Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

well-formed and valid XML difference

 
Rr Kumaran
Ranch Hand
Posts: 548
  • 0
  • 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
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic