parse XML instead of HTML, better error handling, removed HTML generator