We are consuming a web service response xml and I am able to retrieve data for s

We are consuming a web service response xml and I am able to retrieve data for specific tags using this syntax:

if( (xpathsnippet(pv!customersOnAccountResponseBody_Txt, "//*[local-name(.)='ReturnCode']/text()")) = "", "", xpathsnippet(pv!customersOnAccountResponseBody_Txt, "//*[local-name(.)='ReturnCode']/text()") )

The problem with the above results is that I get all instances of the tag "ReturnCode". I only want the data from this tag when its in a particular child tag. How would the syntax change above then?

I have tried absolute and realize path's and neither work....

OriginalPostID-60116

OriginalPostID-60116

  Discussion posts and replies are publicly visible

Parents
  • Owen - I tried what you stated (this is what I call absolute path) and it fails....

    Here is the end tags and the error message. I cannot include the entire error due to confidentiality. The ReturnCode tag I ned to get is within the Account tag.

    </Account> </Accounts> </Customer> </GetCustomerAccountsResponseMessage> </GetCustomerAccountsResponse> </soapenv:Body> </soapenv:Envelope>","/GetCustomerAccountsResponse/GetCustomerAccountsResponseMessage/Customer/Accounts/Account*[local-name(.)='ReturnCode']/text()")' (user=kwellman, exprId=268435793) could not be evaluated: An error occurred while trying to evaluate the XPath expression (/GetCustomerAccountsResponse/GetCustomerAccountsResponseMessage/Customer/Accounts/Account*[local-name(.)='ReturnCode']/text()). (APNX-1-4157-003) (Data Outputs)
Reply
  • Owen - I tried what you stated (this is what I call absolute path) and it fails....

    Here is the end tags and the error message. I cannot include the entire error due to confidentiality. The ReturnCode tag I ned to get is within the Account tag.

    </Account> </Accounts> </Customer> </GetCustomerAccountsResponseMessage> </GetCustomerAccountsResponse> </soapenv:Body> </soapenv:Envelope>","/GetCustomerAccountsResponse/GetCustomerAccountsResponseMessage/Customer/Accounts/Account*[local-name(.)='ReturnCode']/text()")' (user=kwellman, exprId=268435793) could not be evaluated: An error occurred while trying to evaluate the XPath expression (/GetCustomerAccountsResponse/GetCustomerAccountsResponseMessage/Customer/Accounts/Account*[local-name(.)='ReturnCode']/text()). (APNX-1-4157-003) (Data Outputs)
Children
No Data