[jdom-interest] new to jdom .. and many questions

Azrael azrael at azrael-uk.f2s.com
Wed Aug 28 06:09:13 PDT 2002

Dennis Sosnoski wrote:
> Hey, I like that - cleaner and probably more efficient than the direct 
> navigation approach I suggested a few minutes ago. If the goal is to 
> return only elements (as suggested in the email) you probably want to 
> use "temp.addAll(element.getChildren())" rather than 
> "temp.addAll(element.getContent())", though. This lets you skip the 
> "mylist.get(i) instanceof Element" check, too, since you know there'll 
> only ever be elements in the list.
>  - Dennis

It's morning again (ok, afternoon) and I'm gonna try out this stuff, 
just to comment though.. Yes, I am only relating to elements, as my 
supervisors algorithm only handles elements.. and I don't need to take 
account of attributes or entities, or even actual textual content.
However I have implemented tha algorithm in such a way that full 
implementation of all these is possible without a total re-write .. but 
I don't need to worry about them at the level I am now working on.

-- Azrael

More information about the jdom-interest mailing list