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;
    }
  }
}

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 ; } } }
parse a unit tag . unit tags will contain a list of entity tags .
