Jquery is great
Home
Dang I'm struggling with some work code that I really ought not be thinking about on a Friday night...
How do I access xml tags in other namespaces using jquery? If I have some xml like:
I can easily get any of the elements with something like $('thing')
but how do I get them if the elements are namespaced, like
I'm simplifying a bit there, but I can't find any info online about how to get this out again; I can't access my elements with $('stuff:thing')
because that means a stuff tag of type thing...
What am I missing? Do you know what I'm on about? Do you care?
jquery is a brilliant javascript library that I use for everything at work (though I haven't really brought this site up to date with much of it), but I'm struggling to use it to process some gecoded rss like the geo:lat and geo:long in here...
I could really do with knowing this for a fairly funky work project, but equally I could do with not thinking about this on a Friday night...
UPDATE: Just ignore the namespace and get it like this:$('lat, long', xml ).each( function () {
$('#debug').append( '' + this.nodeName + '=' + $(this).text() + '
' );
} );
pauly :: 2007 :: Comment / reply
i dont have an answer to your q (sorry) but was wondering what you make of jquery? i've just started a new project for upmystreet and we're using prototype/scriptaculous but just had a look at the jquery site and it looks quite neat.
when are we going for beers?
nicp :: 2 Sep :: 2007 :: Comment / reply
I use it for everything, it's well recommended. I'm sure prototype is good now too, but jquery is tiny, and does everything you need, and the code you write with it is tiny too. I have got really into the way you select things to do things to too. As I say I use it for everything at work (though I've not brought all my code on this site up to date with it yet), that as much of a recommendation as I can make. Also there are loads of people writing extensions for it, and it's easy to write extensions yourself.
I am doing a training course in it at work, something I only just found out this week, for the other developers. Before this, I'm going on a course to be taught how to run a training course too, bit odd...
I'll email you this stuff too, but check out jquery.com and visualjquery.com for documentation. There's at least one book out about it now, but you can get all the documentation you need online.
I filter out html in posts here now, you can use bbcode or a wiki type hybrid that I favour. Here's a link back to upmystreet.com that you missed out on earlier...
BTW I'm doing my own geocoded feed of pubs and things now, to celebrate this yeah we should meet up for beers soon. Clare is off to Nice with Emma in two weeks, that would be a good time for me, say Friday the 21st? I can't really have any time off so it'll have to be Friday or Saturday, I can come to London or you can come down here.
pauly :: 2 Sep :: 2007 :: Comment / reply
Over to you, discussion about anything local, but please be considerate... Folkestone on TV, Kent gigs, Find a flatmate, rent a room, property queries, current news, what's new, local events, for sale, local services, what I like about Folkestone, ask questions, offer advice, plug yourself... the more it's used the more useful a resource it will become. If you want a gig listed click here to add it (fixed now!), or just click here to post a message...
Also from the same week
Some more posts from the same week as .
London based band I think, sounded like the Libertines [Thursday 30 August 2007]
RE: Starbucks - bouverie place folkestone [Friday 31 August 2007]
Sharon McClaren [Friday 31 August 2007]
RE: On Folkestone is closing [Saturday 1 September 2007]
Royal Oak (Brookland) [Saturday 1 September 2007]
Thankyou for your feedback [Saturday 1 September 2007]
RE: Who killed Dave the Dolphin? [Tuesday 4 September 2007]
Yeah the wife saw Dave last weekend [Tuesday 4 September 2007]
It was mentioned in the Folkestone Herald this week [Friday 17 August 2007]
Live music - Ricky Fontayne [Sunday 15 July 2007]
Who killed Dave the Dolphin? [Thursday 16 August 2007]
Starbucks - bouverie place folkestone [Friday 17 August 2007]
I like Ricky Spontane [Thursday 23 August 2007]
On Folkestone is closing [Thursday 23 August 2007]
RE: Who killed Dave the Dolphin? [Wednesday 29 August 2007]
RE: I like Ricky Spontane [Wednesday 29 August 2007]
RE: On Folkestone is closing [Thursday 12 April 2012]


