Hi You haven't supplied any of the implementation, but it looks to me like you meant to have SecureDocument extend SecureElement rather than SecureNode.
Chris -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 04:31 To: xerces-j-user Subject: java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl Hello, I still have a classCastException that I don't understand. Here is the class hierarchy I have : interface SecureNode extends Node interface SecureElement extends SecureNode interface SecureElementNS extends SecureElement class SecureElementNSImpl extends ElementNSImpl implements SecureElementNS interface SecureDocument extends SecureNode class SecureDocumentImpl extends DocumentImpl implements SecureDocument I parse like that : DOMParser p = new DOMParser(); p.setProperty("http://apache.org/xml/properties/dom/document-class-name", "mypackage.SecureDocumentImpl"); p.parse(new InputSource(is)); SecureDocumentImpl doc = (SecureDocumentImpl)p.getDocument(); //here is my problem SecureElementNS var = (SecureElementNS)doc.getDocumentElement() ; I get : java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl but only with Xerces version > 2 !!! with previouses version 1.X it's ok... Can anybody help me ? Thanks ************************ ADSL JUSQU'A 8 MEGA + 3 MOIS DE TELEPHONE GRATUIT ************************ L'ultra haut débit à 15EUR/mois seulement ! Et vous téléphonez gratuitement en France vers les postes fixes, hors numéros spéciaux pendant 3 mois. 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]