Validating xml sax parser

Validates the XML string/file against the specified XSD string/file.

XSD files are "XML Schemas" that describe the structure of a XML document.

Schemas describe the vocabulary: the names of elements, the attributes, and their datatypes (such as integer, string, and date).

The procedure is very similar to that of a SAX parser, the only difference being that you set attributes on the factory object instead of properties on the parser object.Add Attribute( " Language", " Attribute( " Source", Schema Url);, using the JAXP parser.For an XML document to be based on an XML schema, the XML document is required to be validated with the schema.The validation cannot be robust if it depends on the content of the document, such as JAXP uses URIs as identifiers for properties and attributes, which is consistent with the use of URIs as namespace identifiers.Unfortunately, this use of URIs may be slightly confusing.

Leave a Reply