Sample code for 30+ languages & platforms
Visual FoxPro

Decode HTML Entities found in XML

Demonstrates how to decode HTML entities found in XML.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loXml
LOCAL lcStrDecoded

lnSuccess = 0

* Load an XML file containing the following:

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

loXml = CreateObject('Chilkat.Xml')
lnSuccess = loXml.LoadXmlFile("qa_data/xml/hasHtmlEntity.xml")

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

* Result is Franz&#xf6;sische
? loXml.Content

* Result is Französische
lcStrDecoded = loXml.DecodeEntities(loXml.Content)
? lcStrDecoded

RELEASE loXml