Hey, Im fairly new to javascript but I am an experianced php programmer. I have been parsing XML information using php, but my CPU usage has been too high recently due to this. I am trying to convert my scripts to javascript, but I am unsure how I can do this using javascript. I think that if I get started off, the rest will be easy. One of my XML files is located at http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=bbcradio1&api_key=c910b0bc1e2d4e64964ebcd2d69c255c&limit=500 Code (markup): Basically I have been trying to grab the Name, Artist and large image of the most recent <track>. Any help would be greatly appreciated and linked too on my website . Tim
This should be enough to get you started : http://www.w3schools.com/Xml/xml_parser.asp. and: http://www.w3schools.com/ajax/ajax_intro.asp
If you want the latest track, maybe your CPU is high from parsing so much garbage. You can use PHP with: http://ws.audioscrobbler.com/2.0/?m..._key=c910b0bc1e2d4e64964ebcd2d69c255c&limit=1 <- much less to parse If you want to do JS, JSON is faster than trying to parse XML: http://ws.audioscrobbler.com/2.0/?m...c1e2d4e64964ebcd2d69c255c&limit=1&format=json