Read data from ATOM file with jquery.
- by carrerasrodrigo
Hi, i'm trying to read a xml/atom file, the code is:
$.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);
}
});
The atom file has a field like this:
<entry>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">Docentes y alumnos desa...</div>
</content>
</entry>
The code to read the content tag is:
jQuery(this).find('content').eq(0).text();
this - the entry part.
The problem is, when jQuery execute this line returns "Docentes y alumnos desa...". There is is a way that jQuery returns----
"<div xmlns="http://www.w3.org/1999/xhtml">Docentes y alumnos desa...</div>"
Thanks!! and sorry for the english!!