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