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

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to