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
Branches
Tags
No related merge requests found
...@@ -65,7 +65,10 @@ namespace ATxCommon.Serializables ...@@ -65,7 +65,10 @@ namespace ATxCommon.Serializables
try { try {
var xs = new XmlSerializer(GetType()); var xs = new XmlSerializer(GetType());
var writer = File.CreateText(_storageFile); 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.Flush();
writer.Close(); writer.Close();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment