I'm not sure about keeping the actual formating (indents, line breaks, comments), but what you're basically looking for is XSLT.
There exists in CPAN a few different XSLT modules (XML::XSLT, XML::LibXSLT, XML::ApplyXSLT), but I've never used any of them.
(I do enough XML work that I know of XSLT, yet never used it directly)
In reply to Re: Replacing things in XML files
by jhourcle
in thread Replacing things in XML files
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |