I am using an XmlWriter to render HTML. How can I get an XmlWriter to emit a proper tag that looks like this?
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
here is what I have so far
var xml = XmlWriter.Create(HtmlFileName, new XmlWriterSettings { Indent = true, OmitXmlDeclaration = true});
xml.WriteDocType("html", "-//W3C//DTD XHTML 1.0 Transitional//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", null);
xml.WriteStartElement("html");
xml.WriteAttributeString("xmlns", "http://www.w3.org/1999/xhtml");
...
The last line crashes