473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 2837
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.