>> I have tried the following: >> - defining my own resolveEntity() > > You added this method to a Resolver class (see CDK for example), > registered this resolver with the XML parser (again see CDK?)
I have now spent another few hours looking at the CDK CML code and it is too difficult for me to understand. I decided to follow a 'tutorial' approach and try to build something very simple that only tries to read an arbitrary xml file, using the support in Java 1.4. I subclassed org.xml.sax.helpers.DefaultHandler and overrode the method resolveEntity(String publicId, String systemId) I am passing my handler to javax.xml.parsers.SAXParser.parse() > Another possible problem could be that you might be using the GNU JAXP > parser, > which requires the SYSTEM entities to have a protocol name... ie. > "file://cml.dtd"... I am using what is built into Java 1.4. I don't want to return the dtd. All I want to do at this stage is intercept the calls to startElement(). It works fine if I delete the _declaration_ lines (terminology?) at the beginning of the .cml file. Miguel ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
