Hello I have an c# class that I would like to serialize using XMLSerializer. But I would like to have it serialized to a XMLElement or XMLDocument, is this possible or do I have to serialize it to a String and then parse the string back to a XMLDocument?
+1
A:
You can create a new XmlDocument, then call CreateNavigator().AppendChild(). This will give you an XmlWriter you can pass to the Serialize method that will dump into the doc root.
nitzmahone
2009-12-22 10:10:55
Works, thank you!
Konstantin
2009-12-22 12:10:08