docs: public void parse() throws ResourceXMLParserException, IOException {
          final EntityResolver resolver = createEntityResolver();
          final SAXReader reader = new SAXReader(false);
          reader.setEntityResolver(resolver);
  
          try {
  
              final Document doc;
              if(null==this.doc){
                  final InputStream in;
                  if(null!=file){
                      in = new FileInputStream(file);
                  }else{
                      in = input;
                  }
                  try{
                      doc=reader.read(in);
                  }finally{
                      if(null!=file){
                          in.close();
                      }
                  }
              }else{
                  doc=this.doc;
              }
  
              final EntitySet set = new EntitySet();
              final Element root = doc.getRootElement();
  
              final List list = root.selectNodes(entityXpath);
              for (final Object n : list) {
                  final Node node = (Node) n;
                  final Entity ent = parseEnt(node, set);
                  if (null != receiver) {
                      if (!receiver.resourceParsed(ent)) {
                          break;
                      }
                  }
              }
              if (null != receiver) {
                  receiver.resourcesParsed(set);
              }
  
          } catch (DocumentException e) {
              throw new ResourceXMLParserException(e);
          }
      }