views:

72

answers:

3

I am trying to parse XML feeds from YouTube using jQuery (by doing $(xml).find(...)), but jQuery is having really hard time with those. YouTube feeds are real mess - they have bunch of namespace tags, escaped html tags with inline styles and what not.

Are there any more powerful javascript XML parsers out there (preferably jQuery-compatible) that can chew such mess?

A: 

http://simplepie.org/ is a fast processor for PHP.

CodeToGlory
I need to parse XML in javascript...
serg
Did you look into jFeed? http://www.hovinne.com/blog/index.php/2007/07/15/132-jfeed-jquery-rss-atom-feed-parser-plugin
CodeToGlory
+1  A: 

YouTube also supports JSON which may be easier to work with from jQuery. You can find a starter at http://code.google.com/apis/youtube/2.0/developers_guide_json.html.

Duncan
+6  A: 

Instead of XML parsing pain, check out the JSON response format the API offers.

You can check out the YouTube JSON API Documentation here.

Nick Craver