Search code examples
xmlxsddtd

How is the XML document validated against an XSD or DTD document?


I am trying to grasp the principle of XML validation. There is a point I didn't get yet : what is the process which is responsible of actually validating the XML document against its specified XSD (or DTD) definition ?

I would like to know whether this is by default provided with the OS, or it is done by the editor we use (such as Oxygen IDE)? Thanks for your helpful clarifications.


Solution

  • I would like to know whether

    this is by default provided with the OS,

    No.

    or it is done by the editor we use (such as Oxygen IDE)?

    Also no.

    It is done by a validating XML processor.
    (Which can, of course, be integrated in an IDE like Oxygen).
    One validating XML/XSLT processor is the commercial edition of Saxon: SAXON EE:

    The commercial Enterprise Edition from Saxonica, supporting XSLT 3.0, XPath 2.0 and 3.1, XQuery 3.1, XML Schema 1.0 and 1.1, and XQuery Update 1.0.

    Another possibility is using Xerces, an Open Source validating parser described in this SO answer