[jdom-interest] XML tree traversing

Mores Stanislav stm at prosoft.sk
Thu Dec 28 06:24:33 PST 2000


I wondered why not to have simpler mean of XML tree traversing,
by defining the following methods:

  Element getFirstChild();		- returns first child element or
  Element getNextSibling();		- returns next sibling element or

and possibly:
  Element getPrevSibling();

That would be more easier to use than getChildren(),
with no memory overhead (no List allocation),
especially when traversing the whole tree, which is my
case ( I need to process each node in the tree).

Is it good idea ? 
I guess there might be problem when modifying XML
document during traverse.
What do you think ?


  Ing. Stanislav Mores, Senior Programmer, SW Projects Division
  Prosoft s.r.o., Kuzmanyho 8, 010 01 Zilina, Slovakia
  e-mail: stm at prosoft.sk, mobil: +421-905-340020
  phone: +421-89-5625 491, fax: +421-89-5625 497

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20001228/12611f2a/attachment.htm

More information about the jdom-interest mailing list