title: Using xpath to extract an element out of nested xml document - SOAPUI
body: <p>Hi below is the xml that I have:</p>
  
  <pre><code>&lt;s:Fault&gt;
   &lt;faultcode  xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundat      ion/dispatcher"&gt;
  a:InternalServiceFault
   &lt;/faultcode&gt;
   &lt;faultstring     xml:lang="en-NZ"&gt;**&lt;![CDATA[&lt;ns0:Root                       xmlns:ns0="http://NZPost.EAI.UnifiedTracking.Schemas.FaultMessage"&gt;
    &lt;FaultCode&gt;NZPUT004&lt;/FaultCode&gt;
    &lt;Reason&gt;"**Object reference not set to an instance of an object.**"    &lt;/Reason&gt;
    &lt;/ns0:Root&gt;]]**&gt;
   &lt;/faultstring&gt;
   .
   .
   .
  &lt;/s:fault&gt;
  </code></pre>
  
  <p>I want to use assertion in SoapUI to confirm that the response contains the text "Object reference not set to an instance of an object". But I don't know the xpath that should be used in the declare segment to reach the Reason tag.</p>
  
  <p>I am able to navigate to  and  in the above example but the moment I write faultString//FaultCode or faultString//Message it throws an error saying that there is no match in current response.</p>
  
  <p>Please help!</p>