473,395 Members | 1,539 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,395 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 10166
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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...
0
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
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...

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.