xxxxxxxxxx
import xml.etree.ElementTree as ET
# Example XML data
xml_data = '''
<root>
<child1>Value 1</child1>
<child2>Value 2</child2>
<child3>Value 3</child3>
</root>
'''
# Parse the XML data
root = ET.fromstring(xml_data)
# Get child nodes by name
child_nodes = root.findall("./child1") # Replace "child1" with the desired node name
# Print the value of each matching child node
for child in child_nodes:
print(child.text)