code: public AbstractDescriptor read( File descriptorFile , Class<? extends AbstractXMLDescriptorHandler> handlerClass ) throws JMSException
      {
          if (!descriptorFile.canRead())
              throw new FFMQException("Can't read descriptor file : "+descriptorFile.getAbsolutePath(),"FS_ERROR");
          
          log.debug("Parsing descriptor : "+descriptorFile.getAbsolutePath());
          
          AbstractXMLDescriptorHandler handler;
          try
          {
              // Create an handler instance
              handler = handlerClass.newInstance();
              
              // Parse the descriptor file
              SAXParserFactory factory = SAXParserFactory.newInstance();
              SAXParser parser = factory.newSAXParser();
              FileInputStream in = new FileInputStream(descriptorFile);
              parser.parse(in,handler);
              in.close();
          }
          catch (Exception e)
          {
              throw new FFMQException("Cannot parse descriptor file : "+descriptorFile.getAbsolutePath(),"PARSE_ERROR",e);
          }
          
          AbstractDescriptor descriptor = handler.getDescriptor();
          descriptor.setDescriptorFile(descriptorFile);
  
          return descriptor;
      }
docs: Read and parse an XML descriptor file