Sample code for 30+ languages & platforms
Xbase++

Decode HTML Entities found in XML

Demonstrates how to decode HTML entities found in XML.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oXml
LOCAL cStrDecoded

nSuccess := 0

//  Load an XML file containing the following:

//  <?xml version="1.0" encoding="UTF-8"?>
//  <output>Franz&#xf6;sische</output> 

oXml := CreateObject("Chilkat.Xml")
nSuccess := oXml:LoadXmlFile("qa_data/xml/hasHtmlEntity.xml")

//  Get non-decoded content, then get decoded content.

//  Result is Franz&#xf6;sische
? oXml:Content

//  Result is Französische
cStrDecoded := oXml:DecodeEntities(oXml:Content)
? cStrDecoded

oXml:destroy()