[Fwd: [jdom-interest] getMixedContent -> getContent]

Quisam at aol.com Quisam at aol.com
Thu Jun 28 15:34:47 PDT 2001


>>Elliotte Rusty Harold wrote:
>>
>>>  Longer term, I wonder if there's some way we can add an overloaded
>>>  getContent() method that takes some sort of filter object as an
>>>  argument, so that users could pass in filters to get only comments,
>>>  only text nodes, only text nodes that weren't ignorable white space,
>>>  only elements in a certain namespace, etc.
>>
>>Would like it.
>>Isn't the SAXFilter a better place to ignore white spaces ???
>>
>
>Only if you want to ignore them in the entire tree and only if you 
>actually have a SAXBuilder in place to read from. Neither of those 
>may be true. The document could come from DOM or it could be created 
>in memory. And you may want to filter different parts of the tree 
>differently. For example, you might want to filter an svg:svg element 
>embedded in an XHTML element differently than the surrounding XHTML 
>markup. Nor are white space filters the only filters you might want.

Ok. Ok.
As I said, I would like having filters for doing interesting things,
but it would be also a nice option for SAXBuilder or SAXFilter
to discard 'empty' text contents.

- markus



More information about the jdom-interest mailing list