good evening dear Monks!
his might sound like a strange question, but bear with me..
My mind just went blank when i got a ware this job!
Well i have 5000 files which have to be parsed - in order to strip of the HTML: the good thing is: In each HTML-file i have to get only one line of text - the following is of interest:
In line 999 i have the following results:
Well - how to do the parser-job: can i tell the HTML-Parser that i only have to get the line 999 ?
Note: The data shold be stored in a database:
</p><h1>dataset 1:</h1>
<table border="0" bgcolor="#EFEFEF" leftmargin="15" topmargin="
+5"><tr>
<td><strong>name:</strong> </td> <td width=500> myname one
+ </td></tr><tr>
<td><strong>type:</strong> </td> <td width=500> type_on
+e (04313488) </td></tr><tr>
<td><strong>aresss:</strong> </td><td>Friedrichstr. 70, 7343
+0 Madrid</td></tr><tr>
<td><strong>adresse_two:</strong> </td> <td> no_value
+ </td></tr><tr>
<td><strong>telefone:</strong> </td> <td> 0000736111/68
+0040 </td></tr><tr>
<td><strong>Fax:</strong> </td> <td> 0000736111/680040
+ </td></tr><tr>
<td><strong>E-Mail:</strong> </td> <td> Keine Angabe
+ </td></tr><tr>
<td><strong>Internet:</strong> </td><td><a href="http://www.mysit
+e.es" target="_blank">www.mysite.es</a><br></td></tr><tr> <td><strong
+>the office:</strong> </td>
<td><a href="http://www.mysite_two" target="_blank">mysite_two </a><br
+></td></tr><tr>
<td><strong>:</strong> </td><td> no_value </td></tr><tr>
<td><strong>officer:</strong> </td> <td> no_value </td>
+</td></tr><tr>
<td><strong>employees:</strong> </td> <td> 259 </td></tr>
+<tr>
<td><strong>offices:</strong> </td> <td> 8 </td></tr>
+<tr>
<td><strong>worker:</strong> </td> <td> no_value </td
+></tr><tr>
<td><strong>country:</strong> </td> <td> contryname </
+td></tr><tr>
<td><strong>the_council:</strong> </td> <td>
Well - the question is - is it possible to do the search in the 5000 files with this attribute: that the line 999 is of interest. In other words - can i tell the HTML-paerser that he has to look (/and extract) exactly the line 999!?
Look forward to any and all ideas.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.