Using a modified verson of http://lxr.mozilla.org/mozilla/source/js/rhino/examples/E4X/e4x_example.js. Let's wait until Firefox 1.1 1.5 gets out :)