如何从xml结果下面的标签VertexApplicationException
和User login failed.
中提取值?
在我的包中,我使用“ make request api”调用来获取从顶点计算的税额,有时我在对api调用的响应中得到错误,现在我需要将响应存储在表中,但仅我需要错误消息,例如:VertexApplicationException和用户登录失败。来自下面给出的xml响应标签
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<nsf:Fault xmlns:nsf="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>nsf:Client</faultcode>
<faultstring>User login failed.</faultstring>
<detail>
<ns:VertexException xmlns:ns="urn:vertexinc:oseries:exception:1:0">
<ns:exceptionType>VertexApplicationException</ns:exceptionType>
<ns:rootCause>User login failed.</ns:rootCause>
</ns:VertexException>
</detail>`enter code here`
</nsf:Fault>
</S:Body>
</S:Envelope>