jQuery find() returning an empty string in Google Chrome

I'm using jQuery to setup an Ajax request that grabs an XML feed from a PHP script and then parses some information out of the feed and inserts it into the DOM. **It works fine in Firefox; however, in Chrome, I am getting an empty string for the 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: http://TheAddress.com/feed/01 The Title of the Post Tom 2009-11-05T13:46:44Z 2009-11-05T14:02:19Z ...
Could you post a snippet of the xml?

以上就是jQuery find() returning an empty string in Google Chrome的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准