Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I unescape XML special characters in Perl?

I'm processing some XML files (specifically .vcproj files) in Perl and I want to unescape the special characters. The escaped characters I've encountered so far are:

  • "
  • 
  • 


Obviously I can do this myself but it seems that there should be a standard (or CPAN) module to do this but a naive search brings up nothing relevant.

Any ideas?

like image 947
Motti Avatar asked Jun 11 '09 07:06

Motti


1 Answers

XML::Entities or the older HTML::Entities. I've only used the latter.

Searching probably would have been easier for you if you'd known that these things are called entities; I hate it when I'm in that position of not knowing the key information that would make a search possible.

like image 120
ysth Avatar answered Oct 16 '22 02:10

ysth