MCPcopy Index your code
hub / github.com/apache/tomcat / getFactory

Method getFactory

java/org/apache/tomcat/util/digester/Digester.java:627–648  ·  view source on GitHub ↗

SAX parser factory method. @return the SAXParserFactory we will use, creating one if necessary. @throws ParserConfigurationException Error creating parser @throws SAXNotSupportedException Error creating parser @throws SAXNotRecognizedException Error creating parser

()

Source from the content-addressed store, hash-verified

625 * @throws SAXNotRecognizedException Error creating parser
626 */
627 public SAXParserFactory getFactory()
628 throws SAXNotRecognizedException, SAXNotSupportedException, ParserConfigurationException {
629
630 if (factory == null) {
631 factory = SAXParserFactory.newInstance();
632
633 factory.setNamespaceAware(namespaceAware);
634 // Preserve xmlns attributes
635 if (namespaceAware) {
636 factory.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
637 }
638
639 factory.setValidating(validating);
640 if (validating) {
641 // Enable DTD validation
642 factory.setFeature("http://xml.org/sax/features/validation", true);
643 // Enable schema validation
644 factory.setFeature("http://apache.org/xml/features/validation/schema", true);
645 }
646 }
647 return factory;
648 }
649
650
651 /**

Callers 2

setFeatureMethod · 0.95
getParserMethod · 0.95

Calls 4

setNamespaceAwareMethod · 0.80
setFeatureMethod · 0.80
setValidatingMethod · 0.80
newInstanceMethod · 0.65

Tested by

no test coverage detected