public HtmlFluentNestedBuilder AppendToParentChildren(string name = null, string text = null, int indentSize = 2) { var el = new HtmlFluentNestedBuilder(name, text, indentSize); Children.Last().Children.Add(el); return(el); }
public HtmlFluentNestedBuilder AppendToChildren(string name = null, string text = null, int indentSize = 2) { // will append element to current root var el = new HtmlFluentNestedBuilder(name, text, indentSize); Children.Add(el); return(this); }
public static void Run() { var root = new HtmlFluentNestedBuilder("root"); root .AppendElement("nest1", "Osama") .ThenAppendElement("nest1-2", "nour") .AppendElement(); WriteLine(root); }