Hello,
I have an:
XmlDocument doc = ClassSerializer.Serialize(
_myClass);
// i wrote ClassSerializer, it works great...
which works fine: i have [XmlElement()] and [XmlIgnore] attribute tags inside _myClass. So the doc exists in memory just fine, I can use XPath on it, etc. This is all possible because of "using System.Xml.Serialization;"
Yah for the framework!
However, how do I write the silly thing to a text document?
For example: (this is how far I got before I became confused)
XmlDocument doc = ClassSerializer.Serialize(
_myClass);
XmlTextWriter textWriter = new XmlTextWriter("C:\\myXmFil
e.xml", null);
textWriter.WriteStartDocum
ent();
// write here: ??
textWriter.WriteEndDocumen
t();
textWriter.Close();
Any help would be appreciated. I need this solution ASAP, so 500 points is warranted :)
There were several other questions of the same order on EE, but the solutions were expired links...bad page editor, you!
Start Free Trial