xml find方法解析错误
huashidou opened this issue · comments
huashidou commented
用Jquery OK,换成JSLite报错误信息如下
SyntaxError: DOM Exception 12: An invalid or illegal string was specified.
querySelectorAllJSLite.js:299
(匿名函数)JSLite.js:299
initJSLite.js:301
JSLiteJSLite.js:272
successjxml.html:14
onreadystatechangeJSLite.js:1093
document.querySelectorAll(selector) JSLite.js:300
小弟调调 commented
@huashidou 你这个是ajax
调用返回数据然后调用find
方法报错的吗?如下面实现?
$.ajax({
url: 'http://127.0.0.1:1987/test.xml',
dataType: 'xml',
success: function(data , xhr, settings, deferred){
$(data).find("jsliteeee")
}
});