Freigeben über


putFeature Method

 

Sets the value of a SAX reader feature.

These features allow you to control the behavior of the SAX reader. Each feature uses a qualified Uniform Resource Identifier (URI) that identifies it to the reader.

Visual Basic Usage Syntax

oSAXXMLReader.putFeature
(strName, vfValue)  

Parameters

strName
The name of the current feature.

vfValue
A Boolean expression (True/False) specifying whether the feature is on or off.

Return Values

The following table shows the return values for the putFeature method.

Feature Returns
exhaustive-errors

 external-general-entities

 external-parameter-entities

 namespacesnamespace-prefixes

 parameter-entities

 preserve-system-identifiers

 prohibit-dtd

 schema-validation

 server-http-request

 suppress-validation-fatalError

 use-inline-schema

 use-schema-location
If failed, trappable error.
Other features Trappable error

C/C++ Syntax

HRESULT putFeature(  
   [in] const wchar_t * pwchName,  
   [in] VARIANT_BOOL vfValue);  

Parameters

pwchName[in]
The name of the feature (zero-terminated Unicode string).

vfValue[in]
The current state of the feature (True or False).

Return Values

The following table lists the return values for the putFeature method.

Feature Returns
namespaces S_OK (not parsing and legal)

E_FAIL if namespace-prefixes is False. (parsing or illegal)
namespace-prefixes S_OK (not parsing and legal)

E_FAIL if namespaces is False. (parsing or illegal)
external-general-entities

 external-parameter-entities

 parameter-entities

 preserve-system-identifiers

 prohibit-dtd

 suppress-validation-fatalError

 use-inline-schema

 use-schema-location
S_OK (not parsing)

E_FAIL (parsing or illegal)
server-http-request S_OK (not parsing)

E_FAIL (parsing)
exhaustive-errrors

 schema-validation
E_FAIL
Other features E_INVALIDARG

Remarks

For more information on specific features, see SAX Reader Features.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXXMLReader Interface

See Also

getFeature Method