Forum Moderators: open

Message Too Old, No Replies

parsing xml with asp

not getting desired results

         

macrost

9:43 pm on Jul 2, 2004 (gmt 0)

10+ Year Member



I am trying to pull out some nodes from an xml string, and I am getting no error either which is odd.

Set xml = Server.CreateObject("MSXML2.FreeThreadedDomDocument.3.0")
xml.async = False
xml.loadXml(xmlhttp.responseText)

Set root = xml.documentElement
Set hotelname = root.selectNodes("NexRes")
For Each name In hotelname
clientid = name.selectSingleNode("response/customer/clientId").text
totalrate = name.selectSingleNode("response/rateInfo/totalRate").text
hotelid = name.selectSingleNode("request/hotelID").text
confid = name.selectSingleNode("response/confirmationNumber").text
Next
response.write(clientid & totalrate & hotelid & confid)


The only one that is coming through is the hotelid.
Here's the basic format of the xml:

<NexRes product="Hotel">
<response status="success" type="BookReservation" timestamp="07/02/2004 15:51:14">
<customer>
<clientID></clientID>
</customer>
<rateInfo>
<totalRate></totalRate>
</rateInfo>
<confirmationNumber></confirmationNumber>
</response>
<request></reqeust>
</NexRes>

macrost

4:47 am on Jul 19, 2004 (gmt 0)

10+ Year Member



shameless bump

Xoc

4:18 pm on Aug 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm looking this over and don't see obvious flaws. Did you figure it out?