You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ali Manji <al...@hotmail.com> on 2002/08/06 14:57:33 UTC

Extending ElementImpl problems?

Hi,

I am making use of xerces 1.4.2 and am trying to create a class that extends
org.apache.xerces.dom.ElementImpl which of course implements Element.

However, when I assign it an instance of this class a value of some value of
type Element, it throws a ClassCastException.

For example, consider:

org.w3c.dom.Element root = new MyElement();
root = (MyElement) document.getDocumentElement();

where MyElement extends ElementImpl.

This will throw the following odd exception:

java.lang.ClassCastException: rg.apache.xerces.dom.DeferredElementNSImpl

Any ideas why this doesn't work or any ideas on how to accomplish this task
some other way

Thanks in advance,
Ali

*****************************************************
Ali M. Manji
*****************************************************



_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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