Exemplo n.º 1
0
        private HtmlElementModel CreateHtmlElementModel(DOMElementAttribute att, string text)
        {
            List <AttributeViewModel> attributes = new List <AttributeViewModel>();

            if (!string.IsNullOrEmpty(att.Type))
            {
                attributes.Add(new AttributeViewModel("type", att.Type));
            }
            if (NonSelfClosingTags.Contains(att.Tag.ToLower()))
            {
                text = string.IsNullOrEmpty(text) ? "This is a " + att.Tag : text;
            }
            return(new HtmlElementModel(att.Tag, attributes.ToArray(), text));
        }
Exemplo n.º 2
0
 private HtmlElementModel CreateHtmlElementModel(DOMElementAttribute att)
 {
     return(CreateHtmlElementModel(att, ""));
 }