Xml Diff and Patch tools

by Matt 16. April 2007 17:35

Ages ago, I found Microsoft's xml diff and patch tools on gotdotnet. Dead useful little package - it does exactly what it says on the tin, diffs and patches xml files.

I went looking for it again today, and of course, link rot had set in. Microsoft is phasing out gotdotnet, so when you head on over to http://apps.gotdotnet.com/xmltools/xmldiff/ you get an "Unspecified error" page, with no helpful links. Bit of a shame, that, seeing how loads of pages around the web point you there.

Fortunately, there are a couple of msdn articles. The first gives a nice overview of using the xmldiffpatch assembly in your own code, but not of the tools. And the link to download the tools returns an out of date 1.0 version.

But, that download has a sample to generate a html file from two differing xml files. And this second msdn article creates a Windows Form app over the top of this sample to generate and display the differences in a hosted browser window. Again, this uses an out of date 1.0 version.

Finally, I look at the home page of www.gotdotnet.com (which still has people uploading samples even though it's being decommissioned) and find a link to the XML tools page on msdn. Now, we get the newer 1.1 version. (There's also a link to the quite useful Xml Notepad on that page.)

And it doesn't install on Vista.

It's demanding .net 1.1 to be installed.

Keep me covered, I'm going in.

First, we need to open the executable in Visual Studio. This should display the resource view. Expand the RCDATA node, and right click on "CABINET". Export this data as "cabinet.cab". Switch back to explorer, and double click on the .cab file. You can now copy out setup.exe, setup.ini and XmlDiffPatch.msi. In fact, we're just interested in the .msi file. If you double click on it, you get an error message that .net 1.1 isn't installed.

I can't find a way to fix this easily. The msi file has a custom action that checks for the installed .net framework versions, and compares them against a property it has stashed away. It would be nice if we could have just changed the SupportedRuntimes value in the setup.ini, or passed in an override value for the VSDSupportedRuntimes property on the command line, but no. We have to edit the .msi file. You'll need Orca installed (I think it comes as a .msi in the Windows SDK). Open the .msi file, scroll down to "CustomAction" and delete the VSDCA_VsdLaunchConditions custom action. Save the file and exit.

Double clicking the .msi will now allow you to install the software. Phew.

It seems to work, but bizarrely, the XmlPatch.exe file gains the Vista UAC shield. I guess because it's got the word "patch" in the name (and because it's in the Program Files directory. Copy it out, and it's fine). That's a bit pants. To fix that, you'll need to copy the following into a file called XmlPatch.exe.manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
  <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="XmlPatch.exe" type="win32"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker"/> 
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

Then drop to a command prompt. Seeing how you've already got the Windows SDK for Orca, you'll also get mt.exe from there. It should be the latest version (there are bugs in previous versions which can cause blue screens!). Run the following command line, using the mt.exe from the SDK:

mt -manifest XmlPatch.exe.manifest -outputresource:XmlPatch.exe

Finally, we've got a version of the xml diff and patch tools, ready to use. And it even comes with source. Installed to Program Files so that you can't compile it without moving it, but you've got source code. You can now build the all important dll, the XmlDiff and XmlPatch command line utils, and there's that sample that generates a html diff view for you. This was the sample I wanted to build, and what caused all of this pain. It'd better be worth it.

Tags:

Vista | .net tools

Comments (65) -

lb
4/17/2007 7:34:49 PM #

RE: Xml Diff and Patch tools

wow. that was easy Wink

Reply

Matt Ellis
4/18/2007 4:02:06 PM #

RE: Xml Diff and Patch tools

Just a walk in the park, Kazansky

Reply

Jason
6/18/2008 9:12:06 AM #

RE: Xml Diff and Patch tools

The MSDN links are out of date again - the post at [2] contains a working link though.

Not having orca and being intimidated by the size of the download, I was able to extract it using the simple little tool at [2].


[1] http://www.jsware.net/jsware/msicode.php3

[2] forums.microsoft.com/.../ShowPost.aspx

Reply

low cost franchise
low cost franchise United Kingdom
4/23/2009 6:23:36 PM #

Heya - Just looking through some blogengine.net blogs, seems to be a fairly nice platform, certainly better than blogger but still playing with the idea of wordpress.  Any major plus points you have found over WP at all?

