Perl
Perl
Decode HTML Entities found in XML
Demonstrates how to decode HTML entities found in XML.Chilkat Perl Downloads
use chilkat();
$success = 0;
# Load an XML file containing the following:
# <?xml version="1.0" encoding="UTF-8"?>
# <output>Französische</output>
$xml = chilkat::CkXml->new();
$success = $xml->LoadXmlFile("qa_data/xml/hasHtmlEntity.xml");
# Get non-decoded content, then get decoded content.
# Result is Französische
print $xml->content() . "\r\n";
# Result is Französische
$strDecoded = $xml->decodeEntities($xml->content());
print $strDecoded . "\r\n";