PyDocs

Nav

Structured Markup Processing Tools

IncrementalParser

  • IncrementalParser(bufsize=65536)
This interface adds four extra methods to the XMLReader
interface that allow XML parsers to support incremental
parsing. Support for this interface is optional, since not all
underlying XML parsers support this functionality.

When the parser is instantiated it is ready to begin accepting
data from the feed method immediately. After parsing has been
finished with a call to close the reset method must be called to
make the parser ready to accept new data, either from feed or
using the parse method.

Note that these methods must _not_ be called during parsing, that
is, after parse has been called and before it returns.

By default, the class also implements the parse method of the XMLReader
interface using the prepareParser, feed and close methods of the
IncrementalParser interface as a convenience to SAX 2.0 driver
writers.
Members of IncrementalParser

c

close
This method is called when the entire XML document has been passed to the parser through the feed method, to notify the parser that there are no more data.

f

feed
This method gives the raw XML data in the data parameter to the parser and makes it parse the data, emitting the corresponding events.

p

prepareParser
This method is called by the parse implementation to allow the SAX 2.0 driver to prepare itself for parsing.

r

reset
This method is called after close has been called to reset the parser so that it is ready to parse new documents.
0 Examples
No examples for xml.sax.xmlreader/IncrementalParser.
See Also
No see-alsos for xml.sax.xmlreader/IncrementalParser
0 Notes
No notes for IncrementalParser