title: Set new value on attributes in a namespace
body: <p>I have this xml (it is a part of a more extended one) that I'm parsing using python and lxml</p>
  
  <pre><code>&lt;om:OM_Observation gml:id="observation"&gt;
   &lt;gml:description&gt;Wind Speed&lt;/gml:description&gt;     
   &lt;om:phenomenonTime xlink:href="#phenomenonTime"/&gt;
   &lt;om:resultTime xlink:href="#phenomenonTime"/&gt;
   &lt;om:procedure xlink:href="procedure"/&gt;
   &lt;om:observedProperty xlink:href="WS_5min_avg"/&gt;
   &lt;om:featureOfInterest xlink:href="#FOI"/&gt;
   &lt;om:result xsi:type="gml:MeasureType" uom="m/s"&gt;568&lt;/om:result&gt;
  &lt;/om:OM_Observation&gt;
  </code></pre>
  
  <p>I'm able to get the text value within the tags and change its value and update the file data.xml:</p>
  
  <pre><code>from lxml import etree
  data='data.xml'
  data_tree = etree.parse(data)
  root = data_tree.getroot()
  nsmap = {'xsi': 'http://www.w3.org/2001/XMLSchema-instance', 'xlink': 'http://www.w3.org/1999/xlink',  'gml': 'http://www.opengis.net/gml/3.2',  'om': 'http://www.opengis.net/om/2.0'}
  
  result=data_tree.xpath("//om:OM_Observation/om:result", namespaces=nsmap)
  result[0].text="114"    
  etree.ElementTree(root).write(data, xml_declaration=True, encoding='utf-8', method="xml", pretty_print=True)
  </code></pre>
  
  <p>What I would like to do is to change the value of the attribute and update the xml file. 
  I'm trying a similar approach but it is not working. I'm able to get the value of the attribute:</p>
  
  <pre><code> featureOfInterest_attr=tree.xpath("//om:featureOfInterest/@xlink:href", namespaces=nsmap)
  </code></pre>
  
  <p>but if I would like to change its value using:</p>
  
  <pre><code>tree.xpath("//om:featureOfInterest/@xlink:href",namespaces=nsmap)="#newFOI"
  etree.ElementTree(root).write(data, xml_declaration=True,encoding='utf-8', method='xml', pretty_print=True)
  </code></pre>
  
  <p>the new value is not inserted.
  What I'm doing wrong?</p>