MergeXML

MergeXML merges the XML sources (files, strings, objects) into single DOM 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 usage

var MergeXML = require('mergexml');

MergeXML can included as a global script or with npm install mergexml --save and loaded as shown above.

var oMX = new MergeXML([opts]);

opts - the options object:

join - common root name if any source has different root name (default is root, specifying false denies different names)