Hi,
I want to display xml-formatted string in a new window.
I tried this way:
function show_xml() {
var res = "<?xml version=\"1.0\" encoding=\"ISO-8859-2\"?>
<blub id=\"123\"></blub>
<blib id=\"453\"></blib>
";
var newWindow = window.open("","new");
newWindow.document.open("text/xml");
newWindow.document.write(res);
}
problems:
- how to remove the line breaks, because the string has really this breaks inside.
- after putting the string on one line manually, the result is a blank page, nothing inside..
so, how can I display a xml string in a new window ??
thanks in advance ..:GERD:..
I want to display xml-formatted string in a new window.
I tried this way:
function show_xml() {
var res = "<?xml version=\"1.0\" encoding=\"ISO-8859-2\"?>
<blub id=\"123\"></blub>
<blib id=\"453\"></blib>
";
var newWindow = window.open("","new");
newWindow.document.open("text/xml");
newWindow.document.write(res);
}
problems:
- how to remove the line breaks, because the string has really this breaks inside.
- after putting the string on one line manually, the result is a blank page, nothing inside..
so, how can I display a xml string in a new window ??
thanks in advance ..:GERD:..