`libxml2` supports indentation of generated XML / HTML documents, via https://github.com/GNOME/libxml2/blob/master/xmlwriter.c#L4570-L4589. It would be handy if this could be made available in `write_xml()` and `write_html()`.