public void WriteTextNode(DomTextWriter writer) { //write inner run writer.InnerStringBuilder.Append(this.GetOriginalBuffer()); }
//------------------------------------ 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(); }
public override void CopyInnerText(DomTextWriter domTextWriter) { domTextWriter.Write(_copyBuffer); }
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, ">"); }
public virtual void CopyInnerText(DomTextWriter stbuilder) { }