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.
by Deepak Vohra 09/15/2004 An XML schema defines the structure of the elements and attributes in an XML document.
You have to parse an XML document and add an Error Handler to discover whether the XML is valid or invalid.
But the example Java program can still run using JDK 1.6 and Xerces2 2.9.1 Xerces-J package can also be loaded by the SAXParser Instance() method.
Here is my SAXValidator.java: /** * * Copyright (c) 2002 by Dr.
XML Schema (XSD) Validation using SAXParser This section describes a tutorial example on how to the Xerces2 SAXParser class to validate an XML document assigned with an XSD file.
Note that tutorial examples given in this section were taken in 2002 using JDK 1.4 and Xerces-J 2.3.