internal virtual XmlNode RemoveNodeAt( int i ) {
XmlNode oldNode = (XmlNode)Nodes[i];
string oldNodeValue = oldNode.Value;
XmlNodeChangedEventArgs args = parent.GetEventArgs( oldNode, parent, null, oldNodeValue, oldNodeValue, XmlNodeChangedAction.Remove );
if (args != null)
parent.BeforeEvent( args );
Nodes.RemoveAt(i);
oldNode.SetParent( null );
if (args != null)
parent.AfterEvent( args );
return oldNode;
}