473,795 Members | 2,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10205
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.s ourceforge.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*****@henwoo denergy.com> wrote in message
news:%2******** *******@TK2MSFT NGP11.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******** ******@tk2msftn gp13.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.s ourceforge.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*****@henwoo denergy.com> wrote in message
news:%2******** *******@TK2MSFT NGP11.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
4118
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 the Saxon xml parser. Can someone please help me to get this to work? The two xml input files follow, as well as my attempt to write the merge xsl (merge_on_date_time.xsl): lrv_1_transaction_cid_1.xml: ---------------------------- <?xml...
8
9525
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 each person for whom a mail merge letter is desired. The query reads address info from the table for each record where is true.
0
1318
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 are included in the merge modules, because it remove the files necossary to for development. How can i prevent the uninstall from removing that files. I know that normal project files i can set the permanent property to true and will not be...
8
1551
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 there are ~600k to 1m lines to process total. Every line in each log file typically contains a date, a time, follwed by a textual message * Unfortunately, not all log files have the same format/layout; e.g. some may have only have month/day...
8
1873
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? If it is possible what would be the best technology to implement the solution (XMLDom, XSLT...)? How hard would the solution be?
1
4296
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 target location ('\8.0.50727.42.cat') WARNING: Two or more objects have the same target location ('\8.0.50727.42.cat')
4
7224
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 compile error stating that it cannot find: "C:\Program Files\Common Files\Merge Modules\Crystal_regwiz2003.msm" I am not sure where to get this file or even if it is appropriate (i.e., should there be a newer version for Visual Studio 2005).
7
7242
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 for any comments about the use of the docmd.transfertext method instead of the code Albert used for creating the text file. Also, perhaps some ideas for coding the Subject Line of each email so
0
1607
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) for this project included files CrystalReportsRedist2005_x86.msm, microsoft_vc80_atl_x86.msm and policy_8_0_Microsoft_vc80_atl_x86.msm all situated in c:\program files\common files\merge modules directory. My ported application still uses dotnet...
1
14889
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: "Microsoft.VC90.CRT" "9.0.21022.8" "x86". I created an MSI package with the following merge modules: "Program Files\Common Files\Merge Modules\Microsoft_VC90_CRT_x86.msm" and "policy_9_0_Microsoft_VC90_CRT_x86.msm".
0
9522
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10216
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10002
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9044
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7543
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
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 we have to send another system
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.