Entering content frame

Background documentation XML Schema Validator Locate the document in its SAP Library structure

XML Schema is a language defining the structure of an XML file. It is expected that soon it will completely replace the previous DTD language, because of its much greater expressive capabilities.

In order to use our implementation of XML Schema Validation, you have to do one of the following:

·         Enter in the command line - java com.sap.engine.lib.schema.validator.CommandLine. (initially a classpath to the sapxmltoolkit.jar has to be specified).

·         Use:
DocumentBuilderFactory.setAttribute(“http://www.inqmy.com/schema”, “myschema.xsd”);

·         For example:
import com.sap.engine.lib.schema.validator.SchemaValidator;
boolean result =
new SchemaValidator().validate(nodeXML, nodeXSD);
where nodeXML and nodeXSD are the DOM trees of the XML instance and the schema respectively .

For more in formation about the XML Schema Validation refer to Using XML Schema with SAX

 

Leaving content frame