473,569 Members | 2,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to compare two xml documents?

I have to xml documents. I want to compare them and show them in two treeview
controls.

The one on the left is the new version of the document and the one is the
right is the old version of the same document. So if I have a node in the new
one that it is not in the old one it means it's has been added and if I have
a node in the old one that it is
no tin the new one it means it's has been removed.

I want to show the differences between the two doc in two treeview.

Anybody can help me?

Thanks
Mar 16 '07 #1
2 10433
I know the search term is called diff so try this search term at google

diff xml files c#

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee. com
URL http://clintongallagher.metromilwaukee.com/
"Iker Llanos" <Ik********@dis cussions.micros oft.comwrote in message
news:8C******** *************** ***********@mic rosoft.com...
>I have to xml documents. I want to compare them and show them in two
treeview
controls.

The one on the left is the new version of the document and the one is the
right is the old version of the same document. So if I have a node in the
new
one that it is not in the old one it means it's has been added and if I
have
a node in the old one that it is
no tin the new one it means it's has been removed.

I want to show the differences between the two doc in two treeview.

Anybody can help me?

Thanks


Mar 17 '07 #2
The XML Diff and Path tool at Microsoft should give you a good starting
point - it's almost exactly what you're looking for:
http://msdn.microsoft.com/XML/XMLCod...xmldiffgui.asp

There are a whole lot of related code samples at:
http://msdn.microsoft.com/XML/XMLCod...s/default.aspx

--
Chris Mullins, MCSD.NET, MCPD:Enterprise , Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"Iker Llanos" <Ik********@dis cussions.micros oft.comwrote in message
news:8C******** *************** ***********@mic rosoft.com...
>I have to xml documents. I want to compare them and show them in two
treeview
controls.

The one on the left is the new version of the document and the one is the
right is the old version of the same document. So if I have a node in the
new
one that it is not in the old one it means it's has been added and if I
have
a node in the old one that it is
no tin the new one it means it's has been removed.

I want to show the differences between the two doc in two treeview.

Anybody can help me?

Thanks


Mar 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1907
by: Neil | last post by:
Folks, I've got a problem at work, and I'm hoping that someone out there may have had something similar (although I doubt it!) or may be able to offer some advice. I'm in the process of designing a system that interacts with a third party external firm. Basically, they will send us an XML document (the quote request) via SOAP that...
2
2414
by: Muqu | last post by:
hi, I am trying to compare one nicely written html file against another program generated one, whose formatting isn't very appealing to human eyes. I am tuning the code so that two htmls will match but there some are always some difference. Is there any tools out there that can compare the structure, instead of content, of two htmls?
2
2768
by: Ganesh Muthuvelu | last post by:
Hello, How can I compare or visually check the differences between two XML schemas. Let us say I have two files like "version_1.xsd" and "version_2.xsd" , how would I programtically find out the differences between these two XSD files?. Is there a way to do this in .NET? Thanks, Ganesh
1
3352
by: Twinkle | last post by:
HI All, I have a problem..How to match two same word files. if someword missing in second files then it should be highlight by color change.
1
3982
by: lewis76 | last post by:
Hi all, I feel like this question has been asked before but I just cannot seem to find a good answer. Q: Is there a way to have two XML files and compare them and save them to one. Example: XML-A:
2
6016
seshu
by: seshu | last post by:
Hi Everybody I have a piece of code to compare two documents using vb.net but the problem here is it is comparing the whloe sentence but not word by word how to compare word by word The code i wrote is like this Dim objword As Word.Application objword = CreateObject("Word.Application") With objword ...
3
9566
by: super.raddish | last post by:
Greetings, I am relatively new to, what I would call, advanced XSLT/XPath and I am after some advice from those in the know. I am attempting to figure out a mechanism within XSLT to compare the difference between two source documents and output node-sets which are "different" (changed or new) to new XML files using xsl:result-document To...
1
1375
by: =?Utf-8?B?RGFuaWVsIERpIFZpdGE=?= | last post by:
II want to compare how many seconds there are between files. If the files are within a 1 - 10 second range I want to copy them to their own folders. What I have so far is a couple methods that take in all the files in a directory / subdirectories and sort them by their lastWriteTime stamp: Dim flist As List(Of System.IO.FileInfo) Private...
2
5691
by: =?Utf-8?B?UFM=?= | last post by:
Hi, Is there a way to compare PDF, Word Document, Excel using C# like WinDiff utility that compares text file and display the result with the modified text in both the document? -- Thanks, PS
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.