Menu

#1 Proper XPath execution

open
nobody
None
5
2006-08-13
2006-08-13
Andy
No

I had a problem using more complex xPath queries with
this script e.g using the ancestor axis, so I had a
look on the net, and found this:
http://www.15seconds.com/Issue/010409.htm

It says about half way through that MSXML defaults to
XSL pattern matching in selectNodes rather than xPath,
I've fixed my copy by changing the "activateDom"
function as follows:

function activateDom(helper)
{
if (!helper.dom)
{
var dom = new ActiveXObject("Msxml2.DOMDocument");
dom.setProperty("SelectionLanguage", "XPath");
...

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.