How do I parse XML data returned by a “GET” request in JQuery

McMuffin

New Member
So i'm making a "Follower Counter" for a small media company. I've set up a get request to return the Twitter API XML file that contains the number of followers. I know that the get request is set up correctly because it works when I hard code the success function. The issue that I'm having is an inability to use the xml data that is being returned. I need to parse the xml to get the required tag, and then update my $('#followCounter').html. So how can I do this.Here is my current jQuery:\[code\]var url = 'http://api.twitter.com/1/users/show.xml?screen_name=nightoutinc'; $.get(url, {dataType: 'xml',success: function (twitterAPI){ var twitter = $(twitterAPI 'follower_count').html();$('#followCounter').html(twitter);alert('success');}\[/code\]I'm not getting any console errors. The XML can be found here: http://api.twitter.com/1/users/show.xml?screen_name=nightoutincThanks,Brian
 
Back
Top