[PHP4] Quick way to burp out a PEAR XML tree to a valid XHTML doc?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am using XMLHttpRequest() from Javascript on the client side.
XMLHttpRequest() expects a valid XML/XHTML document as a response.

The target for the request is a PHP4 script running on my web server.  This
script queries an external web server, which returns an XML response to my
PHP4 script.

My PHP4 script uses the PEAR XML parser to parse the XML response into a
PEAR XML tree object, which I modify and add to.

All this works fine.  Now I need to take the PEAR XML tree object and send
it back to the client side Javascript XMLHttpRequest() as a valid XHTML/XML

What's the fastest and easiest way to get this done?


Site Timeline