我有一个 html 表
<table border="0" width="100%">
<tr class="headerbg">
<th width="5%">
No
</th>
<th width="30%">
Name
</th>
<th width="20%">
Department or Division
</th>
<th width="25%">
Email
</th>
<th width="20%">
Staff/Student
</th>
</tr>
<tr class="bg2">
<td>
1
</td>
<td>
<strong><a class="searchLink2" href="tel_search.php?fore=Dave&sur=Rumber">Dave Rumber</a></strong>
</td>
<td>
Medical School
</td>
<td>
<a class="searchLink2" href="mailto:Dave.Rumber@Home.com">Dave.Rumber@Home.com</a>
</td>
<td>
Student
</td>
</tr>
</table>
有时会出现不止一排人的结果。我希望能够遍历每一行并提取姓名和电子邮件信息并进行其他处理。将数据放入数据网格中,并可能放入数据库中。
我想我的问题是我该怎么做?
string table = GetContents(buffer);
table = table.Replace(" ", "");
table = table.Replace("&", "&");
XElement inters = XElement.Parse(table);
我可以将它放入 XElement,但我不太确定从这里去哪里!
谢谢!