Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

getProperty Method (IXMLDOMDocument2)

Retrieves the value of one of the second-level properties that are set either by default or using the setProperty method.

[Script]

Script Syntax

strPropValue = objXMLDOMDocument2.getProperty(name);

Parameters

name
The string name of the property. This name is case-sensitive.

Example

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.5.0");
xmlDoc.setProperty("SelectionLanguage", "XPath");
alert(xmlDoc.getProperty("SelectionLanguage"));
[Visual Basic]

Visual Basic Syntax

strPropValue = objXMLDOMDocument2.getProperty(name)

Parameters

name
The string name of the property. This name is case-sensitive.

Example

Dim xmlDoc As New Msxml2.DOMDocument50
xmlDoc.setProperty "SelectionLanguage", "XPath"
MsgBox xmlDoc.getProperty("SelectionLanguage")
[C/C++]

C/C++ Syntax

HRESULT getProperty(BSTR name, VARIANT* value);

Parameters

name [in]
The string name of the property. This name is case-sensitive.
value [out, retval]
The variant return value of the requested flag.

C/C++ Return Values

S_OK
The value returned if successful.
E_FAIL
The value returned if property name is invalid.

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

Second-level properties | setProperty Method

Applies to: IXMLDOMDocument2