關於XML文檔模型的事件驅動
來源:互聯網
上載者:User
////////////////////////////////////////////////////////////////////////////////
//Author: stardicky //
//E-mail: stardicky@hotmail.com //
//QQNumber: 9531511 //
//CompanyName: Ezone International //
//Class: HBS-0308 //
//title: 關於XML文檔模型的事件驅動 //
////////////////////////////////////////////////////////////////////////////////
using System;
using System.Xml;
namespace EzoneXMLEventDemo
{
/// <summary>
/// Class1 的摘要說明。
/// </summary>
class XMLEvent
{
/// <summary>
/// 應用程式的主進入點。
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: 在此處添加代碼以啟動應用程式
//
XmlDocument XmlDoc=new XmlDocument();
XmlDeclaration MyDeclaration=XmlDoc.CreateXmlDeclaration("1.0","utf-8","yes");
XmlDoc.NodeChanged+=new XmlNodeChangedEventHandler(XmlDoc_NodeChanged);
XmlDoc.NodeChanging+=new XmlNodeChangedEventHandler(XmlDoc_NodeChanging);
XmlDoc.NodeInserted+=new XmlNodeChangedEventHandler(XmlDoc_NodeInserted);
XmlDoc.NodeInserting+=new XmlNodeChangedEventHandler(XmlDoc_NodeInserting);
XmlDoc.NodeRemoved+=new XmlNodeChangedEventHandler(XmlDoc_NodeRemoved);