archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java
/**
     * Remove namespaces from element recursively.
     */
Remove namespaces from element recursively.
Remove namespaces from element recursively .
@SuppressWarnings("unchecked")
    public void removeNamespaces( Node elem )
    {
        if (elem.getNodeType() == Node.ELEMENT_NODE || elem.getNodeType() == Node.ATTRIBUTE_NODE) {
            document.renameNode(elem, null, elem.getLocalName());
            Node n;
            NodeList nodeList = elem.getChildNodes();
            for (int i = 0; i < nodeList.getLength(); i++) {
                n = nodeList.item(i);
                removeNamespaces(n);
            }
        }
    }
@ SuppressWarnings ( "unchecked" ) public void removeNamespaces ( Node elem ) { if ( elem . getNodeType ( ) == Node . ELEMENT_NODE || elem . getNodeType ( ) == Node . ATTRIBUTE_NODE ) { document . renameNode ( elem , null , elem . getLocalName ( ) ) ; Node n ; NodeList nodeList = elem . getChildNodes ( ) ; for ( int i = 0 ; i < nodeList . getLength ( ) ; i ++ ) { n = nodeList . item ( i ) ; removeNamespaces ( n ) ; } } }
Remove namespaces from element recursively.
Remove namespaces from element recursively .