Flextext to Plaintext

I think this would make your life soooo much easier with projects like this. My friend (and local Python guru) @BrenBarn suggests taking a look at lxml as well as elementtree, but either one should be a good start.

Incidentally (you probably already know this, but since we’re talking about it), the output of an XML parser is called a “DOM” — document object model. Learning to manipulate a DOM (golly, that sounds so… modern…) is a really useful skill that also applies to the HTML/browser world. A primary function of Javascript is to build a DOM from an HTML page and make each of the nodes (which correspond to HTML elements) available for processing.

Also, your post got me to thinking about how JSON fits into this conversion business, so I spun off a rather lengthy JSON in the Middle post that might be of interest.