Click here to Skip to main content
15,913,610 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralNo correct xhtml from XML and XSL Pin
Gumbah13-Aug-04 0:06
Gumbah13-Aug-04 0:06 
GeneralRe: No correct xhtml from XML and XSL Pin
ChrisAdams15-Aug-04 19:37
ChrisAdams15-Aug-04 19:37 
GeneralRe: No correct xhtml from XML and XSL Pin
Gumbah15-Aug-04 21:01
Gumbah15-Aug-04 21:01 
QuestionPulling Values From An XML File - Recommendations? Pin
Member 66660712-Aug-04 6:11
Member 66660712-Aug-04 6:11 
GeneralEvaluating XPath expressions on Windows CE Pin
Kot_Begemot6-Aug-04 5:52
Kot_Begemot6-Aug-04 5:52 
GeneralRegular Expression of XML document Pin
Rashid_Mehmood5-Aug-04 14:53
Rashid_Mehmood5-Aug-04 14:53 
GeneralRe: Regular Expression of XML document Pin
abu-alSaber16-Aug-04 22:12
abu-alSaber16-Aug-04 22:12 
GeneralMerging of two XML documents Pin
dabs5-Aug-04 7:15
dabs5-Aug-04 7:15 
Although there does not seem to be too much traffic in here I'll give it a try anyway...

I would like to be able to merge two XML documents, in such a manner that one will override the other. I.e., there will be a "global" XML file that contains some generic data, and then a "local" XML file that contains data that overrides data found in the global file. The local file does not have to contain the exact same number of nodes as the global one, i.e. it may only contain the nodes that we are interested in overriding.

You may ask yourself "how can this be helpful?", one example could be a global file that contains various settings that are used in an application, including text strings that will be visible to the user, and then a local file that contains translation of these visible text strings to some other languge, but otherwise does not change the settings/data in any way. In this way it will be easy to localise this file (we might want to be able to translate into many languages) without having to maintain multiple copies of the settings file - one for each language.

What I'm curious about is if there is a simple way to accomplish this through any known tools. The overhead should preferably be small, i.e. I don't want to be forced to install some massive Java libraries for this task alone Smile | :) . The code we're currently using to load/save XML files uses the Microsoft XML Parser so anything that's available through that tool is OK. I'm also willing to take a look at some .NET components if they do the job nicely, since this code will be used in an environment that ensures that the .NET framework has been installed.

Mind you that there are some obstacles on the way, for instance if the files in question were to store a list of books (classic example) and we would like to display the name of each book in the correct language, then we could create two files:

global.xml:

<books>
<book id="1">
<name>Some book</name>
<author>John Doe</author>
</book>
<book id="2">
<name>Another book</name>
<author>Susanne Smith</author>
</book>
</books>

local.xml ( book names have been translated into Icelandic Smile | :) ) :

<books>
<book id="1">
<name>Einhver bók</name>
</book>
<book id="2">
<name>Einhver önnur bók</name>
</book>
</books>

where the local.xml file does not want to mess with the author names, and it must override the correct bookname based on the id's. Note that under some circumstances, xml nodes equivalent to the <book> node might contain more attributes (not just the "id" attribute), and the unique attribute isn't necessarily called "id".

So does anyone have a *simple* solution to this problem? Any pointers would be very much welcome.

Best regards,
Daniel
GeneralRe: Merging of two XML documents Pin
ChrisAdams11-Aug-04 23:49
ChrisAdams11-Aug-04 23:49 
GeneralRe: Merging of two XML documents Pin
dabs12-Aug-04 0:31
dabs12-Aug-04 0:31 
GeneralRe: Merging of two XML documents Pin
Praveen Nayak6-Sep-04 0:11
Praveen Nayak6-Sep-04 0:11 
Generalmicrosoft vb script runtime error'800a01a8' is harassing me Pin
chmonalisa4-Aug-04 23:35
chmonalisa4-Aug-04 23:35 
Generalmicrosoft vb script runtime error'800a01a8' is harassing me Pin
chmonalisa4-Aug-04 23:33
chmonalisa4-Aug-04 23:33 
GeneralSOAP to SQL / SQL to SOAP Pin
cfaulkner3-Aug-04 11:59
cfaulkner3-Aug-04 11:59 
GeneralError with XML Pin
osal3-Aug-04 8:19
osal3-Aug-04 8:19 
GeneralRe: Error with XML Pin
abu-alSaber16-Aug-04 22:00
abu-alSaber16-Aug-04 22:00 
GeneralI have a project to submit and dont know how to start Pin
ClubV22-Aug-04 5:31
ClubV22-Aug-04 5:31 
GeneralRe: I have a project to submit and dont know how to start Pin
Jeff Martin5-Aug-04 7:50
Jeff Martin5-Aug-04 7:50 
Generalediting XML config file from within executing program in VB.NET Pin
Vineet Rajan2-Aug-04 1:59
Vineet Rajan2-Aug-04 1:59 
GeneralGeneric XSL to Page and Sort 'FOR XML RAW, XMLDATA' Query Pin
jvaugha426-Jul-04 1:43
jvaugha426-Jul-04 1:43 
GeneralError when writing XML file Pin
basidati20-Jul-04 21:26
basidati20-Jul-04 21:26 
Generalusing RDL Pin
blankg17-Jul-04 2:08
blankg17-Jul-04 2:08 
GeneralXML Web Services publishing Pin
Asif Rehman16-Jul-04 17:07
Asif Rehman16-Jul-04 17:07 
GeneralRe: XML Web Services publishing Pin
palbano16-Jul-04 19:08
palbano16-Jul-04 19:08 
GeneralRe: XML Web Services publishing Pin
Javier Lozano16-Jul-04 20:12
Javier Lozano16-Jul-04 20:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.