traversing a xml string

traversing a xml string

Hi Guys,
 
I am trying to run a small example which travers the xml string , but could not able to run it.
Please help. The JQuery script is as follows

<

script type ="text/javascript" language ="javascript" src ="../../JS/jquery-1.4.2.js" > </ script >

<

script type ="text/javascript" language ="javascript">

$(document).ready(

function (){

alert(

'doc is ready' );

var t = $( '<foo><bar>something</bar></foo>' );

t.find(

'bar' ).each( function () {

alert($(

this ).text());

});

})

</

script >