in reply to Re: fix ODT files with line breaks looking poor
in thread fix ODT files with line breaks looking poor

the example presented by haukex fails to open

An ODT file is basically a ZIP file that contains a bunch of other files, one of them being content.xml, which I extracted and edited down to what I considered a minimal but representative example, which is what I showed. I cared more about the structure of the XML, and I also tested my code on the <r><p>a<x>b<y>c<x>d<s/>e</x>f</y>g</x>h</p></r> --> <r><p>a<x>b<y>c<x>d</x></y></x></p><p><x><y><x>e</x>f</y>g</x>h</p></r> example.

Replies are listed 'Best First'.
Re^3: fix ODT files with line breaks looking poor
by Jenda (Abbot) on Apr 18, 2019 at 13:11 UTC

    I see. :-) I just saved it with .odt extension and tried to force Word to open it. It was two in the morning.

    The result is valid XML and looks right according to how I understand the task so let's hope it helps anyone. I think the code is kinda neat.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.