mscorlib(4.0.0.0) API with additions
XmlComment.cs
1 using System.Xml.XPath;
2 
3 namespace System.Xml
4 {
6  public class XmlComment : XmlCharacterData
7  {
10  public override string Name => OwnerDocument.strCommentName;
11 
14  public override string LocalName => OwnerDocument.strCommentName;
15 
18  public override XmlNodeType NodeType => XmlNodeType.Comment;
19 
20  internal override XPathNodeType XPNodeType => XPathNodeType.Comment;
21 
25  protected internal XmlComment(string comment, XmlDocument doc)
26  : base(comment, doc)
27  {
28  }
29 
34  public override XmlNode CloneNode(bool deep)
35  {
37  }
38 
41  public override void WriteTo(XmlWriter w)
42  {
43  w.WriteComment(Data);
44  }
45 
48  public override void WriteContentTo(XmlWriter w)
49  {
50  }
51  }
52 }
Represents an XML document. You can use this class to load, validate, edit, add, and position XML in ...
Definition: XmlDocument.cs:13
virtual XmlDocument OwnerDocument
Gets the T:System.Xml.XmlDocument to which this node belongs.
Definition: XmlNode.cs:104
internal XmlComment(string comment, XmlDocument doc)
Initializes a new instance of the T:System.Xml.XmlComment class.
Definition: XmlComment.cs:25
Definition: __Canon.cs:3
XmlNodeType
Specifies the type of node.
Definition: XmlNodeType.cs:5
XPathNodeType
Defines the XPath node types that can be returned from the T:System.Xml.XPath.XPathNavigator class.
Definition: XPathNodeType.cs:4
Represents a writer that provides a fast, non-cached, forward-only way to generate streams or files t...
Definition: XmlWriter.cs:12
virtual XmlComment CreateComment(string data)
Creates an T:System.Xml.XmlComment containing the specified data.
Definition: XmlDocument.cs:820
override void WriteTo(XmlWriter w)
Saves the node to the specified T:System.Xml.XmlWriter.
Definition: XmlComment.cs:41
virtual string Data
Contains the data of the node.
override XmlNodeType NodeType
Gets the type of the current node.
Definition: XmlComment.cs:18
override string LocalName
Gets the local name of the node.
Definition: XmlComment.cs:14
override string Name
Gets the qualified name of the node.
Definition: XmlComment.cs:10
Provides text manipulation methods that are used by several classes.
abstract void WriteComment(string text)
When overridden in a derived class, writes out a comment <!–...–> containing the specified text.
Represents the content of an XML comment.
Definition: XmlComment.cs:6
override XmlNode CloneNode(bool deep)
Creates a duplicate of this node.
Definition: XmlComment.cs:34
override void WriteContentTo(XmlWriter w)
Saves all the children of the node to the specified T:System.Xml.XmlWriter. Because comment nodes do ...
Definition: XmlComment.cs:48
Represents a single node in the XML document.
Definition: XmlNode.cs:13