title: python lxml - modify attributes
body: <pre><code>from lxml import objectify, etree
  
  root = etree.fromstring('''&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
  &lt;scenario&gt;
  &lt;init&gt;
      &lt;send channel="channel-Gy"&gt;
          &lt;command name="CER"&gt;
              &lt;avp name="Origin-Host" value="router1dev"&gt;&lt;/avp&gt;
              &lt;avp name="Origin-Realm" value="realm.dev"&gt;&lt;/avp&gt;
              &lt;avp name="Host-IP-Address" value="0x00010a248921"&gt;&lt;/avp&gt;
              &lt;avp name="Vendor-Id" value="11"&gt;&lt;/avp&gt;
              &lt;avp name="Product-Name" value="HP Ro Interface"&gt;&lt;/avp&gt;
              &lt;avp name="Origin-State-Id" value="1094807040"&gt;&lt;/avp&gt;
              &lt;avp name="Supported-Vendor-Id" value="10415"&gt;&lt;/avp&gt;
              &lt;avp name="Auth-Application-Id" value="4"&gt;&lt;/avp&gt;
              &lt;avp name="Acct-Application-Id" value="0"&gt;&lt;/avp&gt;
              &lt;avp name="Vendor-Specific-Application-Id"&gt;
                  &lt;avp name="Vendor-Id" value="11"&gt;&lt;/avp&gt;
                  &lt;avp name="Auth-Application-Id" value="4"&gt;&lt;/avp&gt;
                  &lt;avp name="Acct-Application-Id" value="0"&gt;&lt;/avp&gt;
              &lt;/avp&gt;
              &lt;avp name="Firmware-Revision" value="1"&gt; &lt;/avp&gt;
          &lt;/command&gt;
      &lt;/send&gt;
  &lt;/init&gt;
  
  &lt;traffic&gt;
      &lt;send channel="channel-Gy" &gt;
          &lt;action&gt;
              &lt;inc-counter name="HbH-counter"&gt;&lt;/inc-counter&gt;
              ....
          &lt;/action&gt;
      &lt;/send&gt;
  &lt;/traffic&gt;
  &lt;/scenario&gt;''')
  </code></pre>
  
  <p>How can I modify/set both values?</p>
  
  <ul>
  <li><p>Host-IP-Address <strong>value="0x00010a248921"</strong></p></li>
  <li><p>"Vendor-Id" <strong>value="11"</strong> </p></li>
  </ul>
  
  <p>I've unsuccessfully tried accessing</p>
  
  <pre><code>root.xpath("//scenario/init/send_channel/command[@name='CER']/avp[@name='Host-IP-Address']/value/text()")
  </code></pre>
  
  <p><strong>Goal:</strong> I'd preferably like to see a lxml.objectify vs an Xpath solution but I'll accept other lxml based solutions.</p>
  
  <p>The files are &lt;100kB so speed/RAM is not much of a concern.</p>