/** * Merge the mergeSource element into the target element. The * elements must have the same namespace and localname in order * for the merge to proceede. An exception will be thrown if the * target and mergeSource elements do not have the same namespace * and localname. * * @param target destination element * @param mergeSource source element */ public void merge(Element target, Element mergeSource) { if (!matchSimpleNS(target, mergeSource)) { throw new IllegalArgumentException("The target and merge elements are not the same"); } mergeRecursive(target, mergeSource); }
/** * Merge the mergeSource element into the target element. The * elements must have the same namespace and localname in order * for the merge to proceede. An exception will be thrown if the * target and mergeSource elements do not have the same namespace * and localname. * * @param target destination element * @param mergeSource source element */ public void merge(Element target, Element mergeSource) { if (!matchSimpleNS(target, mergeSource)) { throw new IllegalArgumentException("The target and merge elements are not the same"); } mergeRecursive(target, mergeSource); }