ISAXXMLReader::putFeature Method (Compact 2013)
3/26/2014
This method sets the value of a feature.
Syntax
HRESULT putFeature(
const wchar_t* pwchName,
VARIANT_BOOL* vfValue
);
Parameters
- pwchName
[in] Pointer to the name of the feature (zero-terminated Unicode string).
- vfValue
[in] Current state of the feature (True or False).
Return Value
The following table lists the return values for the putFeature method.
Feature |
Returns |
---|---|
|
S_OK: Not parsing and legal. E_FAIL: If |
|
S_OK: Not parsing and legal. E_FAIL: If |
|
S_OK: Not parsing. E_FAIL: Parsing or illegal. |
|
S_OK |
|
S_OK: Not parsing. E_FAIL: Parsing. |
|
E_FAIL |
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:
"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.
- True
"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.
- True
"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.
- True
"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.
- True
"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.
- True
"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.
- True
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 "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 namespaces
and namespace-prefixes
, as shown in the following table.
If and |
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, |
Library |
uuid.lib |