Why the above code generates an error of XmlTextWriter?
pDoc = new XmlDocument();
XmlProcessingInstruction pPI = pDoc.CreateProcessingInstruction("xml", "version='1.0' encoding='ISO-8859-1'");
XmlTextWriter writer = new XmlTextWriter("boop.xml", null);
writer.Formatting = Formatting.Indented;
(The reason is that the XML declaration is not a processing instruction. Read the XML spec.)
But when you get an error, you should still post it.
Thanks... i read some tutos and seems that main error is that I don't have a root element.
I would post the error, but I have the .NET SDK in spanish and the debugger dumps all in spanish.