public CSSRule parseRule(InputSource source) throws IOException { CSSOMHandler handler = new CSSOMHandler(); _parser.setDocumentHandler(handler); _parser.parseRule(source); return (CSSRule) handler.getRoot(); }
public CSSStyleSheet parseStyleSheet(InputSource source) throws IOException { CSSOMHandler handler = new CSSOMHandler(); _parser.setDocumentHandler(handler); _parser.parseStyleSheet(source); return (CSSStyleSheet) handler.getRoot(); }