Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML and XSD

Status
Not open for further replies.

crazyfishpants

Programmer
Mar 30, 2004
18
US
I would like to have an XML file conform to an XSD file however I am faced with a small problem. How can I enforce existence of a certain element but at the same time not enforce the order of elements. Using all, choice, or sequence does not allow me to do this. For example... assume the pseudo XSD

<all/choice/sequence>
<element: e1 occurs: 0-1 times>
<element: e2 occurs: 1-3 times>
<element: e3 occurs: 1 time>
<all/choice/sequence>

What if I don't care about the order but I do want to be able to have all the elements? How can this be done? It doesn't appear so with the use of all, choice, or sequence? Please help!
 
Or does anyone possibly know how to script moving XML elements within a node so that they are in a specific order?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top