A schema question

L

Lin Shen

Hi,

I want to write a schema to describe the following xml:

<A>
<B/>
<C/>
<D/>
</A>

where,

1) <B>, <C> and <D> can be listed in any order
2) <B> is optional and can occur at most once.
3) <C> is required and must occur exactly once.
4) <D> is required and can occur more than once.

thanks
lin
 
A

Abhinav

Lin said:
Hi,

I want to write a schema to describe the following xml:

<A>
<B/>
<C/>
<D/>
</A>

where,

1) <B>, <C> and <D> can be listed in any order

use the all construct
2) <B> is optional and can occur at most once.
minOccurs="0"

3) <C> is required and must occur exactly once.
4) <D> is required and can occur more than once.

maxOccurs="unbounded"

Check out http://w3schools.org for a gentle but useful intro to schemas.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top