Esempio n. 1
0
 public override void Process(List <ElementBase> Tree, EFMLDocument m)
 {
     Tree.AddRange((from XmlNode mm in m.Meta
                    select new MetaElement
     {
         Name = mm.GetAttributeByName("name"),
         Content = mm.GetAttributeByName("Content")
     }));
 }
Esempio n. 2
0
 public override void Process(List <ElementBase> Tree, EFMLDocument m)
 {
     Tree.AddRange((from XmlNode child in m.Head.ChildNodes
                    where child.Name == "validator"
                    select new ValidatorElement
     {
         Name = child.GetAttributeByName("name"),
         Pattern = child.GetAttributeByName("pattern")
     }));
 }
Esempio n. 3
0
 public override void Process(List <ElementBase> Tree, EFMLDocument m)
 {
     Tree.AddRange((from XmlNode s in m.Stylesheets
                    select new StyleElement
     {
         Source =
             s.HasAttribute("src")
                                           ? File.ReadAllText(s.GetAttributeByName("src"))
                                           : s.InnerText
     }));
 }
Esempio n. 4
0
        public void Load(string efml)
        {
            EFMLDocument doc = EFMLDocument.Load(efml);

            //new SourceElement().Process(document.Header, doc);
            new MetaElement().Process(document.Header.Meta, doc);
            new ScriptElement().Process(document.Header.Scripts, doc);
            new StyleElement().Process(document.Header.Styles, doc);
            new ValidatorElement().Process(document.Header.Validators, doc);

            UiBaseElement(doc.Body.ChildNodes, document.Body);
        }