XMLPullParser and HTMLPullParser may better suite your needs. They get their data by repeated calls to parser.feed(data)
. You still have to wait until all of the data comes in before the tree is usable.
↧
Answer by tdelaney for Parsing a partial XML with python lxml
↧