Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

HTML Parse Help

by Agyeya (Hermit)
on May 07, 2004 at 09:35 UTC ( [id://351403]=perlquestion: print w/replies, xml ) Need Help??

Agyeya has asked for the wisdom of the Perl Monks concerning the following question:

I have a calendar, in which the days are marked with either one of the three colours(Red,Blue and Black). All colours mean different things.
Now I want to store in a MySql databse, the status of the different days, like

------------------- |Date |Status| ------------------- 2004-05-07 |Red | 2004-05-08 |Blue | . | | . . 2004-07-02 |Black | -------------------
I am using WWW::Mechanize

a sample of the tags are:
<td align="Center" width="14%"> <font face="Verdana" color="Black" size="1">3</font> </td> <td align="Center" width="14%"> <font face="Verdana" color="Blue" size="1">4</font> </td> <td align="Center" width="14%"> <font face="Verdana" color="Red" size="1">5</font> </td>
Update
How do I locate all the tags of the above pattern, and then obtain the color and also the date.
Please Respond, Urgent

Replies are listed 'Best First'.
Re: HTML Parse Help
by davis (Vicar) on May 07, 2004 at 10:11 UTC

    And??? What's your question?
    I'm going to make an assumption - you want some help extracting that information so that you can store it in your database. You say you have a calendar -- do you have access to the storage mechanism used by that calendar? Chances are it's already stored in some sort of database, and if you've got access, it shouldn't be hard to translate from one schema to another, neatly bypassing the HTML parsing.

    If you don't have access to the storage, then I don't believe the HTML snippet you gave is complete enough to allow any non ESP-endowed monk to do anything other than guess at solutions.


    davis
    It's not easy to juggle a pregnant wife and a troubled child, but somehow I managed to fit in eight hours of TV a day.
      DavidoOOPS!!
      davis if you wish i can provide you with the link to that site. so that you can check it out for yourself. It would be diificult to explain the matter otherwise.
        if you wish i can provide you with the link to that site

        Well, you could do that. I recommend posting a link that everyMonk can see, along with the code that you've tried already. You're much more likely to get help by saying "Here's what I've tried, but I can't make it work, possibly because of..." than by asking "Here's what I want, will you build it for me?"
        Cheers


        davis
        It's not easy to juggle a pregnant wife and a troubled child, but somehow I managed to fit in eight hours of TV a day.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://351403]
Approved by birdbrane
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found