XmlDocument.NodeRemoving 事件

定义

当属于该文档的节点将从文档中移除时发生。Occurs when a node belonging to this document is about to be removed from the document.

public:
 event System::Xml::XmlNodeChangedEventHandler ^ NodeRemoving;
public event System.Xml.XmlNodeChangedEventHandler NodeRemoving;
member this.NodeRemoving : System.Xml.XmlNodeChangedEventHandler 
Public Custom Event NodeRemoving 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.

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

适用于

另请参阅