Validating xml using sax parser

Posted by / 07-Feb-2015 20:44

The validator will report fatal errors, non-fatal errors and warnings.If the XSD is publicly available using HTTP and referenced through a "schema Location" or "no Namespace Schema Location", then the validator will pick it up and it doesn't need to be specified/uploaded.The key to giving meaning to an XML document -- and the crux of validation -- lies in the set of constraints that governs that document, and in ensuring that those constraints are followed.

Validating a document's constraints, and providing this meaning to one or more XML documents, can be achieved easily by using SAX, the Simple API for XML (see Related topics).Typically, an application validates XML documents against a list of known schemas as part of its error handling.Schemas describe the vocabulary: the names of elements, the attributes, and their datatypes (such as integer, string, and date).For an XML document to be valid based on an XML schema, the XML document has to be validated against the XML schema.This tutorial explains the procedure of validating an XML document with an XML schema.

validating xml using sax parser-68validating xml using sax parser-17validating xml using sax parser-36

The piece of XML to validate is specified in the constructor.

One thought on “validating xml using sax parser”