Variable sequence of element tags in a XML document.

Discussion in 'XML' started by debicool_98@yahoo.com, Oct 28, 2004.

  1. Guest

    I'm working on an XML document we want to process into our backend
    system.
    The author of the definition (Schema) wants to allow variable sequence
    of different element tags (blocks) in a specific part of that document.


    Example:
    This is the general structure of that XML document.
    You can see different Loan Types as part of the student block
    <School>
    <Student>
    <LoanInformation>
    <LoanTypeA>
    <LoanTypeB>
    <LoanTypeC>
    </Student>
    </School>

    The author wants to allow that the LoanTypes could come in in any
    sequence like

    <School>
    <Student>
    <LoanInformation>
    <LoanTypeC>
    <LoanTypeA>
    <LoanTypeB>
    </Student>
    </School>

    or

    <School>
    <Student>
    <LoanInformation>
    <LoanTypeB>
    <LoanTypeA>
    <LoanTypeC>
    </Student>
    </School>

    etc.

    the LoanTypes are also Looping elements so multiple entries of those
    could occure like

    <School>
    <Student>
    <LoanInformation>
    <LoanTypeB>
    <LoanTypeA>
    <LoanTypeB>
    <LoanTypeB>
    <LoanTypeC>
    <LoanTypeA>
    </Student>
    </School>

    Are there any rules (documented) which either allow this or do not
    allow this in any XML document.
    Any Information are highly appreciated.
    , Oct 28, 2004
    #1
    1. Advertising

  2. wrote:

    > I'm working on an XML document we want to process into our backend
    > system.
    > The author of the definition (Schema) wants to allow variable sequence
    > of different element tags (blocks) in a specific part of that document.
    >
    >
    > Example:
    > This is the general structure of that XML document.
    > You can see different Loan Types as part of the student block
    > <School>
    > <Student>
    > <LoanInformation>
    > <LoanTypeA>
    > <LoanTypeB>
    > <LoanTypeC>
    > </Student>
    > </School>
    >
    > The author wants to allow that the LoanTypes could come in in any
    > sequence like
    >
    > <School>
    > <Student>
    > <LoanInformation>
    > <LoanTypeC>
    > <LoanTypeA>
    > <LoanTypeB>
    > </Student>
    > </School>
    >
    > or
    >
    > <School>
    > <Student>
    > <LoanInformation>
    > <LoanTypeB>
    > <LoanTypeA>
    > <LoanTypeC>
    > </Student>
    > </School>
    >
    > etc.
    >
    > the LoanTypes are also Looping elements so multiple entries of those
    > could occure like
    >
    > <School>
    > <Student>
    > <LoanInformation>
    > <LoanTypeB>
    > <LoanTypeA>
    > <LoanTypeB>
    > <LoanTypeB>
    > <LoanTypeC>
    > <LoanTypeA>
    > </Student>
    > </School>
    >
    > Are there any rules (documented) which either allow this or do not
    > allow this in any XML document.


    You need to make sure those tags are closed properly e.g.
    <LoanTypeB />
    but besides that the XML specification allows what you have.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Oct 28, 2004
    #2
    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. GhislainTanguay
    Replies:
    3
    Views:
    6,300
    Joe Reazor
    May 21, 2004
  2. Tony Prichard
    Replies:
    0
    Views:
    715
    Tony Prichard
    Dec 12, 2003
  3. Manish Hatwalne
    Replies:
    1
    Views:
    392
    Martin Honnen
    Jul 13, 2004
  4. Replies:
    0
    Views:
    332
  5. HANM
    Replies:
    2
    Views:
    695
    Joseph Kesselman
    Jan 29, 2008
Loading...

Share This Page