Convert Javascript object to XML string