Florian Lindner wrote: >Traceback (most recent call last): > File "ConfigReader.py", line 40, in ? > c = ConfigReader(f) > File "ConfigReader.py", line 32, in __init__ > print sourceNode.getElementsByTagName("filename")[0].nodeValue() >TypeError: 'NoneType' object is not callable > > This is because nodeValue here is 'None' and 'None()' doesn't make sense. Looks like you want the thing between <filename> and </filename>. This is not a nodeValue, this is nodeValue of firstChild of element 'filename'. So this should work:
print sourceNode.getElementsByTagName("filename")[0].firstChild.nodeValue -- http://mail.python.org/mailman/listinfo/python-list