Thanks

Matthew

Reply

matt
matt United Kingdom
4/24/2009 8:48:53 AM #

I haven't really used any other blog engine. I previously used a different open source platform that wasn't as good as BlogEngine. So, I can't really compare with WordPress and Blogger and all.

But I've got no real complaints about BlogEngine.net - I think it's great. I like it because it's .net and open source, and I'm a .net developer and so can play around with it. Plus, it's got essentially all of the features I'm interested in. As far as I'm concerned, I'd give it a hearty recommendation.

Matt

Reply

listoftrustedcpc
listoftrustedcpc
2/7/2011 5:36:45 PM #

The amusing information

Reply

Semi Truck Accident
Semi Truck Accident
2/11/2011 12:49:22 PM #

The very crux of your writing whilst appearing agreeable originally, did not really settle properly with me after some time. Someplace within the paragraphs you managed to make me a believer unfortunately just for a while. I nevertheless have a problem with your leaps in assumptions and you might do well to help fill in those gaps. When you actually can accomplish that, I could definitely be fascinated.

Reply

Olympia Sandison
Olympia Sandison
2/11/2011 5:43:26 PM #

In this awesome design of things you'll secure  an A just for effort. Where exactly you confused me personally was on the particulars. As it is said, details make or break the argument.. And that could not be much more true here. Having said that, let me tell you what exactly did do the job. The authoring is definitely pretty powerful and this is probably the reason why I am taking the effort to opine. I do not make it a regular habit of doing that. Next, whilst I can see a leaps in reason you make, I am not necessarily convinced of exactly how you seem to unite your points which inturn make the final result. For right now I will yield to your point but trust in the foreseeable future you actually link the dots much better.

Reply

emailandzipsubmitoffers
emailandzipsubmitoffers
2/16/2011 8:09:18 AM #

What excellent phrase

Reply

Jane Roberts
Jane Roberts
3/24/2011 11:57:07 AM #

The solid truth about this  blog article is, that it spoke to me deeply. Thank you for sharing your thoughts and concerns.

Reply

Houston Chiropractor
Houston Chiropractor
3/24/2011 2:52:01 PM #

The magnonomous truth about this blog post is, that it spoke to me greatly. Thank you for sharing your thoughts and concerns.

Reply

fighter tube
fighter tube
5/8/2011 3:55:42 AM #

and more importantly, how will you ever know obama is not bluffing you when he is now holding all the cards??

Reply

Rehoboth Beach
Rehoboth Beach
5/10/2011 5:59:21 AM #

Nicely written article. I would work on the conclusion though.

Reply

Joseph C. Johnson
Joseph C. Johnson
5/10/2011 3:10:22 PM #

That is a pretty intriguing write-up.  It is quite helpful and you have clearly performed your preparation ahead of writing this post.  I have to return and follow your forthcoming content.

Reply

Kirby Richey
Kirby Richey
5/12/2011 2:35:11 PM #

That is a really interesting content.  It is quite instructive and you also have undoubtedly done your homework well before writing this write-up.  I will likely need to return and read your upcoming content.

Reply

Hayward Roofing
Hayward Roofing
5/14/2011 10:36:07 PM #

Thank you for this awesome post.  I liked it a lot! Smile
Laughing, thanks for this!
thx for posting Smile
This post was interesting.
This was interesting to stumble upon, thx.
I really liked this.
thx for putting the thought in & writing that
thx for posting this, I enjoyed the read.
You have an interesting point of view ;)
I enjoyed what you have to say
thanks for putting this out there
One of the best aspects about the blogging world is all the pieces of info bloggers generously give.  thanks a bunch! ;)
Awesome post!
Thanks!
Found your post listed in Digg Smile
Saw your site bookmarked on Delicious
I'll Digg this, thank you!
Really like this post.
I really enjoyed reading this post
Great read, thank you very much for putting it out there.
Interesting Post
Good share, I look forward to the rest
Really enjoy your style
I enjoyed your site
Your blog is interesting
Great, thx for posting!
I just wanted to say tHANKS for your post
Hey, I just wanted to drop a note and tell you great post!
Thanks for posting this.  It's sometimes a struggle to keep up with my blogging.  Coming across a site that puts off such a great vibe is very inspirational.
Thank you for your post, I enjoy your blog.  Long time reader, first time commenter, you know the drill.  I tried to comment this once before, I don't think it posted correctly...hopefully it will this time! Tong

