Valid XML
When an XML document conforms to all the rules established in the DTD, it is said to be valid , meaning that all the elements are used correctly.
Tip
A well-formed document is not necessarily valid, but if a document proves to be valid, it follows that it is also well-formed.
When your document uses a DTD, you can check it for mistakes using a validating parser. The parser checks the document against the DTD for contextual errors, such as missing elements or improper order of elements. Some common parsers are Xerces from the Apache XML Project (available at http://xml.apache.org) and Microsoft MSXML (http://msdn.microsoft.com/xml/default.asp). A full list of validating parsers is provided by Web Developer’s Virtual Library at http://wdvl.com/Software/XML/parsers.html.
As an alternative to downloading your own parser, you can use a free online parsing service. Just enter the locations of your documents at these sites:
The Brown University Scholarly Technology Group’s XML Validation Form at www.stg.brown.edu/service/xmlvalid/
W3Schools XML Validator (based on MSXML) at http://www.w3schools.com/dom/dom_validate.asp
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access