This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Displaying XML in a new IE window
- From: "Andrew Welch" <andrew at thebristoldirectory dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 6 Feb 2002 08:57:23 -0000
- Subject: RE: [xsl] Displaying XML in a new IE window
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
This isnt an xsl question, so you will need to find the relevant list.
However, to give you a start- your function is fine, the problem is what
you are passing to it.
A possible way to get the whole xml is to use the XML DOM and then access
the root.xml:
function showXML() {
var xml = new ActiveXObject('MSXML2.DOMDocument.4.0');
xml.async = false;
xml.load('yourXMLFile.xml');
xml.setProperty("SelectionLanguage", "XPath");
displayXML(xml.xml);
}
Cheers
andrew
===
-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Haque,
Suraiya
Sent: Tuesday, February 05, 2002 6:35 PM
To: 'xsl-list@lists.mulberrytech.com'
Subject: [xsl] Displaying XML in a new IE window
I'm trying to display some XML in a new IE window. I would like to display
the whole XML tree, with tags and attributes , but only the elements show up
as strings. My Javascript looks like this:
function displayXML(xmlString)
{
var test=window.open('','newWindow','resizable=yes,scrollbars=yes,
height=undefined,width=undefined', false);
test.document.write("<body>")
test.document.write(xmlString)
test.document.write("</body>")
}
Anyone know what I should be doing differently?
Thanks in advance for your help.
-Suraiya
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list