Hello, I got a strange exception. Here is my problem :
public interface SecureDocument extends Node { } public class SecDocImpl extends DocumentImpl { public static void main(String[] args) { try { InputStream is = new FileInputStream("pathtofile"); DOMParser p = new DOMParser(); p.setProperty("http://apache.org/xml/properties/dom/document-class-name", "mypackage.SecDocImpl"); p.parse(new InputSource(is)); SecDocImpl m= (SecDocImpl)p.getDocument() ; is.close(); DocumentImpl tmp = (DocumentImpl)m ; Element e = tmp.getDocumentElement() ; Node r = (Node)e ; //it's just to try here is the error------> SecureDocument root = (SecureDocument)e ; } catch (Exception e) { System.err.println("error") ; } } } } And the exception is : java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl with no more explanation. Can anybody help me ? ************************ ADSL JUSQU'A 16 MEGA + TELEPHONE GRATUIT ************************ L'ultra haut débit à 30EUR/mois seulement ! Et vous téléphonez gratuitement en France vers les postes fixes, hors numéros spéciaux. Pour profiter de cette offre exceptionnelle, cliquez ici : http://register.tiscali.fr/adsl/ (voir conditions sur le site) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]