PureBasic
PureBasic
Decode HTML Entities found in XML
Demonstrates how to decode HTML entities found in XML.Chilkat PureBasic Downloads
IncludeFile "CkXml.pb"
Procedure ChilkatExample()
success.i = 0
; Load an XML file containing the following:
; <?xml version="1.0" encoding="UTF-8"?>
; <output>Französische</output>
xml.i = CkXml::ckCreate()
If xml.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
success = CkXml::ckLoadXmlFile(xml,"qa_data/xml/hasHtmlEntity.xml")
; Get non-decoded content, then get decoded content.
; Result is Französische
Debug CkXml::ckContent(xml)
; Result is Französische
strDecoded.s = CkXml::ckDecodeEntities(xml,CkXml::ckContent(xml))
Debug strDecoded
CkXml::ckDispose(xml)
ProcedureReturn
EndProcedure