jQuery

Wow! I don’t know how it’s eluded me for the past several years but a buddy at Banner just turned me on to jQuery. Thanks Isaac! I’m still trying to understand its capabilities but it looks to me like it is basically javascript shorthand. There are lots of way cool plugins written for it that allow for all kinds of interactivity.

http://jQuery.com/

I’ve been coding with javascript for about 12 years now. It just goes to show that there’s always something new out there to learn.

XML2Object JSXML object converter

I found an actionscript version of this script quite some time ago. I’ve used it heavily and had need of the same thing in Javascript. So, here’s the JS version of it.

XML2Object Example

Essentially this script allows you to pass an XMLNode object and it will return a Javascript tree’d object for you. If your xml document looks like this…

<notes>
  <note id="note 1">This is the text for note 1</note>
  <note id="note 2">This is the text for note 2</note>
</notes>

Then your JS object would give you access like this…
xml.notes.note[0].value
or
xml.notes.note[‘note 1’].value

It also gives you access to the original xmlNode object from which it was derived…
xml.notes.note[0].node.nodeValue