You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by Markus Jelsma <ma...@openindex.io> on 2017/09/19 08:43:26 UTC

ContentHandlers and CSS parsing

Hello,

I am parsing HTML using Tika and collecting interesting pieces of it using a custom ContentHandler. In the ContentHandler i keep track of parent elements, classes etc using stacks, i know where i am in the mess.

Now, for each element in startElement i need to look-up the visibility, specifically check if display isn't none, and ignore it if so.

How? I have checked CSSParser, CSSBox and several other CSS parsing projects, but i haven't seen a simple straightforward API yet that lets me look-up its computed style for a given location.

Any suggestions?

Many thanks!
Markus