Within an AutoHotKey routine I'm using MSXML6 to parse an XML document.
doc := ComObjCreate("MSXML2.DOMDocument.6.0")
doc.setProperty("SelectionLanguage", "XPath")
doc.async := false
doc.loadXML(xmldata)
doc.selectNodes("osm/way|rel[tag[@k='railway'][@v='station']]").length
In the SelectNodes
line I wish to filter the results to only two nodes: way|rel
It doesn't throw an error but ignores rel
returning only way
nodes.
This syntax works when using it in Saxon. Is there a solution to this in MSXML, or is there an alternative parser I could implement?