getFeature Method

 

Returns the Boolean value of a SAX reader feature.

The Boolean value indicates if a feature is enabled or disabled. For example, setting the "http://xml.org/sax/features/namespaces" feature to True enables namespace processing during parsing.

Visual Basic Usage Syntax

strFeature = oSAXXMLReader.getFeature
(strName)  

Parameters

strName
The name of the current feature.

The feature name is any fully-qualified Uniform Resource Identifier (URI). The values for the namespaces and namespace-prefixes features may be available only in a specific context, such as before, during, or after a parse.

Return Values

For any currently implemented feature of the SAX reader, returns the value of the feature. If a feature is named which is not currently implemented by the SAX reader, returns a trappable error.

C/C++ Syntax

HRESULT getFeature(  
   [in] const wchar_t * pwchName,  
   [out, retval] VARIANT_BOOL * pvfValue);  

Parameters

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

pvfValue[out, retval]
The value of the feature (True or False).

Return Values

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

Feature Returns
exhaustive-errors

 external-general-entities

 external-parameter-entities

 namespaces

 namespace-prefixes

 parameter-entities

 preserve-system-identifiers

 prohibit-dtd

 server-http-request

 suppress-validation-fatalError

 use-inline-schema

 use-schema-location
S_OK — Last successful putFeature argument.
schema-validation S_OK — False
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

putFeature Method