Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a CSS parser for C#? [closed]

Tags:

c#

css

parsing

My program need to parse css files into an in-memory object format. Any advice on how this should be done ?

like image 612
Ken Avatar asked Feb 04 '09 18:02

Ken


People also ask

What is CSS parser?

Overview. The CSS Parser is implemented as a package of Java classes, that inputs Cascading Style Sheets source text and outputs a Document Object Model Level 2 Style tree. Alternatively, applications can use SAC: The Simple API for CSS.

What is the process of parsing a CSS selector?

Similar to HTML parsing, CSS parsing also starts by tokenizing the CSS source code into tokens, which are then parsed into CSS rules. The parsing rules are described in the CSS syntax spec. However, since the syntax is fairly simple, you are free implement your version of the parsing algorithm to maximize the speed.


1 Answers

ExCSS (supports CSS2.1 and CSS3) on GitHub: https://github.com/TylerBrinks/ExCSS.

Which is a newer version of the code project article: http://www.codeproject.com/KB/recipes/CSSParser.aspx

like image 125
Jon Tackabury Avatar answered Oct 01 '22 21:10

Jon Tackabury