diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py index adc978e9a99..255689c4887 100644 --- a/Lib/xml/dom/pulldom.py +++ b/Lib/xml/dom/pulldom.py @@ -227,6 +227,15 @@ class DOMEventStream: return rc raise IndexError + def next(self): + rc = self.getEvent() + if rc: + return rc + raise StopIteration + + def __iter__(self): + return self + def expandNode(self, node): event = self.getEvent() parents = [node]