troubleshooting Question

parse a html file using java

Avatar of priyapratheep
priyapratheep asked on
Java
10 Comments2 Solutions855 ViewsLast Modified:
hi
i have a html file i attached that file with this question.

i want to parse this html file and pickup the number <td>10</td>  10 from this...like that i have to take all the numbers 20 , 30 ....and store  them in a variable

html file will be in this format only

please help me to do this

Regards
some line are here
bla bla bla
 
 
<table width="600" border="0" cellpadding="1" cellspacing="0" bgcolor="#4682b4"><tr><td><table width="100%" border="0" cellpadding="4" cellspacing="1"><tr><td>Line #</td><td>Material</td><td>Brand</td><td>Quantity</td><td>CRD</td><td>Status</td></tr>
<tr class="data1">
<td>10</td>
<td>BQ2085DBTR-V1P3G4</td>
<td>TI</td>
<td>20000</td>
<td>2007-09-05</td>
<td>Rejected</td>
</tr>
<tr class="header"><TD colspan="6">Line Item Messages </td></tr>
<tr class="data2">
<td>20</td>
<td>BQ2085DBTR-V1P3G4</td>
<td>TI</td>
<td>20000</td>
<td>2007-10-05</td>
<td>Rejected</td>
</tr>
<tr class="header"><TD colspan="6">Line Item Messages </td></tr>
<tr class="data1">
<td>30</td>
<td>BQ2085DBTR-V1P3G4</td>
<td>TI</td>
<td>30000</td>
<td>2007-11-05</td>
<td>Rejected</td>
</tr>
<tr class="header"><TD colspan="6">Line Item Messages </td></tr>
<tr class="data2">
<td>40</td>
<td>BQ2085DBTR-V1P3G4</td>
<td>TI</td>
<td>30000</td>
<td>2007-12-05</td>
<td>Rejected</td>
</tr>
<tr class="header"><TD colspan="6">Line Item Messages </td></tr>
<tr class="data1">
<td>50</td>
<td>BQ29311PWRG4</td>
<td>TI</td>
<td>20000</td>
<td>2007-09-05</td>
<td>Rejected</td>
</tr>
<tr class="header"><TD colspan="6">Line Item Messages </td></tr>
<tr class="data2">
<td>60</td>
<td>BQ29311PWRG4</td>
<td>TI</td>
<td>20000</td>
<td>2007-10-05</td>
<td>Rejected</td>
</tr>
<tr class="header"><TD colspan="6">Line Item Messages </td></tr>
<tr class="data1">
<td>70</td>
<td>BQ29311PWRG4</td>
<td>TI</td>
<td>30000</td>
<td>2007-11-05</td>
<td>Rejected</td>
</tr>
<tr class="header"><TD colspan="6">Line Item Messages </td></tr>
<tr class="data2">
<td>80</td>
<td>BQ29311PWRG4</td>
<td>TI</td>
<td>30000</td>
<td>2007-12-05</td>
<td>Rejected</td>
</tr>
<tr class="header"><TD colspan="6">Line Item Messages </td></tr>
</table></td></tr></table>
<BR>Please Login to the Portal if you wish see further details.
<BR><BR>Regards
        </font>
      </TD>
  </TR>
</table>
</BODY>
</HTML>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros