
April 11th, 2002, 09:50 AM
|
 |
Madden Maniac
|
|
Join Date: Jun 2001
Location: Finland
Posts: 519
 
Time spent in forums: 1 Day 3 h 47 m 50 sec
Reputation Power: 13
|
|
|
Updating XML files...
I'm having trouble with updating XML files...
This code works for reading the values:
def getText(nodelist):
rc = ""
for node in nodelist:
if node.nodeType == node.TEXT_NODE:
rc = rc + node.data
return rc
def luo_kayttajalista(userdom,number):
controlled = userdom.getElementsByTagName('User_controlled')
control = controlled[number]
return getText(control.childNodes)
contr = open(USERDATA,'r')
userdom = xml.dom.minidom.parse(contr)
contr.close()
User0 = capitalize(luo_kayttajalista(userdom, 0))
BUT the question is, how can I change those values...
Thanks for any helps...
Miska
|