change XMLGenerator to use XMLWriter
fix tests
fix tests
fix tests
fix indent
set indent
fix test
fix output
fix tests
remove unneeded code
Merge pull request #222 from mimmi20/issue-183-3

Fixes #183