cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to fetch node value of XML element

Occasional 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.
2 REPLIES 2
Occasional Contributor

Re: Not able to fetch node value of XML element

For more clarity: Result stated above is Actual Result, whereas Expected Result is 11.0
Community Hero

Re: Not able to fetch node value of XML element

That is correct, I can see the result success. See the attachment.


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements