how to get xmldoc in a string 15 February 2012 • Tapovan put this line wherever u needed to do this. var string = (new XMLSerializer()).serializeToString(xmlDoc); Last updated: February 15, 2012