How to display the contents of the xml document retrieved from the jquery.ajax()...?
-
I am invoking a web service through $.ajax(). onsuccess I am getting an xml document, now the problem is I need to see the contents of the retrieved xmlDocument.. Is there anyway to do that.. ??
-
Answer:
Put it to the textarea field as-is $("#textareaID").val(xmlstr); or display with html-encoding: $("#someDivID").text(xmlstr); // jQuery text() function performs html-encoding automatically Simple demo: http://jsfiddle.net/wKhnF/1/ Note dataType: "text", it is required to process the response contents as a text rather then XML object.
Rajesh Rs at Stack Overflow Visit the source
Other answers
Use Firebug to check the response. You can use http://api.jquery.com/jQuery.parseXML/ to read, parse the XML, find, and retrieve elements. $.parseXML(xml)
Jayendra
Related Q & A:
- how to fetch a value from persistence.xml to build.properties?Best solution by Stack Overflow
- How to convert positional attributes in an xml file to normal attributes?Best solution by Stack Overflow
- How to close instance of an XML DOCUMENT?Best solution by Stack Overflow
- How to Display an Image in PDF, which is retrieved from MySql Database :JSP and iText?Best solution by Stack Overflow
- How to view the contents of the attachments in a message?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.