sumitbaliyan
11 years agoOccasional Contributor
Not able to fetch node value of XML element
Hi folks,
Need your help, I am fairly aware of XPath and how to fetch node value of XML element value via XPath in SoapUI. But for below SoapUI response, I am not getting expected result.
Response XML
=========
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<n:addResponse xmlns:n="http://www.parasoft.com/wsdl/calculator/">
<n:Result xsi:type="xsd:float">11.0</n:Result>
</n:addResponse>
</soap:Body>
</soap:Envelope>
XPath expression used
================
declare namespace n='http://www.parasoft.com/wsdl/calculator/';
declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
//soap:Body/n:addResponse/n:Result
Result
======
<n:Result xsi:type="xsd:float" xmlns:n="http://www.parasoft.com/wsdl/calculator/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">11.0</n:Result>
Please guide.
Need your help, I am fairly aware of XPath and how to fetch node value of XML element value via XPath in SoapUI. But for below SoapUI response, I am not getting expected result.
Response XML
=========
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<n:addResponse xmlns:n="http://www.parasoft.com/wsdl/calculator/">
<n:Result xsi:type="xsd:float">11.0</n:Result>
</n:addResponse>
</soap:Body>
</soap:Envelope>
XPath expression used
================
declare namespace n='http://www.parasoft.com/wsdl/calculator/';
declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
//soap:Body/n:addResponse/n:Result
Result
======
<n:Result xsi:type="xsd:float" xmlns:n="http://www.parasoft.com/wsdl/calculator/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">11.0</n:Result>
Please guide.