У меня есть файл xml, и когда я анализирую его, используя приведенный ниже код python. Вот что он печатает в результате:
columnInfo {'class': 'com.manu.webservices.metadata.ColumnBean', 'columnName': 'Employee', 'schemaName': 'Workers', 'tableName': 'humanResource'}
Я хочу напечатать humanResource из tableName.
Result Expected:
humanResource
что я пробовал:
import xml.etree.ElementTree as ET
tree = ET.parse('file.xml')
root = tree.getroot()
for child in root:
print (child.tag, child.attrib)