How to convert no-line-break XML to line-break XML

Issue #766 invalid
Former user created an issue

I am not native English speaker. So forgive me for bad English. Some XML documents have no-line breaks as below: <?xml version="1.0" encoding="utf-8"?><documents sourceDir="\ps5std\Data\Translations\SSP_666_(ja-JP)\Export"><doc PS_FileName="3-3d23-425c-a613-77f05cfa8681.xml" PS_DirectoryName="container">

I want to insert line breaks and indents properly by using Rainbow as below <?xml version="1.0" encoding="utf-8"?> <documents sourceDir="\ps5std\Data\Translations\SSP_666_(ja-JP)\Export"> <doc PS_FileName="3-3d23-425c-a613-77f05cfa8681.xml" PS_DirectoryName="container">

Does Rainbow have such a utility?

Comments (2)

  1. ysavourel

    No, there is no such utility in Rainbow or other Okapi component.

    Adding line-breaks after end of elements (and sometimes adding indentation) is often called pretty-printing. You have probably some XML generic utility that do this. You also have online places to do this, like https://www.samltool.com/prettyprint.php

    Note that you should be careful when adding whitespace (linebreaks and indentations) as sometimes it whitespace matters and should not been altered. All depends on the type of XML data you are working with.

  2. Log in to comment