public Node find ( String nodeName ) { // Sanity check if ( IS_EMPTY . test ( nodeName ) ) { throw new IllegalArgumentException ( "The node name should not be empty" ) ; } Node _result = null ; while ( hasMoreAvailableElement ( ) && ( null == _result ) ) { int _position = getPosition ( ) ; Node _current = getSource ( ) . item ( _position ) ; _position ++ ; setPosition ( _position ) ; if ( nodeName . equals ( _current . getNodeName ( ) ) ) { _result = _current ; } } return _result ; }
Find the next node having the specified node name .