[jdom-interest] a base class to JDOM element and comment?
Jason Hunter
jhunter at servlets.com
Mon Apr 21 12:11:53 PDT 2003
This idea has been discussed at length. Thus far I've never found a
proposal that was better than what we have, but you can check Brad's
experimental approach at ftp://a.cs.okstate.edu/pub/hip/jdom-x.zip and
see what you think.
-jh-
Winston Wolff wrote:
>
> I have just started integrating JDOM into one of my projects and I really admire it's ease of use. I don't know when the Beta 9 is scheduled for public release, so I have one suggestion which I would like to mention and see if anybody things it would be a useful addition to the project.
>
> I think it would be useful to have a common base class for the various JDOM entity objects like Element and Comment in particular. Perhaps org.jdom.Entity?
>
> My situation is this: I have a tree of objects that I am storing as XML via JDOM. Each object has a method: Element xmlEncode() with returns an Element object to represent itself in the XML file. However I would like to also allow a comment to be returned in some cases. For example, Entity xmlEncode() Where an entity could be either an element or a comment. This will allow the java object to mark it's place in the XML file, but not actually put an element in.
>
> What do people think?
>
> -winston
More information about the jdom-interest
mailing list