Okay, so we have a webapp that's communicating with a web-service via XML.
As of now we're assembling those XMLs by just hacking Strings together (and sending that via XMLHttpRequest/POST). I'm of a mind to re-factor that into using the facilities for building and serialising an XML DOM tree that are built into the browser, i.e. document.implementation & XMLSerializer().serializeToString(doc) (see Mozilla docs here and here). It's been working fine so far, except the resulting string doesn't contain an XML declaration.
So, how's that supposed to work? Any good advice and/or reading?
Oh, yeah, I've found this mozilla bug describing the problem and a hacky workaround (the linked thread is available via archive.org).