Swapped in XMLWriter
Split the write file method and added a method to return the xml as a string.
Merge branch 'feature/xml_changes' into develop
Merge branch 'release/2.2'