Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I have looked at the HTML::parser examples and gotten a lot of help from them but my problem goes a little deeper than it can help. I am very new to perl and love it but need some help. I have an HTML file that I must parse to get information from. It looks something like this:
<a name="a"></a> <h2>A</h2> <table border="0" cellpadding="0" cellspacing="0" width="1 +00%"> <tr> <td> <table id="a" border="1" bordercolor="#333366" ce +llpadding="5" cellspacing="0" width="100%"> <tr> <td width="33%" class="clsTableBody" valign +="top" id="firstCol"><a href="pdf\c76b834e-36e1-497b-b13e-eba2348dc04 +4.pdf" target="_blank">Abbott, Evelyn</a><br/><span>110136892</span>< +br/><a href="pdf\8a956f66-1c60-48fc-905c-b49d617aa6c5.pdf" target="_b +lank">Agnew, Thomas</a><br/><span>110377660</span><br/></td> <td width="34%" class="clsTableBodyClear" v +align="top" id="secondCol"><a href="pdf\37d3e78b-1adb-458b-9e89-0df78 +0909f08.pdf" target="_blank">Allison, David</a><br/><span>108116112</ +span><br/><a href="pdf\6c0a5bb4-143d-4305-957b-796c8193d07a.pdf" targ +et="_blank">Allison, Gary Owen</a><br/><span>116815754</span><br/></t +d> <td width="33%" class="clsTableBody" valign +="top" id="thirdCol"><a href="pdf\ae8d51e0-005b-44be-84cb-3c9b5733575 +5.pdf" target="_blank">Arsenault, Michael</a><br/><span>108318866</sp +an><br/><a href="pdf\e646f948-f78d-4463-a01d-0261aebf70dc.pdf" target +="_blank">Arsenault, Normand A.</a><br/><span>113069066</span><br/></ +td> </tr> </table> </td> </tr> </table>
(Tried to post the actual html code but it is being rendered) I need to get the href values from this and then right after the href values is a 9 digit number that belongs to this record that I need also. IF anyone can point me in a direction to get these two values i would be very grateful. Thanks

In reply to Process a HTML file to get information from it. by Griffler

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2022-05-21 05:45 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.