Made upload use the Apache XmlStreamReader class for string decoding