title: xpath query to update an element by value
body: <p>I'm trying to access an element by value using an XPath query for later update its value, although the XML file is simple, failed to get find the right query.</p>
  
  <p>for example:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;row&gt;
      &lt;OBJECTID&gt;1&lt;/OBJECTID&gt;
      &lt;TABLE_PK&gt;IN&lt;/TABLE_PK&gt;
      &lt;FIELD_PK&gt;AC_TR_OID&lt;/FIELD_PK&gt;
      &lt;TABLE_FK&gt;&lt;/TABLE_FK&gt;
    &lt;/row&gt;
    &lt;row&gt;
      &lt;OBJECTID&gt;2&lt;/OBJECTID&gt;
      &lt;TABLE_PK&gt;ARQUETAP&lt;/TABLE_PK&gt;
      &lt;FIELD_PK&gt;ARP_AR_OID&lt;/FIELD_PK&gt;
      &lt;TABLE_FK&gt;ARQ&lt;/TABLE_FK&gt;
    &lt;/row&gt;
    &lt;row&gt;
      &lt;OBJECTID&gt;3&lt;/OBJECTID&gt;
      &lt;TABLE_PK&gt;ACOMRUR&lt;/TABLE_PK&gt;
      &lt;FIELD_PK&gt;ACR_TR_OID&lt;/FIELD_PK&gt;
      &lt;TABLE_FK&gt;PASS&lt;/TABLE_FK&gt;
    &lt;/row&gt;
    &lt;row&gt;
      &lt;OBJECTID&gt;4&lt;/OBJECTID&gt;
      &lt;TABLE_PK&gt;ACOMRUR&lt;/TABLE_PK&gt;
      &lt;FIELD_PK&gt;ACR_RA_OID&lt;/FIELD_PK&gt;
      &lt;TABLE_FK&gt;WRANCH&lt;/TABLE_FK&gt;
    &lt;/row&gt;
    &lt;row&gt;
      &lt;OBJECTID&gt;5&lt;/OBJECTID&gt;
      &lt;TABLE_PK&gt;ACTUATION&lt;/TABLE_PK&gt;
      &lt;FIELD_PK&gt;ACT_ACTUATIONP_OID&lt;/FIELD_PK&gt;
      &lt;TABLE_FK&gt;ACTUATIONP&lt;/TABLE_FK&gt;
    &lt;/row&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>I just want to get access elements one by one, for example:
  Update TABLE_PK element called ACOMRUR the number row 3 with a new value to replace ACOMRUR, 
  /root/row[3]/OBJETID[text()='ACOMRUR']
  /root/row/TABLE_PK[text()='ACOMRUR']</p>
  
  <p>I also tested with more complex queries, nested,logical operators but nothing.
  I would appreciate any suggestions
  thanks,</p>