C
C
Convert HTML File to XML File
See more HTML-to-XML/Text Examples
Convert HTML file to XML file.Chilkat C Downloads
#include <C_CkHtmlToXml.h>
void ChilkatSample(void)
{
BOOL success;
HCkHtmlToXml htmlToXml;
success = FALSE;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
htmlToXml = CkHtmlToXml_Create();
// Indicate the charset of the output XML we'll want.
CkHtmlToXml_putXmlCharset(htmlToXml,"utf-8");
success = CkHtmlToXml_ConvertFile(htmlToXml,"test.html","out.xml");
if (success != TRUE) {
printf("%s\n",CkHtmlToXml_lastErrorText(htmlToXml));
}
else {
printf("Success\n");
}
CkHtmlToXml_Dispose(htmlToXml);
}