//
// (C) 2002 Jason Diamond, Kral Ferch
//
-\r
+
using System;
namespace System.Xml
#region Fields
XmlLinkedNode nextSibling;
+ XmlLinkedNode lastLinkedChild;
#endregion
public override XmlNode NextSibling
{
get {
- if (Object.ReferenceEquals(nextSibling, ParentNode.LastLinkedChild.NextLinkedSibling) == false) {
+ if(ParentNode == null) {
+ return null;
+ }
+ else if (Object.ReferenceEquals(nextSibling, ParentNode.LastLinkedChild.NextLinkedSibling) == false) {
return nextSibling;
}
else {
}
}
+ // copied this way from XmlElement
+ internal override XmlLinkedNode LastLinkedChild
+ {
+ get { return lastLinkedChild; }
+ set { lastLinkedChild = value; }
+ }
+
#endregion
}
}