Response to
Ni************@gmail.com:
At the moment, I'm displaying the XML HTTP response text using
javascript alert (see below).
I'm trying to render XML HTTP response in a new window and the
output of the window needs to be of content type text/xml (i.e.
the XML output where you can expand/contact the tags in browser).
Is there anyway to render the XML? Thanks....
// Post XML via AJAX.
xmlhttp.open("POST", "http://localhost/processRequest",
true); xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
alert(xmlhttp.responseText);
}
}
xmlhttp.setRequestHeader("Content-Type", "text/xml")
xmlhttp.send(xmlRequest);
Use the responseXML property instead of responseText -- assuming
your server is sending the correct headers for the information
retrieved.
Since there are limitations with XML and Internet Explorer:
http://www.quirksmode.org/blog/archi...p_notes_r.html http://msdn2.microsoft.com/en-us/library/ms757055.aspx
....may be of some help. I've no clue if there has been any
fundamental changes in how Internet Explorer handles XML in version
7.
http://www.w3schools.com/php/ajax_responsexml.asp http://www.w3schools.com/php/php_ajax_responsexml.asp
....offers a small example of what can be done with the resulting
XML.
I also assume this depends greatly on what you are trying to do with
the XML -- process it versus actually rendering it for display as is
or styling it.
--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.