code: function getXPath(stack, currentTagName) {
      var path = ['ROOT'];
      for (var i = 1, len = stack.length; i < len; i++) {
          path.push(stack[i].tagName);
      }
      if (currentTagName) {
          path.push(currentTagName);
      }
      return path.join('>');
  }
docs: #[begin] error