17 Nov
2022
17 Nov
'22
2:15 p.m.
Am 11/17/2022 um 2:10 PM schrieb Giuseppe G. A. Celano:
Hi,
I am trying to prettyprint an XML file. I tried the serialization option “indent”=“yes”, but it does not work as expected. On BaseX 9, the prettyprint was the default setting: how to get the same result in BaseX 10 (and later)? Thanks.
Can you show us your code? For me declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; declare option output:method 'xml'; declare option output:indent 'yes'; declare context item := <root><foo>bar</foo></root>; . gives the result <root> <foo>bar</foo> </root> in 10.3.