Menu

#229 Mismatched TD and TR tags

v2.0
closed-duplicate
nobody
5
2007-11-16
2006-10-11
scrapersrus
No

Test HTML tags with problem

--------------
<table>
<tr>
<td>test1</td>
</tr>
<tr>
<td>
<table>
<tr><td>test 2</td></tr>
<tr><td>test 3</td><td>test 4</td><td>test
5</td></tr>
<tr><td>mismatch 1</td>/td>
<tr><td>test 6</td><td>test 7</td><td>test
8</td></tr>
<tr><td>mismatch 2</td>/td>
</table>
<td>
</tr>
</table>
-----------

when i run nodeclassfilter on it to get table tags, i
get 2 entries. So far so good. Now i check number of
rows on these 2 entries. Result comes back as

Rows = 5
Rows = 3

This is wrong result. The inner table has 5 rows and
it comes back as 3. The problem is the rows with
text "Mismatch 1" etc. These rows do not have matched
closing TR tags. Instead these are closed with TD
tags. So parser terminates the table tag after third
row from where mismatch starts.
But if table with mismatched entries is top level
table then it reports correct number of rows.

Is there any fix available for these kind of
mismatched tags?

Thanks

Discussion

  • scrapersrus

    scrapersrus - 2006-10-11

    Test file

     
  • scrapersrus

    scrapersrus - 2006-10-11

    Logged In: YES
    user_id=1618640

    Here is the test HTML file.

     
  • Derrick Oswald

    Derrick Oswald - 2007-08-18
    • milestone: --> v2.0
    • status: open --> pending-duplicate
     
  • Derrick Oswald

    Derrick Oswald - 2007-08-18

    Logged In: YES
    user_id=605407
    Originator: NO

    I think this is the same issue as RFE #923146 handle out of order closing tags.

     
  • SourceForge Robot

    • status: pending-duplicate --> closed-duplicate
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 90 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

MongoDB Logo MongoDB