Re: How to replace the two last digits from an xml file?

2009-03-06 Thread odeits
On Mar 6, 3:31 pm, odeits wrote: > On Mar 6, 11:53 am, awel wrote: > > > > > Hi, > > > I am trying to get a value from an xml file, increment it by 1, > > replace by the new value and write another xml with the new value > > inside. > > > I have found this code to get the line and it works but I

Re: How to replace the two last digits from an xml file?

2009-03-06 Thread odeits
On Mar 6, 11:53 am, awel wrote: > Hi, > > I am trying to get a value from an xml file, increment it by 1, > replace by the new value and write another xml with the new value > inside. > > I have found this code to get the line and it works but I have to do > everything manualy: > > import re > lin

How to replace the two last digits from an xml file?

2009-03-06 Thread awel
Hi, I am trying to get a value from an xml file, increment it by 1, replace by the new value and write another xml with the new value inside. I have found this code to get the line and it works but I have to do everything manualy: import re lines = open("c:\\File1.xml").readlines() for i in rang