[Htmlparser-user] No line numbers if using a string source for parser
Brought to you by:
derrickoswald
From: Graham B. <gra...@wh...> - 2009-10-04 03:34:49
|
Hi there, Im using the parser to extract links and am passing the html in as a string source ie: Parser oParser = new Parser(new Lexer(sHTML)); However Ive noticed that I can get the starting position of the extracted nodes: LinkTag.getStartPosition but cannot get the starting line number: LinkTag.getStartingLineNumber is always 0 it works fine and gives the line number if I pass in an input stream from httpurlconnection or the urlconnection itself. so a bit confused - is this a bug or is it not possible to get the line numbers when using the stringsource ? could really do with the line numbers if there is a correct way of doing this, thanks. all working really well apart from that, thanks for the library. regards, Graham |