xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Menetrier" <rom...@artsum.fr>
Subject problem with dom3 and jdk1.4
Date Thu, 14 Nov 2002 10:43:47 GMT
Hi,

I have to make my java application work with j2se 1.4. It currently runs
fine on 1.3 version, but when I run the program with java 1.4, there's a
problem of "method not found" (method setErrorHandler) on class
org.w3c.Document (I try to revalidate a dom3 document with Xerces and my
DomErrorHandler).
I think the class(interface) "org.w3c.Document" is loaded from inside the
jvm 1.4 and this interface in java 1.4 not have this method.

Can you say how to turn around this problem and have a program working on
java 1.3 & 1.4 ?

Here is my code :

    DOMImplementationAS domImpl =
(DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
    DOMASBuilder parser = domImpl.createDOMASBuilder();
    DOMInputSource dom_input_source =
(((DOMImplementationLS)domImpl).createDOMInputSource());
    dom_input_source.setStringData(getXmlString(xml));
    Document doc = parser.parse(dom_input_source);
    doc.setErrorHandler(this); //the class is the error handler too
    doc.setNormalizationFeature("validate", true);
    doc.normalizeDocument();

Thanks,
Romain


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Mime
View raw message