This may not be a direct AHK problem, but I hope someone can spot the error/solution for me.
I load Stations_New.xml, & manipulate it using selectNodes & selectsinglenode.
I'm trying to use the .xml property to display the results.
msgbox % doc.xml displays the xml file as expected.
msgbox % No_CRS.xml returns an 'Unknown Name' error
msgbox % No_CRS.length returns a number of the expected total number of nodes, proving there's some data in there.
msgbox % SingleNo_CRS.xml returns the first node, as expected.
If .xml isn't a property of selectNodes, how do I store/display it's results?
Code: Select all
FileRead, xmldata, Stations_New.xml
doc := ComObjCreate("MSXML2.DOMDocument.6.0")
doc.setProperty("SelectionLanguage", "XPath")
doc.async := false
doc.loadXML(xmldata)
No_CRS := doc.selectNodes("osm/node[tag[@k='railway'][@v='station']]")
SingleNo_CRS := doc.selectsinglenode("osm/node[tag[@k='railway'][@v='station']]")
msgbox % doc.xml
msgbox % No_CRS.xml
msgbox % No_CRS.length
msgbox % SingleNo_CRS.xml