title: Get attribute from xml with MySQL
body: <p>I have this xml in a field in MySQL and I want to get just a attribute.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;cf:Tag1 Version="3.3" at01="1" at02="2"&gt;
      &lt;cf:Tag2 a="A" b="B" c="C"/&gt;
  &lt;/cf:Tag1&gt;
  </code></pre>
  
  <p>This is the xml file I´m using and this is the query I´ve been using.</p>
  
  <pre><code>SELECT ExtractValue(a.xml, '/Version') as ver1
      , ExtractValue(a.xml, '//Version') as ver2
      , ExtractValue(a.xml, 'cf:Tag1[@Version=0]') as ver3
      , ExtractValue(a.xml, 'Tag1[@Version=0]') as ver4
      , ExtractValue(a.xml, 'Tag1[@Version]') as ver5
      , ExtractValue(a.xml, 'cf:Tag1[@Version]') AS ver6
      , ExtractValue(a.xml, '//cf:Tag1[@Version]') AS ver7
      , ExtractValue(a.xml, '//cf:Tag1') AS ver8
  FROM table1 a;
  </code></pre>
  
  <p>Thank you for your help.</p>