Im working on an application where i need to fetch data and im using a js function to do the same

My xml is this http://pastebin.com/sUd3Z7QK

and the js function for fetching data is as follows...