putFeature Method

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 - SAX2 Reference

putFeature Method

Enables or disables a feature.

The MXValidator CoClass supports the following features:

  • "exhaustive-errors"
  • "use-inline-schema"
  • "use-schema-location"
[Visual Basic]

Implementation Syntax

Sub putFeature(strName As String, varValue as Variant)

Usage Syntax

oMXValidator.putFeature(strName, varValue)

Remarks

If the putFeature method fails, either because the feature setting could not be changed, or because an invalid feature name was passed to the method, a trappable error is raised.

Settings for the features of the MXValidator are as follows:

"exhaustive-errors"
True — (default) Report all validation errors. This feature is always enabled, and will always return True.

False — The getFeature method of the MXValidator will not return FALSE. This feature cannot be disabled. If putFeature is called with varValue set to False, the setting will not be changed, and a trappable error will be raised.

Access — (parsing) Read-only; (not parsing) Read/write.

"use-inline-schema"
True — (default) Use inline schemas for validation.

False — Do not use inline schemas for validation. Treat any inline schemas as XML instead.

Access — (parsing) Read-only; (not parsing) Read/write.

"use-schema-location"
True — Use the xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes to load and use schemas.

False — (default) Treat any schema location attributes as generic attributes.

Access — (parsing) Read-only; (not parsing) Read/write.

[C/C++]

Syntax

HRESULT putFeature(
   [in] BSTR strName,
   [in] VARIANT_BOOL fValue);

Return Values

The following table indicates the features implemented for the MXValidator.
Feature Returns
exhaustive-errors S_OK — The fValue parameter is TRUE (not parsing).

E_FAIL — The fValue parameter is FALSE (parsing).

use-inline-schema

use-schema-location

S_OK — (Not parsing and legal.)

E_FAIL — (Parsing or illegal.)

Other features E_INVALIDARG

Remarks

Settings for the features of the MXValidator are as follows:

"exhaustive-errors"
True — (default) Report all validation errors. This feature is always enabled, and will always return TRUE.

False — The getFeature method of the MXValidator will not return FALSE. This feature cannot be disabled. If putFeature is called with fValue set to FALSE, the setting will not be changed, and HRESULT will be set to E_FAIL.

Access — (parsing) Read-only; (not parsing) Read/write.

"use-inline-schema"
True — (default) Use inline schemas for validation.

False — Do not use inline schemas for validation. Treat any inline schemas as XML instead.

Access — (parsing) Read-only; (not parsing) Read/write.

"use-schema-location"
True — (default) Use the xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes to load and use schemas.

False — Treat any schema location attributes as generic attributes.

Access — (parsing) Read-only; (not parsing) Read/write.

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.

See Also

getFeature Method

Applies to: MXValidator CoClass