title: extract value from xml in mysql
body: <p>i am trying to extract values from xml. i am getting problem when xml has attribute.
  like following Stored Procedure</p>
  
  <pre class="lang-sql prettyprint-override"><code>DELIMITER $$
  DROP PROCEDURE IF EXISTS `excel`.`insert_items` $$
  CREATE DEFINER=`root`@`localhost` PROCEDURE `insert_items`()
  BEGIN
  SET @xml = '&lt;items&gt;&lt;item&gt;
          &lt;value columntype="0"&gt;Single Line Text_01&lt;/value&gt;
      &lt;value columntype="1"&gt;Single Line Text_12341&lt;/value&gt;
      &lt;value columntype="2"&gt;Single Line Text_21&lt;/value&gt;
      &lt;value columntype="3"&gt;Single Line Text_31&lt;/value&gt;
      &lt;value columntype="4"&gt;Single Line Text_41&lt;/value&gt;
      &lt;/item&gt;
  &lt;/items&gt;';
  SELECT @columntype, ExtractValue(@xml, 'items/item/value[items/item/value/@columntype=0]');    
  END $$
  DELIMITER ;
  </code></pre>