Код: Выделить всё
My name is Wrufesh[/b]. What is yours?[b]
Код: Выделить всё
import xml.etree.ElementTree as ET
tree = ET.parse('sample.xml')
root = tree.getroot()
for child in root:
print child.text()
Код: Выделить всё
'My name is' as an output.
Код: Выделить всё
'My name is Wrufesh[/b]. What is yours?' as an output.
Подробнее здесь: https://stackoverflow.com/questions/272 ... ted-result