You may find BeautifulSoup (http://www.crummy.com/software/BeautifulSoup/) useful. from BeautifulSoup import BeautifulSoup b = BeautifulSoup() b.feed(file('test.html').read()) print b.first('title').renderContents() HTH -- Anakim Border http://pydc.sourceforge.net aborder at users.sourceforge.net