CSS Parser in ColdFusion or Java?

923 views Asked by At

I'm building something that requires a simple HTML frontend for editing some properties in CSS. However, I need to get the value specified by a CSS file.

The only parser I can find is CSS Parser Project , and it is in Java. It implements both Document Object Model Level 2 Style & SAC: The Simple API for CSS API. It should work, but we have not tried. Any tutorial on this project or the API's?

Another solution my team can think of is to push that responsibility to the client's browser + jQuery. However, it doesn't seem very reliable and efficient.

Regular expression does not seem to be the right tool for fishing out properties from CSS.

Anyone has a better/simpler solution? Thanks!

3

There are 3 answers

0
Henry On BEST ANSWER
2
Peter Boughton On

Ben Nadel has created a CSS parser in ColdFusion - it's not fully featured yet, but it might be good enough?

He's also been doing a lot of other CSS-related stuff recently, so if you need more things take a poke around his blog.

1
Peter Boughton On

The only parser I can find is CSS Parser Project ... Any tutorial on this project or the API's?

It looks like this may have beenrenamed from a previous project - here's the API: http://www.docjar.com/docs/api/com/steadystate/css/overview-summary.html