3
J'utilise un XmlWriter pour rendre HTML. Comment puis-je obtenir un XmlWriter pour émettre une balise appropriée qui ressemble à ceci?Comment obtenez-vous un XmlWriter pour écrire un tag HTML avec xmlns et xml: lang?
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
voici ce que j'ai jusqu'à présent
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");
...
La dernière ligne tombe en panne
qui l'a fait MERCI! –