Java Code Examples for com.sun.xml.internal.xsom.parser.XSOMParser#setErrorHandler()
The following examples show how to use
com.sun.xml.internal.xsom.parser.XSOMParser#setErrorHandler() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WhitespacesTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "TestSchemaFiles") public void testWhitespacesCollapse(String schemaFile) throws Exception { XSOMParser parser = new XSOMParser(SAXParserFactory.newInstance()); XsomErrorHandler eh = new XsomErrorHandler(); parser.setErrorHandler(eh); parser.parse(getSchemaFile(schemaFile)); if (eh.gotError) { throw new RuntimeException("XSOM parser encountered error", eh.e); } }
Example 2
Source File: WhitespacesTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "TestSchemaFiles") public void testWhitespacesCollapse(String schemaFile) throws Exception { XSOMParser parser = new XSOMParser(SAXParserFactory.newInstance()); XsomErrorHandler eh = new XsomErrorHandler(); parser.setErrorHandler(eh); parser.parse(getSchemaFile(schemaFile)); if (eh.gotError) { throw new RuntimeException("XSOM parser encountered error", eh.e); } }
Example 3
Source File: ModelLoader.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Potentially problematic - make sure the parser instance passed is initialized * with proper security feature. * * @param parser * @return */ public XSOMParser createXSOMParser(XMLParser parser) { // set up other parameters to XSOMParser XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser)); reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt)); reader.setErrorHandler(errorReceiver); reader.setEntityResolver(opt.entityResolver); return reader; }
Example 4
Source File: ModelLoader.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Potentially problematic - make sure the parser instance passed is initialized * with proper security feature. * * @param parser * @return */ public XSOMParser createXSOMParser(XMLParser parser) { // set up other parameters to XSOMParser XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser)); reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt)); reader.setErrorHandler(errorReceiver); reader.setEntityResolver(opt.entityResolver); return reader; }
Example 5
Source File: WhitespacesTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "TestSchemaFiles") public void testWhitespacesCollapse(String schemaFile) throws Exception { XSOMParser parser = new XSOMParser(SAXParserFactory.newInstance()); XsomErrorHandler eh = new XsomErrorHandler(); parser.setErrorHandler(eh); parser.parse(getSchemaFile(schemaFile)); if (eh.gotError) { throw new RuntimeException("XSOM parser encountered error", eh.e); } }
Example 6
Source File: ModelLoader.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Potentially problematic - make sure the parser instance passed is initialized * with proper security feature. * * @param parser * @return */ public XSOMParser createXSOMParser(XMLParser parser) { // set up other parameters to XSOMParser XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser)); reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt)); reader.setErrorHandler(errorReceiver); reader.setEntityResolver(opt.entityResolver); return reader; }
Example 7
Source File: WhitespacesTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "TestSchemaFiles") public void testWhitespacesCollapse(String schemaFile) throws Exception { XSOMParser parser = new XSOMParser(SAXParserFactory.newInstance()); XsomErrorHandler eh = new XsomErrorHandler(); parser.setErrorHandler(eh); parser.parse(getSchemaFile(schemaFile)); if (eh.gotError) { throw new RuntimeException("XSOM parser encountered error", eh.e); } }
Example 8
Source File: ModelLoader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Potentially problematic - make sure the parser instance passed is initialized * with proper security feature. * * @param parser * @return */ public XSOMParser createXSOMParser(XMLParser parser) { // set up other parameters to XSOMParser XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser)); reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt)); reader.setErrorHandler(errorReceiver); reader.setEntityResolver(opt.entityResolver); return reader; }
Example 9
Source File: ModelLoader.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Potentially problematic - make sure the parser instance passed is initialized * with proper security feature. * * @param parser * @return */ public XSOMParser createXSOMParser(XMLParser parser) { // set up other parameters to XSOMParser XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser)); reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt)); reader.setErrorHandler(errorReceiver); reader.setEntityResolver(opt.entityResolver); return reader; }
Example 10
Source File: ModelLoader.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Potentially problematic - make sure the parser instance passed is initialized * with proper security feature. * * @param parser * @return */ public XSOMParser createXSOMParser(XMLParser parser) { // set up other parameters to XSOMParser XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser)); reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt)); reader.setErrorHandler(errorReceiver); reader.setEntityResolver(opt.entityResolver); return reader; }
Example 11
Source File: ModelLoader.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Potentially problematic - make sure the parser instance passed is initialized * with proper security feature. * * @param parser * @return */ public XSOMParser createXSOMParser(XMLParser parser) { // set up other parameters to XSOMParser XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser)); reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt)); reader.setErrorHandler(errorReceiver); reader.setEntityResolver(opt.entityResolver); return reader; }
Example 12
Source File: ModelLoader.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Potentially problematic - make sure the parser instance passed is initialized * with proper security feature. * * @param parser * @return */ public XSOMParser createXSOMParser(XMLParser parser) { // set up other parameters to XSOMParser XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser)); reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt)); reader.setErrorHandler(errorReceiver); reader.setEntityResolver(opt.entityResolver); return reader; }
Example 13
Source File: WhitespacesTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "TestSchemaFiles") public void testWhitespacesCollapse(String schemaFile) throws Exception { XSOMParser parser = new XSOMParser(SAXParserFactory.newInstance()); XsomErrorHandler eh = new XsomErrorHandler(); parser.setErrorHandler(eh); parser.parse(getSchemaFile(schemaFile)); if (eh.gotError) { throw new RuntimeException("XSOM parser encountered error", eh.e); } }