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

Function fromstringlist

Lib/xml/etree/ElementTree.py:1384–1397  ·  view source on GitHub ↗

Parse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance.

(sequence, parser=None)

Source from the content-addressed store, hash-verified

1382fromstring = XML
1383
1384def fromstringlist(sequence, parser=None):
1385 """Parse XML document from sequence of string fragments.
1386
1387 *sequence* is a list of other sequence, *parser* is an optional parser
1388 instance, defaulting to the standard XMLParser.
1389
1390 Returns an Element instance.
1391
1392 """
1393 if not parser:
1394 parser = XMLParser(target=TreeBuilder())
1395 for text in sequence:
1396 parser.feed(text)
1397 return parser.close()
1398
1399# --------------------------------------------------------------------
1400

Callers

nothing calls this directly

Calls 4

feedMethod · 0.95
closeMethod · 0.95
XMLParserClass · 0.85
TreeBuilderClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…