Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Problem with xerces

Hi All !
I tried to write a plugin, which will show SVG files using Batik viewer. I
found such a plugin that based on  Batik 1.1 version, but it uses crimson
parser, that is not satisfied our goals, because it can not properly parse
SVG file with java script nodes. 
The older version of Batik uses org.apache.xerces.parsers.SAXParser . 
I added  an import node in plugin.xml
  <requires>
      <import plugin="org.eclipse.core.resources"/>
      <import plugin="org.eclipse.ui"/>
	<import plugin="org.apache.xerces"/>
   </requires>

When I try to use that in the Eclipse I receives the following exception:
SAX2 driver class org.apache.xerces.parsers.SAXParser not found
I suppose that the problem is in the classLoader.
This is the part of code, where document is created : 
            String parser = XMLResourceDescriptor.getXMLParserClassName();
            SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
	URL url = getClass().getResource(path);
	Document doc = f.createDocument(url.toExternalForm());

Thank you in advance,
Arus



Back to the top