public XElement ToXml() { XElement RetVal = new XElement("config"); RetVal.SetAttributeValue("name", Name); RetVal.SetAttributeValue("datafolderpath", DataFolderPath); RetVal.Add(RootGroup.ToXml()); return(RetVal); }