public static void AddObjectNode(IXmlLoadSave item, string nodeName, ref XmlElement Root) { XmlElement element1 = Root.OwnerDocument.CreateElement(nodeName); XmlElement element2 = Root.OwnerDocument.CreateElement(item.XmlName); item.AttachToXmlNode(ref element2); element1.AppendChild((XmlNode)element2); Root.AppendChild((XmlNode)element1); }
public static void AddNode(IXmlLoadSave Data, string Name, ref XmlElement Root) { if (Data == null) { return; } XmlElement element = Root.OwnerDocument.CreateElement(Name); Data.AttachToXmlNode(ref element); Root.AppendChild((XmlNode)element); }