Message156472
As it stands in Hg, when the write() method of an xml.etree.ElementTree object is called, and a tag within the XML tree has no child tags or defined text, the tag is written using the short notation "<tag ... />".
Whether or not the short notation is used instead of the long "<tag ...></tag>" notation is used should be configurable by the programmer, without having to resort to serializing the XML into a string and then doing replace() on said string.
The attached patch adds an optional parameter to the write() method that provides this choice.
If the 'use_long_xml_tags' parameter is not set (or otherwise evaluates to the boolean False), the current behavior applies.
If this parameter evaluates to the boolean True, long tags are used when producing XML output. |
|
Date |
User |
Action |
Args |
2012-03-21 04:46:26 | adpoliak | set | recipients:
+ adpoliak |
2012-03-21 04:46:26 | adpoliak | set | messageid: <1332305186.87.0.484792091693.issue14377@psf.upfronthosting.co.za> |
2012-03-21 04:46:26 | adpoliak | link | issue14377 messages |
2012-03-21 04:46:25 | adpoliak | create | |
|