在这个xml中,我想匹配,包含'match'的元素(random2元素)
<root>
<random1>
<random2>match</random2>
<random3>nomatch</random3>
</random1>
</root>
Run Code Online (Sandbox Code Playgroud)
好的,到目前为止我有:
//[re:test(.,'match','i')] (with re in the proper namespace)
Run Code Online (Sandbox Code Playgroud)
这会返回random2,random1和root ...我想只获得"random2"
有任何想法吗?