Get XML String from JQuery XML Object
Posted: January 9th, 2012 | Author: admin | Filed under: Uncategorized | Tags: javascript, jquery, xml | No Comments »Problem: You have an XML structure in a JQuery object and now you want to extract a string with the raw xml.
Solution: Use the XMLSerializer class. This class provides methods for serializing DOMs and nodes into text or byte streams. In our case, we will call the serializeToString(data) method:
new XMLSerializer().serializeToString(xmlDoc);