I'm doing a small XML enricher based on JS, which, given a XML file, computes some stuff in the tree, and print on a <pre></pre>
tag (prettified with highlight.js) the content of my modified file.
Because I use jQuery for computations, I obtain at the end of the process a jQuery object.
For now, my code is only :
$("#output").append(xmlComputed)
But obviously, in the browser, I obtain a parsed form of my xml content, without any tags.
So I would like to know what kind of method I can use to obtain the full xml node in string from a jQuery node, like with .html()
I suppose?
And so, I'll be able to escape then the special characters and print the result.
Thank you in advance!
[Edit] I've ever tried this : Convert xml to string with jQuery
But I obtain only the beginning of my xml document, eg <!--xml version=1.0-->