I want XDocument
to output the XML prolog (for example \"\") in uppercase.
Here is how I\'m cur
I had the same problem, the program that should read the XML could not handle the "utf" in lower case.
Found this simple workaround:
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.OmitXmlDeclaration = true;
settings.NewLineHandling = NewLineHandling.Replace;
settings.NewLineOnAttributes = true;
using (
XmlWriter xmlWriter =
XmlWriter.Create(
Application.StartupPath + @"\Output\products.xml", settings))
{
xmlWriter.WriteStartDocument();
xmlWriter.WriteRaw("\r\n");
xmlWriter.WriteStartElement("products");
etc....