I have xml that I have in a string. I want to change some attributes in it.
So what I have done is
var xml //contains xml
parser = new DOMParser()
xmlDoc = parser.parseFromString(xml, "text/xml")
xmlDoc.setAttribute("name", "random")
Now the xmlDoc has the required changes. But how do I get the string representation of the xml again?