Anyone know of any Perl module to escape text in an XML document?
I\'m generating XML which will contain text that was entered by the user. I want to correctly handl
I am not sure why you need to escape text that is in an XML file. If your file contains:
x < y
The file is not an XML file despite the proliferation of angle brackets. An XML file must contain valid data meaning something like this:
x < y
or
Therefore, either:
You are not asking for escaping data in an XML file. Rather, you want to figure out how to put character data in an XML file so the resulting file is valid XML; or
You have some data in an XML file that needs to be escaped for some other reason.
Care to elaborate?