putFeature Method
Enables or disables a feature.
The MXValidator CoClass supports the following features:
"exhaustive-errors""use-inline-schema""use-schema-location"
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
getFeaturemethod of theMXValidatorwill not return FALSE. This feature cannot be disabled. IfputFeatureis called withvarValueset 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:schemaLocationandxsi:noNamespaceSchemaLocationattributes to load and use schemas.False — (default) Treat any schema location attributes as generic attributes.
Access — (parsing) Read-only; (not parsing) Read/write.
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-errorsS_OK — The fValueparameter is TRUE (not parsing).E_FAIL — The
fValueparameter is FALSE (parsing).use-inline-schemause-schema-locationS_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
getFeaturemethod of theMXValidatorwill not return FALSE. This feature cannot be disabled. IfputFeatureis called withfValueset 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:schemaLocationandxsi:noNamespaceSchemaLocationattributes 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
in the upper-left corner of the page.
See Also
Applies to: MXValidator CoClass
