Turns out that setting the outputter=”simple” fixed the problems.  I find this odd considering the outputter description makes it sound completely cosmetic, “outputs the document with a degree of formatting. Elements are indented and given new lines wherever possible to make a more readable document. This is not suitable for all applications since some XML consumers will be whitespace sensitive.”