Home > ASP Development > Grabbing xml with classic asp

Grabbing xml with classic asp



i am trying to grab the weather from a website using asp, but i am having a lot of trouble because the server i'm using has a very old version of asp on it.

i was trying to use the site

http://xml.weather.yahoo.com/forecastrss?p=location (where location is your zipcode) - the output being an xml document. Does anyone know how to parse through the xml or basically do a screen scrape to grab the temperature from that? every time i try to create an object to grab the data like:

xml = Server.CreateObject("Microsoft.XMLHTTP")

i get a message that server.createobject failed (b/c my server is so out of date). i have talked with the administrator and i do not believe they will update it. any help would be grately appreciated



greg

    
Guest


have a look at the following link, it is a posting in the code bank on what i think ur looking to do:



http://forums.aspfree.com/code-bank...-url-91854.html

Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by markoc
have a look at the following link, it is a posting in the code bank on what i think ur looking to do:



http://forums.aspfree.com/code-bank-54/read-an-xml-from-an-url-91854.html




Hmm i tried that and it still gives me "Server.CreateObject Failed"



Once I add set objXML = Server.CreateObject("MSXML2.DOMDOCUMENT.4.0") I get that error - i'm thinking my server doesn't support the object. any other suggestions? thanks

Was this answer helpful ? Yes No   
Guest


when u say it's a very old server, what OS is it running?

Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by markoc
when u say it's a very old server, what OS is it running?




i believe linux - i talked with the administrator and he didn't seem to know how to pull from other web pages, he's the one that told me the server is kind of old and may not support some of the newer functions that i had been trying to use to grab from other sites

Was this answer helpful ? Yes No   
Guest


try creating one of those:

MSXML2.XMLHTTP

MSXML2.DOMDocument

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved