M
Mezzrow
Hey all.
I've seen something that confuses me a bit, and was wondering if
someone could shed some light on the issue.
I have an XML file as an embedded resource in a C# Windows Forms
application. The File is taken directly from a file on the desktop.
I load it into a stream...
....
Assembly a = Assembly.GetExecutingAssembly();
Stream resStream = a.GetManifestResourceStream(resourceName);
....
Read it into an XML document
....
XmlDocument doc = new XmlDocument();
doc.Load(resStream);
....
And write it back out without changes.
....
doc.Save(xmlFileName);
....
The file is written, and when opening the files in notepad, they look
identical.
However, the new file is half the size of the original.
Anyone know why this is or how I can correct this?
Thanks for your time.
-Mezz
I've seen something that confuses me a bit, and was wondering if
someone could shed some light on the issue.
I have an XML file as an embedded resource in a C# Windows Forms
application. The File is taken directly from a file on the desktop.
I load it into a stream...
....
Assembly a = Assembly.GetExecutingAssembly();
Stream resStream = a.GetManifestResourceStream(resourceName);
....
Read it into an XML document
....
XmlDocument doc = new XmlDocument();
doc.Load(resStream);
....
And write it back out without changes.
....
doc.Save(xmlFileName);
....
The file is written, and when opening the files in notepad, they look
identical.
However, the new file is half the size of the original.
Anyone know why this is or how I can correct this?
Thanks for your time.
-Mezz