How to convert XML String into XML document

原创
2017/07/02 00:06
阅读数 71
Sometimes, it is neccessary to convert string into document. For example, convert XML String into XML document.Actually, just use jquery as following:
var xml = "<object><name>name</name><sex>boy</sex></object>";

$.parseXML(xml);//Generate document

$($.parseXML(xml));//Generate document object
展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部