[New-bugs-announce] [issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

Jérôme Laurens report at bugs.python.org
Thu Apr 30 01:34:55 CEST 2015


New submission from Jérôme Laurens:

The documentation for xml.etree.ElementTree.Element.text reads "If the element is created from an XML file the attribute will contain any text found between the element tags."

import xml.etree.ElementTree as ET
root3 = ET.fromstring('<a><b/>TEXT</a>')
print(root3.text)

CURRENT OUTPUT

None

"TEXT" is between the elements tags but does not appear in the output

BTW : this is well formed xml and has nothing to do with tail.

----------
components: XML
messages: 242256
nosy: jlaurens
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree.Element.text does not conform to the documentation
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24079>
_______________________________________


More information about the New-bugs-announce mailing list