You might try this:
 $(data).find("item").each(function(i, item) {
   stuff = $item.find('[nodeName="content:encoded"]')
...

Where 'data' is what comes back from the ajax call.

I couldn't find another way to get the data from a 'xx:yy' element. I
asked the question on the board here and this was the best answer I
got.

On May 9, 1:24 pm, Connor <con...@letsbeglobal.com> wrote:
> Hi,
>
> I've been experimenting with jQuery's AJAX capabilities. I was trying
> to create an effect that pulls data from an XML RSS feed and displays
> it. Long story short, I got everything to work, but I couldn't figure
> out how to pull data from a CDATA section like the following:
>
> <item>
> <content:encoded><![CDATA[<p>
> Some text
> </p>
> ]]></content:encoded>
> </item>
>
> I wanted to put the "Some Text" in a variable. But I have no clue how.
> This is what my jquery looks like so far:
>
>  $.ajax({
>                  type: "GET",
>                  url: "vid.xml",
>                  dataType: "xml",
>                  success: function(xml) {
>
>                      $(xml).find('item').each(function(){
>
>                                                  var text = 
> $(this).children("content").text();
>
>                      }); //close each(
>                  }
>              }); //close $.ajax(
>
> How would I go about targeting the p tag or the content inside?
>
> Thanks for any help,
>
> Connor

Reply via email to