code: function(node, criteria){
          var nodes = [];
          var children, tagName, n, matchNodes, child;
          if (node && node.hasChildNodes()) {
              children = node.childNodes;
              n = children.length;
  
              for(var k=0; k<n; k++){
                  child = children[k];
                  while (child && child.nodeType != 1) {
                      child = child.nextSibling;
                      k++;
                  }
                  tagName = (child ? child.nodeName : '');
                  if (tagName.length > 0 && tagName.indexOf(criteria) > -1) {
                      nodes.push(child);
                  } else {
                      matchNodes = this.getSiblingNodesByTagCriteria(
                          child, criteria);
  
                      if(matchNodes.length > 0){
                          (nodes.length == 0) ? 
                              nodes = matchNodes : nodes.push(matchNodes);
                      }
                  }
              }
  
          }
          return nodes;
      }
docs: Method: getSiblingNodesByTagCriteria
  Recursively searches passed xml node and all it's descendant levels for
  nodes whose tagName contains the passed search string. This returns an
  array of all sibling nodes which match the criteria from the highest
  hierarchial level from which a match is found.
  
  Parameters:
  node - {DOMElement} An xml node
  criteria - {String} Search string which will match some part of a tagName
  
  Returns:
  Array({DOMElement}) An array of sibling xml nodes