Jump to content

Displaying an XML file


ameliabob

Recommended Posts

I have seen somewhere and can't find it any more using document.write as a way to see a small file. The actual line of code looked something likedocument.write("<xmp>" + xmlDoc.xml + "</xmp>" );but this doesn't work for me! Does anyone have any suggestions?

Link to comment
Share on other sites

Extracted from http://w3schools.com/dom/dom_document.asp

xml: Returns the XML of a node and its descendants. IE-only property
If you want to load the XML document into a string, you can use AJAX (See W3Schools Tutorial). it will return the XML document in the responseText.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...