Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个像下面这样的 xml ..
<parent> <child> <f1>abh</f1> <f2>jb</f2> </child> <child> <f1>abh2</f1> <f2>jb2</f2> </child> </parent>
如何使用 xpath 表达式获得 f2 值为 jb2 的子项的 f1?
XPath
/parent/child[f2="jb2"]/f1