How to serialize multiple objects into a existing XmlDocument in .Net/C#?
I have a XmlDocument, which already contains data. I have multiple objects. Now I want to s
This will serialize objects and append them to a XmlDocument. While de-/serializing the code will resolve the namespaces. @Alex: Thanks for the example with XPathNavigator.
void test2()
{
XmlDocument doc = new XmlDocument();
XmlNode root = doc.AppendChild(doc.CreateElement("root"));
doc.DocumentElement.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
doc.DocumentElement.SetAttribute("xmlns:xsd", "http://www.w3.org/2001/XMLSchema");
serializeAppend(root, new object[] { 1, "two", 3.0 }); // serialize object and append it to XmlNode
var obj = deserialize