473,467 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HELP - Getting a Difference between XML documents?

Ed
Hi,

I have 2 sets of XML documents.

XML1 is:
<Root>
<Node1>111</Node1>
<Node2>222</Node2>
<Node3>333</Node3>
<Node4>
<Node4A>444A</Node4A>
<Node4B>444B</Node4B>
</Node4>
<Node5>555</Node5>
</Root>

XML2 is:
<Root>
<Node1>111</Node1>
<Node2>222New</Node2>
<Node3>333</Node3>
<Node4>
<Node4A>444A</Node4A>
<Node4B>444BNew</Node4B>
</Node4>
<Node5>555New</Node5>
</Root>

Essentially, what I want to do in my VB Dot Net application is to have
XML2 - XML1, where the result would be:

<Root>
<Node2>222New</Node2>
<Node4>
<Node4B>444BNew</Node4B>
</Node4>
<Node5>555New</Node5>
</Root>

Only the differring nodes remain.

Is something like this possible? Please Help.

Thanks,
ed
Jul 20 '05 #1
5 2841
Ed wrote:
Only the differring nodes remain.

Is something like this possible? Please Help.


Take a look at Microsoft XML Diff tool -
http://apps.gotdotnet.com/xmltools/xmldiff
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Jul 20 '05 #2
apm
Oleg Tkachenko <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message news:<eh**************@TK2MSFTNGP09.phx.gbl>...
Ed wrote:
Only the differring nodes remain.

Is something like this possible? Please Help.


Take a look at Microsoft XML Diff tool -
http://apps.gotdotnet.com/xmltools/xmldiff

Now if only there was a platform-independent, GPL'd version :-)

-Andrew Marlow
Jul 20 '05 #3
apm wrote:
Now if only there was a platform-independent, GPL'd version :-)

AFAIK java versions do exist also, from IBM alphaworks to mention one.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Jul 20 '05 #4
>>>Only the differring nodes remain.
Is something like this possible? Please Help.

Take a look at Microsoft XML Diff tool -
http://apps.gotdotnet.com/xmltools/xmldiff

Now if only there was a platform-independent, GPL'd version :-)


How about X-Diff? It has C++ ja Java implementations and it's a real
difference algorithm - most normal algorithms assume that the order of
elements is significant, thus reducing the problem to finding the
difference between two strings.

But it is recommended that in XML the order of child elements would not
be significant. In that case one might think that the task reduces to
finding a difference between two trees - which is NP-Complete. However,
by taking advantage of some properties of XML documents, X-Diff runs in
polynomial time.

http://www.cs.wisc.edu/~yuanwang/xdiff.html

Jul 20 '05 #5
Ed
Thanks for all the responses.. I'm gonna give the XML Diff tool a look!

Aleksi Kallio <aleksi.kallio@_DONT_SPAM_csc.fi> wrote in message news:<bh**********@newsread2.funet.fi>...
Only the differring nodes remain.
Is something like this possible? Please Help.
Take a look at Microsoft XML Diff tool -
http://apps.gotdotnet.com/xmltools/xmldiff

Now if only there was a platform-independent, GPL'd version :-)


How about X-Diff? It has C++ ja Java implementations and it's a real
difference algorithm - most normal algorithms assume that the order of
elements is significant, thus reducing the problem to finding the
difference between two strings.

But it is recommended that in XML the order of child elements would not
be significant. In that case one might think that the task reduces to
finding a difference between two trees - which is NP-Complete. However,
by taking advantage of some properties of XML documents, X-Diff runs in
polynomial time.

http://www.cs.wisc.edu/~yuanwang/xdiff.html

Jul 20 '05 #6

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

Similar topics

6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
5
by: Ed | last post by:
Hi, I have 2 sets of XML documents. XML1 is: <Root> <Node1>111</Node1> <Node2>222</Node2> <Node3>333</Node3> <Node4>
3
by: alyssa | last post by:
Hi guys.. I'm getting an error saying that --->C:\Documents and Settings\Yeoh Cheng Lin\My Documents\Visual Studio Projects\CallBillingSystem\CallBillingSystem\Calculate_rates.cs(35): 'float'...
5
by: Mad Scientist Jr | last post by:
I'm trying to record a voice memo on a Pocket PC (2000) from VB.NET (smart device application from vs.net 2003). Tom Shelton did an initial conversion to VB.NET which I am trying to run, but am...
4
by: Mark Cooney | last post by:
OK this might be long winded by want to show you everything I am doing. Down below is the result I get from an API Call to a website called Betfair. The following is some code I am trying, but...
6
by: bleyddyn.apRhys | last post by:
I have a bit of code that doesn't compile under MSVC++ but does under GCC. Even under GCC, though, it seems odd that I don't need a std namespace qualifier for the exp function. Is this just one...
1
by: lucky29105 | last post by:
I am at my wits end here- I have an assignment due today (05/11) and I still cannot compile. I am getting 14 errors! I don't want someone to do my work, but I need help, I am stuck. Here is the...
11
by: hamiltongreg | last post by:
I am new to Java and am having problems getting my program to compile correctly. My assignment is as follows; Choose a product that lends itself to an inventory (for example, products at your...
4
by: rhivka | last post by:
I'm going to try to keep this question within the student posting guidelines. I've been working on a class file, and I'm not sure I've constructed it correctly. I'm getting several errors concerning...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.