Core/src/main/java/org/openestate/io/core/XmlUtils.java
public static void replaceNamespace(Document doc, Node node, String newNamespaceURI) {
        if (node instanceof Attr) {
            doc.renameNode(node, newNamespaceURI, node.getLocalName());
        } else if (node instanceof Element) {
            doc.renameNode(node, newNamespaceURI, node.getLocalName());
            NodeList children = node.getChildNodes();
            for (int i = 0; i < children.getLength(); i++) {
                XmlUtils.replaceNamespace(doc, children.item(i), newNamespaceURI);
            }
        }
    }
public static void replaceNamespace(Document doc, Node node, String newNamespaceURI) {
        if (node instanceof Attr) {
            doc.renameNode(node, newNamespaceURI, node.getLocalName());
        } else if (node instanceof Element) {
            doc.renameNode(node, newNamespaceURI, node.getLocalName());
            NodeList children = node.getChildNodes();
            for (int i = 0; i < children.getLength(); i++) {
                XmlUtils.replaceNamespace(doc, children.item(i), newNamespaceURI);
            }
        }
    }
public static void replaceNamespace ( Document doc , Node node , String newNamespaceURI ) { if ( node instanceof Attr ) { doc . renameNode ( node , newNamespaceURI , node . getLocalName ( ) ) ; } else if ( node instanceof Element ) { doc . renameNode ( node , newNamespaceURI , node . getLocalName ( ) ) ; NodeList children = node . getChildNodes ( ) ; for ( int i = 0 ; i < children . getLength ( ) ; i ++ ) { XmlUtils . replaceNamespace ( doc , children . item ( i ) , newNamespaceURI ) ; } } }
Replace the namespace of a {@link Node} and its children.

@param doc             the document to update
@param node            the node to update
@param newNamespaceURI the new namespace URI
Replace the namespace of a { @link Node } and its children .