Fallback replacement for getEvent() using the standard SAX2 interface, which means we slurp the SAX events into memory (no performance gain, but we are compatible to all SAX parsers).
(self)
| 256 | return rc |
| 257 | |
| 258 | def _slurp(self): |
| 259 | """ Fallback replacement for getEvent() using the |
| 260 | standard SAX2 interface, which means we slurp the |
| 261 | SAX events into memory (no performance gain, but |
| 262 | we are compatible to all SAX parsers). |
| 263 | """ |
| 264 | self.parser.parse(self.stream) |
| 265 | self.getEvent = self._emit |
| 266 | return self._emit() |
| 267 | |
| 268 | def _emit(self): |
| 269 | """ Fallback replacement for getEvent() that emits |