static void Main(string[] args) { XMLChild child = new XMLChild("food"); child. addAtributte("name", "nose"). addElement("name", "Belgian Waffles"). addElement("price", 5.59). addElement("description", "Belgian Waffles"). addElement("calories", "Two of our famous Belgian Waffles with plenty of real maple syrup"); XML xml = new XML("break"); xml.addChild(child).addChild(child); Console.WriteLine(xml.getXML()); Console.ReadKey(); }
public XMLChild addElement(XMLChild child) { this.childs.Add(child); return(this); }
public XML appendChild(XMLChild child) { this.childs.Add(child); return(this); }