/// <summary> /// 格式化 /// </summary> /// <param name="outer"></param> protected override void Format(IHtmlOutput outer) { outer.Append(HtmlChar.SingleLeftAngleQuotation); outer.Append(Tag); Attributes.Format(outer); Classes.Format(outer); Csses.Format(outer); Scripts.Format(outer); if (NodesIsEmpty() && IsSelfClosed(Tag)) { outer.Append(HtmlChar.Slashes); outer.Append(HtmlChar.SingleRightAngleQuotation); return; } outer.Append(HtmlChar.SingleRightAngleQuotation); foreach (var node in Children()) { node.Format(outer); } if (HtmlOutput.DebugFormat && Children().Count() > 0) { outer.Append("\r\n"); } outer.Append(HtmlChar.SingleLeftAngleQuotation); outer.Append(HtmlChar.Slashes); outer.Append(Tag); outer.Append(HtmlChar.SingleRightAngleQuotation); }