Class DocumentMerger

  • All Implemented Interfaces:

    public class DocumentMerger
    extends Object
    implements MergeProcessor
    Class that can merge two DOM Documents, relatively simply. This works by just importing all the child nodes from the right-hand document into the left-hand document.

    Create the DocumentMerger, then call addMergeItem successive times with Documents. Finally call performMerge(), which will return you the merged DOM Document.

    This class may be overridden by subclasses that wish to apply strategies to particular types of XML document.