Post tagged: XML

Tools for data

How to store data, what to use

Prompted by a recent tweet asking what people used for storing and managing their data, I wrote down my own hard-won lessons on the topic. In rough order of preference and data complexity:

A hierarchical strategy

Use restructured text for documentation

Or markdown / asciidoc. The advantages of this being:

  • It's …

Encoding types in etree

Setting encoding in the header of ElementTree generated XML.

Not that I'm picking on ElementTree or anything but ...

Normally XML documents will declare their character encoding in their opening tag. And, normally, this will be utf8. (This may be a standard.) So this is a common sight:

xml version='1.0' encoding='utf8'?>

An oddity in ElementTree is that …