Steven O'Neill
asked on
Merge 2 XML Files together - Reworking of original
Quite some time ago I received a huge amount of help from Geert Bormans on merging an XML and XLS(X) file together...now I'm back with some alterations to one of the XML files which hopefully someone - Geert :) - is able to help with.
The original questions can be found here for review:
https://www.experts-exchange.com/questions/28691313/Merge-Excel-file-with-contents-of-XML-file.html
https://www.experts-exchange.com/questions/28691770/Merge-Excel-file-with-contents-of-XML-file-Part-2.html
https://www.experts-exchange.com/questions/28965298/Merge-2-XML-Files-together.html
Everything has been working great but we have a new XML output file that I need to merge together with the original XML file. I've added the files to the question and hopefully the names I've provided make sense.
We need to take the new style file CARDIOLOGY-REPORTS & CARDIOLOGY-REPORTS-Convert ed XML files and merge these together (they will always be in the correct order within the XML files) using the Merge-File-Cardio.XSL file and create the CARDIOLOGY-REPORTS XML output file (this goes into a different directory so doesn't overwrite any of the original input files.
Essentially we need to change the XSL file to take into account the new style of the original CARDIOLOGY-REPORTS.XML file. I've tried to get this to work but altering the XSL Templates to root (as I believe this is what it should be but not sure if I've done this correctly) and the Group-Starting-With element has changed form the original as well and I'm trying to pick this up using Name = 'GJH' but again this may be incorrect. I'm aware the COUNT and FILE elements will need altering to the correct fields names in the new style CARDIOLOGY-REPORTS.XML file (these are "Page count in document" and "Document filename").
Sorry if it's a bit of a rabble but hopefully makes sense.
Any advice is appreciated as always.
Steven
File 01 can be found here: CARDIOLOGY-REPORTS.XML
File 02 (which we merge into this file) can be found here: CARDIOLOGY-REPORTS-Converted.xml
The expected output file, can be found here: CARDIOLOGY-REPORTS.xml
The XSL file used that needs altering, can be found here: merge-files-cardio.xsl
The original questions can be found here for review:
https://www.experts-exchange.com/questions/28691313/Merge-Excel-file-with-contents-of-XML-file.html
https://www.experts-exchange.com/questions/28691770/Merge-Excel-file-with-contents-of-XML-file-Part-2.html
https://www.experts-exchange.com/questions/28965298/Merge-2-XML-Files-together.html
Everything has been working great but we have a new XML output file that I need to merge together with the original XML file. I've added the files to the question and hopefully the names I've provided make sense.
We need to take the new style file CARDIOLOGY-REPORTS & CARDIOLOGY-REPORTS-Convert
Essentially we need to change the XSL file to take into account the new style of the original CARDIOLOGY-REPORTS.XML file. I've tried to get this to work but altering the XSL Templates to root (as I believe this is what it should be but not sure if I've done this correctly) and the Group-Starting-With element has changed form the original as well and I'm trying to pick this up using Name = 'GJH' but again this may be incorrect. I'm aware the COUNT and FILE elements will need altering to the correct fields names in the new style CARDIOLOGY-REPORTS.XML file (these are "Page count in document" and "Document filename").
Sorry if it's a bit of a rabble but hopefully makes sense.
Any advice is appreciated as always.
Steven
File 01 can be found here: CARDIOLOGY-REPORTS.XML
File 02 (which we merge into this file) can be found here: CARDIOLOGY-REPORTS-Converted.xml
The expected output file, can be found here: CARDIOLOGY-REPORTS.xml
The XSL file used that needs altering, can be found here: merge-files-cardio.xsl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanx again Geert. Pretty much spot on, little tweak needed as the same record was being used from the first document but managed to sort that myself. I missed the Description field (my bad) and I've sorted that as well.
Enjoy DC :)
Enjoy DC :)
ASKER
As always Geert, thanx for your assistance on this.
Welcome, good to hear it worked out well
just this one template should be find
I don't know where to get the description from
and it might need some tweeking
in the US this week, will follow up this evening DC time