user5260816
user5260816

Reputation:

Is VBScript fulfills XPath completely?

I'm new to VBScript in dealing with XML files. I noticed that there are some vbscript commands to select certain nodes like .ChildNodes, .documentElement, .lastChild and stuff like that.

However, I can reach to any node using XPath along with selectNodes, or selectSingleNode. So is the XPath not fully compatible with vbscript and so I have to use some vbscript commands to reach specific node/nodes?

Upvotes: 2

Views: 210

Answers (1)

AhmedWas
AhmedWas

Reputation: 1277

  • In older versions of xml objects, you need to specify the selecetion langauge as XPath as in xmlDoc.setProperty "SelectionLanguage", "XPath"
  • Starting from MSXML4, XPath is the default selection language.
  • In MSXML2, which is common among people working with UFT, it follows the XPath language "with minor exceptions".

That's almost from When does XPath property have to be set to XML DOM object?

Upvotes: 2

Related Questions