I have a lot of badly indented XML files.
I want to write a script or use a tool that discards all files.
Is there such a tool or a good library in the main scripting language (Ruby and Python are preferred) or in Java?
You are looking for an XML pretty printer .
Here is an online tool that uses xmlpp under the hood.
Here is a long list of options:
http://www.dpawson.co.uk/xsl/sect2/pretty.html#d8578e19
, , xslt HTML Tidy.
If you want the package to disable them yourself, and you are using Linux, use the following script. It will create copies of the source files added with the _ symbol:
for i in *.xml; do xmllint --format "$i" > pretty_"$i"; done
Source: https://habr.com/ru/post/1731396/More articles:C ++ Manipulator Not Running - c ++Sending email using java code - javaC ++ operator overload example - c ++How to read a file from the phoneβs internal memory in Android? - androidread text file from phone memory in android - androidJavaScript date constructor and timezone - javascriptBuild Error Using VC6 - vc6Read MST file with vbscript - windows-installerNetbeans does not allow Python 2.6 as the default platform (forcing Jython2.5) - pythonCMD.exe command in java does not end - javaAll Articles