Hello. I was wondering: is there a way to create HTML files programmatically in C# as you can do with XML? Mine is a console application, so maybe some of the options are not available. Basically, I would like to do something smarter than just building a big string.
Possible scenario:
Instead of writing:
string html="<html><head>Blah</head><body>{0}</html>", myotherstring
I would like to work as in XML
XmlTextWriter w = new XmlTextWriter(xml_file_path + xml_file_name,
System.Text.Encoding.UTF8);
w.WriteProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
// construct xml
XmlElement root = xmlDoc.CreateElement("element");
...
xmlDoc.Save(w);
w.Close();
Apologies for the naive question.