[jdom-interest] TODO: Get recursive content

Per Norrman pernorrman at telia.com
Tue May 6 05:26:58 PDT 2003


Hi,

I noticed in the TODO file:

* Add methods to recursively get content and get filtered content.

I digged in my archives and freshened up on a JDOMTreeWalker. It has served
me well in the past, but now I find myself more often using xpath...

Anyway, this class provides an Iterator implementation that does a
pre-order,
depth-first traversal (at least I think i does that) with optional
filtering.
I just updated it to use org.jdom.filter.Filter instead of my own.
You cannot remove nodes, just iterate.

Feel free to use it for any purpose.

/Per Norrman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JDOMTreeWalker.java
Type: application/octet-stream
Size: 3094 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030506/b6272f9b/JDOMTreeWalker.obj


More information about the jdom-interest mailing list