tags:

views:

1183

answers:

2

What is a good C/C++ CSS parser? All that I can find is CSSTidy, and it seems to be more of an application than a parsing library.

+2  A: 

I googled for:

 "CSS Parser" C++ 

The first result is http://sourceforge.net/projects/htmlcxx. It's a CSS/HTML API for C++.

Colin
+2  A: 

A pretty good bet would be to read through the Mozilla or Safari code-base. If you need something a little more accessible for another program, there's an ANTLR grammar (which you can use to create C++ code) at http://antlr.org/grammar/1214945003224/csst3.g. The W3 validator is located at http://dev.w3.org/cvsweb/2002/css-validator/, but it is Java.

Sean