In many instances walking the DOM tree, bloats your code and that is not good, particularly when we don't have to do that. By using namespaces and existing xhtml technologies we can leverage the best out of both worlds and get highly functional Web applications, while avoiding code bloat.

In the next example we are going to trigger a simple show / hide event from the XML file. There are two lines in the xml file (examples 5 folder) that are important to look at.

Line 4: <ul xmlns="http://www.w3.org/1999/xhtml" id="eddies">

Line 13: <a href="#" onmousedown="ajaxManager('hide_menu')">Hide Menu</a>