Ejemplo n.º 1
0
        static void Main()
        {
            Element html =
                new Element("html",
                    new Element("head"),
                    new Element("body",
                        new Element("section",
                            new Element("h2"),
                            new Element("p"),
                            new Element("span")),
                        new Element("footer")));

            File.WriteAllText("index.html", html.Display());
        }
Ejemplo n.º 2
0
        public static void Main()
        {
            Element html = 
                new Element("html",
                    new Element("head"),
                    new Element("body", 
                        new Element("section", 
                            new Element("h2"),
                            new Element("p"),
                            new Element("span")),
                        new Element("footer")));

            html.Display();

            // Console.WriteLine(html);
        }
Ejemplo n.º 3
0
        public static void Main()
        {
            Element html = new Element("html",
                            new Element("head"),
                            new Element("body",
                                new Element("section",
                                    new Element("h3"),
                                    new Element("p")),
                                new Element("ul",
                                    new Element("li",
                                        new Element("a")),
                                    new Element("li",
                                        new Element("a"))),
                                new Element("footer")));
            html.Add(new Element("script"));

            Console.WriteLine(html.Display());
        }
Ejemplo n.º 4
0
 public void Remove(Element element)
 {
     this.Elements.Remove(element);
 }
Ejemplo n.º 5
0
 public void Add(Element element)
 {
     this.Elements.Add(element);
 }