|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElementFilter
Interface for classes that decide whether or not to accept elements in XML
documents. This interface cannot extend the NodeFilter
interface because the matches(Element)
method is allowed to throw an
ProcessingException
.
Method Summary | |
---|---|
boolean |
avoids(Element element)
Whether the filter would avoid to filter an element, if possible. |
void |
init(Document document,
File filename)
Resets the filter to start processing a new document. |
boolean |
matches(Element element)
Decides whether an element is accepted by this filter. |
boolean |
prefers(Element element)
Whether the filter would prefer to filter an element. |
Method Detail |
---|
void init(Document document, File filename) throws ProcessingException, IOException
matches(Element)
or prefers(Element)
on elements of
this document.
document
- the document to processfilename
- the file name of the document
ProcessingException
- if an error occurs while starting to
process the document
IOException
- if an I/O error occursboolean avoids(Element element)
element
- the element to consider
true
if this would prefer to avoid filtering the
element; false
otherwiseboolean matches(Element element) throws ProcessingException
element
- the element to test
true
if this filter accepts the element;
false
otherwise
ProcessingException
- if an error occurs during filteringboolean prefers(Element element)
element
- the element to consider
true
if this would prefer to filter the element;
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |