Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

well-formed and valid XML difference  RSS feed

 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

What is the difference between well-formed and valid XML ?

Thanks & Regards,
Kumar.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well-formedness means that your XML structure is correct, you're not using illegal characters, etc. For example, the following document is not well-formed because the elements are not contained properly:

The validity of an XML document, however, is about the XML document complying with a given DTD or XML Schema document which describes what kind of tags are allowed, in what order, how many of them, what other elements can they contain, etc.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!