[jQuery] Re: Noob question about accessing element contents

2008-07-03 Thread ml1
This forum is about using jQuery, thus I assumed that I didn't have to spell out that I indeed of course meant the best jquery way. Thank you for your answer.

[jQuery] Re: Noob question about accessing element contents

2008-07-02 Thread Richard D. Worth
$('item', xml).eq(1).text() - Richard On Wed, Jul 2, 2008 at 11:51 AM, ml1 [EMAIL PROTECTED] wrote: I'm trying to find out the best practice for getting the contents of one particular element. I know about the each() call. As I said I can use ways that seem not so efficient to get the

[jQuery] Re: Noob question about accessing element contents

2008-07-02 Thread Brian J. Fink
Let's say you've got the element stored in a variable as an XMLElement, then it would be a simple matter to refer to the jQuery object of the element itself, for example, for variable elem: $(elem,xml).text() On Jul 2, 12:10 pm, Richard D. Worth [EMAIL PROTECTED] wrote: $('item',

[jQuery] Re: Noob question about accessing element contents

2008-07-02 Thread Brian J. Fink
This forum is about using jQuery, so our answers will usually be focused on the best JQUERY way, not necessarily the BEST way. On Jul 2, 11:51 am, ml1 [EMAIL PROTECTED] wrote: I'm trying to find out the best practice for getting the contents of one particular element. I know about the each()

[jQuery] Re: Noob question about accessing element contents

2008-07-01 Thread Mike Alsup
I am using jquery to parse some xml.  I'm looking for the best practice to access an elements text contents. Let's say my xml looks like this: items   item      Hello world!    /item    item       Goodnight moon!    /item items I can get a wrapped set of the elements this way: