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

SelectionLanguage Property

Used in MSXML 3.0 to specify whether the DOM object should use XPath language ("XPath") or the old XSLPattern language (default) as the query language.

[JScript]

JScript Syntax

domObj.setProperty(strProp, strVal);
strVal= domObj.getProperty(strProp);
[Visual Basic]

Visual Basic Syntax

domObj.setProperty(strProp, strVal)
strVal= domObj.getProperty(strProp)
[C/C++]

C/C++ Syntax

HRESULT setProperty(BSTR strProp, VARIANT strVal);
HRESULT getProperty(BSTR strProp, VARIANT* strVal);

Value

strProp
A BSTR string whose value is "SelectionLanguage".
strVal
A VARIANT string of "XPath".

Remarks

In MSXML 3.0 you can set this property to "XPath" to switch the query language from XSLPattern to XPath. Once the property is set, there is no way to switch back without creating an instance of a new DOM object.

MSXML 4.0 and later supports XPath as the only query language. This property is always set to "XPath" in MSXML 4.0 and later. You can ignore this property completely.

Example

xmldoc.setProperty("SelectionLanguage", "XPath"); // JScript
xmldoc.setProperty "SelectionLanguage", "XPath"   ‘ VBScript

Applies To

Component: MSXML 3.0 and later

Interface: IXMLDOMDocument2

Method: setProperty | getProperty