Error Behaviour in parsing and correcting HTML's

Hi,
  Consider Parsing the below HTML.

<html>
<head>
<title>My Page</title>
</head>
<body>
<table summary="">
<form action="something">
<tr><td><input type="" name="3" value=""></td></tr>
</form>
</table>
</body>
</html>


The parsing result of the above is 
Note that the form is moved outside the table 
while the input tags are still inside the table 
but outside the form.

<html>
<head>
<title>My Page</title>
</head>
<body>
<form action="something"></form>
<table summary="">
<tr>
<td><input type="" name="3" value=""></td>
</tr>
</table>
</body>
</html>


Is there any option to handle such a case.
I used HTMLKit to generate this.But all other tools with tidy 
are giving the same result.

Thanks,
SaravanaKumar.

Received on Monday, 3 December 2001 23:28:50 UTC