Solved

programmatically join/merge two XML files

Posted on 2002-03-12
1
403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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 …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

696 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