The W3C Web API Working Group has published the last call working draft of ElementTraversal Specification. "This specification defines the ElementTraversal interface, which allows script navigation of the elements of a DOM tree, excluding all other nodes in the DOM, such as text nodes. It also provides a property to expose the number of child elements of an element. It is intended to provide a more convenient alternative to existing DOM navigation interfaces, with a low implementation footprint." Hmm, just what the DOM needs: yet another way to do it.
ElementTraversal
provides some extra properties/methods for navigating only through elements, while ignoring text and white space:
firstElementChild
lastElementChild
previousElementSibling
nextElementSibling
childElementCount
This makes it easier to process record-like XML, but inappropriate for reading documents with mixed content.