要获得具有相同标签名称的交易对手,正确的XPath是什么



我正试图弄清楚从这个XML文档中获取信息的正确XPath是什么。

<relationships>
<relationship>
<person>
<name>Jane Doe</name>
<role>Customer</role>
</person>
<person>
<name>John Doe</name>
<role>Vendor</role>
</person>
</relationship>
</relationships>

我想要得到的(我使用的是PDI(是一个类似这样的表格。

其他人员其他人员角色John Doe供应商Jane Doe
人员角色
Jane Doe客户
John Doe供应商客户

这个例子可能过于简化了,所以我的答案需要更多的工作来处理真实数据,但我要做的是获得与人相关的两行:

角色Jane Doe户供应商

相关内容

最新更新