ANN: XML builder for Python

Stefan Behnel stefan_ml at
Thu Jul 3 15:32:06 CEST 2008

Hi, two comments.

Gerard flanagan <grflanagan <at>> writes:
> Nice! Here's a version that uses elementtree:
>      def __call__(self, value='', **kargs):
>          self.element.text = value

This should spell

       def __call__(self, value=None, **kargs):

> class builder(element):
>      def __init__(self, version, encoding):
>          self.parent = ET.Element('root')

And this might need some more work to fix as the root element shouldn't be 
necessary. But it's a good start. Look at the link I posted for some more 


More information about the Python-list mailing list