PyDocs

Nav

Structured Markup Processing Tools

XMLPullParser

xml.etree.ElementTree

class · Added in 3.4 (source)
  • XMLPullParser(events=None)
A pull parser suitable for non-blocking applications. Its input-side API is similar to that of XMLParser, but instead of pushing calls to a callback target, XMLPullParser collects an internal list of parsing events and lets the user read from it. events is a sequence of events to report back. The supported events are the strings "start", "end", "comment", "pi", "start-ns" and "end-ns" (the “ns” events are used to get detailed namespace information). If events is omitted, only "end" events are reported.
Changed in 3.8
  • 3.8: The comment and pi events were added.
Members of XMLPullParser

c

close
Finish feeding data to parser.

f

feed
Feed encoded data to parser.
flush
Triggers parsing of any previously fed unparsed data, which can be used to ensure more immediate feedback, in particular with Expat >=2.6.0.

r

read_events
Return an iterator over currently available (event, elem) pairs.
0 Examples
No examples for xml.etree.ElementTree/XMLPullParser.
See Also
No see-alsos for xml.etree.ElementTree/XMLPullParser
0 Notes
No notes for XMLPullParser