public interface ElementPersistentFilter extends Filter
For example, if you have thousands elements in the databox, and you just want output Node elements, use a filter like this:
ElementPersistentFilter filter=new ElementPersistentFilter(){ public boolean isTransient(Element element){ return !(element instanceof Node); } } box.output("file.xml", false, filter);Please note that this filter ask you whether an element is transient. Return true means do not write out the element.
Modifier and Type | Method and Description |
---|---|
boolean |
isTransient(Element element)
Tells whether the given element is transient.
|
boolean isTransient(Element element)
element
- Element the elementCopyright © 2002 - 2010 Serva Software. All Rights Reserved.