And when size is important, smaller too.

On May 18, 3:21 am, Josh Powell <seas...@gmail.com> wrote:
> If you aren't forced to use XML, look at trying JSON instead.  It is a
> MUCH friendlier format for passing information around.
>
> On May 17, 11:09 pm, KrushRadio - Doc <drega...@gmail.com> wrote:
>
> > Paypal Transaction ID: 8PY233604R986225R :D
>
> > Thanks for your help.
>
> > Actually, there were 2 parts that I didn't get.. one was the CSS
> > selector syntax and how it needed to be formed inside of the initial
> > grab..
>
> > Thats the learning curve.  the way that 'day[name=Monday]show' didn't
> > make any sense to me.  in xpath i'd have to use the /day
> > [...@name='monday']/show  would have made more sense... The lack of
> > quotes would have thrown me the most.  i probably would have chained
> > the show at the end of it, in another each function.
>
> > So, basically, the initial dataset definition can be in the first
> > part, I don't have to chain the find(day and attribute).find(show,
> > data).each(function(){ do stuff here}  which was the original track i
> > was going down.
>
> > Thanks so much again... this part has been haunting me.
>
> > ~Doc
>
> > On May 17, 8:20 pm, deltaf <j...@deltafactory.com> wrote:
>
> > > 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 athttp://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 />');
> > > >                                          });
> > > >                                 }
> > > >                         });
>
> > > >                 });- Hide quoted text -
>
> > > - Show quoted text -

Reply via email to