I have tested Johnv Shuns example and it works.And its much cleaner in my opinion.var bodyObject={testContainer:[{child1: "test"},{child2: "test"},{child3: "test"}]};var xObject = new XMLHelper().toXMLStr(bodyObject);var writer=response.getStreamWrit...