XmlNodeChangedEventArgs Class
Provides data for the NodeChanged, NodeChanging, NodeInserted, NodeInserting, NodeRemoved and NodeRemoving events.
Assembly: System.Xml (in System.Xml.dll)
| Name | Description | |
|---|---|---|
![]() | XmlNodeChangedEventArgs(XmlNode, XmlNode, XmlNode, String, String, XmlNodeChangedAction) | Initializes a new instance of the XmlNodeChangedEventArgs class. |
| Name | Description | |
|---|---|---|
![]() | Action | Gets a value indicating what type of node change event is occurring. |
![]() | NewParent | Gets the value of the ParentNode after the operation completes. |
![]() | NewValue | Gets the new value of the node. |
![]() | Node | Gets the XmlNode that is being added, removed or changed. |
![]() | OldParent | Gets the value of the ParentNode before the operation began. |
![]() | OldValue | Gets the original value of the node. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
The following C# code shows how to use the event handler.
//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 AppendChild 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. |
Available since 10
.NET Framework
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



