Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This method returns the value of a property. The property name is any qualified Uniform Resource Identifier (URI).
HRESULT getProperty(const wchar_t* pwchName,VARIANT* pvarValue);
Parameters
- pwchName
[in] Pointer to the property's name (zero-terminated Unicode string). - pvarValue
[out, retval] Pointer to the corresponding data type for the property.
Return Values
The following table lists the return values for the getProperty method.
Property | Returns |
---|---|
lexical-handler declaration-handler |
S_OK — The current value is returned. |
"xmldecl-encoding" "xmldecl-version" "xmldecl-standalone" |
S_OK — The current value is parsed.
E_FAIL — Not parsing. |
dom-node xml-string |
S_OK — An empty value is returned. |
Other properties | E_INVALIDARG — The property is not recognized. |
Remarks
It is possible for a reader to recognize a property name but not be able to return its state. Although a core set of properties is defined, a reader is not required to recognize 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:
"http://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.
"http://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.
"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.
"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.
"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.
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
OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.
Link Library: Uuid.lib.
See Also
putProperty Method | ISAXXMLReader:IUnknown Interface
Send Feedback on this topic to the authors