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

Function parseString

Lib/xml/sax/__init__.py:35–48  ·  view source on GitHub ↗
(string, handler, errorHandler=ErrorHandler())

Source from the content-addressed store, hash-verified

33 parser.parse(source)
34
35def parseString(string, handler, errorHandler=ErrorHandler()):
36 import io
37 if errorHandler is None:
38 errorHandler = ErrorHandler()
39 parser = make_parser()
40 parser.setContentHandler(handler)
41 parser.setErrorHandler(errorHandler)
42
43 inpsrc = InputSource()
44 if isinstance(string, str):
45 inpsrc.setCharacterStream(io.StringIO(string))
46 else:
47 inpsrc.setByteStream(io.BytesIO(string))
48 parser.parse(inpsrc)
49
50# this is the parser list used by the make_parser function if no
51# alternatives are given as parameters to the function

Callers 1

check_parseStringMethod · 0.90

Calls 8

setCharacterStreamMethod · 0.95
setByteStreamMethod · 0.95
InputSourceClass · 0.85
setErrorHandlerMethod · 0.80
ErrorHandlerClass · 0.70
make_parserFunction · 0.70
setContentHandlerMethod · 0.45
parseMethod · 0.45

Tested by 1

check_parseStringMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…