#!perl -w
# Name: xmlformat.pl
#
# Use tidy to change input file and make bak
# Usage: xmlformat.pl xmlfile.xml
use strict;
use File::Copy;
die "No args...\n"
unless 0==$#ARGV;
my $xmlfile = shift;
die "Could not copy $xmlfile. $!\n"
unless copy($xmlfile, "$xmlfile.bak");
my @args = ('C:\\bin\\tidy.exe', '-m', '-xml', '-q', '-i', $xmlfile);
system(@args) == 0 or die "system @args failed: $?"
UltraEdit v17 does it (maybe previous releases too):
Select the desired text,
in the main menu, select Paragraph Formatting + ReIndent Selection, the result is here as the result of an XML beautifuller output
Regards
Bonjour,
UltraEdit v17 le fait (peut être d'autres versions précédentes également):
Sélectionner le texte désiré,
dans le menu principal, sélectionner Formatage du paragraphe + Indenter de nouveau la sélection, le résultat est là, identique à la sortie d'un embellisseur XML
Wow, you really dug up an old post to respond to. The easiest way to handle the original post in the current version of UltraEdit is with the drop-down menu option:
The command XML Convert to CR/LFs in menu Format was introduced with UltraEdit for Windows v11.20 and UEStudio v5.10 for files syntax highlighted as XML files. This command became available for all files, regardless of file extension and syntax highlighting, with UltraEdit for Windows v17.10 and UEStudio v11.10.
The command XML Convert to CR/LFs in traditional menu Format was replaced by Reformat XML in submenu XML with UltraEdit for Windows v27.00 and UEStudio v20.00 which additionally introduced the command Compress XML. The commands are in menu Coding in submenu XML on using contemporary menus. In ribbon mode the commands are listed in popup menu opened on clicking on ribbon tab Coding in group Formatting on down arrow of item XML.
Best regards from an UC/UE/UES for Windows user from Austria