Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A CSS selector engine for C++
Branch: master
Failed to load latest commit information.
doc Fixed link to example in documentation
examples Explicitly link against the C++ standard library
src Updated documentation, now explicitly showing possible exceptions
web Fixed typo on web page
COPYING Initial commit
ChangeLog Version bump and web page update
Doxyfile Version bump and web page update
Makefile Added first unit tests
TODO Added parsing of pseudo-elements with arguments


hcxselect - A CSS selector engine for htmlcxx

hcxselect is a small CSS selector engine for htmlcxx. It parses
CSS selector expressions and applies them to a set of trees of HTML
nodes parsed via htmlcxx.

# Usage

The "library" consists of a header and a source file and is currently
meant to be directly included in other software, as it provides no
installation options. Please be aware the flex is needed to generate
code for the lexical scanner. However, this needs to be done only once,
and the respective header file can be used directly.

# Compliance

hcxselect aims to comply with the Selectors Level 3 specification
<>. However, a couple of browser-specific
selectors are not implemented, as they don't make sense here:

	* pseudo-classes:
	  :link, :visited, :hover, :active, :focus, :target, :lang,
	  :enabled, :disabled, :checked, :indeterminate

	* pseudo-elements:
	  ::before, ::after

The following extra pseudo-classes are provided for convenience:

	* :text matches text (i.e., non-text and non-comment node)
	* :comment matches comment nodes

# License

hcxselect licensed under 3-clause BSD license. However, please be
aware that htmlcxx itself uses the GNU Lesser General Public License
(LGPL) and uses tree.hh, which in turn is available under the GNU
General Public License (GPL), version 2 or 3.
Something went wrong with that request. Please try again.