Beispiel #1
0
 static void Main(string[] args)
 {
     Page page = new Page(new CodeRenderer.MarkupStructure.Html("test.html"));
     //Console.WriteLine("Title = " + page.Title);
     /*foreach (Element element in page.Body.Elements)
     {
         Console.Write(((Text)element).text);
         if (((Text)element).text != "\n")
             Console.Write(" ");
     }*/
     page.Print();
     Console.WriteLine("\n-----\nEnd\n");
     Console.ReadLine();
 }
Beispiel #2
0
 public static void Render(Page page,CodeRenderer.MarkupStructure.Html html)
 {
     Renderer.page = page;
     foreach (CodeRenderer.MarkupStructure.Tag tag in html.RootTag.Content)
     {
         switch (tag.name)
         {
             case "head":
                 page.Html.Head = (Head)RenderHead(tag,page.Html);
                 break;
             case "body":
                 page.Html.Body = (Body)RenderTag(tag,page.Html);
                 break;
             default:
                 throw new NotImplementedException();
                 break;
         }
     }
 }