• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about XML Syntax

 
Neetha Kasuganti
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a well-formed XML document, can an element be it's own child?
Ex: Is the following xml-data well-formed?
<element>
<child1>
.....
</child1>
<element>
....
</element>
<child2/>
.....
</element>
Thank You
Neetha
 
Dmitry Kachaev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes
http://www.w3.org/TR/2000/REC-xml-20001006#sec-well-formed
[ May 01, 2002: Message edited by: Dmitry Kachaev ]
[ May 01, 2002: Message edited by: John Wetherbie ]
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dmitry,
I modified your post slightly to add the hyperlink. Thanks for posting the URL to the relevant section of the XML recommendation.
[ May 01, 2002: Message edited by: John Wetherbie ]
 
Neetha Kasuganti
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! guys.
I couldn't find the explanation anywhere in the well-formedness section at the URL you referred . I may not have interpreted it's presence .
I'd appreciate if one of you could give me the exact section number where it is said this nesting is possible.
Thanks again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic