title: Update\Modify an XML file in Android
body: <p>I want to know how I can update an XML file in real time. I had this file for example:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;Cars&gt;
          &lt;car make="Toyota" model="95" hp="78" price="120"/&gt;
          &lt;car make="kia" model="03" hp="80" price="300"/&gt;
      &lt;/Cars&gt;
  </code></pre>
  
  <p>What should I do to update the price value like this one? :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;Cars&gt;
          &lt;car make="Toyota" model="95" hp="78" price="50"/&gt;
          &lt;car make="kia" model="03" hp="80" price="100"/&gt;
      &lt;/Cars&gt;
  </code></pre>
  
  <p>I have searched the web but all I found was how to parse, and how to write the whole file using <code>XmlSerializer</code>, but not how to modify. Also I have found <a href="https://www.google.com.ly/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=2&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwiircac3s3LAhXJtBQKHcDNAMYQFgghMAE&amp;url=http%3A%2F%2Fwww.mkyong.com%2Fjava%2Fhow-to-modify-xml-file-in-java-dom-parser%2F&amp;usg=AFQjCNFTZuZm1zyn4F3czsMK1vtrhkxIeg&amp;sig2=DAGC6a_YZgdKcUC8Xi27eQ" rel="noreferrer">this</a> in Java but I failed to implement it on Android because I'm very new to the android-xml world.</p>