You can use the jQuery plugin ( http://jquery.com/ ) on the HTML page as an entry in a script tag called the jquery ajax () function to hit the url, and you can use the jquery parseXML () and find () function to analyze the data XML like this -
<html> <head> <script src="js/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script> <script> function onBodyLoad(){ $.ajax({ url:'http://twitter.com/statuses/public_timeline.xml', dataType:"xml", contentType:'application/xml', timeout:10000, type:'POST', success:function(data) { alert(data); var xmlDoc = $.parseXML( data ), $xml = $( xmlDoc ), $title = $xml.find( "title" ); $( "#someElement" ).append( $title.text() ); $title.text( "XML Title" ); $( "#anotherElement" ).append( $title.text() ); }, error:function(XMLHttpRequest,textStatus, errorThrown) { alert("Error status :"+textStatus); alert("Error type :"+errorThrown); alert("Error message :"+XMLHttpRequest.responseXML); }}); } </script> </head> <body onload="onBodyLoad()"> <p id="someElement"></p> <p id="anotherElement"></p> </body> </html>
source share