[jdom-interest] Abstracting interface to JDOM nodes.

Elliotte Rusty Harold elharo at metalab.unc.edu
Sat Aug 26 07:08:34 PDT 2000

At 4:50 PM -0600 8/25/00, Trebor A. Rude wrote:
>	I want to write getSerializedForm() for Element.  However, to 
>do this, it
>needs to be able to call getSerializedForm() on its children. This can not
>easily be done since the children vary in their type, and don't implement
>a common interface. I propose such a common interface be created, an
>equivelent of Node in the org.w3c.dom package. I'm willing to do the work,
>but I'd like comments from the crowd as to whether or not this is a good
>idea, and if so, what should and shouldn't go in such an interface.

1. getSerializedForm() is going away to be replaced by the 
XMLOutputter class. Don't use it or waste your time on it.

2. You don't need a common interface. instanceof works just fine for 
this use case.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |

More information about the jdom-interest mailing list