Hi,
This small patch introduces a XML pretty print function. It basically
takes advantage of the indentation feature of xmlDocDumpFormatMemory
from libxml2 to format XML strings.
postgres=# SELECT xmlpretty('<foo id="x"><bar id="y"><var
id="z">42</var></bar></foo>');
xmlpretty
--------------------------
<foo id="x"> +
<bar id="y"> +
<var id="z">42</var>+
</bar> +
</foo> +
(1 row)
The patch also contains regression tests and documentation.
Feedback is very welcome!
Jim