ANN: XML builder for Python

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


Hi, two comments.

Gerard flanagan <grflanagan <at> gmail.com> 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 
ideas.

Stefan





More information about the Python-list mailing list