|
|
2009-03-02
, 16:38
|
|
|
Posts: 229 |
Thanked: 108 times |
Joined on Oct 2007
@ Sacramento, California
|
#2
|
| The Following User Says Thank You to Munk For This Useful Post: | ||
|
|
2009-03-02
, 16:48
|
|
|
Posts: 1,684 |
Thanked: 1,562 times |
Joined on Jun 2008
@ Austin, TX
|
#3
|
| The Following User Says Thank You to epage For This Useful Post: | ||
|
|
2009-03-08
, 17:57
|
|
|
Posts: 229 |
Thanked: 108 times |
Joined on Oct 2007
@ Sacramento, California
|
#4
|
|
|
2010-07-26
, 20:34
|
|
Posts: 1 |
Thanked: 0 times |
Joined on Jul 2010
|
#5
|
|
|
2010-07-27
, 11:17
|
|
|
Posts: 466 |
Thanked: 180 times |
Joined on Feb 2010
|
#6
|
![]() |
| Tags |
| python elementtree |
| Thread Tools | |
|
Is there a simple way to just replace one element? Or do I have to read all elements from a file and then write the whole dang thing out just to update one element?
Here's a sample of my config.xml file:
<traveller> <time_format>%I:%M</time_format> <location>95838</location> <weather_refresh_interval>1</weather_refresh_interval> <celsius>False</celsius> <atmosphere> <title>rain3</title> <volume>5</volume> <playing>False</playing> </atmosphere> <atmosphere> <title>Children Playing</title> <volume>3</volume> <playing>False</playing> </atmosphere> <atmosphere> <title>Grandfather Clock</title> <volume>7</volume> <playing>True</playing> </atmosphere> </traveller>