[thelist] Display XML document inside an HTML document

Joe Ngo chilijoe at gmail.com
Fri Jan 21 06:12:50 CST 2005


Is there a way to display XML document inside another HTML document? I
want something that uses the browsers capability of displaying the XML
tree. For example, if you open an XML document on IE or Mozilla, the
document is displayed in a structured fashion such that you can
collapse/expand each node.

One way I could think of is to an iframe that loads the XML document.

However, my XML document would not come from another source. The XML
document source would come from an XMLHTTPResponseObject.responseXML.

Could I create an iframe then populate the iframe via javascript like
the following? What is the right way to do so, because the following
doesn't work:

   window.frames['xml_iframe'].document = XMLHTTPResponseObject.responseXML;

-- 
Take back the web!
http://www.spreadfirefox.com


More information about the thelist mailing list