C++
C++
Decode HTML Entities found in XML
Demonstrates how to decode HTML entities found in XML.Chilkat C++ Downloads
#include <CkXml.h>
void ChilkatSample(void)
{
bool success = false;
// Load an XML file containing the following:
// <?xml version="1.0" encoding="UTF-8"?>
// <output>Französische</output>
CkXml xml;
success = xml.LoadXmlFile("qa_data/xml/hasHtmlEntity.xml");
// Get non-decoded content, then get decoded content.
// Result is Französische
std::cout << xml.content() << "\r\n";
// Result is Französische
const char *strDecoded = xml.decodeEntities(xml.content());
std::cout << strDecoded << "\r\n";
}