XPath表达式以源顺序选择*all*元素,文本节点和注释节点

Mat*_*ens 5 html javascript xpath dom

选择所有元素,文本节点和注释节点的XPath表达式的顺序与它们在文档中出现的顺序相同?

以下有效选择所有元素,但不选择文本节点和注释节点:

var result = document.evaluate('//*', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null),
    index = -1;
while (++index < result.snapshotLength) {
  console.log(result.snapshotItem(index));
}
Run Code Online (Sandbox Code Playgroud)

有可能做以下事情吗?(注意:这是非功能性伪代码.)

document.evaluate('//* and text() and comment()');
Run Code Online (Sandbox Code Playgroud)

Mic*_*Kay 5

//node()
Run Code Online (Sandbox Code Playgroud)

选择每个节点的子节点:即所有元素,文本节点,注释和处理指令(但不是属性,命名空间节点或文档节点)