I have an XML SOAP result:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope 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"> <soap:Body> <CreateCIInStockResponse xmlns="http://somenamespace.com/"> <CreateCIInStockResult> <Status>OK</Status> <Data>SOMERESULT</Data> </CreateCIInStockResult> </CreateCIInStockResponse> </soap:Body> </soap:Envelope>
As you can see, the namespace defined in CreateCIInStockResponse uses the default namespace - no prefix is defined.
I can get both status and data if we use
/soap:Envelope/soap:Body/node()/node()/node()/text()
Am I right that there is no way - using XPath - to directly access the contents of the "Data"?
My problem is that I can neither change the call to the web service, nor change the result returned from the web service. All I can do is use XPath to output my data.
Any suggestions?
source share