XML parser and serializer
Check XML syntax and reserialize the supported document tree without changing mixed text by inserting indentation.
Worked input and output
Input
<note priority='high'>Hello & goodbye</note>
Output
<note priority="high">Hello & goodbye</note>
The attribute is serialized with double quotes. Content order and meaningful text spacing are retained; this conservative formatter does not insert new indentation into mixed content.