public Element ConvertToLocal(HtmlNode node, CompositeElement <IOutlineChildElement> parent) { var builder = creator.GetBuilder(node); if (builder.GetElement().ElementType == ElementType.PlainText) { return(null); } Dictionary <string, string> properties = ReadNodeProperties(node); if (builder.GetElement().ElementType == ElementType.TextElement) { properties.Add("Text", node.InnerText); } if (parent != null) { builder.BuildElement(properties, parent); } else { builder.BuildElement(properties); } return(builder.GetElement()); }
public void BuildElement(Dictionary <string, string> properties, CompositeElement <IOutlineChildElement> parent) { if (parent != null) { parent.AddChildElement(element as IOutlineChildElement); element.ParentElement = parent; } BuildElement(properties); }