|
|
|
Как прикрутить другой парсер к JAXP?
|
|||
|---|---|---|---|
|
#18+
Устанавливаю свойство для парсера - http://java.sun.com/xml/jaxp/properties/schemaSource, он выкидывает исключение - org.xml.sax.SAXNotRecognizedException, т.е. парсер по умолчанию(Crimson) не поддерживает JAXP1.2 , хочу прикруить к JAXP Xerses 2, только вот не знаю как:( ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.01.2005, 12:43 |
|
||
|
Как прикрутить другой парсер к JAXP?
|
|||
|---|---|---|---|
|
#18+
RTFM public static SAXParserFactory newInstance() throws FactoryConfigurationError Obtain a new instance of a SAXParserFactory. This static method creates a new factory instance This method uses the following ordered lookup procedure to determine the SAXParserFactory implementation class to load: * Use the javax.xml.parsers.SAXParserFactory system property. * Use the properties file "lib/jaxp.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above. * Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.parsers.SAXParserFactory in jars available to the runtime. * Platform default SAXParserFactory instance. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.01.2005, 14:44 |
|
||
|
Как прикрутить другой парсер к JAXP?
|
|||
|---|---|---|---|
|
#18+
big_mammothRTFM public static SAXParserFactory newInstance() throws FactoryConfigurationError Obtain a new instance of a SAXParserFactory. This static method creates a new factory instance This method uses the following ordered lookup procedure to determine the SAXParserFactory implementation class to load: * Use the javax.xml.parsers.SAXParserFactory system property. * Use the properties file "lib/jaxp.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above. * Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.parsers.SAXParserFactory in jars available to the runtime. * Platform default SAXParserFactory instance. Да, оно самое, просто с ходу не додумался, что там в файле jaxp.properties прописывать :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.01.2005, 11:07 |
|
||
|
Как прикрутить другой парсер к JAXP?
|
|||
|---|---|---|---|
|
#18+
Если в лом праить файл свойств можно и так java.exe.....-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl Естественно в classpath должен быть прописан пути к библиотекам ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.01.2005, 11:42 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=32858829&tid=2153130]: |
0ms |
get settings: |
7ms |
get forum list: |
13ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
143ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
35ms |
get tp. blocked users: |
1ms |
| others: | 225ms |
| total: | 438ms |

| 0 / 0 |
