Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[xsd-dev] xsd newbie question


I need library that can provide information about xml schema. I found XSD and it looks promising, however I can't figure out even simple tasks.

Suppose that I have schema, like the Purchase Order Schema from the XML Schema Primer. How can I do following?

1) load schema (i.e. create XSDSchema object)?

2) find out all complexType names (answer should be: PurchaseOrderType, USAddress, Items)

3) which elements can be defined in
  a) //purchaseOrder/shipTo
  b) //purchaseOrder/items
answer to 3 should be:
  a) name, street, city, state, zip -- in this order
  b) item -- zero or more times

My most basic problem is that I don't know how to do 1). I think there are examples for 2) and 3), but examples I found so far already expects XSDSchema object ready.

Java code that shows how to do this would be very helpful.

Thank you.

--Peter Stibrany

Back to the top