code:     public TransformerFactory createTransformerFactory() {
          TransformerFactory factory = TransformerFactory.newInstance();
          factory.setErrorListener(new XmlErrorListener());
          return factory;
      }
  
  