Python library: match xml / html with template, and extract format data.