System.Xml.XmlNodeChangedEventArgs Class

Provides data for the XmlDocument.NodeChanged, XmlDocument.NodeChanging, XmlDocument.NodeInserted, XmlDocument.NodeInserting, XmlDocument.NodeRemoved and XmlDocument.NodeRemoving events.

See Also: XmlNodeChangedEventArgs Members

Syntax

public class XmlNodeChangedEventArgs : EventArgs

Remarks

The following C# code shows how to use the event handler.

Example

 //Add a new event handler.
 XmlDocument doc = new XmlDocument();
 doc.NodeInserted += new XmlNodeChangedEventHandler(NodeInsertedHandler);
 //Define the event handler.
 void NodeInsertedHandler(Object src, XmlNodeChangedEventArgs args)
 {
  Console.WriteLine("Node " + args.Node.Name + " inserted!!");
 }
Note:

If an operation is comprised of multiple actions, it results in multiple events. For example, an XmlNode.AppendChild(XmlNode) call may have to remove the node being appended from its previous parent. In this case you will see a NodeRemoved event followed by a NodeInserted event.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0