View Single Post
Join Date: Jun 2005
Posts: 54
Reputation: senexom is an unknown quantity at this point 
Solved Threads: 0
senexom's Avatar
senexom senexom is offline Offline
Junior Poster in Training

Re: How to Parse XML in ASP?

 
0
  #2
Aug 9th, 2005
I've figured it out and just in case someone else is forced to use ASP to process XML...

The code above WORKS on an XML document on the server, but if you are like me and you're trying to read XML document from a response stream the following code does the trick...

  1. set xmlDoc = createObject("MSXML2.DOMDocument")
  2.  
  3. xmlDoc.async = False
  4. xmlDoc.setProperty "ServerHTTPRequest", true
  5. xmlDoc.load("http://somesite.com/api/xml?action=login&login=jon@doe.com&password=foobar")
  6.  
  7. response.write xmlDoc.selectSingleNode("//results/status").Attributes.GetNamedItem("code").Text
Cheers!
Reply With Quote