accept_node method

accept_node

Test whether a specified node is visible in the logical view of a TreeWalker or NodeIterator. This function will be called by the implementation of TreeWalker and NodeIterator; it is not normally called directly from user code. (Though you could do so if you wanted to use the same filter to guide your own application logic.)

Returns

a constant to determine whether the node is accepted, rejected, or skipped, as defined above.

def accept_node(self, n):
    ...
ParameterTypeDescription
nNodenode to check to see if it passes the filter or not.

See Also