示例#1
0
 public void WriteTextNode(DomTextWriter writer)
 {
     //write inner run
     writer.InnerStringBuilder.Append(this.GetOriginalBuffer());
 }
示例#2
0
 //------------------------------------
 public virtual string GetInnerHtml()
 {
     //get inner html*** 
     StringBuilder stbuilder = new StringBuilder();
     DomTextWriter textWriter = new DomTextWriter(stbuilder);
     foreach (var childnode in this.GetChildNodeIterForward())
     {
         HtmlElement childHtmlNode = childnode as HtmlElement;
         if (childHtmlNode != null)
         {
             childHtmlNode.WriteNode(textWriter);
         }
         HtmlTextNode htmlTextNode = childnode as HtmlTextNode;
         if (htmlTextNode != null)
         {
             htmlTextNode.WriteTextNode(textWriter);
         }
     }
     return stbuilder.ToString();
 }
示例#3
0
 public override void CopyInnerText(DomTextWriter domTextWriter)
 {
     domTextWriter.Write(_copyBuffer);
 }
示例#4
0
        public virtual void WriteNode(DomTextWriter writer)
        {
            //write node
            writer.Write("<", this.Name);
            //count attribute 
            foreach (var attr in this.GetAttributeIterForward())
            {
                //name=value
                writer.Write(' ');
                writer.Write(attr.Name);
                writer.Write("=\"");
                writer.Write(attr.Value);
                writer.Write("\"");
            }
            writer.Write('>');


            //content
            foreach (var childnode in this.GetChildNodeIterForward())
            {
                HtmlElement childHtmlNode = childnode as HtmlElement;
                if (childHtmlNode != null)
                {
                    childHtmlNode.WriteNode(writer);
                }
                HtmlTextNode htmlTextNode = childnode as HtmlTextNode;
                if (htmlTextNode != null)
                {
                    htmlTextNode.WriteTextNode(writer);
                }
            }
            //close tag
            writer.Write("</", this.Name, ">");
        }
示例#5
0
 public virtual void CopyInnerText(DomTextWriter stbuilder)
 {
 }