473,404 Members | 2,137 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,404 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 2840
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
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...

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.