public static String getElementAttributes(Element element,
                                              ImmutableSet<String> exclude) {
        StringBuilder buffer = new StringBuilder();
        if (element != null) {
            NamedNodeMap attributes = element.getAttributes();
            if (attributes != null) {
                addAttributesToString(exclude, buffer, attributes);
            }
        }

        return buffer.toString().trim();
    }
public static String getElementAttributes ( Element element , ImmutableSet < String > exclude ) { StringBuilder buffer = new StringBuilder ( ) ; if ( element != null ) { NamedNodeMap attributes = element . getAttributes ( ) ; if ( attributes != null ) { addAttributesToString ( exclude , buffer , attributes ) ; } } return buffer . toString ( ) . trim ( ) ; }
@param element The DOM Element.
@param exclude the list of exclude strings.
@return A string representation of the element's attributes excluding exclude.