[Htmlparser-user] Re: HTML TABLE PARSER
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2002-01-21 01:17:25
|
Hi Rohit, For including your own scanner type, you would need to do something like this : [1] HTMLTableTag - the tag that stores the data of the table tags [2] HTMLTableScanner - the class which does the scanning - implement the two template methods : (i) evaluate() - returns true if the tag name is "TABLE". false otherwise (ii) scan() - returns the HTMLTableTag object from the available text data. Here, you will be having the tag contents, and you will need to extract the relevant data out, construct the table object appropriately and return it. Finally, you need to register this scanner. Thats it - after this, table object will be identified. All the scanners in the library were written with this architecture in mind. Check out the entire scanners package, in particular, HTMLLinkScanner. Check out the corresponding test cases (in scannersTests package), and you should get a clear idea of the usage. Also - could you subscribe to the HTMLParser User's list, and mail your queries to that single mail id. Cheers Somik ----- Original Message ----- From: "Rohit Kelapure" <rke...@vt...> To: <fal...@mt...>; <kaa...@ik...>; <na...@us...>; <so...@ki...> Sent: Monday, January 21, 2002 10:07 AM Subject: HTML TABLE PARSER > My name is Rohit Kelapure. > > I am a graduate student in Computer Science at Virginia Tech. > > I have been going through the source code of the HTML parser. > > I need to customize this so as to extract the items of a table on a HTML page > and insert in a database. > > >From the code and documentation it is clear that I need to create my own > scanner-tag pair. > > Could you give some more pointers to this.Which are the java source files > which I should be working with? Have any of you worked on this modification > before? > > Your help and suggestions are greatly welcome. > > Thanks, > Rohit Kelapure. > Graduate Student Computer Science Virginia Tech USA. > > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |