.TH "DOM::CustomNodeFilter" kde3 "11 Jun 2005" "Version Version 3.4.1" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DOM::CustomNodeFilter \- \fBCustomNodeFilter\fP can be used to define your own \fBNodeFilter\fP for use with NodeIterators and TreeWalkers.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <dom2_traversal.h>\fP
.PP
Inherits DOM::DomShared.
.PP
Inherited by KJS::JSNodeFilter.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "virtual short \fBacceptNode\fP (const \fBNode\fP &n)"
.br
.ti -1c
.RI "virtual bool \fBisNull\fP ()"
.br
.ti -1c
.RI "virtual \fBDOMString\fP \fBcustomNodeFilterType\fP ()"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "CustomNodeFilterImpl * \fBimpl\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
\fBCustomNodeFilter\fP can be used to define your own \fBNodeFilter\fP for use with NodeIterators and TreeWalkers. 

You can create a custom filter by doing the following:
.PP
class MyCustomNodeFilter { ..... virtual short acceptNode (const \fBNode\fP &n); ..... }
.PP
Then in your program:
.PP
short MyCustomNodeFilter::acceptNode (const \fBNode\fP &n) { if (condition) return NodeFilter::FILTER_ACCEPT; else .... }
.PP
MyCustomFilter *filter = new MyCustomFilter(); \fBNodeFilter\fP nf = NodeFilter::createCustom(filter); \fBNodeIterator\fP ni = document.createNodeIterator(document,NodeFilter.SHOW_ALL,nf,false);
.PP
The default implementation of acceptNode() returns NodeFilter::FILTER_ACCEPT for all nodes. 
.PP
Definition at line 295 of file dom2_traversal.h.

.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
