更新时间:2023-11-30 13:54:58
我讨论同样的问题,我解决了如下:
I hade the same issue and I solved it like below:
xmlDoc = document.implementation.createDocument("", "", null);
root = xmlDoc.createElement("description");
xmlDoc.appendChild(root);
alert((new XMLSerializer()).serializeToString(xmlDoc));