Correctness fix to include XML declaration

This commit is contained in:
Matt Nadareski
2026-03-31 18:15:36 -04:00
parent 0b055a563e
commit e2e19db294
8 changed files with 24 additions and 0 deletions

View File

@@ -21,6 +21,9 @@ namespace SabreTools.Serialization.Writers
var writer = new XmlTextWriter(stream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
// Write document start
writer.WriteStartDocument();
// Write the files, if they exist
WriteFiles(obj, writer);
writer.Flush();

View File

@@ -21,6 +21,9 @@ namespace SabreTools.Serialization.Writers
var writer = new XmlTextWriter(stream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
// Write document start
writer.WriteStartDocument();
// Write the Mame, if it exists
WriteMame(obj, writer);
writer.Flush();

View File

@@ -55,6 +55,9 @@ namespace SabreTools.Serialization.Writers
var writer = new XmlTextWriter(stream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
// Write document start
writer.WriteStartDocument();
// Write document type
writer.WriteDocType(DocTypeName, DocTypePubId, DocTypeSysId, DocTypeSubset);

View File

@@ -21,6 +21,9 @@ namespace SabreTools.Serialization.Writers
var writer = new XmlTextWriter(stream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
// Write document start
writer.WriteStartDocument();
// Write the M1, if it exists
WriteM1(obj, writer);
writer.Flush();

View File

@@ -21,6 +21,9 @@ namespace SabreTools.Serialization.Writers
var writer = new XmlTextWriter(stream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
// Write document start
writer.WriteStartDocument();
// Write the Mess, if it exists
WriteMess(obj, writer);
writer.Flush();

View File

@@ -21,6 +21,9 @@ namespace SabreTools.Serialization.Writers
var writer = new XmlTextWriter(stream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
// Write document start
writer.WriteStartDocument();
// Write the Dat, if it exists
WriteDat(obj, writer);
writer.Flush();

View File

@@ -45,6 +45,9 @@ namespace SabreTools.Serialization.Writers
var writer = new XmlTextWriter(stream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
// Write document start
writer.WriteStartDocument();
// Write document type
writer.WriteDocType(DocTypeName, DocTypePubId, DocTypeSysId, DocTypeSubset);

View File

@@ -45,6 +45,9 @@ namespace SabreTools.Serialization.Writers
var writer = new XmlTextWriter(stream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
// Write document start
writer.WriteStartDocument();
// Write document type
writer.WriteDocType(DocTypeName, DocTypePubId, DocTypeSysId, DocTypeSubset);