use of com.steadystate.css.parser.CSSOMParser in project tdi-studio-se by Talend.
the class CSSParserUtils method parserCSSSelectors.
public static CSSRuleList parserCSSSelectors(Reader read, String url) {
CSSOMParser cssparser = new CSSOMParser();
CSSStyleSheet css = null;
try {
if (read == null)
//$NON-NLS-1$
css = cssparser.parseStyleSheet(new InputSource("file:" + url), null, null);
else
css = cssparser.parseStyleSheet(new InputSource(read), null, null);
} catch (IOException e) {
ExceptionHandler.process(e);
return null;
}
return css.getCssRules();
}
Aggregations