Reply

webdesigner
webdesigner
5/18/2011 12:12:18 AM #

this is just awesome

Reply

Franchise Advice
Franchise Advice
5/24/2011 5:02:32 AM #

Nice platform, just researching some blogs to use for my franchise advice website.  All the best, Matt.

Reply

John
John
7/14/2011 3:24:51 AM #

Great stuff!

Reply

best suv
best suv
7/20/2011 10:20:03 PM #

Hi,what an excellent article this is,I found it on bing and I like it very much,I agree with what you have said, lots of things will be learned form your site,but I still have some questions with the last part,can you explain it for me ?I will appreciate your answer,and I will be back again!

Reply

Rehoboth Beach
Rehoboth Beach
7/25/2011 10:20:55 AM #

I absolutely love Rehoboth

Reply

SJR Luxuria
SJR Luxuria
8/9/2011 7:01:57 PM #

Blog engine is a really good blog platform, Wish you best luck for blogging

Reply

Encinitas chiropractic
Encinitas chiropractic
8/13/2011 8:58:08 AM #

I like this blog! Thanks for sharing the post.

Reply

Btissam
Btissam
10/23/2011 11:58:31 AM #

Hello

Interresting post here will came back
keep update

Reply

Bari Zabawa
Bari Zabawa
11/9/2011 10:39:27 PM #

Good write up, I am really interested about this topic. I will certainly come back and visit! Keep up the good work!

Reply

Nicholas
Nicholas
11/10/2011 6:12:43 PM #

Reply

philix
philix United States
11/19/2015 3:40:17 PM #

wonderful site.

Reply

philix
philix United States
11/20/2015 2:01:13 AM #

superb web site

Reply

philix
philix United States
11/20/2015 6:50:14 AM #

Ace Site

Reply

philix
philix United States
11/21/2015 11:06:33 AM #

wonderful website.

Reply

Wilton Megeath
Wilton Megeath United States
1/15/2016 3:48:07 AM #

AWESOME!Can't wait for that, will be something to want to accomplish day by day, to do something AWESOME!

Reply

Georgeanna Carrigg
Georgeanna Carrigg United States
1/15/2016 4:04:13 AM #

Let me be the first to say: Congrats, Neil! I've been following this site from day one, and have loved every single day of awesomeness that it has delivered. You deserve all the success coming your way. Keep it up!AWESOME!

Reply

Mitzi Towers
Mitzi Towers United States
1/15/2016 4:22:46 AM #

Congrats! So glad to see this site getting the recognition it deserves, the world can always use a little more awesome.

Reply

Joseph Vogel
Joseph Vogel United States
1/15/2016 4:33:45 AM #

Thaaaat IS awesome! lol hehe

Reply

Taren Esh
Taren Esh United States
1/15/2016 4:51:27 AM #

I can't wait to read this masterpiece. Ordering off the menu at fast food restaurants and old dangerous playground equipment have to be in the book!

Reply

Wilton Megeath
Wilton Megeath United States
1/15/2016 5:33:07 AM #

AWESOME!Can't wait for that, will be something to want to accomplish day by day, to do something AWESOME!

Reply

Terrell Sabel
Terrell Sabel United States
1/15/2016 5:44:20 AM #

The dolphin saving you one is the best one!

Reply

Janean Finkelson
Janean Finkelson United States
1/15/2016 5:45:28 AM #

Thaaaat IS awesome! lol hehe

Reply

Jerald Petula
Jerald Petula United States
1/15/2016 5:45:59 AM #

Congratulations on your success! You deserve it for brightening all of my work days with something to be excited about.

Reply

Isreal Payor
Isreal Payor United States
1/15/2016 5:54:01 AM #

getting laid AWSOME

Reply

Thersa Tomich
Thersa Tomich United States
1/15/2016 6:39:17 AM #

the style of keeping you connected with so many things of different types is awesome and you find it interesting everytime.

Reply

Antony Goren
Antony Goren United States
1/15/2016 6:58:48 AM #

Let me be the first to say: Congrats, Neil! I've been following this site from day one, and have loved every single day of awesomeness that it has delivered. You deserve all the success coming your way. Keep it up!AWESOME!

