3
Reply

How to overwrite data in a xml file?

franky

franky

Sep 12 2005 7:12 PM
16.9k

Hi boys and girls!

I have an xml file that looks for example like this:

  <?xml version="1.0" standalone="no" ?>
- <FMGC>
- <seccion Nombre="PLAN DE VUELO">
- <F-PLN>
- <Nombre>
  <valor>Nombre1</valor>
  <valor>Nombre2</valor>
  <valor>Nombre3</valor>
  </Nombre>
- <Lat>
  <valor>Lat1</valor>
  <valor>Lat2</valor>
  <valor>Lat3</valor>
  </Lat>
- <Long>
  <valor>Long1</valor>
  <valor>Long2</valor>
  <valor>Long3</valor>
  </Long>
  </F-PLN>
  </seccion>
  </FMGC>

Then, my program do some stuff and has a new value to put for example in the place where is "Long1".
How can I overwrite that value in the xml file without to write the
whole xml again?
If is not posible tell me the best way to perform that task

Thanks in advance and if it has been posted before please refer me to that post because i haven't found it.


Answers (3)