How to parse XML in python

Python have a XML modules to parse trees. You can use it to store and receive data from text files (.xml extension is not required). There is many editors to edit trees (See Links below to find one).

Loading files
from xml.etree import ElementTree as ET document=ET.parse("test.xml") mainnode.document.getroot print mainnode.tag test.xml this is a text inside a node.
 * 1) importing module as ET for easiest writing
 * 1) parse file test.xml. In result we get ET.ElementTree object
 * 1) print the main node name

See:

 * EaseXML
 * xml.dom.minidom

Editors to edit xml tree

 * xml-copy-editor

From HowTo Wiki, a Wikia wiki.