code: function(node, name, uri) {
          outer: for(var sibling=node; sibling; sibling=sibling.nextSibling) {
              switch(sibling.nodeType) {
                  case 1: // Element
                      if((!name || name === (sibling.localName || sibling.nodeName.split(":").pop())) &&
                         (!uri || uri === sibling.namespaceURI)) {
                          // matches
                          break outer;
                      }
                      sibling = null;
                      break outer;
                  case 3: // Text
                      if(/^\s*$/.test(sibling.nodeValue)) {
                          break;
                      }
                  case 4: // CDATA
                  case 6: // ENTITY_NODE
                  case 12: // NOTATION_NODE
                  case 10: // DOCUMENT_TYPE_NODE
                  case 11: // DOCUMENT_FRAGMENT_NODE
                      sibling = null;
                      break outer;
              } // ignore comments and processing instructions
          }
          return sibling || null;
      }
docs: Method: getThisOrNextEl
  Return this node or the next element node.  Optionally get the first
  sibling with the given local name or namespace URI.
  
  Parameters:
  node - {DOMElement} The node.
  name - {String} Optional local name of the sibling to search for.
  uri - {String} Optional namespace URI of the sibling to search for.
  
  Returns:
  {DOMElement} The next sibling element.  Returns null if no element is
  found, something significant besides an element is found, or the
  found element does not match the query.