Reply

Taren Esh
Taren Esh United States
1/15/2016 7:06:45 AM #

Thaaaat IS awesome! lol hehe

Reply

Terrell Sabel
Terrell Sabel United States
1/15/2016 7:44:56 AM #

I can't wait to read this masterpiece. Ordering off the menu at fast food restaurants and old dangerous playground equipment have to be in the book!

Reply

Isreal Payor
Isreal Payor United States
1/15/2016 8:20:24 AM #

Well good for you! I have a lot but one I just thought of was when you lick a crease of paper so that it'll rip in a straight line and it actually tears in a frayed straight line rather than rips awkwardly. I love that bleachy taste and that bleachy satisfaction.

Reply

Willis Karam
Willis Karam United States
1/15/2016 8:27:52 AM #

the style of keeping you connected with so many things of different types is awesome and you find it interesting everytime.

Reply

high pr backlinks generator
high pr backlinks generator United States
2/9/2016 8:38:02 PM #

Famous! This is just awesome! Not just reputable, but additionally important details. Which is uncommon ahead by these days! I need to state that I am actually amazed and will surely come back once more if you keep up the top quality and worth of the content at this degree, or even obtain it on the next degree. Regards, from all-time low of my heart, thanks for your time! God bless!

Reply

Loyd Wage
Loyd Wage United States
7/15/2016 3:49:01 PM #

Fantastic blog. keep it up!

Reply

Dinah Dicamillo
Dinah Dicamillo United States
7/17/2016 4:10:21 AM #

I really like all the points you have made.

Reply

Elvin Zadora
Elvin Zadora United States
7/21/2016 11:30:21 AM #

In any case I will be subscribing for your rss feed and I am hoping you write again very soon!

Reply

James Fly
James Fly United States
7/29/2016 7:49:03 AM #

This is such a great site come check out our new free Dating web site would wide fined your true love at http://youllfindlove.com/

Reply

Mckinley Charlesworth
Mckinley Charlesworth United States
8/25/2016 4:15:35 AM #

We stayed in Manila and would like to find a Smart Home Builders to do our house architectural plans. An informative post about this subject would be very helpful.

Reply

Estas mismas fuentes preven que serán en torno a 4.000 personas de CCOO y 2.000 de UGT las que a lo largo de la jornada tratarán que la huelga sea un éxito, especialmente en las primeras horas coincidiendo con el inicio del funcionamiento de los transportes la apertura de los comercios. La sesión de control de este jueves se ha desarrollado sin la presencia del presidente del Gobierno, Mariano Rajoy, que está volviendo a España después del viaje oficial que ha realizado a Seúl. El segundo gran episodio que demostró la falta de firmeza fue el pensionazo: cuatro meses después de la huelga general del 29 de septiembre, dispusieron, junto al gobierno, que tendremos que trabajar dos años más para cobrar una pensión más exigua.

Reply

Reparacion de lavadora madrid
Reparacion de lavadora madrid United States
11/29/2016 10:16:00 AM #

Nota: Este epígrafe comprende la fabricación de vidrio hueco por procedimientos automáticos, semiautomáticos manuales y abarca la fabricación de envases de vidrio; de servicio de mesa y otros objetos domésticos de vidrio no prensado; fabricación de vidrio prensado y otras fabricaciones de vidrio hueco. Epígrafe 247.4.- Fabricación de vajillas, artículos del hogar y objetos de adorno, de material cerámico. Nota: Este epígrafe comprende la fabricación de aparatos higiénicos y sanitarios de todas clases en gres, loza y porcelana. Epígrafe 247.6.- Fabricación de aisladores y piezas aislantes de material cerámico para instalaciones eléctricas.

Reply

consumo de aparatos electrodomesticos
consumo de aparatos electrodomesticos United States
12/16/2016 10:10:32 PM #

Su oferta es continuar con la garantía del fabricante por tiempo ilimitado y el precio, si es cierto todo, más que razonable. No es así en el caso de los gases refrigerantes, si falta gas en una instalación de aire acondicionado es sencillamente porque existe una fuga. Puede ser que en algunos talleres solucionen una fuga pequeña cargando más gas, pero esto es pan para hoy y hambre para mañana”, la fuga está ahí y volveremos al mismo problema tarde temprano. La solución lógica sería la búsqueda del punto por donde perdemos gas y su posterior reparación.

