Connecting Tech Pros Worldwide Forums | Help | Site Map

XML XSD question

mavis
Guest
 
Posts: n/a
#1: May 26 '06
XML XSD question

How to define a set of elements that could be in any order and can
occur more than once??

Thanks a lot!


Boris Kolpackov
Guest
 
Posts: n/a
#2: May 26 '06

re: XML XSD question


"mavis" <donghuad@gmail.com> writes:
[color=blue]
> How to define a set of elements that could be in any order and can
> occur more than once??[/color]

You would use an unbounded choice of optional elements:

<choice maxOccurs="unbounded">
<element name="a" ... />
<element name="b" ... />
<element name="c" ... />
</choice>


I would, however, not recommend using it since it complicates processing
of your documents.

hth,
-boris


--
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding
mavis
Guest
 
Posts: n/a
#3: May 26 '06

re: XML XSD question


Thanks!!

mavis
Guest
 
Posts: n/a
#4: May 31 '06

re: XML XSD question


Do you think it will influence the processing performance??
Thanks a lot!

Mavis

Boris Kolpackov wrote:[color=blue]
> "mavis" <donghuad@gmail.com> writes:
>[color=green]
> > How to define a set of elements that could be in any order and can
> > occur more than once??[/color]
>
> You would use an unbounded choice of optional elements:
>
> <choice maxOccurs="unbounded">
> <element name="a" ... />
> <element name="b" ... />
> <element name="c" ... />
> </choice>
>
>
> I would, however, not recommend using it since it complicates processing
> of your documents.
>
> hth,
> -boris
>
>
> --
> Boris Kolpackov
> Code Synthesis Tools CC
> http://www.codesynthesis.com
> Open-Source, Cross-Platform C++ XML Data Binding[/color]

Closed Thread