I recursively pass through all the nodes in an XML
:
def verify_elements_children(root):
if root.childNodes:
for node in root.childNodes:
if node.nodeType == node.ELEMENT_NODE:
if node.tagName in config_elements_children[node.parentNode.tagName]:
# print node.toxml()
verify_elements_children(node)
But I don't know how to get all the attributes names of the selected the selected node
?