I believe you can extend an interface. For example, the HTMLElement interface extends Element which in turn extends Node
-Chikeobi -----Original Message----- From: Wayne Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 1:04 PM To: [EMAIL PROTECTED] Subject: Extending (subclassing) Elements This might be more of a Java question, but I'll ask it here anyway since our Java gurus don't have an answer... I would like to subclass Elements. Now I know an Element is really an interface, not a class. How do I go about extending the Elements interface so that I can add some customized methods to it? Do I have to subclass the ElementImpl? When I try this, and then attempt to cast the Element returned by getDocumentElement to my subclass, I get a java.lang.ClassCastException. Anyone have any suggestions? Thanks in advance. ===== --- Wayne Johnson, | There are two kinds of people: Those 3943 Penn Ave. N. | who say to God, "Thy will be done," Minneapolis, MN 55412-1908 | and those to whom God says, "All right, (612) 522-7003 | then, have it your way." --C.S. Lewis __________________________________ Do you Yahoo!? Yahoo! Search - Find what you're looking for faster http://search.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *********************************************************************************** Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the [EMAIL PROTECTED] and destroy the original message. *********************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
