Solved

programmatically join/merge two XML files

Posted on 2002-03-12
1
401 Views
Last Modified: 2013-12-03
How do I programmatically join/merge two XML files (or larded as dataset) in the way that no repetitions of elements/nodes
will occur, just like what SQL statements can do to datasets?
The XML files are having similar structure and elements are separated by id attributes.

Thanks,
Neural
0
Comment
Question by:neural
1 Comment
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 6862448
There's no built-in way of doing that. You will have to write code to do that yourself. You will need to load the XML documents and traverse them with DOM. With DOM, you will be able to enumerate through the nodes from one document and search for it in the other document. If the search failed, then add it to the resulting DOM. Finally, save this DOM to disk.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
use of cookies and regulations 1 99
website content maintenance 3 100
Problem to file 3 82
Animated .jpg? 13 95
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question