public override void Dispose() { base.Dispose(); if (null != this.html) { this.html = null; } }
internal HtmlAttribute(HtmlDocument ownerdocument) { _ownerdocument = ownerdocument; }
/// <summary> /// 初始化 /// </summary> private void Init() { if (null == this.Content || !(this.Content is TextContent)) { return; } this.html = new HtmlDocument(); this.html.OptionAutoCloseOnEnd = true; //this.html.OptionReadEncoding = false; //this.html.OptionDefaultStreamEncoding = this.Content.Context.ContentEncoding; this.html.LoadHtml(((TextContent)this.Content).Content); this.rootNode = this.html.DocumentNode; this.headNode = this.rootNode.SelectSingleNode("//html/head"); this.bodyNode = this.rootNode.SelectSingleNode("//html/body"); }
internal HtmlTextNode(HtmlDocument ownerdocument, int index) : base(HtmlNodeType.Text, ownerdocument, index) { }
internal HtmlCommentNode(HtmlDocument ownerdocument, int index) : base(HtmlNodeType.Comment, ownerdocument, index) { }