If Html File Has No Ending "/tr" Tag OR "/td" Tag Then HTML Agility Pack Does Not Read That Informat

Posted by Harikrishna on Stack Overflow See other posts from Stack Overflow or by Harikrishna
Published on 2010-03-19T13:02:05Z Indexed on 2010/03/23 8:23 UTC
Read the original article Hit count: 239

Filed under:
|
|
|
|

I am using HTML Agility Pack to parse html content. I am using parsing to extract table information. It works. But if there is no ending "/tr" tag or "/td" tag then it does not parse that information perfectly.(in which there is no ending tr tag or td tag.)

Like

<TABLE border=0><TBODY><TR height=20><TD class=xl27boL noWrap width="7%">01890345&nbsp;</TD>
    <TD class=xl27boL noWrap width="4%">1416</TD>
    <TD class=xl27boL noWrap width="7%">kjlkjkls&nbsp;</TD><TD class=xl27boL noWrap width="4%">14:01:57&nbsp;</TD>
    <TD class=xl27boL noWrap align=left width="15%">Football</TD><TD class=xl27boL noWrap align=right width="5%">&nbsp;</TD>
    <TD class=xl27boL noWrap align=right width="5%">50&nbsp;</TD>
    <TD class=xl27boL noWrap align=right width="5%">4997.2500</TD><TD class=xl27boL noWrap align=right width="7%">249862.50&nbsp;</TD><TD class=xl27boL noWrap align=right width="5%">&nbsp;</TD><TD class=xl27boL noWrap align=right width="5%">&nbsp;</TD><TD class=xl27boRLnoWrap align=right width="8%">249612.64&nbsp;</TD><TD class=xl27boL noWrap align=right 
width="5%">4997.2500</TD><TD class=xl27boL noWrap align=right width="7%">249862.50&nbsp;</TD><TD class=xl27boL noWrap align=right width="5%">249.86</TD><TD class=xl27boL noWrap align=right width="5%">4992.2528</TD><TD class=xl27boL noWrap align=right width="5%">&nbsp;</TD><TD class=xl27boL noWrap align=right width="5%">&nbsp;</TD>
    <TD class=xl27boRL noWrap align=right width="8%">249612.64&nbsp;</TD>
    </table>

So for that what should I do ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET