Library: Netconf
Package: Filtering
Header: Poco/Netconf/Filter.h
A Filter filters a document either by xpath or by a XML tree. A uninitialized filter will return everything, If a filter is initialized with an empty Document (which is valid), it will return nothing. If it is not initialized at all, it will return everything.
Member Functions: getSubTree, getXPath, setSubTree, setToGetAll, setXPath, type
F_GETALL = 0
F_XPATH = 1
F_SUBTREE = 2
Filter();
Creates a default Filter, which doesn't filter at all.
~Filter();
Destroys the Filter.
Poco::AutoPtr < XML::Document > getSubTree() const;
Returns the tree, which can be 0.
const std::string & getXPath() const;
Returns an xpath expression, can be empty.
void setSubTree(
Poco::AutoPtr < XML::Document > filter = Poco::AutoPtr < XML::Document > ()
);
Creates a subtree filter, removes a previously set xpath filter. If the document is null, the filter will filter everything, i.e. returning nothing.
void setToGetAll();
Disables filtering.
void setXPath(
const std::string & xPathExpress
);
Creates a xpath filter, removes a previously set XML::Document filter.
Type type() const;
Returns the type of the filter.