no line breaks in xml file with elementTree

Stefan Behnel stefan_ml at behnel.de
Sun Oct 31 09:23:41 EDT 2010


hackingKK, 31.10.2010 10:04:
> On Sunday 31 October 2010 01:58 PM, Lawrence D'Oliveiro wrote:
>> hackingKK wrote:
>>> Further more, I just was curious why elementtree is not having the
>>> namespace facility?
>>
>> ElementTree handles namespaces just fine.
>
> So is there a function to generate tags with namespace?

Yes, it's called "Element", as in

     el = ET.Element('{http://the.name/space}tag')

Reading the docs helps a lot here.

Stefan




More information about the Python-list mailing list