A general purpose Filter able to represent all legal JDOM objects or a specific subset. Filtering is accomplished by way of a filtering mask in which each bit represents whether a JDOM object is visible or not. For example to view all Text and CDATA nodes in the content of element x.
Filter filter = new ContentFilter(ContentFilter.TEXT | ContentFilter.CDATA); List content = x.getContent(filter);
For those who don't like bit-masking, set methods are provided as an alternative. For example to allow everything except Comment nodes.
Filter filter = new ContentFilter(); filter.setCommentVisible(false); List content = x.getContent(filter);
The default is to allow all valid JDOM objects.
@version $Revision: 1.15 $, $Date: 2007/11/10 05:29:00 $
@author Bradley S. Huffman