473,569 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to Merge to xml document ?

Hello,

I've to merge a peace of xml in another xml document.
Here is an example:

The doc:
<layout>
<win x="0">
<visible>fals e</visible>
<text>coucou</text>
</win>
</layout>

The other xml peace :
<layout>
<win x="10">
<visible>true </visible>
<backcolor rgb="25,25,25">
</win>
</layout>

The merge result should be:
<layout>
<win x="10">
<visible>truevi sible>
<text>coucou</text>
<backcolor rgb="25,25,25">
</win>
</layout>

I can do that with some recursives loops but I come in that newsgroup
to ask if there are some tools in .Net API which manage such operation ??
Or if .Net does not have such operator, is there a external library that can do that ??

Thank you for your lights ;o)
cyrille
Jan 31 '06 #1
2 2469
Hello

I would use the XmlDocument object. You can load both file in 1 line of code
and change the XmlNodes arround. Give it a try ^^

--
Francois Beaussier

"# Cyrille37 #" <cy*******@free .fr> a écrit dans le message de news:
%2************* ***@TK2MSFTNGP0 9.phx.gbl...
Hello,

I've to merge a peace of xml in another xml document.
Here is an example:

The doc:
<layout>
<win x="0">
<visible>fals e</visible>
<text>coucou</text>
</win>
</layout>

The other xml peace :
<layout>
<win x="10">
<visible>true </visible>
<backcolor rgb="25,25,25">
</win>
</layout>

The merge result should be:
<layout>
<win x="10">
<visible>truevi sible>
<text>coucou</text>
<backcolor rgb="25,25,25">
</win>
</layout>

I can do that with some recursives loops but I come in that newsgroup
to ask if there are some tools in .Net API which manage such operation ??
Or if .Net does not have such operator, is there a external library that
can do that ??

Thank you for your lights ;o)
cyrille

Feb 1 '06 #2
# Cyrille37 # wrote:
Hello,

I've to merge a peace of xml in another xml document.


The XML Diff and Patch GUI Tool

http://msdn.microsoft.com/library/de...xmldiffgui.asp

Contents

Introduction
An Overview of the XML Diff and Patch API
XML Diff and Patch Meets Winforms
Working with XML DiffGrams
Other Features of the XML Diff and Patch Tool

Feb 1 '06 #3

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

Similar topics

2
12493
by: Steve M | last post by:
I'm trying to do invoke the mail merge functionality of MS Word from a Python script. The situation is that I have a template Word document, and a record that I've generated in Python, and I want to output a new Word .doc file with the template filled in with the record I've generated. (To refresh your memory, in Word a mailmerge is...
2
3235
by: Aaron | last post by:
hello, i am perfoming a mail merge with the following code. Public Function MergeIt() Dim objWord As Object Set objWord = GetObject("C:\MyMerge.doc", "Word.Document") ' Make Word visible. objWord.Application.Visible = True ' Set the mail merge data source as the db3 database.
8
9504
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
1513
by: Lauren Wilson | last post by:
Hi folks, I am using the following code to merge data from an Access table to a pre-defined Word 2000 merge document. It al works fine except for ONE problem -- after the merged document displays and the user saves it or whatever, then closes it, the actual merge template is displayed in the background and asks if the user wants to save...
9
4310
by: Neil Ginsberg | last post by:
I have a strange situation using Access to automate a Word mail merge. Using Access 2000 and Word 2000, the code opens Word, opens the document in Word, sets a table in the calling Access application as the data source, and then performs a merge. Everything works fine. However, when a user uses it in Access 2002 and Word 2002, an extra...
3
5570
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge document in Word; 2. opens the document and runs the merge process for the new data. I have managed to write the code to perform step 1 ok, but I'm...
4
5440
by: lesperancer | last post by:
I have 3 tables (office97) tblQuote quoteNbr tblDetails ( quote : 1 <-> M: quoteDetails) quoteNbr detailLine product value
1
4944
by: mr k | last post by:
Hi, I wanted to use mail merge with forms but Text form fields are not retained during mail merge in Word, I got the code from Microsoft but it doesn't remember the text form field options such as the maximum length of the text (which I need) and the text format (would be ideal but can do without if need be) I have posted the code below, so...
7
7232
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...
1
6538
by: Esther Lane | last post by:
Hello! First off, many many thanks to Albert who wrote the Mail Merge code for MS Access I am using. It has been working beautifully for a few years. However, my client just (without notice!) upgraded from Access 2000 to Access 2007. Now that component is failing. The merge is building the data source file fine (text file named...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
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...
0
8120
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...
1
7672
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
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...
1
5512
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...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
937
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...

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.