Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method returns the Boolean value of a feature.

Syntax

HRESULT getFeature(
  const wchar_t* 
pwchName,
  VARIANT_BOOL* 
pvfValue
);

Parameters

pwchName

[in] Pointer to the feature name (zero-terminated Unicode string).

pvfValue

[out, retval] Pointer to the value of the feature (True or False).

Return Value

The following table lists the return values for the getFeaturemethod.

Feature Returns

namespaces namespace-prefixes

S_OK: Last successful putFeatureargument.

external-general-entities external-parameter-entities

S_OK: Last successful putFeatureargument.

"normalize-line-breaks"

S_OK: Last successful putFeatureargument.

"server-http-request"

S_OK: Last successful putFeatureargument.

validation string-interning

S_OK: False

Other features

E_INVALIDARG

Remarks

The feature name is any fully qualified Uniform Resource Identifier (URI). However, at this time, the ISAXXMLReaderinterface recognizes only the following features and their settings:

  • "http://xml.org/sax/features/namespaces"

    • True

      (Default) Perform name space processing.

    • False

      This value has no effect and returns E_FAIL.

    • Access

      Read-only for parsing; read/write when not parsing.

  • "http://xml.org/sax/features/namespace-prefixes"

    • True

      Report the original prefixed names and attributes used for namespace declarations in the QNames (qualified names) field.

    • False

      Do not report attributes used for namespace declarations and, optionally, do not report original prefixed names.

    • Access

      Read-only for parsing; read/write when not parsing.

  • "http://xml.org/sax/features/external-general-entities"

    • True

      Include all external general (text) entities.

    • False

      (Default) Do not include external general entities.

    • Access

      Read-only for parsing; read/write when not parsing.

  • "http://xml.org/sax/features/external-parameter-entities"

    • True 

      Include all external parameter entities, including the external document type definition (DTD) subset.

    • False

      (Default) Do not include any external parameter entities, including the external DTD subset.

    • Access

      Read-only for parsing; read/write when not parsing.

  • "normalize-line-breaks"

    • True

      (Default) Normalize CR-LF sequence into single LF per XML 1.0 specifications.

    • False

      Keep CR-LF intact, as usual in COM programming.

    • Access

      Read-only for parsing; read/write when not parsing.

  • "server-http-request"

    • True

      Use the server-safe ServerXMLHTTPobject for the parseURLmethod.

    • False

      (Default) Use the WinInet component to get data through HTTP for parseURL.

    • Access

      Read-only for parsing; read/write when not parsing.

The values for the namespacesand namespace-prefixesfeatures may be available only in a specific context, such as before, during, or after a parse.

The reader recognizes the "http://xml.org/sax/features/string-interning"and "http://xml.org/sax/features/validation"features. However, you cannot set these features in the current SAX2 implementation.

The behavior of the reader depends on the values of the namespacesand namespace-prefixes, as shown in the following table.

If namespacesis... and namespace-prefixesis... True True True False False True False False

Reports name space names

Yes

Yes

Yes*

Illegal

Reports startPrefixMappingand endPrefixMappingevents

Yes

Yes

Yes

Illegal

Reports QNames

Yes*

Yes

Yes

Illegal

Reports xmlns attributes

No

Yes

Yes

Illegal

The SAX2 specifications state the implementation must report QNames when the namespaceor namespace-prefixesfeature is set to False. The namespaceand namespace-prefixesfeatures cannot both be set to False.

Requirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also