public Attribute removeAttributeWithNamespaceURI ( CharSequence uri , CharSequence name ) { for ( Iterator < Attribute > it = event . attributes . iterator ( ) ; it . hasNext ( ) ; ) { Attribute attr = it . next ( ) ; if ( attr . localName . equals ( name ) && getNamespaceURI ( attr . namespacePrefix ) . equals ( uri ) ) { it . remove ( ) ; return attr ; } } return null ; }
Remove and return the attribute for the given namespace URI and local name if it exists .