I have an XML object (loaded using XMLHTTPRequest
\'s responseXML
). I have modified the object (using jQuery) and would like to store it as text in
You can use doc.xml in internet exlporer.
You'll get something like this:
function xml2Str(xmlNode) {
try {
// Gecko- and Webkit-based browsers (Firefox, Chrome), Opera.
return (new XMLSerializer()).serializeToString(xmlNode);
}
catch (e) {
try {
// Internet Explorer.
return xmlNode.xml;
}
catch (e) {
//Other browsers without XML Serializer
alert('Xmlserializer not supported');
}
}
return false;
}
Found it here.