[jQuery] Converting XMLDocument to Plain XML?

[jQuery] Converting XMLDocument to Plain XML?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi everybody,
I was wondering if there is an easy way to convert an XMLDocument (or
childNodes) back into plain xml text?
Basically I'm thinking about fetching a XML document, manipulating it
with jQuery and then push it back to the server to save the results.
This is what I imagine to do:
------------------------------------------------------------------------
$.get('data/my-data.xml', data_callback);
function data_callback(xml)
{
    // Manipulate xml object / child nodes
    // ...
    // Save the resulting xml document
    $.post('save.php', {plain_xml: $(xml).toXML()});
    // So what I would need is a $.fn.toXML() function
}
------------------------------------------------------------------------
I hope that makes sense. If there is no easy way I guess I'll have to
code some recursive $.fn.toXML function to generate the plain xml,
right?
Best Regards,
Felix Geisendörfer
<div class="moz-signature">--
<small>--------------------------
<a href="http://www.thinkingphp.org">http://www.thinkingphp.org</a>
<a href="http://www.fg-webdesign.de">http://www.fg-webdesign.de</a>
</small></div>
</body>
</html>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/