Commits

Jason R. Coombs committed 1d8879c

Added common parameters for serializing XML elements

Comments (0)

Files changed (1)

openpack/basepack.py

 		"""Return the raw bytes of the Part."""
 		data = self.data
 		if isinstance(data, ElementClass):
-			data = tostring(data)
+			data = tostring(data, encoding='utf-8', pretty_print=True)
 		if isinstance(data, unicode):
 			return data.encode('utf-8')
 		return data