@ Nullable public HtmlAttributeNode getDirectAttributeNamed ( String attrName ) { // the child at index 0 is the tag name for ( int i = 1 ; i < numChildren ( ) ; i ++ ) { StandaloneNode child = getChild ( i ) ; if ( child instanceof HtmlAttributeNode ) { HtmlAttributeNode attr = ( HtmlAttributeNode ) child ; if ( attr . definitelyMatchesAttributeName ( attrName ) ) { return attr ; } } } return null ; }
Returns an attribute with the given static name if it is a direct child .