Given a url, I need all used css attributes for a html nodes including those derived from css files depending on the node attributes.
Is there anything in java that already does this ?
Or can I run a web browser instance in java and hence have the css attributes collected by running javascript in this browser instance ?

1 Answer
1

If performance in your application is critical then i do not suggest you to use browser controls. then you should take the following steps

1) download your web page source code
2) find all style files in header or body and find all inline style in your html source
3) download all css files and fed them to CssParser (as @PeterMmm suggest) to create css structure
4) if you'd like to calculate a node final css you should start from the root node and find all rules apply to it and calculate the styles using the standard