perlquestion
Adithyakiran.k
<p>Hi, I need help in writing a perl program to convert an xml file which has utf8 characters to their respective named entities for some files and to their numbered entities for some other files.</p>
<p> for example, below is some text from input file</p>
<p><element1>
<p> Some sample text with “special characters” in the file </p>
</element1></p>
<p> Below is sample output I am looking for Case 1: (Numbered entities)</p>
<p><element1>
<p> Some sample text with &#8220;special characters&#8221; in the file </p>
</element1></p>
<p> Below is sample output I am looking for Case 2: (Named entities)</p>
<p><element1>
<p> Some sample text with &ldquo;special characters&rdquo; in the file </p>
</element1></p>
<p> Thanks in Advance !</p>