writeelementstring

C#: XmlTextWriter.WriteElementString fails on empty strings?

Hello, I'm using XmlTextWriter and its WriteElementString method, for example: XmlTextWriter writer = new XmlTextWriter("filename.xml", null); writer.WriteStartElement("User"); writer.WriteElementString("Username", inputUserName); writer.WriteElementString("Email", inputEmail); writer.WriteEndElement(); writer.Close(); The expected...

C# XmlTextWriter: Allows Unicode?

Hi, I'm using XmlTextWriter to save certain configuration elements for my program (it's only 10-15 string values, this is why I'm using XmlTextWriter). My code looks as follows: XmlTextWriter writer = new XmlTextWriter("FILENAME.XML", null); writer.WriteStartElement("Config"); writer.WriteElementString("Param1", param1); writer.WriteE...