public static SAXParser createXIncludeAwareSAXParser ( boolean doBaseURIFixup ) { SAXParserFactory factory = SAXParserFactory . newInstance ( ) ; factory . setNamespaceAware ( true ) ; factory . setXIncludeAware ( true ) ; SAXParser parser = null ; try { factory . setFeature ( Constants . XERCES_FEATURE_PREFIX + Constants . XINCLUDE_FIXUP_BASE_URIS_FEATURE , doBaseURIFixup ) ; parser = factory . newSAXParser ( ) ; } catch ( Exception x ) { throw new RuntimeException ( x ) ; } return parser ; }
Creates a SAXParser that is configured to resolve XInclude references but not perform schema validation .