473,776 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Good way to selectively merge XML docs?


Hi folks,

I'm interested in merging two xml docs together. The documents use the same
structure, and in the case of similar nodes I'd like to keep the "newer"
one. I'll explain what I mean by that below.

For instance, if I have two docs like so:

<!--xmldoc1-->

<topnode>
<automobilepart >
<name>Radiato r</name>
<version>4</version>
</automobilepart>
<automobilepart >
<name>Head Gasket</name>
<version>8</version>
</automobilepart>
</topnode>
<!--xmldoc2-->

<topnode>
<automobilepart >
<name>Radiato r</name>
<version>6</version> <!--note newer version from above-->
</automobilepart>
<automobilepart >
<name>Spark Plug</name>
<version>4</version>
</automobilepart>
</topnode>

I'd like to create a document which is a combination of the two inputs, but
only has the "latest" version of a given autopart. In the example above, my
final document would contain a Head Gasket, a Spark Plug, and a Radiator,
whose "version" is 6. How might I tackle this? Could I do it with XSLT?
I'm using the MSXML3 parser to create the first two documents, if that helps
any.

TIA,

-Jim


Jul 20 '05 #1
0 2012

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

Similar topics

1
2690
by: Charlie Chang | last post by:
Hi, Does anyone know any good book(s) about MS-SQL, especially about Replication - basically, I need in-depth explanation about how to setup/maintain Snap Shot, Transactional, Merge Replication and different agents - with good examples? Hopefully, the book(s) is recent enough to cover SQLCE merge replication as well. In-depth information about DTS is a plus ^_^ Just tired of print hundreds of pages from MSDN site.
3
5394
by: Richard Fritzler | last post by:
I was given the task of designing a complete web based document prep system. In simplest terms (using a msword explanation) create a database of merge fields, and a library of templates. Allow the webuser to select the template, merge his DB record, and produce a formatted document that can be printed or downloaded. We need to do this without specialized software on the client, since it will be universally available to webusers. We...
1
1867
by: Paul Wagstaff | last post by:
Hi folks, Please forgive me - this straddles Access & Word '97 If I could, I'd send a (approx 1000 records) recordset to Word, mailmerge it & save the new document. However, Word's mailmerge process stops at around 400 records (I've only sent it a handful of fields for testing). My current method involves a saved ..doc with its datasource saved as my Access query. Thro' Access VBA I:
10
14375
by: Robert Jacobson | last post by:
Hi, I'm develing a COM add-in for Microsoft Word XP that displays a form. I'd like to have the form display using the Windows XP theme. However, neither using a manifest nor calling Application.EnableVisualStyles does the trick. (EnableVisualStyles works but massive instability, probably because the system is trying to theme the Word application itself.) I'm now trying to selectively enable the themes for just my form, or just...
2
4295
by: Mike Stephens | last post by:
A contact management application we previously developed for a customer now has a requirement to perform mail merging. Normally request like this would be very simple to solve, we were just point the mail merge data source to the database. But this request is a little bit different. The customer needs to perform the mail merge from the contacts in a dataset. Example In the main contact window the client has the ability to filter contact...
0
2387
by: academic | last post by:
Using ToolStripManager.Merge(ToolStrip,ToolStrip) I've been able to merge a MenuStrip into a MenuStrip but never a ContextMenuStrip into a MenuStrip. From the docs it seems to me I should be able to.
1
2028
by: EoRaptor013 | last post by:
We have a situation almost exactly like that in the MS documentation vis a vis peer-to-peer replication. We have three servers and three user groups, one each in Chicago, New York, and Bermuda. Because of our business practices, we are fairly confident that only one group will be updating a given record at any one time but the users will be updating their own local database servers and those updates must appear on all three servers....
0
2204
by: mbbostwick | last post by:
I have a problem with a mail merge procedure I used to use with Access '97. We recently converted to Office XP (2002) and I now have an issue I am unfamilliar with and have been unable to resolve. I am trying to merge individual records into seperate mail merge word docs. In the past I linked my word files directly to the tables and then simply changed the QueryString of the merge file for the particular record I need to create a...
1
2089
by: sparks | last post by:
I just got a chance to dl the work and printed out the docs and noticed on one of the screen shots it says print and there is a button for merge all. So this is for single as well as a complete merge of your database? Will have to check this out. His documents deal with single prints...is there documentation on a full merge?
0
9627
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10060
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9922
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
8951
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
7469
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
6721
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5367
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
4030
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
2859
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.