xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregor Karlinger" <gregor.karlin...@iaik.at>
Subject RE: problem with dom3 and jdk1.4
Date Thu, 14 Nov 2002 12:54:29 GMT
Roman,

See http://java.sun.com/xml/jaxp/faq.html,
especially question

  "Q. How do I override the JAXP implementation
   in J2SE SDK 1.4 and above?"

Liebe Gruesse/Regards,
Gregor Karlinger
          

> -----Original Message-----
> From: Romain Menetrier [mailto:romain@artsum.fr] 
> Sent: Thursday, November 14, 2002 11:44 AM
> To: xerces-j-user@xml.apache.org
> Subject: problem with dom3 and jdk1.4
> 
> 
> 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