Namespace namespace[] = new Namespace[]{getNamespace()};
while (childIterator.hasNext()) {
ODOMElement child = (ODOMElement) childIterator.next();
// Get the relative XPath of the child.
XPath childXPath = new XPath((Element) child, namespace);
try {
// Does the relative path find an element in the toElement?
ODOMElement toChild = (ODOMElement)
childXPath.selectSingleNode((Element) toElement);
if (toChild != null) {
// Corresponding child also exists in the source element,
// so recursively move listeners between the two children.
child.moveListeners(toChild);