From: Lars Gustäbel Date: Wed, 11 Oct 2000 22:35:00 +0000 (+0000) Subject: Added parent attribute with getters and setters on XMLFilterBase. X-Git-Tag: v2.0~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc1b5c81a56625d716b3e2cbcdbff17c41876779;p=python Added parent attribute with getters and setters on XMLFilterBase. --- diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py index 9fe8a4a999..1fb3743802 100644 --- a/Lib/xml/sax/saxutils.py +++ b/Lib/xml/sax/saxutils.py @@ -104,6 +104,10 @@ class XMLFilterBase(xmlreader.XMLReader): the event stream or the configuration requests as they pass through.""" + def __init__(self, parent = None): + xmlreader.XMLReader.__init__(self) + self._parent = parent + # ErrorHandler methods def error(self, exception): @@ -193,6 +197,14 @@ class XMLFilterBase(xmlreader.XMLReader): def setProperty(self, name, value): self._parent.setProperty(name, value) + # XMLFilter methods + + def getParent(self): + return self._parent + + def setParent(self, parent): + self._parent = parent + # --- Utility functions def prepare_input_source(source, base = ""):