title: xml-sql: update multiple nodes
body: <p>I have the following problem. i have a xml file stored in a sql database.
  i should change all the VALUE tag values by dividing per 100.
  here is an extract the structure of the xml:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;HEIGHTC&gt;
    &lt;VALUE&gt;15 &lt;/VALUE&gt;
    &lt;HEIGHTC_DATE&gt;201110180000&lt;/HEIGHTC_DATE&gt;
  &lt;/HEIGHTC&gt;
  &lt;HEIGHTC&gt;
    &lt;VALUE&gt;15 &lt;/VALUE&gt;
    &lt;HEIGHTC_DATE&gt;201110250000 &lt;/HEIGHTC_DATE&gt;
  &lt;/HEIGHTC&gt;
  &lt;HEIGHTC&gt;
    &lt;VALUE&gt;15 &lt;/VALUE&gt;
    &lt;HEIGHTC_DATE&gt;201111020000 &lt;/HEIGHTC_DATE&gt;
  &lt;/HEIGHTC&gt;
  &lt;HEIGHTC&gt;
    &lt;VALUE&gt;15 &lt;/VALUE&gt;
    &lt;HEIGHTC_DATE&gt;201111080000 &lt;/HEIGHTC_DATE&gt;
  &lt;/HEIGHTC&gt;
  &lt;HEIGHTC&gt;
    &lt;VALUE&gt;20 &lt;/VALUE&gt;
    &lt;HEIGHTC_DATE&gt;201111150000 &lt;/HEIGHTC_DATE&gt;
  &lt;/HEIGHTC&gt;
  &lt;HEIGHTC&gt;
    &lt;VALUE&gt;15 &lt;/VALUE&gt;
    &lt;HEIGHTC_DATE&gt;201111290000 &lt;/HEIGHTC_DATE&gt;
  &lt;/HEIGHTC&gt;
  </code></pre>
  
  <p>I have found the following query:</p>
  
  <pre class="lang-sql prettyprint-override"><code>DECLARE @var varchar(50)
  set @var='HEIGHTC'
  UPDATE tcdc.dbo.BADM_Xml
  SET  xml_badm.modify('replace value of (/ROOT/*[local-name()=sql:variable("@var")]/VALUE/text())[1] with (/ROOT/*[local-name()=sql:variable("@var")]/VALUE)[1] * 0.01')
  </code></pre>
  
  <p>and it works fine for a single node at a time: is there a way to generalize and update all in a single instruction?
  thanx in advance
  diego</p>