Running XmlDiff and XmlPatch Class Code Samples

Microsoft XML Diff

Microsoft XML Diff 1.0 and XML Patch 1.0

Running XmlDiff and XmlPatch Class Code Samples

The code samples shown in this documentation assumes that the common language runtime has been downloaded from http://msdn.microsoft.com/netframework/downloads/howtoget.asp.

For full code samples, copy and paste the code into Notepad, and save the file as CompareNodes.txt. Next, open up a command prompt. The following examples show that two different commands are used for running code, depending on the language of the code sample.

The following command compiles the code for Visual Basic code samples. This command assumes that the code is stored on the C drive and is called CompareNodes.txt.

Visual Basic Samples

C:\>vbc /r:system.xml.dll /r:system.dll /r:xmldiffpatch.dll C:\CompareNodes.txt

When the code compiles successfully, the executable version of the code is saved in another file that has the same name, however the extension of the file is .exe. You can now run the executable by issuing the command:

C:\>C:\CompareNodes

The following command compiles the code for C# code samples. This command assumes that the code is stored on the C drive and is called CompareNodes.txt.

C# Samples

C:\>csc /r:system.xml.dll;system.dll; C:\CompareNodes.txt

When the code compiles successfully, the executable version of the code is saved in another file that has the same name, however the extension of the file is .exe. You can now run the executable by issuing the command:

C:\>C:\CompareNodes

© 2002 Microsoft Corporation. All rights reserved.