ISAXXMLReader::putProperty Method
A version of this page is also available for
4/8/2010
This method sets the value of a property. The property name is any qualified Uniform Resource Identifier (URI).
Syntax
HRESULT putProperty(
const wchar_t* pwchName,
VARIANT* varValue
);
Parameters
- pwchName
[in] Pointer to the property's name (zero-terminated Unicode string).
- varValue
[in] Corresponding data type of the property.
Return Value
The following table lists the return values for the putProperty method.
Property | Returns |
---|---|
|
S_OK: Not parsing. E_FAIL: Parsing. |
|
E_FAIL |
|
E_FAIL |
Other properties |
E_INVALIDARG |
Remarks
Although a core set of properties is defined, a reader is not required to recognize any specific property names. Some property values may be available only in a specific context, such as before, during, or after a parse.
The ISAXXMLReader interface recognizes the following properties:
"https://xml.org/sax/properties/lexical-handler"
This is an optional extension handler for lexical events like comments with the following settings:- Data type
ISAXXMLLexicalHandler. - Access
Read/write.
- Data type
"https://xml.org/sax/properties/declaration-handler"
This is an optional extension handler for declaration events with the following settings:- Data type
ISAXXMLDeclHandler. - Access
Read/write.
- Data type
"xmldecl-encoding"
Encoding declared in the XML header of the currently parsed document. This data is unavailable until the reader parses the XML header. This property has the following settings:- Data type
BSTR*. - Default
Empty if there is no XML declaration or if a property is not found. - Access
Read for parsing; none when non-parsing.
- Data type
"xmldecl-version"
Version declared in the XML header of currently parsed document. This data is unavailable until the reader parses the XML header. This property has the following settings:- Data type
BSTR*. - Default
Empty if there is no XML declaration. - Access
Read for parsing; none when non-parsing.
- Data type
"xmldecl-standalone"
Declared in the XML header of currently parsed document. This data is unavailable until the reader parses the XML header. This property has the following settings:- Data type
BSTR* ("yes" or "no"). - Default
Empty if there is no XML declaration or if a property was not found. - Access
Read for parsing; none when non-parsing.
- Data type
The "xmldecl-encoding"
, "xmldecl-version"
, and "xmldecl-standalone"
properties provide information about the presence and content of the XML header. However, XML header information was designed for low-level reader and parser use, not for applications.
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 |