• Why not share:
  • Social sharing button for Facebook
  • Social sharing button for Linkedin
  • Social sharing button for Twitter
  • Social sharing button for Googleplus
  • Social sharing button for Pinterest

Using standard ASP libraries


Set objXMLDoc = CreateObject(“Microsoft.XMLDOM”)

objXMLDoc.async = False

status = objXMLDoc.documentElement.selectSingleNode(“//response”).getAttribute(“status”)

if status = “success”  then
response.write “Status ” & status & ” Credits ” & objXMLDoc.documentElement.selectSingleNode(“//response/credits”).Text
response.write “Status ” & status & ” Reason ” & objXMLDoc.documentElement.selectSingleNode(“//response/reason”).Text
end if

Put that into an ASP page and change the username, password, message and orig in the url string and it will work.  In terms of parsing the XML, this is a useful reference:  http://devguru.com/content/technologies/xml_dom/home.html. 

This code does not use the .net framework so it will work in both ASP and ASP.NET pages.  The only weakness in the solution above is the fact that there can be multiple reasons for failure, this solution will only take the first reason, but for some, this will be good enough.  To make the code handle this case, the else block would need a loop and

you would use objXMLDoc.documentElement.selectNodes
instead of objXMLDoc.documentElement.selectSingleNode.

No related posts.