Catch only XML parsing exceptions here

Signed-off-by: Michal Čihař <michal@cihar.com>
Wrap long line

Signed-off-by: Michal Čihař <michal@cihar.com>
Make generator new style class

Signed-off-by: Michal Čihař <michal@cihar.com>