I am trying to Select nodes from some webservice response XML to no avail. For some reason I am able to select the root node (\"xmldata\") however, when I try to drill deeper(\"
Ok, so I finally worked out what I was doing wrong. As the xml I was retrieving was from a webservice, and I had limited information about it, I used the following to write the xml to the page so that I could see how it was structured.
Response.Write oXMLHttp.ResponseXml.xml
For some reason(maybe someone could fill this part in) it wrote all the XML tags in lower case. It turns out that after some investigation and after doing the following I found out that this was not the truth!
dim nodeList
Set nodeList = xmlDoc.SelectNodes("//xmldata/")
for each item In nodeList
response.write(item.text & " -> Tag Name: " & item.nodeName & "
")
Next
'this wrote the following to the page
'22506 -> Tag Name: CustomerID
'Jim -> Tag Name: FirstName
'N -> Tag Name: IsSuperAdmin
'Jones 2 -> Tag Name: LastName
As you can see the 'nodeName' property output shows the tags to be camel case. So that ResponseXML was rather misleading and seeing XPath is case sensitive was preventing me from selecting the Nodes in question.