Friday, 22 October 2010

AWT- Well formed XML document

How to define and measure well-formed XML document?

# A well formed XML document does not need a DTD (Document Type Definition), but is must conform to the XML syntax rules. If all tags in a document are developed with no any errors and follow the XML guidelines, then a document is considered as well formed.

It has to pursue several rules that most other markup languages also follow. These are generic rules that must be followed for a document to be well-formed, as well as valid. The rules are as follows:

  • One Root Element - The XML document may only have one root element. 
  • Proper Nesting - XML elements must be closed in the order they are opened.
  • Well-Formed Entities - Any entities that are referenced in the document must also be well-formed. http://www.tizag.com/xmlTutorial/xmlvalidwellformed.php
  • All the entity must be well-formed if it is externally parsed, it must be well-formed.
  • Parsed entities may not be recursive, meaning that a parsed entity may not refer to itself.
  • Parameter entity references can only be in the DTD, but nowhere else.
  • There is a specified structure for the external subset of a DTD.




No comments:

Post a Comment