mscorlib(4.0.0.0) API with additions
XmlNotation.cs
1 namespace System.Xml
2 {
4  public class XmlNotation : XmlNode
5  {
6  private string publicId;
7 
8  private string systemId;
9 
10  private string name;
11 
14  public override string Name => name;
15 
18  public override string LocalName => name;
19 
22  public override XmlNodeType NodeType => XmlNodeType.Notation;
23 
27  public override bool IsReadOnly => true;
28 
31  public string PublicId => publicId;
32 
35  public string SystemId => systemId;
36 
39  public override string OuterXml => string.Empty;
40 
44  public override string InnerXml
45  {
46  get
47  {
48  return string.Empty;
49  }
50  set
51  {
52  throw new InvalidOperationException(Res.GetString("Xdom_Set_InnerXml"));
53  }
54  }
55 
56  internal XmlNotation(string name, string publicId, string systemId, XmlDocument doc)
57  : base(doc)
58  {
59  this.name = doc.NameTable.Add(name);
60  this.publicId = publicId;
61  this.systemId = systemId;
62  }
63 
69  public override XmlNode CloneNode(bool deep)
70  {
71  throw new InvalidOperationException(Res.GetString("Xdom_Node_Cloning"));
72  }
73 
76  public override void WriteTo(XmlWriter w)
77  {
78  }
79 
82  public override void WriteContentTo(XmlWriter w)
83  {
84  }
85  }
86 }
override string InnerXml
Gets the markup representing the children of this node.
Definition: XmlNotation.cs:45
Represents an XML document. You can use this class to load, validate, edit, add, and position XML in ...
Definition: XmlDocument.cs:13
override bool IsReadOnly
Gets a value indicating whether the node is read-only.
Definition: XmlNotation.cs:27
XmlNameTable NameTable
Gets the T:System.Xml.XmlNameTable associated with this implementation.
Definition: XmlDocument.cs:230
override void WriteTo(XmlWriter w)
Saves the node to the specified T:System.Xml.XmlWriter. This method has no effect on XmlNotation node...
Definition: XmlNotation.cs:76
string SystemId
Gets the value of the system identifier on the notation declaration.
Definition: XmlNotation.cs:35
override XmlNode CloneNode(bool deep)
Creates a duplicate of this node. Notation nodes cannot be cloned. Calling this method on an T:System...
Definition: XmlNotation.cs:69
XmlNodeType
Specifies the type of node.
Definition: XmlNodeType.cs:5
Represents a writer that provides a fast, non-cached, forward-only way to generate streams or files t...
Definition: XmlWriter.cs:12
override string OuterXml
Gets the markup representing this node and all its children.
Definition: XmlNotation.cs:39
override string Name
Gets the name of the current node.
Definition: XmlNotation.cs:14
override XmlNodeType NodeType
Gets the type of the current node.
Definition: XmlNotation.cs:22
string PublicId
Gets the value of the public identifier on the notation declaration.
Definition: XmlNotation.cs:31
abstract string Add(char[] array, int offset, int length)
When overridden in a derived class, atomizes the specified string and adds it to the XmlNameTable.
Represents a notation declaration, such as <!NOTATION... >.
Definition: XmlNotation.cs:4
The exception that is thrown when a method call is invalid for the object's current state.
override string LocalName
Gets the name of the current node without the namespace prefix.
Definition: XmlNotation.cs:18
Represents a single node in the XML document.
Definition: XmlNode.cs:13
override void WriteContentTo(XmlWriter w)
Saves the children of the node to the specified T:System.Xml.XmlWriter. This method has no effect on ...
Definition: XmlNotation.cs:82