Exemplo n.º 1
0
 public override void Dispose()
 {
     base.Dispose();
     if (null != this.html)
     {
         this.html = null;
     }
 }
Exemplo n.º 2
0
 internal HtmlAttribute(HtmlDocument ownerdocument)
 {
     _ownerdocument = ownerdocument;
 }
Exemplo n.º 3
0
        /// <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");
        }
Exemplo n.º 4
0
 internal HtmlTextNode(HtmlDocument ownerdocument, int index)
     :
     base(HtmlNodeType.Text, ownerdocument, index)
 {
 }
 internal HtmlCommentNode(HtmlDocument ownerdocument, int index)
     : base(HtmlNodeType.Comment, ownerdocument, index)
 {
 }