ASP Forum
reading XML
Kamon | Posted 12:43am 8. March 2006 Server Time |

I have a site that goes out to this xml doc (http://xml.weather.yahoo.com/forecastrss?p=CHXX0008) and gets the weather for the given city.  I know in .net (im using 1.1 on this project) you can read the xml, I just don't know how to do it correctly. Can anyone give me a site, or example to work from in order to read that xml doc?

thanks
Sojan | Posted 12:53am 8. March 2006 Server Time |

Have you tried  this one on implementing AJAX in ASP.NET 1.1
http://www.15seconds.com/Issue/050526.htm
probinu | Posted 1:01pm 8. March 2006 Server Time |

http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=31
Informant | Posted 1:35pm 8. March 2006 Server Time |

Heres a Crued example with no error handling:

Function getXML(sourceFile As String)
Dim myRequest As System.Net.WebRequest = System.Net.WebRequest.Create(sourceFile)
Dim myResponse As System.Net.WebResponse = myRequest.GetResponse()
Dim myReader As System.Xml.XmlTextReader = new System.Xml.XmlTextReader(myResponse.GetResponseStream())
Dim doc As System.Xml.XmlDocument = New System.Xml.XmlDocument()
doc.Load(myReader)
getXML = doc
End Function



Reply to Post reading XML



Back to Forum Page