[PythonReports-checkins] PythonReports/PythonReports datatypes.py, 1.1, 1.2
Brought to you by:
a1s
From: alexander s. <a1...@us...> - 2006-11-03 11:51:25
|
Update of /cvsroot/pythonreports/PythonReports/PythonReports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3892 Modified Files: datatypes.py Log Message: ElementTree: string conversion returns full XML text Index: datatypes.py =================================================================== RCS file: /cvsroot/pythonreports/PythonReports/PythonReports/datatypes.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** datatypes.py 1 Nov 2006 11:03:32 -0000 1.1 --- datatypes.py 3 Nov 2006 11:51:17 -0000 1.2 *************** *** 1,4 **** --- 1,5 ---- """Data types and element primitives, common for templates and printouts""" """History: + 03-nov-2006 [als] ElementTree: string conversion returns full XML text 20-oct-2006 [als] added Structure 29-sep-2006 [als] ElementTree: keep filename after .parse() *************** *** 1164,1167 **** --- 1165,1174 ---- self.root_validator.writexml(file, self._root, encoding) + def __str__(self): + """Return string representation of the tree""" + _stream = StringIO() + self.write(_stream) + return _stream.getvalue() + ### elements common for templates and printouts |