public boolean hasChild ( String child ) { final NodeList list = root . getChildNodes ( ) ; for ( int i = 0 ; i < list . getLength ( ) ; i ++ ) { final Node node = list . item ( i ) ; if ( node . getNodeName ( ) . equals ( child ) ) { return true ; } } return false ; }
Check if node has the following child .