How to use nokogiri For css file parse

P

Priyank Shah

Hi,

Any one have idea about how to use

Nokogiri::CSS("abc.css")


for parse css file or getting the classes and styles from that css file.

Thanks,
Priyank Shah
 
M

Markus Fischer

Hi,

Any one have idea about how to use

Nokogiri::CSS("abc.css")

for parse css file or getting the classes and styles from that css file.

Nokogiri cannot parse CSS, what you're looking at is part to parse the
selectors used to query your document. You need another library for
parsing CSS itself (see google).

HTH
 
P

Priyank Shah

Markus said:
Hi,



Nokogiri cannot parse CSS, what you're looking at is part to parse the
selectors used to query your document. You need another library for
parsing CSS itself (see google).

HTH

Hi,

Thanks for reply,

But i found gem for that is "css_parser" please check it.

http://github.com/alexdunae/css_parser

it is really nice.

Thanks,
Priyank Shah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top