Exemple #1
0
 /// <summary>
 /// 处理文本节点
 /// </summary>
 /// <param name="textContent">文本内容</param>
 /// <returns></returns>
 protected override IHtmlTextNode ProcessText( HtmlTextContent textContent )
 {
     var textNode = base.ProcessText( textContent ).CastTo<DomTextNode>();
       textNode.ContentFragment = textContent;
       return textNode;
 }
 /// <summary>
 /// 处理文本节点
 /// </summary>
 /// <param name="textContent">HTML文本信息</param>
 /// <returns>处理过程中所创建的文本节点,若不支持则返回 null</returns>
 protected virtual IHtmlTextNode ProcessText( HtmlTextContent textContent )
 {
     return CreateTextNode( textContent.Html );
 }
Exemple #3
0
 /// <summary>
 /// 创建一段文本内容
 /// </summary>
 ///<param name="startIndex">文本开始位置</param>
 /// <param name="endIndex">文本结束位置</param>
 /// <returns>用于描述文档声明标签内容的对象</returns>
 protected virtual HtmlTextContent CreateText(int startIndex, int endIndex)
 {
     var text = new HtmlTextContent(new HtmlContentFragment(this, startIndex, endIndex - startIndex));
     return text;
 }