/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: DOM_NodeFilter.hpp 568078 2007-08-21 11:43:25Z amassari $
*/
// DOM_NodeFilter.h: interface for the DOM_NodeFilter class.
//
//////////////////////////////////////////////////////////////////////
#ifndef DOM_NodeFilter_HEADER_GUARD_
#define DOM_NodeFilter_HEADER_GUARD_
#include "DOM_Node.hpp"
XERCES_CPP_NAMESPACE_BEGIN
class NodeFilterImpl;
/**
* Filters are objects that know how to "filter out" nodes. If a
* DOM_NodeIterator
or DOM_TreeWalker
is given a
* filter, it applies the filter before it returns the next node.
*
* If the filter says to accept the node, the iterator returns it; otherwise, the
* iterator looks for the next node and pretends that the node that was rejected
* was not there.
*
* The DOM does not provide any filters. Filter is just an interface that users can
* implement to provide their own filters.
*
* Filters do not need to know how to iterate, nor do they need to know anything
* about the data structure that is being iterated. This makes it very easy to write
* filters, since the only thing they have to know how to do is evaluate a single node.
* One filter may be used with a number of different kinds of iterators, encouraging
* code reuse.
*
*/
class DEPRECATED_DOM_EXPORT DOM_NodeFilter
{
public:
/** @name Enumerators for Node Filter */
//@{
/*
*
FILTER_ACCEPT | *Accept the node. Navigation methods defined for * NodeIterator or TreeWalker will return this node. | *
* FILTER_REJECT | *Reject the node. Navigation methods defined for * NodeIterator or TreeWalker will not return this * node. For TreeWalker, the children of this node will * also be rejected. Iterators treat this as a synonym * for FILTER_SKIP. | *
FILTER_SKIP | *Reject the node. Navigation methods defined for * NodeIterator or TreeWalker will not return this * node. For both NodeIterator and Treewalker, the * children of this node will still be considered. | *