BAD HTML CODE
<div><b>ciao ciao <b>ok</b></b></div>
<img src='http://static.php.net/www.php.net/images/php.gif' border=0 alt="ciccio">
<b>ciao <b>ok</b> picio<i style='color:red>
<div style="width:200px;" style="height:100px">
ciao
<table><tr><td>1</td><td>2</td></tr></table><SPAN></SPAN>
FIXING BAD HTML
Found a b tag inside a b tag at node 4: MOVED
Every node that has parent 3 will have parent 2
Found a b tag inside a b tag at node 10: MOVED
Every node that has parent 9 will have parent 1
Found a div tag inside a i tag at node 13: MOVED
Every node that has parent 12 will have parent 1
node id | pre | tag | post | parentTag | tipo |
---|
0 | | | | 0 | |
1 | | <root> | | 0 | root |
2 | | <div> | | 1 | div |
3 | | <!-- T A G "b" R E M O V E D --> | | 2 | |
4 | ciao ciao | <b> | | 2 | b |
5 | | | ok | 4 | |
6 | | | | 2 | |
7 | | | | 2 | |
8 | | <img src='http://static.php.net/www.php.net/images/php.gif' alt="ciccio"/> | | 1 | img |
9 | | <!-- T A G "b" R E M O V E D --> | | 1 | |
10 | ciao | <b> | | 1 | b |
11 | | | ok | 10 | |
12 | picio | <!-- T A G "i" R E M O V E D --> | | 1 | |
13 | | <div style="width:200px;height:100px;" > | | 1 | div |
14 | ciao | <table> | | 13 | table |
15 | | <tr> | | 14 | tr |
16 | | <td> | | 15 | td |
17 | | | 1 | 16 | |
18 | | <td> | | 15 | td |
19 | | | 2 | 18 | |
20 | | | | 15 | |
21 | | | | 14 | |
22 | | | | 13 | |
22
1:<root>
1 root2:<div>
2 div3:<!-- T A G "b" R E M O V E D -->
3
4:ciao ciao
<b>
4 b
</b>4 b
6:
7:
</div>2 div
8: <img src='http://static.php.net/www.php.net/images/php.gif' alt="ciccio"/>
8 img
9: <!-- T A G "b" R E M O V E D -->
9
12: picio
<!-- T A G "i" R E M O V E D -->
12
13: <div style="width:200px;height:100px;" >
13 div14: ciao
<table>
14 table
</table>14 table
22:
</div>13 div
</root>1 root
node id | pre | tag | post | parentTag | tipo |
---|
0 | | | | 0 | |
1 | | <root> | | 0 | root |
2 | | <div> | | 1 | div |
3 | ciao ciao | <b> | | 2 | b |
4 | | | ok | 3 | |
5 | | | | 2 | |
6 | | <img src='http://static.php.net/www.php.net/images/php.gif' alt="ciccio"/> | | 1 | img |
7 | ciao | <b> | | 1 | b |
8 | | | ok | 7 | |
9 | picio | <div style="width:200px;height:100px;"> | | 1 | div |
10 | ciao | <table> | | 9 | table |
11 | | <tr> | | 10 | tr |
12 | | <td> | | 11 | td |
13 | | | 1 | 12 | |
14 | | <td> | | 11 | td |
15 | | | 2 | 14 | |
16 | | | | 11 | |
17 | | | | 10 | |
18 | | | | 9 | |
19 | | | | 1 | |
19
1:<root>
1 root2:<div>
2 div3:ciao ciao
<b>
3 b
</b>3 b
5:
</div>2 div
6: <img src='http://static.php.net/www.php.net/images/php.gif' alt="ciccio"/>
6 img
9: picio
<div style="width:200px;height:100px;">
9 div10: ciao
<table>
10 table
</table>10 table
18:
</div>9 div
19:
</root>1 root
20:
21:
22:
FIXED HTML OUTPUT
ciao ciao ok
ciao ok picio
FIXED HTML CODE
<div>ciao ciao <b>ok</b></div> <img src='http://static.php.net/www.php.net/images/php.gif' alt="ciccio"/> ciao <b>ok</b> picio <div style="width:200px;height:100px;"> ciao <table><tr><td>1</td><td>2</td></tr></table></div>
download php from this page