This is an un-Perl answer. I don't know what else you might want to do to this file but have you considered using XSLT instead of Perl? XSLT is designed to handle XML.
In reply to Re: Filter for XML elements
by mertserger
in thread Filter for XML elements
by uituit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |