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

Method feed

Lib/xml/sax/expatreader.py:198–213  ·  view source on GitHub ↗
(self, data, isFinal=False)

Source from the content-addressed store, hash-verified

196 # IncrementalParser methods
197
198 def feed(self, data, isFinal=False):
199 if not self._parsing:
200 self.reset()
201 self._parsing = True
202 self._cont_handler.startDocument()
203
204 try:
205 # The isFinal parameter is internal to the expat reader.
206 # If it is set to true, expat will check validity of the entire
207 # document. When feeding chunks, they are not normally final -
208 # except when invoked from close.
209 self._parser.Parse(data, isFinal)
210 except expat.error as e:
211 exc = SAXParseException(expat.ErrorString(e.code), e, self)
212 # FIXME: when to invoke error()?
213 self._err_handler.fatalError(exc)
214
215 def flush(self):
216 if self._parser is None:

Callers 1

closeMethod · 0.95

Calls 4

resetMethod · 0.95
SAXParseExceptionClass · 0.85
startDocumentMethod · 0.45
fatalErrorMethod · 0.45

Tested by

no test coverage detected