From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
Cc: | Peter Smith <smithpb2250(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrey Borodin <amborodin86(at)gmail(dot)com> |
Subject: | Re: [PATCH] Add pretty-printed XML output option |
Date: | 2023-03-14 23:25:21 |
Message-ID: | 3057762.1678836321@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> writes:
> On 14.03.23 18:40, Tom Lane wrote:
>> I poked at this for awhile and ran into a problem that I'm not sure
>> how to solve: it misbehaves for input with embedded DOCTYPE.
> The issue was the flag XML_SAVE_NO_EMPTY. It was forcing empty elements
> to be serialized with start-end tag pairs. Removing it did the trick ...
> ... but as a side effect empty start-end tags will be now serialized as
> empty elements
> postgres=# SELECT xmlserialize(CONTENT '<foo><bar></bar></foo>' AS text
> INDENT);
> xmlserialize
> --------------
> <foo> +
> <bar/> +
> </foo>
> (1 row)
Huh, interesting. That is a legitimate pretty-fication of the input,
I suppose, but some people might think it goes beyond the charter of
"indentation". I'm okay with it personally; anyone want to object?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2023-03-14 23:54:26 | Re: Add macros for ReorderBufferTXN toptxn |
Previous Message | Jim Jones | 2023-03-14 22:57:22 | Re: [PATCH] Add pretty-printed XML output option |