This article shows five ways of how to configure different Java APIs (including DOM, SAX, dom4j and XOM) using JAXP 1.3 for checking and validating XML with DTD and Schema(s).
To report errors, it is necessary to provide an Error Handler to the underlying implementation.
Configure Java APIs (SAX, DOM, dom4j, XOM) using JAXP 1.3 to validate XML Documents with DTD and Schema(s).
Many Java XML APIs provide mechanisms to validate XML documents, the JAXP API can be used for most of these XML APIs but subtle configuration differences exists.
XML XSD Schema is an XML-oriented representation of the structure of an XML document.
XML XSD Schema has the power of possibility to provide the standard structure for XML attributes and elements, through its support for namespaces and datatypes.
Besides, if you want to get more information, you could refer to the following links.
You can click on the links in the error message to jump to the node in the XML document where the error was found.This article explains the procedure for performing that validation using Before validating an XML document, you must specify the location of the XML XSD Schema.By using XMLFox Advance you can validate XML document for both cases, when your XML document contains an in-line XSD schema and for an outside XSD file as well. First one displays an XML with in-line XSD and the second shows two separate XML and XSD files.You can specify that a document be automatically validated when a file is opened or saved ( command.If a document is valid, a successful validation message is displayed in the Messages window.