JS将XML转换成普通文本

/*转换XML*/
function ConvertXML(str) {

    var newStr = str.replace(/</g, '<');
    newStr = newStr.replace(/>/g, '>');
    return newStr;
}

  

原文地址:https://www.cnblogs.com/hellohongfu/p/2680630.html