java - Build only the nodes matching certain criteria using Lexer and HTMLParser -
i'm parsing huge documents not performant parse wholesale or build dom. div nodes contain information want build part of dom , analyze there. ideally use lightweight lexer (i using htmlparser.org's, java lexer i've been able find), , when see node of interest, build node. is there clean way using these technologies? haven't found way parse resource other text or url - thought maybe it's possible manually setting lexer. 1 problem setlexer in parser mutates lexer (which affects parsing of *entire document),, assume because writer of class unaware there better languages write obfuscated code in java. idea how put these together?