#!/usr/local/bin/python3 import xml.etree.ElementTree as ET parser = ET.XMLPullParser() parser.feed('') for e in parser.read_events(): print(e)