Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parsing xml response

Status
Not open for further replies.

globalterminal

Programmer
Apr 26, 2010
1
US
I am using ASP.
I have a response from a webservice that is being placed in a single variable. I am having trouble getting the nodes that i need from this response. What would be the best way to parse this XML?
 
[1] The response is a sort of xml fragment. In that case, if your request is sent via xmlhttp, the responsexml object may not be suitable without further worked on. In that case, you've to capture the responsetext and start from there.

[2] You could create an domdocument parser to load (.loadxml) a wrapped responsetext (wrapped with an self-made root to the responsetext to make it well-formed).

[3] Then from the parse dom document, if you want to zoom into the "content" element's message, you have to further use another parser object to parser the "context"'s text content. From there onward, all the data would be ready for you to scrutinize.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top