internal HtmlNode AddNode(HtmlTag tag) { var node = new HtmlNode(tag); Fragments.Add(node); return node; }
internal static HtmlText Create(string doc, HtmlTag startTag, HtmlTag endTag) { var startIndex = 0; if (startTag != null) { startIndex = startTag.StartIndex + startTag.Length; } var endIndex = doc.Length; if (endTag != null) { endIndex = endTag.StartIndex; } var text = new HtmlText(doc, startIndex, endIndex); if (text != null && !string.IsNullOrEmpty(text.Content)) { return text; } return null; }
internal HtmlNode(HtmlTag openTag) { Name = openTag.Name.ToLowerInvariant(); Attributes = openTag.Attributes; }