473,473 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HTML table parser to get the required content and store in an array

3 New Member
Hi,

I am trying to write a program to fetch the HTML table values and store in the array as they are in the table.

<table>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
......
.......
</table>

assume there are other tables also there.
I have tried WWW:mechanize, HTML:parser. but as i am new to these parsing, i don't know how to write and fetch. If you can help me to get the value then it will be more helpful.

Thank you in advance for helping

I tried to search in cpan, and other sources but dint get
Jan 24 '08 #1
6 3098
numberwhun
3,509 Recognized Expert Moderator Specialist
Please DO NOT turn on your signature for your posts. Personal URL's and emails are not allowed in the regular forums per the Posting Guidelines. Please read them and adhere to them.

Regards,

MODERATOR
Jan 24 '08 #2
numberwhun
3,509 Recognized Expert Moderator Specialist
Hi,

I am trying to write a program to fetch the HTML table values and store in the array as they are in the table.

<table>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
......
.......
</table>

assume there are other tables also there.
I have tried WWW:mechanize, HTML:parser. but as i am new to these parsing, i don't know how to write and fetch. If you can help me to get the value then it will be more helpful.

Thank you in advance for helping

I tried to search in cpan, and other sources but dint get
You say you have tried those two modules, but have you read their documentation on CPAN? The documentation usually gives pretty good examples of how to use the modules.

Regards,

Jeff
Jan 24 '08 #3
snsanju
3 New Member
Actually i have already gone through the CPAN documents...
But i dint get the example related to my issue.

Assume in a web page we have more than 3 table and all tables have the same layout and structure. I wants to compare with some text inside some TD of TR. And then wants to take that particular table for further process.

I mean, fetch the TD value in the 2 dimensional array.
Jan 26 '08 #4
KevinADC
4,059 Recognized Expert Specialist
There is HTML::TableParser but I have never used it myself. The documentation is not easy to understand. But maybe you can try experimenting with code and get it to work.
Jan 26 '08 #5
kierandes
25 New Member
Hi all. Could someone PM me the link to that parser tutorial. I have been looking for the same thing. Trying to make a parser that would grab the data , put it in an array then store it in mysql. Some fun bit of coding :)
Apr 30 '08 #6
KevinADC
4,059 Recognized Expert Specialist
Hi all. Could someone PM me the link to that parser tutorial. I have been looking for the same thing. Trying to make a parser that would grab the data , put it in an array then store it in mysql. Some fun bit of coding :)

Start here: http://search.cpan.org/
Apr 30 '08 #7

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

Similar topics

7
by: YoBro | last post by:
Hi I have used some of this code from the PHP manual, but I am bloody hopeless with regular expressions. Was hoping somebody could offer a hand. The output of this will put the name of a form...
2
by: Rio | last post by:
I'm trying to build HTML table parser (available not satisfying my needs), I need to know what is in every cell, along with its cell, row and table number plus the attributes that go with those...
10
by: Free-Ed, Ltd. | last post by:
I am going nuts trying to find a paragraph in a book that described how to change the text content (HTML) in a DIV. Actually I have an array of HTML strings that I want to drop into the DIV,...
9
by: Phil_Harvey | last post by:
I am redoing my website and trying to get it to do something more exciting using Javascript. I did normal Java at university and code at work in VB.NET. I have got reasonably far into what I want...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: Lars Eighner | last post by:
In our last episode, <004f629c$0$10265$c3e8da3@news.astraweb.com>, the lovely and talented mark4asp broadcast on comp.infosystems.www.authoring.html: I have not done this, not even on...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
42
by: Santander | last post by:
how to decode HTML pages encoded like this: http://www.long2consulting.com/seeinaction2008/Simplicity_Beach_table/index.htm Is there script that will do this automatically and generate normal fully...
11
Dormilich
by: Dormilich | last post by:
Lately I have seen so much awful HTML, that I like to show what a HTML document should look like, regarding the requirements from the W3C. the absolute minimum is defined as: or expressed in...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.