[jdom-interest] Re: [jdom-commits] Suggestion for adding breadthFirstEnumeration and deapthFirstEnumeration in the Element class

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Aug 10 04:47:56 PDT 2000

At 4:12 PM -0700 8/9/00, Chandra Patni wrote:
>I have been using JDOM for a week or so and it seems to be pretty 
>interesting. I have few suggestions regarding some of the added 
>1. It will be really useful to have breadthFirstEnumeration, 
>deapthFirstEnumeration and other traversals of a given element. I 
>suggest the inclusion of these two methods in the Element class.
>Iterator breadthFirstIterator();
>Iterator depthFirstIterator();
>Iterator inOrderIterator();
>Iterator postOrderIterator();
>Iterator preOrderIterator();
>I will be willing to contribute to this effort if desired.

These could be useful but I see no reason to clutter the Element API 
with them. How about experimenting with them in a separate class 
somewhere off in the contrib package?

| 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