Share via


ISAXXMLReader::getFeature Method

A version of this page is also available for

Windows Embedded CE 6.0 R3

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 getFeature method.

Feature Returns

namespaces namespace-prefixes

S_OK: Last successful putFeature argument.

external-general-entities external-parameter-entities

S_OK: Last successful putFeature argument.

"normalize-line-breaks"

S_OK: Last successful putFeature argument.

"server-http-request"

S_OK: Last successful putFeature argument.

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 ISAXXMLReader interface recognizes only the following features and their settings:

  • "https://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.
  • "https://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.
  • "https://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.
  • "https://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 ServerXMLHTTP object for the parseURL method.
    • 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 namespaces and namespace-prefixes features may be available only in a specific context, such as before, during, or after a parse.

The reader recognizes the "https://xml.org/sax/features/string-interning" and "https://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 namespaces and namespace-prefixes, as shown in the following table.

If namespaces is... and namespace-prefixes is... True True True False False True False False

Reports name space names

Yes

Yes

Yes*

Illegal

Reports startPrefixMapping and endPrefixMapping events

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 namespace or namespace-prefixes feature is set to False. The namespace and namespace-prefixes features 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

Reference

ISAXXMLReader::putFeature Method
ISAXXMLReader