And now for the "teaching" part of the request...

KrushRadio, the crucial part that I believe you wanted to be taught
about is:
 $('day[name=Monday]>show', data)

If you're familiar with CSS selector syntax, that's a great head-
start.The full details can be found at http://docs.jquery.com/Selectors

To break it down for you, the selector includes "<show> elements that
are children of <day> elements with name attributes equal to
'Monday'". All of the matched results are put into an array of
elements which are iterated with .each().

Hope we've helped earn jQuery that donation!

 - jb


On May 17, 8:43 pm, "comslash.com" <comsl...@gmail.com> wrote:
> $(function(){
>
>                         $.ajax({
>                                 type: "GET",
>                                 url: "test.xml",
>                                 dataType: "xml",
>                                 success: function(data){
>                                  $('day[name=Monday]>show', 
> data).each(function(){
>                                                         time     = 
> $(this).find('time').text();
>                                                         dj               = 
> $(this).find('dj').text();
>                                                         showname 
> =$(this).find('showname').text();
>
>                                                         $('body').append(time 
> + '<br />' + dj + '<br />' + showname +
> '<br /><br />');
>                                          });
>                                 }
>                         });
>
>                 });

Reply via email to