|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: recursive nesting
Aye, tis valid, Cap'n.
But since you say "recursive", I presume there is only one kind of
<item>, no matter how deeply nested they are. If that is correct, then
your <item> element can have "mixed content", i.e. it can have its own
content, e.g. How are you, and it can have subelements, i.e. more
instances of <item>. Therefore if you validate your xml against a W3C
XML Schema, it would be equally valid to say:
<item>How are you
<item>I am fine
<item>what is
<item>what is your profession?</item>
your name?
</item>
</item>
What the?
</item>
This might be OK in document-oriented XML, if your items were
subparagraphs or bullet items, etc. But in data-oriented XML, like a
form or database record update, some shops strictly forbid this because
it is oviously not going to be valid for field-by-field structured data.
But others think of it as more of a guideline ;-)
Cheers
Jack Lindsey
Jack Sparrow wrote:
Hi all,
I would like to know if its valid to do recursive nesting( like the
pattern shown below) in XML.
<item>
<item>How are you</item
<item>I am fine</item>
<item>
<item>
<item>
<item>what is your name?</item>
<item>what is your profession?</item>
</item>
</item>
Please let me know.
Thanks,
Jack
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








