[jdom-interest] Additional functionality for class org.jdom.filter.ElementFilter?

Michael Kordt kordt at uni-wuppertal.de
Tue Jul 5 03:46:12 PDT 2005


Bradley S. Huffman wrote:
> Michael Kordt writes:
> 
> 
>>So if these possibilities of retrieving filtering criteria really do not exis
>>t 
>>in the current JDOM release, I'd like to suggest adding them in the next rele
>>ase 
>>(probably JDOM 1.1?) - this would be a small but convenient enhancement to an
>> 
>>already very comfortable and easy-to-use API for processing XML documents.
> 
> 
> So your suggesting getName(), setName(), getNamespace(), setNamespace(). Hmmm
> ContentFilter has getters and setters, it seems reasonable that other filters
> should too.
> 
> Brad

Adding getName() and getNameSpace() would be very appreciated... :-)

However I am not sure if the corresponding setters would be very useful. My 
experience with JDOM is rather limited until now, but my idea about an element 
filter is that, once created, I may (of course!) reuse it for filtering 
according to its specific criteria, but when I want to apply different filtering 
criteria (i. e. different element name and/or namespace) later on I would 
suggest creating a new filter instead of manipulating the criteria of the 
existing one.

I don't know if you agree with that (as I said before I am rather a JDOM newbie, 
therefore my perspective may be somewhat narrow) - I just wanted to point out my 
notion of element filters and their use in view of your proposal to even provide 
setName() and setNamespace() within the ElementFilter class.

Michael


More information about the jdom-interest mailing list