intel/genxml: use ElementTree.write and .indent
authorDylan Baker <dylan.c.baker@intel.com>
Mon, 3 Oct 2022 17:22:20 +0000 (10:22 -0700)
committerDylan Baker <dylan.c.baker@intel.com>
Wed, 12 Oct 2022 17:59:03 +0000 (10:59 -0700)
commit9a185d78caf87b2345ba0ed30997694ba2410b4a
treecefd82203a22def72def8367d62352caa1b0dfe6
parentb876f4daa9d569c402c5b54e7d295036d3dbc8c2
intel/genxml: use ElementTree.write and .indent

This removes a bunch of hand-written code, and allows for fewer corner
cases. The resulting code has some minor differences (no empty newlines
and the encoding is declared in the xml declaration)

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18955>
src/intel/genxml/gen_sort_tags.py