Post tagged: elementtree

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 …