The "kitchen sink" module for manipulating XML is XML::Twig. Consider:
use strict; use warnings; use XML::Twig; my $xml = <<XML; <outermost> <innermost> <first>1</first> <second/> <third>These spaces are to be preserved.</third> </innermost> </outermost> XML my $twig = XML::Twig->new(); $twig->parse ($xml); $twig->print();
Prints:
<outermost><innermost><first>1</first><second/><third>These spaces are + to be preserved.</third></innermost></outermost>
In reply to Re: compacting XML?
by GrandFather
in thread compacting XML?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |