XmlDocument.NodeChanging 事件


当属于该文档的节点的 Value 将被更改时发生。Occurs when the Value of a node belonging to this document is about to be changed.

 event System::Xml::XmlNodeChangedEventHandler ^ NodeChanging;
public event System.Xml.XmlNodeChangedEventHandler NodeChanging;
member this.NodeChanging : System.Xml.XmlNodeChangedEventHandler 
Public Custom Event NodeChanging As XmlNodeChangedEventHandler 


此事件允许用户执行额外检查,如有必要,将引发异常来停止操作。This event allows the user to do extra checking and, if necessary, throw an exception to stop the operation. 如果引发异常,则 XmlDocument 返回到其原始状态。If an exception is thrown the XmlDocument returns to its original state. 此事件仅适用于具有值的节点。This event only applies to nodes that have a value.

此文档创建的所有节点(无论是否已插入到文档中)都包含在此事件中。All nodes created by this document, whether or not they have been inserted into the document, are included in this event.