template based html parser