question: private void parseUnit ( Element unitNode , Vector < Entity > list ) { NodeList nl = unitNode . getChildNodes ( ) ; for ( int i = 0 ; i < nl . getLength ( ) ; i ++ ) { Node currNode = nl . item ( i ) ; if ( currNode . getParentNode ( ) != unitNode ) { continue ; } int nodeType = currNode . getNodeType ( ) ; if ( nodeType == Node . ELEMENT_NODE ) { String nodeName = currNode . getNodeName ( ) ; if ( nodeName . equalsIgnoreCase ( ENTITY ) ) { parseEntity ( ( Element ) currNode , list ) ; } else if ( nodeName . equalsIgnoreCase ( PILOT ) ) { parsePilot ( ( Element ) currNode ) ; } } else { continue ; } } }
target:  Parse a Unit tag.  Unit tags will contain a list of Entity tags.