Unicode C
Unicode C
Decode HTML Entities found in XML
Demonstrates how to decode HTML entities found in XML.Chilkat Unicode C Downloads
#include <C_CkXmlW.h>
void ChilkatSample(void)
{
BOOL success;
HCkXmlW xml;
const wchar_t *strDecoded;
success = FALSE;
// Load an XML file containing the following:
// <?xml version="1.0" encoding="UTF-8"?>
// <output>Französische</output>
xml = CkXmlW_Create();
success = CkXmlW_LoadXmlFile(xml,L"qa_data/xml/hasHtmlEntity.xml");
// Get non-decoded content, then get decoded content.
// Result is Französische
wprintf(L"%s\n",CkXmlW_content(xml));
// Result is Französische
strDecoded = CkXmlW_decodeEntities(xml,CkXmlW_content(xml));
wprintf(L"%s\n",strDecoded);
CkXmlW_Dispose(xml);
}