how to change character entiry to hex decimal entity in XML::Twig using perl?

297 views Asked by At

I am new to perl script, I want convert character entity to hexa decimal entity.. how can i convert this file using xml::Twig module?

File sample.xml:

    <?xml version="1.0"?>
    <root>
      <text>This testing&mdash;value.</text>
    </root>    

Output as:

    <?xml version="1.0"?>
    <root>
      <text>This testing&#x2014;value.</text>
    </root>    

how to include this conversion in xml twig....

0

There are 0 answers