code: public static XWPFTemplate compile(InputStream inputStream, Configure config) {
  		try {
  			XWPFTemplate instance = new XWPFTemplate();
  			instance.config = config;
  			instance.doc = new NiceXWPFDocument(inputStream);
  			instance.visitor = new TemplateVisitor(instance.config);
  			instance.eleTemplates = instance.visitor.visitDocument(instance.doc);
  			return instance;
  		} catch (IOException e) {
  			logger.error("Compile template failed", e);
  			throw new ResolverException("Compile template failed");
  		}
  	}
docs: template file as InputStream
  
  @param inputStream
  @param config
  @return
  @version 1.2.0