An internally used helper class for dealing with XML documents.
This class is used by {@link XMLConfiguration}. It provides some basic functionality for processing DOM documents and dealing with elements. The main idea is that an instance holds the XML document associated with a XML configuration object. When the configuration is to be saved the document has to be manipulated according to the changes made on the configuration. To ensure that this is possible even under concurrent access, a new temporary instance is created as a copy of the original instance. Then, on this copy, the changes of the configuration are applied. The resulting document can then be serialized.
Nodes of an {@code XMLConfiguration} that was read from a file are associatedwith the XML elements they represent. In order to apply changes on the copied document, it is necessary to establish a mapping between the elements of the old document and the elements of the copied document. This is also handled by this class.
@version $Id: XMLDocumentHelper.java 1624601 2014-09-12 18:04:36Z oheger $
@since 2.0