【发布时间】:2017-08-23 09:08:19
【问题描述】:
我有这样的 xml 响应:
<Result xmlns="olineservice" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ResponseStatus>false</ResponseStatus>
<Error>
<ErrorCode>-7</ErrorCode>
<ErrorDescription>data wasn't found</ErrorDescription>
</Error>
</Result>
我想获得ErrorCode 的价值。我试过这个:
//Error[1]/text()
但ErrorCode 属性似乎是Nan。
你能推荐我任何解决方案吗?
【问题讨论】:
标签: xml xpath apache-nifi