s/&(?!amp|quot|apos|lt|gt)/&/g; may work for you in some simple cases. This replaces ampersands that are not immediately followed by something that might be a valid tag with an escaped version.
In reply to Re: Re: parsing reserved chars with xml::simple
by diotalevi
in thread parsing reserved chars with xml::simple
by bear0053
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |