On May 5, 9:38 pm, "Joseph J. Kesselman" <keshlam-nos...@comcast.net>
wrote:
I should say that, if you do need to generate XML source (probably not
true in browser code, but may be true in the server or standalone apps):
DOM Level 3 and later has an optional load/save module. If you don't
have that available you may be able to put the DOM through an XSLT
stylesheet or JAXP serializer. Check the documentation for your
environment to see what's available, or load up one of the available
libraries.
But the right place to begin is with the problem you're trying to solve.
If you're working with a DOM in a brower, it would be somewhat unusual
for you to need to see the XML via anything but the browser's "view
source" or by looking at the source file some other way... except
possibly as a debugging aid.
What I'm trying to do is to have the user edit a table's content which
comes from the server in XML format. The scripts parses the XML string
into DOM and manipulates the DOM as the user edits its content. The
aim is to minimize interaction with the server. So all the editing is
done locally using JavaScript. If the user confirms the edits made, I
want to post the changed XML code to the server and for that I want to
generate the XML text from the DOM document.