Код: Выделить всё
from xml.etree.ElementTree import Element, tostring
document = Element('outer')
node = SubElement(document, 'inner')
node.NewValue = 1
print tostring(document) # Outputs ""
Код: Выделить всё
Существует ли правильный метод для отображения XML-объявления в ElementTree?>
Подробнее здесь: https://stackoverflow.com/questions/153 ... lementtree
Мобильная версия