VBScript
VBScript
Decode HTML Entities found in XML
Demonstrates how to decode HTML entities found in XML.Chilkat VBScript Downloads
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
success = 0
' Load an XML file containing the following:
' <?xml version="1.0" encoding="UTF-8"?>
' <output>Französische</output>
set xml = CreateObject("Chilkat.Xml")
success = xml.LoadXmlFile("qa_data/xml/hasHtmlEntity.xml")
' Get non-decoded content, then get decoded content.
' Result is Französische
outFile.WriteLine(xml.Content)
' Result is Französische
strDecoded = xml.DecodeEntities(xml.Content)
outFile.WriteLine(strDecoded)
outFile.Close