title
element.**
Here's the basic setup of the Ajax request:
$.get('feed.php', function(oXmlDoc) {
$(oXmlDoc).find('entry').each(function() {
$(this).find('title').text();
$(this).find('id').text();
// do other work...
});
});
For what it's worth, here's the PHP script that's grabbing data from the feed. I'm using cURL because I'm making the request across domains (and because it was a quick and dirty solution for the problem at hand).
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $str_feed_url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$xml = curl_exec($curl);
curl_close($curl);
echo $xml;
The XML data is being returned correctly and I can see the values of the sibling nodes in Chrome (such as ID
), but, for whatever reason, I continue to get an empty string for the title
node.
**Edit:** As requested, here's a fragment of the relevant XML:
Could you post a snippet of the xml?