[Tutor] getAttribute
kakada
hokkakada at khmeros.info
Fri Mar 31 12:58:34 CEST 2006
Hello all,
Could anyone help me by giving example of getAttribute
xmldata = ziparchive.read("content.xml")
xmldoc = minidom.parseString(xmldata)
officeNode = xmldoc.getElementsByTagName('office:text')
I have another function:
def go_thru (nodelist):
for x in range(nodelist.length):
node = nodelist[x]
i = 0
print node.getAttribute('text:style-name')
go_thru(officeNode) #Calling function
I always get error message: AttributeError: Text instance has no
attribute 'getAttribute'
Could anyone give an explanation?
Thanks a lot,
da
More information about the Tutor
mailing list