static Node changeNamespace(final Node node, final String oldNamespaceUri,
      final String newNamespaceUri) throws XPathExpressionException {
    Node result = null;
    final NodeList nodes = query(node, "//*");
    for (int i = 0; i < nodes.getLength(); i++) {
      final Node element = nodes.item(i);
      if (element.getNamespaceURI() == null || element.getNamespaceURI().equals(oldNamespaceUri)) {
        Node renamed =
            node.getOwnerDocument().renameNode(element, newNamespaceUri, element.getNodeName());
        if (element == node) {
          result = renamed;
        }
      }
    }
    return result;
  }
Change the namespace URI of a <code>node</code> and its children to
<code>newNamespaceUri</code> if that node is in the given <code>oldNamespaceUri</code>
namespace URI.


@param node {@link Node} to change namespace URI on.
@param oldNamespaceUri old namespace URI to change from.
@param newNamespaceUri new Namespace URI to change to.
@return the modified version of the passed in node.
@since GemFire 8.1
geode-core/src/main/java/org/apache/geode/management/internal/configuration/utils/XmlUtils.java