I have the following soap response and want to extract the list of products:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<listProductsResponse xmlns="http://warehouse.acme.com/ws">
<listProductsResult>
<listProductsResult>
<productName>hammer</productName>
<productId>54112</productId>
</listProductsResult>
<listProductsResult>
<productName>drill</productName>
<productId>54113</productId>
</listProductsResult>
<listProductsResult>
<productName>circular saw</productName>
<productId>54114</productId>
</listProductsResult>
<listProductsResult>
<productName>jigsaw</productName>
<productId>54115</productId>
</listProductsResult>
</listProductsResult>
</listProductsResponse>
</soapenv:Body>
</soapenv:Envelope>
The following XPath returns a "No Match". I'm wondering why?
/soapenv:Envelope/soapenv:Body/ns:listProductsResponse
The following is working but seems to me a dirty approach since a namespace is specified for listProductsResponse:
/soapenv:Envelope/soapenv:Body/*[local-name()="listProductsResponse"]