RE: [ajax-user] CSS Parser and docs?
Brought to you by:
vamp201
From: Tamaillon A. <Arn...@at...> - 2006-04-14 06:47:43
|
Hello ! =20 You could try cssparser ( http://sourceforge.net/projects/cssparser). It = is far more compliant with the CSS format. However, the project seems = not to be maintained. It is less performant than Cypress (almost 10 = times slower), but it's because it handles much more of the CSS format = than Cypress. There are some things that could be enhanced in cssparser, = but it does the work. =20 Arnaud -----Message d'origine----- De : aja...@li... = [mailto:aja...@li...]De la part de Monte = Hayward Envoy=E9 : jeudi 13 avril 2006 22:45 =C0 : aja...@li... Objet : [ajax-user] CSS Parser and docs? Does anyone know of a decent open-source utility for parsing CSS? I want to be able to parse a style sheet and extract attribute values by = attribute name. Something like this: CSSstylesheet css =3D new CSSstylesheet(" all.css"); Rule rules[] =3D css.getRules(); for(int i=3D0;i<rules.length();i++){ currRule =3D rules[i]; System.out.println(currRule.getSelector() + "\n" + = currRule.getAttributeValue("margin-left"));=20 } I tried Cypress, but found that there were about 20 classes with no = substantive javadocs or usage examples. The other CSS parser I found was distributed as a Windows DLL, which is = incompatible with the usage environment.=20 Thanks. --=20 Monte Hayward http://www.rootlet.blogspot.com=20 |