java_dom4j_xpath

1、

从当前节点开始往下找,需要这样写 xpath语句:

Element cge__PSR_Ref = (Element)eleBusG.selectSingleNode(".//"+FstrNsHashKey_cge+":PSR_Ref");

即 Element.selectSingleNode(".//命名空间:tagname");

ZC:我一直尝试的是 SomeElement.selectSingleNode("//命名空间:tagname");  这样始终得不到我要的效果,差点郁闷死...

ZC: 确实应该是这样,js 的 xpath 也是这样子的 (evaluate)。

2、

原文地址:https://www.cnblogs.com/codeskilla/p/5209090.html