private NodeList getByName ( String name ) { NodeList answer = new NodeList ( ) ; for ( Object child : children ( ) ) { if ( child instanceof Node ) { Node childNode = ( Node ) child ; Object childNodeName = childNode . name ( ) ; if ( childNodeName instanceof QName ) { QName qn = ( QName ) childNodeName ; if ( qn . matches ( name ) ) { answer . add ( childNode ) ; } } else if ( name . equals ( childNodeName ) ) { answer . add ( childNode ) ; } } } return answer ; }
Provides lookup of elements by name .