I'm trying to use the jStyleParser library ( part of the CSSBox project) to analyze the css of a generic web page and bind all the css information to the DOM of that page. My goal is, given a web page, to have a DOM tree such that, for each node, I can get all the css informations realted to tha node.
This is (part of) my code:
System.out.println("Analizing "+Mylocalfile.getAbsolutePath());
StyleSheet ss = CSSFactory.parse(Mylocalfile.getAbsolutePath(), "UTF-8");
if (ss.isEmpty()) System.out.println("StyleSheet is void");
The parse method seem to be unable to parse the file: the StyleSheet ss is infact void.
Do you know why?