Re: [Htmlparser-user] No line numbers if using a string source for parser
Brought to you by:
derrickoswald
From: Derrick O. <der...@gm...> - 2009-10-04 05:12:32
|
Does your input text string contain the newline (0x0A) or carriage return-newline (0x0D,0x0A) end of line characters? On Sun, Oct 4, 2009 at 5:04 AM, Graham Bentley < gra...@wh...> wrote: > 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 > > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > |