homepage Welcome to WebmasterWorld Guest from 54.226.43.155
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
xml parsing with asp
cybotron




msg:4080605
 4:55 pm on Feb 15, 2010 (gmt 0)

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.

Also how do I know which nodes to select from the 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://www.example.com/request.php?auth=FFFFFFFFFFFFFFFFFFFF&type=query&..."

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

[edited by: httpwebwitch at 4:49 pm (utc) on Feb 17, 2010]
[edit reason] examplified an API URL [/edit]

 

httpwebwitch




msg:4082347
 4:48 pm on Feb 17, 2010 (gmt 0)

seems to me that Products is undefined in your "for" loop

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved