Sometimes I use python to analyse a HTML document. But I found that if there is a tag start with '<!' not '<!--', sgmllib with treat it as a 'special' pattern. It'll be ok mostly, occasionaly failed. Because sometimes someone can use tag '<!' for comment. I fix it by treat all '<!' as comment, but this will lost declaration like DOCTYPE. Anyone has some ideas?