XML XSD question

Discussion in 'XML' started by mavis, May 26, 2006.

  1. mavis

    mavis Guest

    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!
    mavis, May 26, 2006
    #1
    1. Advertising

  2. "mavis" <> writes:

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


    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
    Boris Kolpackov, May 26, 2006
    #2
    1. Advertising

  3. mavis

    mavis Guest

    Thanks!!
    mavis, May 26, 2006
    #3
  4. mavis

    mavis Guest

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

    Mavis

    Boris Kolpackov wrote:
    > "mavis" <> writes:
    >
    > > How to define a set of elements that could be in any order and can
    > > occur more than once??

    >
    > 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, May 31, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,094
    Markus
    Nov 22, 2005
  2. Matt
    Replies:
    3
    Views:
    37,224
    MKNDK
    Sep 11, 2008
  3. stiank81
    Replies:
    4
    Views:
    15,378
    stiank81
    Jun 26, 2005
  4. Rushi
    Replies:
    1
    Views:
    545
  5. Replies:
    0
    Views:
    560
Loading...

Share This Page