public static Namespaces getNamespaces(Element element) {
        Assert.isNotNull(element);
        Node parent = element.getParentNode();
        while (parent != null && !isElement(parent))
            parent = parent.getParentNode();
        Namespaces namespaces = null;
        if (parent != null)
            namespaces = getNamespaces((Element) parent);
        return getNamespaces(element, namespaces, false);
    }
public static Namespaces getNamespaces(Element element) {
        Assert.isNotNull(element);
        Node parent = element.getParentNode();
        while (parent != null && !isElement(parent))
            parent = parent.getParentNode();
        Namespaces namespaces = null;
        if (parent != null)
            namespaces = getNamespaces((Element) parent);
        return getNamespaces(element, namespaces, false);
    }
public static Namespaces getNamespaces ( Element element ) { Assert . isNotNull ( element ) ; Node parent = element . getParentNode ( ) ; while ( parent != null && ! isElement ( parent ) ) parent = parent . getParentNode ( ) ; Namespaces namespaces = null ; if ( parent != null ) namespaces = getNamespaces ( ( Element ) parent ) ; return getNamespaces ( element , namespaces , false ) ; }
Returns the given element's namespace declarations. The element must
not be <code>null</code>.

@param element the element whose namespace declarations are returned
@return        the element's namespace declarations
Returns the given element s namespace declarations . The element must not be <code > null< / code > .