XmlNodeChangedEventArgs Class
TOC
Collapse the table of content
Expand the table of content

XmlNodeChangedEventArgs Class

 
Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

System.Object
  System.EventArgs
    System.Xml.XmlNodeChangedEventArgs

public class XmlNodeChangedEventArgs : EventArgs

NameDescription
System_CAPS_pubmethodXmlNodeChangedEventArgs(XmlNode, XmlNode, XmlNode, String, String, XmlNodeChangedAction)

Initializes a new instance of the XmlNodeChangedEventArgs class.

NameDescription
System_CAPS_pubpropertyAction

Gets a value indicating what type of node change event is occurring.

System_CAPS_pubpropertyNewParent

Gets the value of the ParentNode after the operation completes.

System_CAPS_pubpropertyNewValue

Gets the new value of the node.

System_CAPS_pubpropertyNode

Gets the XmlNode that is being added, removed or changed.

System_CAPS_pubpropertyOldParent

Gets the value of the ParentNode before the operation began.

System_CAPS_pubpropertyOldValue

Gets the original value of the node.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

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!!");
}
System_CAPS_noteNote

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.

Universal Windows Platform
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.

Return to top
Show:
© 2016 Microsoft