【发布时间】:2014-07-30 12:11:38
【问题描述】:
我想使用下面的xpath
/用户/用户/用户 ID
这不起作用,因为 ESB 在我的 xml 周围添加了一个肥皂信封和正文,要使用的正确 xpath 是什么,或者我如何删除肥皂信封和正文?
xml 是:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<Users xmlns="http://ws.wso2.org/dataservice">
<User>
<UserID>a</UserID>
<Username>a</Username>
<Email>a</Email>
<Password>a</Password>
</User>
<User>
<UserID>a</UserID>
<Username>a</Username>
<Email>a</Email>
<Password>a</Password>
</User>
<User>
<UserID>a</UserID>
<Username>a</Username>
<Email>a</Email>
<Password>a</Password>
</User>
</Users>
</soapenv:Body>
</soapenv:Envelope>
编辑:
当我尝试在我的迭代调解器之外记录它时,这有效
//*[local-name() = 'Users']/*[local-name() = 'User']/*[local-name() = 'UserID']
但是当我尝试将它记录到迭代调解器中时,它什么也没返回?
【问题讨论】:
-
//Users/User/UserID 也不起作用
标签: xpath wso2 wso2esb wso2dss wso2developerstudio