By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

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

P: 8
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
Jul 2 '08 #1
Share this Question
Share on Google+
4 Replies


KevinADC
Expert 2.5K+
P: 4,059
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.
Jul 2 '08 #2

P: 8
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
Jul 3 '08 #3

P: 8
can anyone help?? I would appreciate any help thanks
Jul 7 '08 #4

KevinADC
Expert 2.5K+
P: 4,059
Sorry, but I have no idea how to do what you want. Ask on www.perlmonks.com
Jul 7 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.