Read data from ATOM file with jquery.

Posted by carrerasrodrigo on Stack Overflow See other posts from Stack Overflow or by carrerasrodrigo
Published on 2010-01-29T09:12:06Z Indexed on 2010/04/15 10:03 UTC
Read the original article Hit count: 331

Filed under:
|
|
|
|

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!!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about atom