Forum Discussion
Nastya_Khovrina
Alumni
8 years agoHi,
Thank you for your post. The provided sample response is not a valid XML file. You can check it in the following online validator: https://www.xmlvalidation.com/
The XML declaration should be the first line of an XML file: https://msdn.microsoft.com/en-us/library/ms256048(v=vs.110).aspx, but you get it in line 4:
<ExecuteSearchResult><?xml version='1.0' encoding='utf-8'?>
When you have a valid XML, the XPath assertion should work. In your case, the XPath will be the following:
declare namespace ns1='http://www.valuecheckonline.com/'; //ns1:ExecuteSearchResponse[1]/ns1:ExecuteSearchResult[1]/ns1:ValueCheck[1]/ns1:FindTargetProperty[1]/ns1:City[1]