473,323 Members | 1,547 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,323 software developers and data experts.

Merge XML files

MAF
Is there a quick way to merge two XML files

example A
<TestNode>
<Data>123</Data>
</TestNode>

<TestNode>
<Data>123</Data>
<Data>222</Data>
<Data>333</Data>
</TestNode>
<Next Data>
"Hello World"
</Next Data>
Result would be
<TestNode>
<Data>222</Data>
<Data>333</Data>
</TestNode>
<Next Data>
"Hello World"
</Next Data>
Nov 11 '05 #1
2 10162
That's not actually a merge... you're sort of "diffing" them :o) (I see you
removed the repeated node)

--
.../d:cazz
Daniel Cazzulino
DEVerest - Lagash
Tel +54 (0) 11 4247 7396
www.deverest.com.ar
www.lagash.com
dotnetopensrc.sourceforge.net

Coauthor of:
Beginning C# Web Applications with Visual Studio .NET
Beginning Web Programming using VB.NET and Visual Studio .NET
Professional ASP.NET Server Controls: Building Custom Controls with C#
ASP.NET Components Toolkit

"He who is good for making excuses, is seldom good for anything else."

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Is there a quick way to merge two XML files

example A
<TestNode>
<Data>123</Data>
</TestNode>

<TestNode>
<Data>123</Data>
<Data>222</Data>
<Data>333</Data>
</TestNode>
<Next Data>
"Hello World"
</Next Data>
Result would be
<TestNode>
<Data>222</Data>
<Data>333</Data>
</TestNode>
<Next Data>
"Hello World"
</Next Data>

Nov 11 '05 #2
Well there are a many ways to merge docs.
XSLT is common -
http://www.fawcette.com/Archives/pre...103/rj0103.asp
http://www.devguy.com/fp/XML/XSL/Merge/

If you want XML diff use this http://www.gotdotnet.com/team/xmltools/

Thanks. Mark
PM - System.Xml

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"Daniel Cazzulino" <ya****@nospam.siderar.com> wrote in message
news:ea**************@tk2msftngp13.phx.gbl...
That's not actually a merge... you're sort of "diffing" them :o) (I see you removed the repeated node)

--
../d:cazz
Daniel Cazzulino
DEVerest - Lagash
Tel +54 (0) 11 4247 7396
www.deverest.com.ar
www.lagash.com
dotnetopensrc.sourceforge.net

Coauthor of:
Beginning C# Web Applications with Visual Studio .NET
Beginning Web Programming using VB.NET and Visual Studio .NET
Professional ASP.NET Server Controls: Building Custom Controls with C#
ASP.NET Components Toolkit

"He who is good for making excuses, is seldom good for anything else."

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Is there a quick way to merge two XML files

example A
<TestNode>
<Data>123</Data>
</TestNode>

<TestNode>
<Data>123</Data>
<Data>222</Data>
<Data>333</Data>
</TestNode>
<Next Data>
"Hello World"
</Next Data>
Result would be
<TestNode>
<Data>222</Data>
<Data>333</Data>
</TestNode>
<Next Data>
"Hello World"
</Next Data>


Nov 11 '05 #3

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

Similar topics

1
by: Luke Airig | last post by:
I have two xml files that I need to merge on their common field (date_time). The merged output file needs to have the date_time field and all fields from both of the two input files. I am using...
8
by: Squirrel | last post by:
Hi everyone, I've created a mail merge Word doc. (using Office XP) , the data source is an Access query. Functionality I'm attempting to set up is: User sets a boolean field to true for...
0
by: Shrage H. Smilowitz | last post by:
Hi, I have created a setup project in vs.net, i have included several merge modules, but when i test the installation on my development machine i dont want the uninstall to remove the files that...
8
by: mesterak | last post by:
I'm trying to write a text log file processor but am having significant performance issues. * On average, there are about 100-200 files to process each file being about 1MB in size. * Typically...
8
by: ilikesluts | last post by:
Hi Group, I'm new to XML, here is my question: Would it be possible to write an algorithm that takes in two XML documents with the only condition being that they have the same root element? ...
1
by: mjobbe | last post by:
I have an installer that requires three merge modules (ATL, CRT, and MFC), and after adding them in, I get the following warnings when I build the MSI: WARNING: Two or more objects have the same...
4
by: Tom Jones | last post by:
I have an application that was originally built using Visual Studio 2003 that I upgraded to Visual Studio 2005. When I attempt to build the *.msi file in the deployment project, I am getting a...
7
by: giladp1 | last post by:
I found Albert Kallal's great "Super easy Word Merge" code in his site at: http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html Thanks Albert so much for sharing this. I am looking...
0
by: Claire | last post by:
Hi, I developed an application that uses Crystal Reports in visual studio 2005 then ported the whole application to VS2008. My original setup/deployment application (created within visual studio)...
1
by: cristalink | last post by:
Hi, I have MS Visual Studio 2008 both Pro and Dev Team Edition SP1 installed. I've compiled a managed C++ .DLL which automatically had a manifest embedded, with the following dependency:...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: 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.