[jQuery] AJAX issue
[jQuery] AJAX issue
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[
Some text
]]></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