+//
+// System.Xml.XmlLinkedNode
+//
+// Authors:
+// Jason Diamond <jason@injektilo.org>
+// Kral Ferch <kral_ferch@hotmail.com>
+//
+// (C) 2002 Jason Diamond, Kral Ferch
+//
+\r
using System;
namespace System.Xml
public abstract class XmlLinkedNode : XmlNode
{
#region Fields
+
XmlLinkedNode nextSibling;
#endregion
#region Constructors
- protected internal XmlLinkedNode(XmlDocument doc) : base(doc) { }
+ internal XmlLinkedNode(XmlDocument doc) : base(doc) { }
#endregion
- #region Properties
+ #region Properties
+
public override XmlNode NextSibling
{
get {
set { nextSibling = value; }
}
- [MonoTODO]
public override XmlNode PreviousSibling
{
get {
- throw new NotImplementedException ();
+ if (ParentNode != null) {
+ XmlNode node = ParentNode.FirstChild;
+ if (node != this) {
+ do {
+ if (node.NextSibling == this)
+ return node;
+ } while ((node = node.NextSibling) != null);
+ }
+ }
+ return null;
}
}