remove the declaration

This commit is contained in:
PicelBoi committed 2025-12-28 22:38:05 -05:00
1 parent 4e10ae1f8d
commit 171db402cc
1 file changed
+8 -2
@@ -1,3 +1,4 @@
using System.Xml;
using System.Xml.Serialization;
using MistWX_i2Me.API;
using MistWX_i2Me.Schema.ibm;
@@ -31,14 +32,19 @@ public class ClimatologyRecord : I2Record
XmlSerializer serializer = new XmlSerializer(typeof(ClimatologyRecordResponse));
StringWriter sw = new StringWriter();
XmlWriter xw = XmlWriter.Create(sw, new XmlWriterSettings
{
OmitXmlDeclaration = true,
ConformanceLevel = ConformanceLevel.Fragment,
});
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
ns.Add("", "");
serializer.Serialize(sw, cliRecRes, ns);
serializer.Serialize(xw, cliRecRes, ns);
sw.Close();
recordScript +=
$"<ClimatologyRecord>" +
$"<Key>{result.Location.cliStn}</Key>{sw.ToString()}</ClimatologyRecord>";
$"<Key>{result.Location.cliStn}</Key>{xw.ToString()}</ClimatologyRecord>";
}
recordScript += "</Data>";