Hi Mark,
If you look for a simple solution, you could then use Microsoft IE's HTML
parser which is pretty smart in dealing with non-closed tags. I'd also say
such a routine won't be short as the parser should keep track of each
non-closed tag and its context to suggest proper closing tags in proper
places.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Mark" <ma**@yahoo.comN0SPAM> wrote in message
news:bj**********@lust.ihug.co.nz...
Hi, I am using a program that is ultra paranoid about start and end html
tags.
For example
<p>This is a test
<br>A new line
The above code causes the program to fail
<p>This is a test</p>
<br>A new line</br>
The above code works fine.
Does anyone have a short routine that looks for a start HTML tag and if a
matching end tag does not exist inserts an end tag? I could write one
myself but rather than reinventing the wheel and all that ;)
Thanks in advance
Mark