Background
I am using SQLite to access a database and retrieve the desired information. I'm using ElementTree in Python version 2.6 to create an XML file with that information.
Code
import sqlite3
import xml.etree.ElementTree as ET
# NOTE: Omitted code …
I've been using a minidom.toprettyxml for prettify my xml file.
When I'm creating XML file and using this method, all works grate, but if I use it after I've modified the xml file (for examp I've added an additional …
I have an xml file that I'm using etree from lxml to work with, but when I add tags to it, pretty printing doesn't seem to work.
>>> from lxml import etree
>>> root = etree.parse(…