diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2000-10-11 22:35:00 (GMT) |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2000-10-11 22:35:00 (GMT) |
commit | bc1b5c81a56625d716b3e2cbcdbff17c41876779 (patch) | |
tree | fb451dc89914f773c14ac6019c501d5122246cae /Lib/xml | |
parent | d178ba666b5744f0503e10fec67bed1bd0180fd2 (diff) | |
download | cpython-bc1b5c81a56625d716b3e2cbcdbff17c41876779.zip cpython-bc1b5c81a56625d716b3e2cbcdbff17c41876779.tar.gz cpython-bc1b5c81a56625d716b3e2cbcdbff17c41876779.tar.bz2 |
Added parent attribute with getters and setters on XMLFilterBase.
Diffstat (limited to 'Lib/xml')
-rw-r--r-- | Lib/xml/sax/saxutils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py index 9fe8a4a..1fb3743 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 = ""): |