内容目录

XPath轴(XPath Axes)可定义某个相对于当前节点的节点集:

1、child  选取当前节点的所有子元素

2、parent  选取当前节点的父节点

3、descendant 选取当前节点的所有后代元素(子、孙等)

4、ancestor  选取当前节点的所有先辈(父、祖父等)

5、descendant-or-self 选取当前节点的所有后代元素(子、孙等)以及当前节点本身

6、ancestor-or-self  选取当前节点的所有先辈(父、祖父等)以及当前节点本身

7、preceding-sibling 选取当前节点之前的所有同级节点

8、following-sibling 选取当前节点之后的所有同级节点

9、preceding   选取文档中当前节点的开始标签之前的所有节点

10、following   选取文档中当前节点的结束标签之后的所有节点

11、self  选取当前节点

12、attribute  选取当前节点的所有属性

13、namespace 选取当前节点的所有命名空间节点

dastudio

By dastudio

You are not special.

发表评论