Share via


getProperty Method1

 

In Visual Basic, returns the value (as a string) of a SAX reader property, as specified by its qualified Uniform Resource Identifier (URI).

In C++, returns the value of a property. The property name is any qualified Uniform Resource Identifier (URI).

Visual Basic Usage Syntax

varValue = oSAXXMLReader.getProperty
(strName)  

Parameters

varValue
The corresponding data type of the property.

Return Values

The following table shows the return values for the getProperty method.

Property Returns
declaration-handler

 lexical-handlermax-xml-size

 schemas

 schema-declaration-handler
Current value
charsetdom-node

 xmldecl-encoding

 xmldecl-version

 xmldecl-standalone
Either the current value (when parsing) or a trappable error (when not parsing).
Other properties Trappable error.

C/C++ Syntax

HRESULT getProperty(  
   [in] const wchar_t * pwchName,  
   [out, retval] VARIANT * pvarValue);  

Parameters

pwchName[in]
The property's name (zero-terminated Unicode string).

pvarValue[out, retval]
The corresponding data type for the property.

Return Values

The following table lists the return values for the getProperty method.

Property Returns
declaration-handler

 lexical-handlermax-xml-size

 schemas

 schema-declaration-handler
S_OK — The current value is returned.
charsetdom-node

 xmldecl-encoding

 xmldecl-version

 xmldecl-standalone
S_OK — The current value is returned.

E_FAIL — Not parsing.
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.

For more information about specific properties, see SAX Reader Properties.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXXMLReader Interface

See Also

putProperty Method