PHP Merge XML

Merge XML sources from strings, files, DOM objects.

PHP MergeXML class

The class allows to merge the XML sources (files, strings, objects) into single PHP XML object. The merging is performed recursively on the node level adding new elements and replacing existing ones. The nodes with the same path/name are replaced/added sequentially and the modification can be controlled by the options.

MergeXML could be useful in cases where it is necessary to gather XML data from multiple sources. For example, to join the configuration files of different subsystems depending on the system operation.

The package

The following files are included:

  1. mergexml.php - the MergeXML class; requires PHP 5.2+;
  2. example.html - client-side to select the xml files and display result;
  3. example.php - server-side to receive & pass the xml data and return result;
  4. test1.xml, test2.xml - test data for the example;
  5. readme.md.

The MergeXML is realized also in JavaScript.

GNU LGPL

The GNU LGPL is an open-source license.

FREE Download

10 day 10-day money-back guarantee

Need custom services for this product? Get a quote