.NET

TwitterFacebook
Get flash to fully experience Pearltrees

How to Parse XML in ASP? - ASP

http://www.daniweb.com/web-development/asp/threads/30083/how-to-parse-xml-in-asp Hey guys, I'm having a "great" pleasure of parsing XML in my ASP page, except I can't seem to figure it out what I'm doing wrong. I have tried a bunch of stuff and can't seem to read a simple xml doc. here is what my code looks like... ' Create new XML reader object Dim xmlDoc Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM") ' Load the specified XML file ( returns XML output ) xmlDoc . load ( " http://somesite.com/api/xml?action=login&login=jon@doe.com&password=foobar " ) ' Parse XML if xmlDoc.parseError.errorcode <> 0 then ' oops error in xml Response . Write ( "XML Error...<br>" ) else ' get xml data Response.Write(xmlDoc.documentElement.childNodes(0).attributes.getNamedItem("code").nodeValue) end if
VBScript