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 <CkHtmlToXml.h>
void ChilkatSample(void)
{
bool success = false;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHtmlToXml htmlToXml;
// Indicate the charset of the output XML we'll want.
htmlToXml.put_XmlCharset("utf-8");
success = htmlToXml.ConvertFile("test.html","out.xml");
if (success != true) {
std::cout << htmlToXml.lastErrorText() << "\r\n";
}
else {
std::cout << "Success" << "\r\n";
}
}