Simplify stringifying XML

This commit is contained in:
Lance Stout
2012-09-24 20:59:51 -07:00
parent c2ae1ee891
commit 6c57bb0553
4 changed files with 15 additions and 30 deletions

View File

@@ -1244,7 +1244,9 @@ class XMLStream(object):
data = filter(data)
if data is None:
return
str_data = str(data)
str_data = tostring(data.xml, xmlns=self.default_ns,
stream=self,
top_level=True)
self.send_raw(str_data, now)
else:
self.send_raw(data, now)