Greeting monks, I have one problem while using XML::Twig and my tried code as:
use strict; use XML::Twig; my $file = $ARGV[0]; my $first = 'paragraph'; my $replace = 'p'; my $twig = XML::Twig->new(twig_handlers => {"$first" => sub {$_->set_gi("$replace")}}, ); $twig->parsefile($file); $twig->print;
It works fine, But it convert all hexadecimal entities with some symbols. I need same text as input.
Input: <paragraph>Société Nationale des Chemins de Fer Fran� +0E7;ais, the Spain (Telefónica)</paragraph> Current Output: <p>Société Nationale des Chemins de Fer Français, the Spain (Telefà +³nica)</p> Expected Output: <p>Société Nationale des Chemins de Fer Français, + the Spain (Telefónica)</p>
How to avoid this?
Regards,
Velusamy R.
In reply to Hexadecimal Entity Problem in XML::Twig by Samy_rio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |