title: Using XQUERY to retrieve attributes value
body: <p>Is it possible to use XQUERY to retrieve the attributes <code>filename</code> from the following XML? I am trying to use <em><code>/preFileDoc/inpXML/@filename</code></em> but it doesn't work...</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;preFileDoc xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;senderId&gt;ABC&lt;/senderId&gt;
    &lt;receiverId&gt;XYZ&lt;/receiverId&gt;
    &lt;tranxCode&gt;A001&lt;/tranxCode&gt;
    &lt;inpXML version="1.0" encoding="UTF-8"&gt;
      &lt;soap-env:Envelope&gt;
        &lt;soap-env:Header msgcode="SPPCONVAKT" orig-system="002FTB" refid="65355ff50a172064484bf9da64c1e245" timestamp="2009-02-11 21:00:10.741" filename="SPPCONVAKT20090128001.dat"/&gt;
        &lt;soap-env:Body&gt;
  text1
  text2
        &lt;/soap-env:Body&gt;
      &lt;/soap-env:Envelope&gt;
    &lt;/inpXML&gt;
  &lt;/preFileDoc&gt;
  </code></pre>
  
  <p>ps: Sometimes the <code>filename</code> attributes is sent as <code>fileName</code> in the incoming XML..thinking to retrieve value from attributes <code>@filename</code> OR <code>@fileName</code>.. can it achieve in single XQUERY? Thanks for advice...</p>