Reply

Josue Kirsh
Josue Kirsh United States
1/21/2017 12:32:41 PM #

<p>Sorry, I guess I botched the formatting. I’ll try it again the old fashioned way….</p><p>RS: Remember, we are speaking of the covenant of grace and/or the New Covenant. I know you know that, but simply trying to point out that the administration will be different in the New Covenant.</p><p>David R: Right, I was speaking of the covenant of grace, which (as you point out) is differently administered under the NC (the age of fulfillment) than it was under the OC (the age of type and shadow), yet it is essentially the same covenant in both dispensations, with essentially the same membership. As to its essence, its members are the regenerate, but as to its administration, those who profess the true religion and their children.</p><p>RS.The Old Covenant is to the physical seed of Abraham and so a physical birth was enough</p><p>David R: I’m not sure what you can mean by this, since I’m sure you realize that spiritual seed of Abraham existed under the Old Covenant too. Certainly it’s true that the promises of the covenant were limited to one family under the OC, whereas under the NC, they embrace all the families of the earth. And certainly the NC age is preeminently the age of the Spirit. But as you realize, there were children of the promise (and not just of the flesh) in OC times too. And if what you’re saying is true, then how can circumcision be said to be a sign and seal of the righteousness that is by faith? Shouldn’t it merely be a sign of descent from Abraham?</p><p>RS: I do hold to God’s work in keeping His people persevering, but that is part of the New Covenant promise. The Old Covenant did not have that promise.</p><p>David R: By way of clarification, are you saying that OT believers like Abraham and David had no promise that they would persevere?</p><p>RS: So at this point, though I will admit to being thick between the ears at times, I don’t see the physical seed of believers as being the same as the physical seed of Abraham.</p><p>David R: Well, Paul speaks of those who are <i>merely</i> the physical seed of Abraham as natural branches who are cut off. And likewise he says those who are <i>merely</i> the physical seed of believers will also be cut off. Same olive tree, and same reasons for being cut off under both dispensations.</p><p>RS: A believer is the spiritual seed of Abraham so I am not sure how that is passed on to a physical seen when the spiritual seed comes not by physical descent by the grace of God and the promise of the Father to Christ.</p><p>David R: Well, it’s true that physical descent carries no guarantees, but neither does God ordinarily effect regeneration apart from the use of means, and one of the primary means He uses is covenant nurture from one generation to the next.</p><p id="comment-like-101651" data-liked=comment-not-liked class="comment-likes comment-not-liked"><a href="oldlife.org/.../; class="comment-like-link needs-login" rel="nofollow" data-blog="107067629"><span>Like</span></a><span id="comment-like-count-101651" class="comment-like-feedback">Like</span></p>

Reply

Kip Debiasio
Kip Debiasio United States
2/27/2017 5:38:24 PM #

I just wanted to point out that Sweeny Probate law is the greatest!  I had a wonderful experience with my estate planning and probate needs. They saved me a bunch of money and I just wanted to let everyone know!  Thank you.

Reply

Dewayne Silberman
Dewayne Silberman United States
3/14/2017 7:46:08 PM #

This is a awesome website with some awesome tips

Reply

apk file download
apk file download United States
4/12/2017 1:44:33 PM #

check this website, it also could download apk directly from Google Play: http://www.apksmart.com

Reply

Leonard Beachamp
Leonard Beachamp United States
6/19/2017 11:01:23 PM #

I used this post

Reply

Wilbert Glausier
Wilbert Glausier United States
6/19/2017 11:12:43 PM #

Thank you very much

Reply

Miles Mayberry
Miles Mayberry United States
6/19/2017 11:13:31 PM #

I used this post

Reply

Linn Gorringe
Linn Gorringe United States
6/19/2017 11:29:28 PM #

Thank you very much

Reply

Alejandra Hoevel
Alejandra Hoevel United States
7/10/2017 8:52:48 PM #

Reagrds,

Reply

Carroll B. Merriman
Carroll B. Merriman United States
7/19/2017 11:40:30 AM #

I used this post , Thank you very much

Reply

Add comment

biuquote
  • Comment
  • Preview
Loading

Rel=Me

Month List

RecentComments

Comment RSS