Beispiel #1
0
        public XElement getXML()
        {
            XElement xml = new XElement("Update");

            Changelog changeLog    = getChangelog();
            XElement  changeLogXML = null;

            if (changeLog != null && !changeLog.isEmpty())
            {
                changeLogXML = new XElement("Changelog");
                foreach (Changelog.Log log in changeLog.getLogs())
                {
                    XElement logXML = new XElement("Log");
                    logXML.SetValue(log.getText());
                    changeLogXML.Add(logXML);
                }
                xml.Add(changeLogXML);
            }

            xml.SetAttributeValue("name", getName());
            xml.SetAttributeValue("version", getVersion());
            xml.SetAttributeValue("base", getBaseType());
            xml.SetAttributeValue("url", getFullPath());
            return(xml);
        }