firefo xml 读写实现js代码
一 读xml文件到字符串 第一步:将xml文件,转化为DOM结构 1 var xmlDoc = document.implementation.createDocument(“”, “test”, null); xmlDoc.load(“d:\\develop\\bookmarks.xml”); 2 var req = new XMLHttpRequest(); req.open(“GET”, “chrome://passwdmaker/content/people.xml”, false); req.send(null); var dom = req.responseXML; dom就是DO
用户评论