1 // HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
2 namespace HtmlAgilityPack
5 /// Represents an HTML comment.
7 public class HtmlCommentNode
: HtmlNode
11 private string _comment
;
17 internal HtmlCommentNode(HtmlDocument ownerdocument
, int index
)
19 base(HtmlNodeType
.Comment
, ownerdocument
, index
)
28 /// Gets or Sets the comment text of the node.
36 return base.InnerHtml
;
40 set { _comment = value; }
44 /// Gets or Sets the HTML between the start and end tags of the object. In the case of a text node, it is equals to OuterHtml.
46 public override string InnerHtml
52 return base.InnerHtml
;
56 set { _comment = value; }
60 /// Gets or Sets the object and its content in HTML.
62 public override string OuterHtml
68 return base.OuterHtml
;
70 return "<!--" + _comment
+ "-->";