MXValidator CoClass
The MXValidator CoClass is a SAX XML filter that validates an XML stream. The MXValidator is inserted between the XML source and the XML consumer to validate the contents of the stream. The MXValidator validates the series of events generated by the ISAXContentHandler, and generates a new stream that includes all those events, plus some additional validation-related events. Input events are not buffered. Each input event generates at least one output event.
Controlling Validator Behavior
You can use the following methods to observe and control the behavior of the validator:
- getFeature
- Gets the current state of a validator feature.
- putFeature
- Enables and disables validator features.
Supported Features and Properties
The MXValidator CoClass supports the following features:
"exhaustive-errors""use-inline-schema""use-schema-location"
The MXValidator CoClass implements the following properties:
"schemas""schema-declaration-handler"
Methods
| getFeature | Returns a Boolean value that indicates whether a feature is enabled or disabled. |
| getProperty | Returns the current value of a property. |
| putFeature | Enables or disables a feature. |
| putProperty | Sets the value of a property. |
Properties
| contentHandler | The current content handler. |
| dtdHandler | The current DTD Handler. |
| entityResolver | The current entity resolver. |
| errorHandler | The current error handler. |
Versioning
MSXML 5.0 and later
Requirements
Implementation: msxml5.dll
Header and LIB files: msxml2.h, msxml2.lib
To view reference information for Visual Basic or C/C++ only, click the Language Filter button
in the upper-left corner of the page.
Example
See the putProperty Method for an example of using MXValidator.
