Re: elementtree, element.text = value problem and a couple other questions

"Fredrik Lundh" <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
Werner F. Bruhin wrote:

>I just don't get it.
>
> Excerpt from my code:
>
> def addElement(doc, name):
>    new = et.SubElement(doc, name)
>    return new
>
> def addValueElement(doc, name, value):
>    new = et.SubElement(doc, name)
>    new.text = value
>    new.text = '\n'

did you perhaps mean to write

>    new.text = value + '\n'

?

</F> 



_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.