Sample code for 30+ languages & platforms
Classic ASP

Decode HTML Entities found in XML

Demonstrates how to decode HTML entities found in XML.

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0

' Load an XML file containing the following:

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

set xml = Server.CreateObject("Chilkat.Xml")
success = xml.LoadXmlFile("qa_data/xml/hasHtmlEntity.xml")

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

' Result is Franz&#xf6;sische
Response.Write "<pre>" & Server.HTMLEncode( xml.Content) & "</pre>"

' Result is Französische
strDecoded = xml.DecodeEntities(xml.Content)
Response.Write "<pre>" & Server.HTMLEncode( strDecoded) & "</pre>"

%>
</body>
</html>