I am trying to accomplish a quite simple task here: modified a XML string using jQuery and get the modified string back.
I think that before, I could use the .html() function to do this, but I think they got rid of the functionnality with parse XML document.
So, here is the code:
var tempXML = "<node1><node2>Content #1</node2></node1>";
var parsedXML = $.parseXML(tempXML);
$(parsedXML).find('node2').text('XXXXXX');
alert($(parsedXML).find('node2').text()); // That works, it will display XXXXXX
Now, as I would suspect, the tempXML var is not modified.
So, how do I get the XML code that should read : "XXXXXX"?
Calling $(parsedXML).text(); only return XXXXXX and .html() is not defined for the object...