473,465 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Merge two different xml files into one

I have two xml files that I wish to join/merge into one. The first
file (sp.xml)includes information about study programmes and the
second one includes information about each course. The only thing I
want from file number two(course.xml) abouts courses is credits.
credits pr. course. I am using xsl to show the data.

Here's the first xml file(sp.xml):
<studyinfo>
<studyprogramme>
<name>Bachelor Agroecology</name>
<language>Norwegian</language>
<code>B-GEOM</code>
<studyoptions>
<coursecomposition>
<coursecombination level ="1">
<coursecombinationcode>B-GEOM-OBL</coursecombinationcode>
<coursecombinationame>Geomatikk</coursecombinationame>
<course>
<courseid>
<coursecode>STAT100</coursecode>
<institutenr>192</institutenr>
</courseid>
<coursename>Statistics</coursename>
<semester>1</semester>
<status>O</status>
--> here I want credits from the other xml file(course.xml)!
</course>
etc.
</coursecombination>
</coursecomposition>
</studyoptions>
</studyprogramme>
</studyinfo>
Here's file number two(course.xml):
<studyinfo>
<courses>
<course>
<courseid>
coursecode>STAT100</coursecode>
<institutenr>192</institutenr>
</courseid>
<coursename>Statistics</coursename>
<semester>1</semester>
<status>O</status>
<credits>10</credits> ---->I want this info into my first
file(sp.xml)
</course>
</courses>
</studyinfo>

etc.
---------------------------------

I loop through the document number one (sp.xml)and I have tried using
document() function, but only get the credits for the first course!
The credits for the rest of the courses are from the first course in
the course.xml file, therefore the same.

Also tried <xsl:copy of select="">, but with no luck yet.

Have you any suggestions on a solution for this problem?
Jul 20 '05 #1
0 1359

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

Similar topics

1
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...
8
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...
0
by: EdgarBM | last post by:
Hi, I'd like to compile (with Reflection, at runtime) CSharp files and VB.NET files. I must create two different assemblies with both different code compilers (one for each code type). The...
0
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...
4
by: Andreas Kasparek | last post by:
Hola! I'm preparing my master thesis about a XML Merge Tool implementation and was wondering if there is any open standard for XML diff regarding topics like: - is a diff result computed on...
8
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? ...
1
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...
1
by: Bmack500 | last post by:
I'm using the following subroutine. The two different XML files are identical with the exception of three additional records in the second one. One has 450 records, and the other has 453. After...
4
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...
1
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:...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.