[PDI-11938]: XML Output not well-formed when '&' char in attribute

There are a fix and unit test.
Prefer to not have System.out.println, even in test cases. Suggest commenting them out.