📜  javascript 解析 xml - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:38.988000             🧑  作者: Mango

代码示例1
const txt = "
Roble Ave S1400
" if (window.DOMParser){ parser = new DOMParser(); xmlDoc = parser.parseFromString(txt, "text/xml") } else // Internet Explorer { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.loadXML(txt); }