XmlDocument.NodeInserting 事件

定义

当属于该文档的节点将被插入另一个节点时发生。Occurs when a node belonging to this document is about to be inserted into another node.

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

适用于

另请参阅