开发者

Traversing node using xpath

开发者 https://www.devze.com 2023-03-15 18:48 出处:网络
How do I write xpath query for the node below? I need to traverse the tree until child \"Attribute\" is not null.

How do I write xpath query for the node below? I need to traverse the tree until child "Attribute" is not null.

<Attribute name="ParentNode开发者_JAVA技巧" type="collection" datatype="collection" value="">
   <Attribute name="ChildNode" type="collection" datatype="collection" value="">
     <Attribute name="GrandChild" type="Measurable.Text" datatype="string" value="2605"/>
   </Attribute>
</Attribute> 


Try this Xpath expression: //Attribute[not(*)].

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号