using System; using GroupDocs.Conversion.Options.Convert; namespace ConvertXmlToHtmlUsingCSharp { class Program { public static void Main(string[] args) // Main function to convert XML to HTML using C# { // Remove the watermark in output HTML by adding license string licensePath = "GroupDocs.Conversion.lic"; GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License(); lic.SetLicense(licensePath); // Load the source XML file for conversion to HTML var converter = new GroupDocs.Conversion.Converter("sample.xml"); // Set the convert options for the output HTML var convertOptions = new MarkupConvertOptions(); // Convert and save the XML in HTML format converter.Convert("converted.html", convertOptions); Console.WriteLine("Done"); } } }