MXValidator CoClass

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SAX2 Reference

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 feature.
putFeature
Configures a feature.

Supported Features and Properties

The MXValidator CoClass supports the following feature:

  • "exhaustive-errors"

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

[C/C++]

Header and LIB files: msxml2.h, msxml2.lib

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

Example

See the putProperty Method for an example of using MXValidator.

See Also

ISAXXMLReader Interface