Click to See Complete Forum and Search --> : Parsing XML with ASP


cybotron
02-14-2010, 06:30 PM
Hi Guys,

I am trying to parse xml with asp and display the results but i am having some trouble. I dont know whether i am doing this in the right way as I am fairly new to xml.

The error i get is:

Microsoft VBScript runtime (0x800A01A8)
Object required


The code I am using is:

########################################

<%
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
Set objLst = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = false
objXML.setProperty "ServerHTTPRequest", true

string_url = "http://data.co.uk/uimfm/request.php?auth=D85665C80047D79B06B488285060DF7D@ED720542A93D6D0E6BCB920F5820471F&type=query&s=laptops&cid=&pll=&plh=&srt=pa&pge=10&pgn=&modules=2@product-results||2@"

objXML.Load (string_url)


Set objLst = objXML.getElementsByTagName("LISTING")
intNoOfElements = objLst.length


%>

<HTML><BODY>
<H1>Shopping</H1>

<%
For i = 0 To (Products)

Set objHdl = objLst.item(i)

Response.Write("" & objHdl.childNodes(1).text & "")


Next
%>

</BODY></HTML>

################################


Thanks in advance.

Cybotron