public static Map getAttributes(Element el)
    {
        Map attmap = new HashMap();
        NamedNodeMap attribs = el.getAttributes();
        for (int i = 0; i < attribs.getLength(); i++)
        {
            Attr attr = (Attr)attribs.item(i);
            String name = attr.getName();
            QName qname = resolveQName(el, name);
            String value = attr.getNodeValue();
            attmap.put(qname, value);
        }
        return attmap;
    }
public static Map getAttributes ( Element el ) { Map attmap = new HashMap ( ) ; NamedNodeMap attribs = el . getAttributes ( ) ; for ( int i = 0 ; i < attribs . getLength ( ) ; i ++ ) { Attr attr = ( Attr ) attribs . item ( i ) ; String name = attr . getName ( ) ; QName qname = resolveQName ( el , name ) ; String value = attr . getNodeValue ( ) ; attmap . put ( qname , value ) ; } return attmap ; }
@param el
@return the attributes as Map<QName, String>