Xbase++
Xbase++
Decode HTML Entities found in XML
Demonstrates how to decode HTML entities found in XML.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oXml
LOCAL cStrDecoded
nSuccess := 0
// Load an XML file containing the following:
// <?xml version="1.0" encoding="UTF-8"?>
// <output>Franzö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ösische
? oXml:Content
// Result is Französische
cStrDecoded := oXml:DecodeEntities(oXml:Content)
? cStrDecoded
oXml:destroy()