Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

need help on searching through a parsed HTML table(used HTML::TableExtract)

Question posted by: poisonedapple (Newbie) on July 2nd, 2008 07:40 PM
Hi ,

I have posted this in one of my other thread but I am posting it again since it is infact on a different topic
I got the table extracted and I have a huge document full of tables. From this(HTML::TableExtract) module I am trying to search for keywords(from the user input) on the parsed tables I have to print only the necessary data.
I tried going CPAN but could not really find how to search through it for particular keywords.

One way to do it would be(a rather wrong way for me since I need corresponding columns or some other relevant data from the table if I find that in that particular table):
Output the result of the parsed tables into some .text and parse it from there
but parsing from there would hinder my aim to actually get the keywords corresponding columns

Aim and problem here:: is I cant find anyway to search through the resulting parsed table and get necessary data.


thanks for the reply I appreciate
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
KevinADC's Avatar
KevinADC
Expert
3,025 Posts
July 2nd, 2008
11:17 PM
#2

Re: need help on searching through a parsed HTML table(used HTML::TableExtract)
show some sample data and explain what you are doing. Trying to understand what you wrote without benefit of some sample data is pretty much impossible.

Reply
poisonedapple's Avatar
poisonedapple
Newbie
8 Posts
July 3rd, 2008
04:52 AM
#3

Re: need help on searching through a parsed HTML table(used HTML::TableExtract)
Suppose I get this table after I parse a HTML:

Name:General Test
Address:0x0
target:N

Bits Description
9 Error_in_buffering
7 Error_in_sight
8 OverFlow_control
0 flow_test_0

(bit and decription are two separate columns I could not find a way to display it as such)
What I wanna do is if the user inputs error, flow in the command line I should be able to generate

Error_in_buffering bit:9 Name : general test address:0x0
Error_in_sight bit:7 Name : general test address:0x0
OverFlow_control bit:8 Name:general test address:0x0

Note:Name ,Target, address table is always above the bit description table
So there are multiple tables like these pair

general outlook:
-there are multiple tables which have been parsed now I have to take user input to search for the keyword and find the corresponding bit,name,address,target

I could do keyword search easily if I turn the parsed output into a text file but since I need to have the corresponding and the information(name,target,address) from the corresponding table right above I have to parse it in a table format or in other words I have to do the program from HTML::TableExtract itself.

So all I want to know is how to get the parsed html output as a data structure instead of plain text so that I can interact with the parsed data. If there is some easier way to do this I would appreciate your kindness

Thanks for the reply I appreciate.






error_in_buffering bit::9

Reply
poisonedapple's Avatar
poisonedapple
Newbie
8 Posts
July 7th, 2008
04:23 AM
#4

Re: need help on searching through a parsed HTML table(used HTML::TableExtract)
can anyone help?? I would appreciate any help thanks

Reply
KevinADC's Avatar
KevinADC
Expert
3,025 Posts
July 7th, 2008
03:56 PM
#5

Re: need help on searching through a parsed HTML table(used HTML::TableExtract)
Sorry, but I have no idea how to do what you want. Ask on www.perlmonks.com

Reply
Reply
Not the answer you were looking for? Post your question . . .
180,798 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top Perl Forum Contributors