I have some XML data that I need to handle in Node.js. I need to strip an envelope (SOAP) and then just return the payload/body och the envelope.
I get it as a DOM Document into my code and I can easily find the Body content and get that into a NodeList object.
Now I'd like to return the NodeList as a "XML String" but I haven't been able to find any way of doing this... What I basically need is a XML.stringify() (same as JSON.stringify()) but there doesn't seem to be any such function.
I've tried to write a "stringify()" myself but as there are attributes and namespaces in the XML it becomes very tricky...