protected void setAttributeSmart ( Element element , String attr , String value ) { if ( value == null ) { element . removeAttribute ( attr ) ; } else { element . setAttribute ( attr , value ) ; } }
Set attribute value . If value is null the attribute will be removed .