View Single Post
  #1 (permalink)  
Old June 15th, 2006, 06:52 AM
Lemminkäinen Lemminkäinen is offline
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to combine stuff from two XML-files?

Hiya people,

I have the following problem and was wondering if you enlightened people could help me with it. I have two XML-files with different information about the same topics. I want to merge all the info from these two files into one file.

An example of what I mean:
Code:
I have

file1.xml

<thingy name="epsilon">
  <color>red</color>
</thingy>
<thingy name="gamma">
  <color>blue</color>
<thingy>


and in another file

file2.xml

<thingy name="epsilon">
  <number>seven</number>
</thingy>
<thingy name="gamma">
  <number>four</number>
<thingy>

And I want

file3.xml

<thingy name="epsilon">
  <color>red</color>
  <number>seven</number>
</thingy>
<thingy name="gamma">
  <color>blue</color>
  <number>four</number>
<thingy>
Is this even doable with XSLT? I've been wrestling with this for over four hours now and am completely stumped.

Thanks for reading!

Edit: Oh yeah, the entries aren't in the same order in both files.
Reply With Quote