Пример #1
0
        private string createXML(ge_project project)
        {
            ge_XML g = new ge_XML();
            //  g._href = getHostHref() + constHref;

            XmlNode xmlproject = g.createChild("project", project.Id.ToString(), null);

            g.write(project, xmlproject);
            foreach (var d in project.data)
            {
                XmlNode xmldata = g.createChild("data", d.Id.ToString(), xmlproject);
                g.write(d, xmldata);
            }


            return(g.ToString());
        }
Пример #2
0
        private string createXML(ge_group group)
        {
            ge_XML g = new ge_XML();

            g._href = getHostHref() + constHref;
            XmlNode xmlgroup = g.createChild("group", group.Id.ToString(), null);

            foreach (var p in group.projects)
            {
                XmlNode xmlproject = g.createChild("project", p.Id.ToString(), null);
                g.write(p, xmlproject);
                foreach (var d in project.data)
                {
                    XmlNode xmldata = g.createChild("data", d.Id.ToString(), xmlproject);
                    g.write(d, xmldata);
                }
            }

            return(g.ToString());
        }