mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Added parent attribute with getters and setters on XMLFilterBase.
This commit is contained in:
parent
d178ba666b
commit
bc1b5c81a5
1 changed files with 12 additions and 0 deletions
|
@ -104,6 +104,10 @@ class XMLFilterBase(xmlreader.XMLReader):
|
||||||
the event stream or the configuration requests as they pass
|
the event stream or the configuration requests as they pass
|
||||||
through."""
|
through."""
|
||||||
|
|
||||||
|
def __init__(self, parent = None):
|
||||||
|
xmlreader.XMLReader.__init__(self)
|
||||||
|
self._parent = parent
|
||||||
|
|
||||||
# ErrorHandler methods
|
# ErrorHandler methods
|
||||||
|
|
||||||
def error(self, exception):
|
def error(self, exception):
|
||||||
|
@ -193,6 +197,14 @@ class XMLFilterBase(xmlreader.XMLReader):
|
||||||
def setProperty(self, name, value):
|
def setProperty(self, name, value):
|
||||||
self._parent.setProperty(name, value)
|
self._parent.setProperty(name, value)
|
||||||
|
|
||||||
|
# XMLFilter methods
|
||||||
|
|
||||||
|
def getParent(self):
|
||||||
|
return self._parent
|
||||||
|
|
||||||
|
def setParent(self, parent):
|
||||||
|
self._parent = parent
|
||||||
|
|
||||||
# --- Utility functions
|
# --- Utility functions
|
||||||
|
|
||||||
def prepare_input_source(source, base = ""):
|
def prepare_input_source(source, base = ""):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue