Пример #1
0
 /// <summary>
 /// Returns the menu as XML
 /// </summary>
 /// <param name="isDefault">Sets the default attribute of the menu in the XML</param>
 /// <returns></returns>
 public XDocument GetAsXML(bool isDefault)
 {
     return
         (new XDocument(
              new XDeclaration("1.0", "utf-8", "yes"),
              new XElement("Menu",
                           new XElement("Language",
                                        new XAttribute("lang", this.Language),
                                        new XAttribute("default", isDefault ? "yes" : "no"),
                                        RootItem.GetAsXML()
                                        )
                           )
              ));
 }