code: public static XMLReader newXMLReader(JstlEntityResolver entityResolver)
              throws ParserConfigurationException, SAXException {
          XMLReader xmlReader = SAXPARSER_FACTORY.newSAXParser().getXMLReader();
          xmlReader.setEntityResolver(entityResolver);
          return xmlReader;
      }
docs: Create an XMLReader that resolves entities using JSTL semantics.
  @param entityResolver for resolving using JSTL semantics
  @return a new XMLReader
  @throws ParserConfigurationException if there was a configuration problem creating the reader
  @throws SAXException if there was a problem creating the reader