解析表中的HTML敏捷包WP7

问题描述:

我有以下HTML:解析表中的HTML敏捷包WP7

<table cellspacing="8" cellpadding="6" border="1" style="color: Black; background-color: LightGoldenrodYellow; 
    width: 60%;" id="GridView2" rules="all"> 
    <tbody> 
     <tr style="color: White; background-color: #CF4B0A; font-weight: bold;"> 
      <th align="center" scope="col"> 
       Booked At 
      </th> 
      <th align="center" scope="col"> 
       Booked On 
      </th> 
      <th align="center" scope="col"> 
       Delivered At 
      </th> 
      <th align="center" scope="col"> 
       Delivered On 
      </th> 
      <th scope="col"> 
       Details 
      </th> 
     </tr> 
     <tr align="left" style="color: #333333; background-color: #FFFBA1; font-family: Arial; 
      font-size: Small;"> 
      <td align="center"> 
       Not Available 
      </td> 
      <td align="center"> 
       Not Available 
      </td> 
      <td align="center"> 
       DATA 
      </td> 
      <td align="center"> 
       12/01/2012 
      </td> 
      <td> 
       <a href="javascript:__doPostBack('GridView2$ctl02$LinkButton1','')" id="GridView2_ctl02_LinkButton1"> 
        Details</a> 
      </td> 
     </tr> 
    </tbody> 
</table> 

我想解析使用HTML敏捷包上面的表。我正在使用从Codeplex下载的WP7的HAP解决方案。 任何快速帮助将不胜感激。

+0

没有足够的信息能够帮助你做到这一点。例如,你想从HTML中拉出什么?你已经尝试了什么? – ZombieSheep 2012-02-20 09:48:16

要解析HTML,请使用HAP的HtmlDocument.LoadHtml()函数并将其传递给实际字符串。这将为您提供一个包含所有HTML对象的DOM。