//xml --> dom
const parser = new DOMParser();
xmlDom = parser.parseFromString(xmlString, 'application/xml');
//dom --> xml
const s = new XMLSerializer();
const xmlString = s.serializeToString(xmlDom )
【技术支持】xml字符串和文档dom之间互转
最新推荐文章于 2024-09-07 10:32:12 发布