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