How can I programmatically validate html ?
- From: "mark4asp" <mark4asp@xxxxxxxxx>
- Date: 31 Jul 2008 16:22:51 GMT
I am importing text from a column of a database table to display as
part of a web page in asp.net. There are about 7000 rows in the table.
About 10% of the columns have their content as html and about 10% of
those columns have badly broken html. When broke it generally uses <tr>
and <td> content with no enclosing <table>.
I have two alternatives.
1. I could write a program to create a page from each occurence of html
content in a row and validate that against a html parser.
As anyone done this. If so how could it be done. which parser could be
used?
2. I can replace all the table tags in the database:
<tr -> <div
</tr> -> </div>
<table -> <div
</table> -> </div>
<td -> <span
</td> -> </span>
That will also give me broken html but not nearly as bad because
afterwards at least everything will display in the correct order that
the document author intended. That's what doesn't always happen now;
generally when there is <tr> and <td> content with no enclosing <table>.
.
- Follow-Ups:
- Re: How can I programmatically validate html ?
- From: mark4asp
- Re: How can I programmatically validate html ?
- From: Michael Stemper
- Re: How can I programmatically validate html ?
- Prev by Date: HTML form to Excel
- Next by Date: Re: HTML form to Excel
- Previous by thread: HTML form to Excel
- Next by thread: Re: How can I programmatically validate html ?
- Index(es):
Relevant Pages
|