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

Function parse

Lib/xml/dom/pulldom.py:318–327  ·  view source on GitHub ↗
(stream_or_string, parser=None, bufsize=None)

Source from the content-addressed store, hash-verified

316default_bufsize = (2 ** 14) - 20
317
318def parse(stream_or_string, parser=None, bufsize=None):
319 if bufsize is None:
320 bufsize = default_bufsize
321 if isinstance(stream_or_string, str):
322 stream = open(stream_or_string, 'rb')
323 else:
324 stream = stream_or_string
325 if not parser:
326 parser = xml.sax.make_parser()
327 return DOMEventStream(stream, parser, bufsize)
328
329def parseString(string, parser=None):
330 from io import StringIO

Callers

nothing calls this directly

Calls 3

DOMEventStreamClass · 0.85
make_parserMethod · 0.80
openFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…