[jdom-interest] building jdom trees

Richard Cook rpc at prismtechnologies.com
Wed Mar 7 09:28:19 PST 2001


Probably a silly question, but SAXHandler creates Element objects directly
via new, so is it not possible to build a JDOM tree which contains Element
subclasses? Do I have to build the JDom tree then create some sort of clone
which adapts each Element to the interface I need?


Also Element::equals(Object) is final and uses "==", which means I can't
change it; this is presumably a necessity I shouldn't change?

I have a tendency to write element.getChildren().get(i) and suchlike, I
notice that getChildren() builds a PartialList each time so obviously this
is inefficient (actually I guess LinkedList.get(i) also loops and I should
use an iterator?); is there a set of performance hints anywhere?

Thanks, Richard Cook.




More information about the jdom-interest mailing list