【发布时间】:2010-01-29 09:12:06
【问题描述】:
我正在尝试读取一个 xml/atom 文件,代码是:
$.ajax({
type: 'GET',
url: options.url,
data: options.data,
dataType: 'xml',
async:options.async,
success: function(xml) {
var feed = new JFeed(xml);
if(jQuery.isFunction(options.success)) options.success(feed);
}
});
原子文件有这样一个字段:
<entry>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">Docentes y alumnos desa...</div>
</content>
</entry>
读取内容标签的代码是:
jQuery(this).find('content').eq(0).text();
this -> 入口部分。
问题是,当 jQuery 执行时,这行返回“Docentes y alumnos desa...”。 jQuery有一种返回方式---->
"<div xmlns="http://www.w3.org/1999/xhtml">Docentes y alumnos desa...</div>"
谢谢!!对不起英语!
【问题讨论】: