I want to know how I can update an XML file in real time. I had this file for example:
<?xml version="1.0" encoding="UTF-8"?>
<Cars>
<car make="Toyota" model="95" hp="78" price="120"/>
<car make="kia" model="03" hp="80" price="300"/>
</Cars>
What should I do to update the price value like this one? :
<?xml version="1.0" encoding="UTF-8"?>
<Cars>
<car make="Toyota" model="95" hp="78" price="50"/>
<car make="kia" model="03" hp="80" price="100"/>
</Cars>
I have searched the web but all I found was how to parse, and how to write the whole file using XmlSerializer, but not how to modify. Also I have found this in Java but I failed to implement it on Android because I'm very new to the android-xml world.