[thelist] xmlhttp

Tab Alleman Tab.Alleman at RealMetros.com
Wed Aug 1 14:37:10 CDT 2001


Ok, I'm scratching a little past the XML surface.. what we want to try
to do is use the built-in MSXML parser to extract data from an XML file
and display it on an ASP page.  So ok, I've scrapped the xmlhttp object,
and switched to an XML DOMDocument object which is working fine.  But as
I'm attempting to access attributes, I'm getting a sneaky suspicion that
this parser is 1) not going to work with my beloved VBScript, and 2)
only works with IE 5+.  Is this correct?  Am I going to have to learn
JSP, or is there a better ASP/VBScript solution that isn't
browser-dependent?  

Here's what I've got now:

<!-- 

'Use XML to get Hotel Info!
Dim xmlHotInfo, GetStr
GetStr =
"http://www.travelnow.com/external/xmlinterface.jsp?cid=3464&resType=hot
el&xml=<HotelSessionRequest%20method='selectHotelInfoForHotel'><hotelID>
" & HotelID & "</hotelID></HotelSessionRequest>"

Set xmlHotInfo = CreateObject("msxml2.DOMDocument.4.0")
xmlHotInfo.async = false
xmlHotInfo.load GetStr

Dim HotelInfo
Set HotelInfo = xmlHotInfo.SelectSingleNode("HotelInfo")

Dim HotelName
HotelName = HotelInfo.getAttribute("hotelName")

-->

But at the end HotelName is empty when it shouldn't be.  Am I doing
something wrong again, or will this object not work in VBScript?





More information about the thelist mailing list