Returns a property.
strValue = objXMLDOMSelection.getProperty(name);
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.5.0"); var oSelection; xmlDoc.setProperty("SelectionLanguage", "XPath"); xmlDoc.async = false; xmlDoc.load("books.xml"); if (xmlDoc.parseError.errorCode <> 0) { var myErr = xmlDoc.parseError; alert("You have error " + myErr.reason); } else { oSelection = xmlDoc.selectNodes("//book"); alert(oSelection.getProperty("SelectionLanguage")); }
strValue = objXMLDOMSelection.getProperty(name)
Dim xmlDoc As New Msxml2.DOMDocument50 Dim oSelection As IXMLDOMSelection xmlDoc.setProperty "SelectionLanguage", "XPath" xmlDoc.async = False xmlDoc.Load "books.xml" If (xmlDoc.parseError.errorCode <> 0) Then Dim myErr Set myErr = xmlDoc.parseError MsgBox("You have error " & myErr.reason) Else Set oSelection = xmlDoc.selectNodes("//book") MsgBox oSelection.getProperty("SelectionLanguage") End If
HRESULT getProperty(BSTR name, VARIANT* value);
The getProperty
method returns the value for the internal SelectionLanguage
property (flag) that was set by calling the setProperty
method on the document or the default value.
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button in the upper-left corner of the page.
Applies to: IXMLDOMSelection