I'm creating a program using C# (in ASP.NET environment) that makes an XML file. It uses XmlWriter class for writing, but there's one thing I'm not sure how to do.
Say, to write a string I do:
xmlWriter.WriteElementString("c1", "name");
which becomes:
< c1 >name< /c1 >
That is great, until I try to write an empty string:
xmlWriter.WriteElementString("c1", "");
which becomes:
< c1/ >
But how do you format it to be?
< c1 >< /c1 >