mscorlib(4.0.0.0) API with additions
XmlLinkedNode.cs
1 namespace System.Xml
2 {
4  public abstract class XmlLinkedNode : XmlNode
5  {
6  internal XmlLinkedNode next;
7 
10  public override XmlNode PreviousSibling
11  {
12  get
13  {
14  XmlNode parentNode = ParentNode;
15  if (parentNode != null)
16  {
17  XmlNode xmlNode;
18  XmlNode nextSibling;
19  for (xmlNode = parentNode.FirstChild; xmlNode != null; xmlNode = nextSibling)
20  {
21  nextSibling = xmlNode.NextSibling;
22  if (nextSibling == this)
23  {
24  break;
25  }
26  }
27  return xmlNode;
28  }
29  return null;
30  }
31  }
32 
35  public override XmlNode NextSibling
36  {
37  get
38  {
39  XmlNode parentNode = ParentNode;
40  if (parentNode != null && next != parentNode.FirstChild)
41  {
42  return next;
43  }
44  return null;
45  }
46  }
47 
48  internal XmlLinkedNode()
49  {
50  next = null;
51  }
52 
53  internal XmlLinkedNode(XmlDocument doc)
54  : base(doc)
55  {
56  next = null;
57  }
58  }
59 }
virtual XmlNode ParentNode
Gets the parent of this node (for nodes that can have parents).
Definition: XmlNode.cs:60
override XmlNode PreviousSibling
Gets the node immediately preceding this node.
override XmlNode NextSibling
Gets the node immediately following this node.
Gets the node immediately preceding or following this node.
Definition: XmlLinkedNode.cs:4
virtual XmlNode FirstChild
Gets the first child of the node.
Definition: XmlNode.cs:117
virtual XmlNode NextSibling
Gets the node immediately following this node.
Definition: XmlNode.cs:95
Represents a single node in the XML document.
Definition: XmlNode.cs:13