5
J'essaye d'analyser un fichier xml en utilisant python-amara.Impression de valeurs d'attribut dans python-amara
doc = amara.parse('h.xml')
assert doc.xml_type == tree.entity.xml_type
m = doc.xml_children[0]
print m
Quand je fais cela donne
amara.tree.element at 0x94c864c: name u'HOP', 0 namespaces, 0 attributes, 93 children
Cependant quand j'essaie ceci:
print doc.HOP.A.D
il dit:
AttributeError: 'amara.tree.entity' object has no attribute 'HOP'
Toute idée?