The XML API is used to create an XML Processor, which is an entity that can be stored in a VTS value. An XML Processor serves as a conduit between an XML document and an application that will do something with the content found in that document.
The XML Processor can be either validating or non-validating, depending on whether it has an optional schema cache as specified in a module designated as a class factory. If it is not created to have a schema cache, it is termed a non-validating processor. If it is created to have a schema cache, it is a validating processor.
A non-validating XML Processor checks the XML supplied to it for being “well-formed”, i.e. that the XML is syntactically correct.
A validating XML Processor goes further by checking that the structure of the supplied XML conforms to the structuring rules specified by the schemas. To do this, the XML Processor’s schema cache must be given all the schemas referenced by the XML, and all the schemas referenced by the added schemas. (Note: the root XML schemas are excepted since these are already built-in to the XML Processor)
A validating XML Processor also creates type definitions for all structures described by the schemas. These type definitions are added to the Class Factory.
When a non-validating XML Processor successfully parses the XML supplied, it generates a type definition and type instance specific to the XML.
When a validating XML Processor successfully parses the XML supplied, it generates a type instance of one or more of the types stored in the Class Factory.
Helper functions allow the Web Service Call code to instantiate a type for population when generating output. Such instances can be fed into the XML Processor’s writer to generate XML that conforms to the given schema.
For further information on XML Schemas, please refer to the following two resources:
http://www.w3.org/2001/XMLSchema
http://www.w3.org/2001/XMLSchema-instance
Topics in this section: