XML/HTML tag generation factory/helper for Python