Reputation: 111265
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?
Upvotes: 0
Views: 159
Reputation: 630379
Instead of XML parsing pain, check out the JSON response format the API offers.
You can check out the YouTube JSON API Documentation here.
Upvotes: 6
Reputation: 2503
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.
Upvotes: 1