Reputation: 1810
Is there any Java API which would take a html document and a css document as input and allow me to ask: give me the used value for property x for element with id y? (Computed value would also be fine but used value even better).
(I would like to use a small subset of CSS2.1 as input to style an excel sheet).
Upvotes: 1
Views: 762
Reputation: 20323
I am not sure if there is any library like that but in order to achieve solution to your problem you can use a CSS Parser Simple API For CSS has many implementation, then you can do a query the parsed content for query. If you want to parse HTML also in Java then you can use apache HTML parser. Hope this helps.
Upvotes: 1