473,406 Members | 2,281 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,406 software developers and data experts.

Help in merging 2 or more xml's

Ked
Any help in this matter will be gr8!!

I have 1 XML file:

I am giving the example:

<emails>
<email>
<clients>
<client>
<clientId>12345</clientId>
<extClientId>34567</extClientId>
</client>
</clients>
<emailaddress>jo**@ss.com</emailaddress>
<MailingPreference>Weekly once<MailingPreference>
</email>
<email>
<clients>
<client>
<clientId>35690</clientId>
<extClientId>455454</extClientId>
</client>
</clients>
<emailaddress>jo**@ss.com</emailaddress>
<MailingPreference>Weekly once<MailingPreference>
</email>
<email>
<clients>
<client>
<clientId>544554</clientId>
<extClientId>98725</extClientId>
</client>
</clients>
<emailaddress>ti*@ss.com</emailaddress>
<MailingPreference>Weekly once<MailingPreference>
</email>

</emails>

I would like to merge these 2 XML structures. Do observe that the
clients tag information is different for first 2 XML structures, but
rest is the same. Hence I would like to merge them together. 3rd
structure has completely different info. hence keep it seperate.

Basically I would like to get a XML like:
<emails>
<email>
<clients>
<client>
<clientId>12345</clientId>
<extClientId>34567</extClientId>
</client>
<client>
<clientId>35690</clientId>
<extClientId>455454</extClientId>
</client>
</clients>
<emailaddress>jo**@ss.com</emailaddress>
<MailingPreference>Weekly once<MailingPreference>
</email>
<email>
<clients>
<client>
<clientId>544554</clientId>
<extClientId>98725</extClientId>
</client>
</clients>
<emailaddress>ti*@ss.com</emailaddress>
<MailingPreference>Weekly once<MailingPreference>
</email>
</emails>

Is it possible?..Can anyone suggest a quick solution. Thanks a lot in
advance!!
Jul 20 '05 #1
0 1036

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

Similar topics

1
by: Mael Guillemot | last post by:
Hi, I have one xml looking like this: ========================= <video> <shot id="1"> <timestampbegin>000030.90</timestampbegin> <feature>blabla</feature>...
3
by: William Ahern | last post by:
I'm looking for resources on splitting and merging XML trees. Specifically, on methods to pare large XML documents into smaller documents which can be merged later. Off of the top of my head, I...
4
by: rottyguy70 | last post by:
hello, am trying to do the following with little success. any help is appreciated. 1) assume i have a static mapping: a -> 1 b -> 2 c -> 3 2) i need to read through some data, let's say...
2
by: Cy Huckaba | last post by:
I have an XML document that is linked to other document and I can't figure out what the best way to try and merge them before query qith an XpathNavigator. Simple example...a root xml document...
3
by: Robert Strickland | last post by:
I need to merge 3 or more xml streams (I have 4 string variables that contain xml) into a single xml stream before doing a transformation. Is there any sample code or site to show the way? Thanks
3
by: Patrick | last post by:
I have got 2 XML documents, both of which conform to the same XSD Schema, which define possible optional elements. The 2 XML documents contain 2 disjoint set of XML elements. What is the best,...
2
by: Nikhil Prashar | last post by:
I'm trying to merge two XML files that have the same structure but not necessarily the same nodes in the same order. I've tried opening the files as datasets and using the DataSet.Merge() function,...
3
by: Sanjib Biswas | last post by:
Hi All, I am looking for XML merging for the following scenarios. I want to load both the input files and show in the tree viewer and highlight the differences. Now its up to the user to select...
2
by: daniel.knights | last post by:
Hello, I was wondering if anyone could shed some light on an issue I am having. I have 3 or 4 xml files which i need to merge onto another xml file called build_log.xml, which is produced using...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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,...

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.