Manage ElementTree encoding