title: Parsing xml file with xpath and xquery using eXist-db
body: <p>I need to fetch the <code>&lt;TITLE&gt;</code> element from the following XML using XQuery (I'm using eXist-db).</p>
  
  <pre><code>&lt;?xml-stylesheet href="shakes.xsl" type="text/xsl"?&gt;
  &lt;!--!DOCTYPE PLAY PUBLIC "-//PLAY//EN" "play.dtd"--&gt;
  &lt;ClinicalDocument xmlns="urn:hl7-org:v3"&gt;
      &lt;PLAY&gt;
          &lt;TITLE&gt;The Tragedy of Hamlet, Prince of Denmark&lt;/TITLE&gt;
      &lt;/PLAY&gt;
  &lt;/ClinicalDocument &gt;
  </code></pre>
  
  <p>When I try with the XQuery below I am not getting the expected output.</p>
  
  <pre><code>xquery version "3.0";
  
  doc("/db/apps/demo/data/hamlet.xml")/ClinicalDocument/PLAY/TITLE
  </code></pre>
  
  <p>I think the problem is related to the <code>xmlns</code> attribute present in the <code>&lt;ClinicalDocument&gt;</code> tag:</p>
  
  <pre><code>&lt;ClinicalDocument xmlns="urn:hl7-org:v3"&gt;
  </code></pre>
  
  <p>How can I modify my XQuery to retrieve the desired XML element?</p>