Sample code for 30+ languages & platforms
Classic ASP

Convert HTML File to XML File

See more HTML-to-XML/Text Examples

Convert HTML file to XML file.

Chilkat Classic ASP Downloads

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

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

set htmlToXml = Server.CreateObject("Chilkat.HtmlToXml")

' Indicate the charset of the output XML we'll want.
htmlToXml.XmlCharset = "utf-8"

success = htmlToXml.ConvertFile("test.html","out.xml")
If (success <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode( htmlToXml.LastErrorText) & "</pre>"
Else
    Response.Write "<pre>" & Server.HTMLEncode( "Success") & "</pre>"
End If


%>
</body>
</html>