[jdom-interest] ElementFilter
Elliotte Rusty Harold
elharo at metalab.unc.edu
Thu May 2 18:35:34 PDT 2002
To me at least the documentation for the ElementFilter constructors is
misleading. It states:
public *ElementFilter*()
Filter out the Elements.
public *ElementFilter*(java.lang.String name)
Filter out the Elements with the supplied name in any Namespace.
public *ElementFilter*(Namespace <cid:part1.06090902.05080102 at metalab.unc.edu> namespace)
Filter out the Elements with the supplied Namespace.
public *ElementFilter*(java.lang.String name,
Namespace <cid:part2.05070208.09000903 at metalab.unc.edu> namespace)
Filter out the Elements with the supplied name and Namespace.
What bothers me are the words "Filter out". To me this implies that the
filter is removing those elements so I won't see them. In fact the
opposite is happening. What's filtered are the only elements I do see. I
supsect it's partially an issue of perspective. That is, you could look
at it as a stream of data going by and the filter only filters out and
returns the peices you've asked for. Still that's not the first
interpreation that jumped into my head.
I think we could write it a little more clearly and less ambiguously as
"Selects only the Elements with the supplied Namespace" and "Selects
only the Elements with the supplied name" and so forth.
FYI, CVS seems to be down.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| The XML Bible, 2nd Edition (IDG Books, 2001) |
| http://www.cafeconleche.org/books/bible2/ |
| http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
More information about the jdom-interest
mailing list