code: static DocumentFeatureGenerator createGenerator(Element generatorElement,
        FeatureGeneratorResourceProvider resourceManager) throws InvalidFormatException {
  
      String elementName = generatorElement.getTagName();
  
      XmlFeatureGeneratorFactory generatorFactory = factories.get(elementName);
  
      if (generatorFactory == null) {
        throw new InvalidFormatException("Unexpected element: " + elementName);
      }
  
      return generatorFactory.create(generatorElement, resourceManager);
    }
docs: Creates a {@link DocumentFeatureGenerator} for the provided element.
  To accomplish this it looks up the corresponding factory by the
  element tag name. The factory is then responsible for the creation
  of the generator from the element.
  
  @param generatorElement
  @param resourceManager
  
  @return