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.
This property is supported in MSXML 3.0 6.0. The default value is "XSLPattern" for 3.0. The default value is "XPath" for 6.0.
JScript Syntax
domObj.setProperty(strProp, strVal);
strVal= domObj.getProperty(strProp);
Visual Basic Syntax
domObj.setProperty
(strProp, strVal)
strVal= domObj.getProperty
(strProp)
C\C++ Syntax
HRESULT setProperty(BSTR strProp, VARIANT strVal);
HRESULT getProperty(BSTR strProp, VARIANT* strVal);
Parameters
strProp
A BSTR string whose value is "SelectionLanguage".
strVal
A VARIANT string, "XPath
" or "XSLPattern
".
Remarks
In MSXML 3.0 only, the default for this property is "XSLPattern
"; however, 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.
For MSXML 4.0 and later, only a value of "XPath
" is recognized as XPath is the only query language supported and therefore, this property can be ignored.
Example
xmldoc.setProperty("SelectionLanguage", "XPath"); // JScript
xmldoc.setProperty "SelectionLanguage", "XPath" VBScript
Versioning
This property is supported in MSXML 3.0 and 6.0. The default value is "XSLPattern" for 3.0. The default value is "XPath" for 6.0.
Applies to
Interface: IXMLDOMDocument2
Methods setProperty | getProperty