title: How to check if an element exists in the XML using XPath?
body: <p>Below is my element hierarchy. How to check (using XPath) that <strong>AttachedXml</strong> element is present under <strong>CreditReport</strong> of <em>Primary</em> <strong>Consumer</strong></p>
  <pre><code>&lt;Consumers xmlns=&quot;http://xml.mycompany.com/XMLSchema&quot;&gt;
         &lt;Consumer subjectIdentifier=&quot;Primary&quot;&gt;
            &lt;DataSources&gt;
                 &lt;Credit&gt;
                     &lt;CreditReport&gt;
                        &lt;AttachedXml&gt;&lt;![CDATA[ blah blah]]&gt;
  </code></pre>