MCPcopy Index your code
hub / github.com/python/cpython / itertext

Method itertext

Lib/xml/etree/ElementTree.py:399–416  ·  view source on GitHub ↗

Create text iterator. The iterator loops over the element and all subelements in document order, returning all inner text.

(self)

Source from the content-addressed store, hash-verified

397 yield from e.iter(tag)
398
399 def itertext(self):
400 """Create text iterator.
401
402 The iterator loops over the element and all subelements in document
403 order, returning all inner text.
404
405 """
406 tag = self.tag
407 if not isinstance(tag, str) and tag is not None:
408 return
409 t = self.text
410 if t:
411 yield t
412 for e in self:
413 yield from e.itertext()
414 t = e.tail
415 if t:
416 yield t
417
418
419def SubElement(parent, tag, /, attrib={}, **extra):

Callers 6

test_lost_textMethod · 0.95
test_lost_tailMethod · 0.95
test_basicMethod · 0.80
selectFunction · 0.80
select_negatedFunction · 0.80
_serialize_textFunction · 0.80

Calls

no outgoing calls

Tested by 3

test_lost_textMethod · 0.76
test_lost_tailMethod · 0.76
test_basicMethod · 0.64