thank you for your reply
but this does'nt suit for my application.This will report only one error.What i want is a list of such errors .
For example if an html page has 12 unclosed tags then our script should findout all the 12 with line numbers
please help me