Can the **extra argument in the SubElement() factory in ElementTree be
used to set the text property? Example:

Want the text associated with the <subroot> tag to be xyz.

<root>
  <subroot>xyz</subroot>
</root>

rather than:
root = Element('root')
subroot = SubElement(root, 'subroot')
subroot.text = 'xyz'

Was wondering whether this code accomplish that
root = Element('root')
subroot = SubElement(root, 'subroot', text='xyz')

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to