Robert Kern wrote: [---] >> <p>Current date:<br/>2000-01-01</p> [---] > Use the .tail attribute on the br element: > > In [1]: from xml.etree import ElementTree as ET > > In [4]: p = ET.Element('p') > > In [5]: p.text = 'Current date:' > > In [6]: br = ET.SubElement(p, 'br') > > In [7]: br.tail = '2000-01-01' > > In [8]: ET.dump(p) > <p>Current date:<br />2000-01-01</p>
That did the trick. Thanks! -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinfo/python-list