// Will use specific class
try {
Class factoryClass = ClassUtils.loadClass(className);
factory = (SAXParserFactory)factoryClass.newInstance();
} catch(Exception e) {
throw new ParameterException("Cannot load SAXParserFactory class " + className, e);
}
}
// FIXME(VG): This always prints "SAXParserFactory: null"
// getLogger().debug("SAXParserFactory: " + ClassUtils.which(factory.getClass()));
factory.setNamespaceAware(true);
factory.setValidating(validate);
// Get the DocumentFactory
className = params.getParameter("document-builder-factory", null);
if (className == null) {
this.docFactory = DocumentBuilderFactory.newInstance();
} else {
// Will use specific class
try {
Class factoryClass = ClassUtils.loadClass(className);
this.docFactory = (DocumentBuilderFactory)factoryClass.newInstance();
} catch(Exception e) {
throw new ParameterException("Cannot load DocumentBuilderFactory class " + className, e);
}
}
// FIXME(VG): This always prints "DocumentBuilderFactory: null"
// getLogger().debug("DocumentBuilderFactory: " + ClassUtils.which(docFactory.getClass()));