this is likely to endup being an easy fix so I'll apologize in advance for wasting your time. I have the following code:
$.ajax({
url: "/room/" + $nodeid + "/rss.xml",
dataType: "xml",
success: function($xml){
$($xml).find('node').each(
function(){
alert( $(this).attr('name') );
}
);
},
failure: function(){
alert('Ajax not responding!');
}
});
And I am trying to read the following xml:
<?xml version="1.0" encoding="UTF-8" ?><xml>
<node>
<Title name = 'Title'>Committtee Room 1</Title>
<Theatre name = 'Theatre'>40</Theatre>
<Classroom name = 'Classroom'>24</Classroom>
<Boardroom name = 'Boardroom'>22</Boardroom>
<Cabaret name = 'Cabaret'>24</Cabaret>
</node>
</xml>
Can someone please enlighten me and tell me why my alert( $(this).attr('name') );
is not returning "Title", "Theatre" etc
Thanks.