[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: recursive nesting

  • To: xml-dev@l..., Jack Sparrow <virtualspy3@g...>
  • Subject: RE: recursive nesting
  • From: Jack Lindsey <Jack@L...>
  • Date: Tue, 06 Dec 2005 23:41:12 -0500
  • User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

xml recursive
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.