question: private void extract ( Document source ) { Node node = source . getDocumentElement ( ) ; if ( node != null ) { offer ( node ) ; extract ( node ) ; } }
target:  This is used to extract the nodes of the document in such a way that it can be navigated as a queue. In order to do this each node encountered is pushed in to the queue so that when finished the nodes can be dealt with as a stream.