Skip to content
Snippets Groups Projects
Commit e3dcf8d4 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Remove XML namespace attributes

Fixes #38
parent e6d8fabb
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,10 @@ namespace ATxCommon.Serializables
try {
var xs = new XmlSerializer(GetType());
var writer = File.CreateText(_storageFile);
xs.Serialize(writer, this);
// set the namespace to empty as it only makes the XML less human-readable:
var xns = new XmlSerializerNamespaces();
xns.Add(string.Empty, string.Empty);
xs.Serialize(writer, this, xns);
writer.Flush();
writer.Close();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment