I don't know the exact reason about who is tampering the XML in between but I used below function to sanitize the XML and resolved my problem.
function sanitizeXML(xmlobj)
{
"use strict";
return xmlobj.replace("\r\n-","");
}
Appreciate if there is any good solution.