internal void AppendChild(XmlNode parent, XmlNode child)
        {
            Insertion ins = new Insertion();

            ins.ParentNode   = parent;
            ins.InsertedNode = child;
            changes.Add(ins);
        }
        public void RejectChanges()
        {
            for (int i = changes.Count - 1; i >= 0; i--)
            {
                Insertion ins = changes [i] as Insertion;
                if (ins != null)
                {
                    ins.ParentNode.RemoveChild(ins.InsertedNode);
                    continue;
                }

                Removal rem = changes [i] as Removal;
                if (rem != null)
                {
                    if (rem.RemovedNode.NodeType == XmlNodeType.Attribute)
                    {
                        XmlElement el = (XmlElement)rem.OwnerNode;
                        el.SetAttributeNode((XmlAttribute)rem.RemovedNode);
                    }
                    else
                    {
                        rem.OwnerNode.InsertBefore(rem.RemovedNode, rem.NextSibling);
                    }
                    continue;
                }
                AttributeUpdate au = changes [i] as AttributeUpdate;
                if (au != null)
                {
                    if (au.OldAttribute != null)
                    {
                        au.Element.SetAttributeNode(au.OldAttribute);
                    }
                    else
                    {
                        au.Element.RemoveAttributeNode(au.NewAttribute);
                    }
                    continue;
                }
            }
            changes.Clear();
        }
		internal void AppendChild (XmlNode parent, XmlNode child)
		{
			Insertion ins = new Insertion ();
			ins.ParentNode = parent;
			ins.InsertedNode = child;
			changes.Add (ins);
		}