hcxselect  1.1
A CSS selector engine for htmlcxx
Classes | Functions
hcxselect Namespace Reference

Classes

struct  NodeComp
 Comparison class for nodes. More...
class  Selection
 Convenient wrapper class for select(). More...
class  ParseException
 Exception that may be thrown when parsing a selector expression. More...
class  Node
 Conenient typedef for tree_node_<htmlcxx::HTML::Node>. More...
class  NodeSet
 Custom type for a set of nodes. More...

Functions

NodeSet select (const NodeSet &nodes, const std::string &expr)
NodeSet select (const tree< htmlcxx::HTML::Node > &tree, const std::string &expr)

Detailed Description

Library namespace.


Function Documentation

NodeSet hcxselect::select ( const NodeSet &  nodes,
const std::string &  expr 
)

Applies a CSS selector expression to a set of nodes.

Note:
May throw a ParseException.
Parameters:
nodesThe set of nodes
exprThe CSS selector expression
Returns:
A set of nodes that matches the given selector

Definition at line 746 of file hcxselect.cpp.

NodeSet hcxselect::select ( const tree< htmlcxx::HTML::Node > &  tree,
const std::string &  expr 
)

Applies a CSS selector expression to a whole HTML tree.

Note:
May throw a ParseException.
Parameters:
treeThe HTML tree
exprThe CSS selector expression
Returns:
A set of nodes that matches the given selector