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

Method parse

Lib/xml/sax/xmlreader.py:115–125  ·  view source on GitHub ↗
(self, source)

Source from the content-addressed store, hash-verified

113 XMLReader.__init__(self)
114
115 def parse(self, source):
116 from . import saxutils
117 source = saxutils.prepare_input_source(source)
118
119 self.prepareParser(source)
120 file = source.getCharacterStream()
121 if file is None:
122 file = source.getByteStream()
123 while buffer := file.read(self._bufsize):
124 self.feed(buffer)
125 self.close()
126
127 def feed(self, data):
128 """This method gives the raw XML data in the data parameter to

Callers

nothing calls this directly

Calls 6

prepareParserMethod · 0.95
feedMethod · 0.95
closeMethod · 0.95
getCharacterStreamMethod · 0.80
getByteStreamMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected