By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,061 Members | 1,523 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,061 IT Pros & Developers. It's quick & easy.

Merge XML files

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.