public void setupReaders ( ) { SAXParserFactory spf = SAXParserFactory . newInstance ( ) ; spf . setNamespaceAware ( true ) ; spf . setValidating ( false ) ; SAXCatalogReader saxReader = new SAXCatalogReader ( spf ) ; saxReader . setCatalogParser ( null , "XMLCatalog" , "org.apache.xml.resolver.readers.XCatalogReader" ) ; saxReader . setCatalogParser ( OASISXMLCatalogReader . namespaceName , "catalog" , "org.apache.xml.resolver.readers.OASISXMLCatalogReader" ) ; addReader ( "application/xml" , saxReader ) ; TR9401CatalogReader textReader = new TR9401CatalogReader ( ) ; addReader ( "text/plain" , textReader ) ; }
Setup readers .