As suggested by Peter and Nikolay, v15 now removes the xmlformat function from the catalog and adds the [NO] INDENT option to xmlserialize, as described in X069.\
Great. I'm checking this patch and it seems, indentation stops working if we have a text node inside:
gitpod=# select xmlserialize(document '<xml><more>13</more></xml>' as text indent); xmlserialize ---------------------------------------- <?xml version="1.0" encoding="UTF-8"?>+ <xml> + <more>13</more> + </xml> +
(1 row)
gitpod=# select xmlserialize(document '<xml>text<more>13</more></xml>' as text indent); xmlserialize ---------------------------------------- <?xml version="1.0" encoding="UTF-8"?>+ <xml>text<more>13</more></xml> +