Beispiel #1
0
 def __init__ (self):
     """DTDParser.__init__
     Happy little constructor of the DTDParser class.  No inputs.
     """
     XMLParser.__init__(self)
     self.name = DTDMatchStrings.reName
     self.ref = DTDMatchStrings.reReference
     self.quote = re.compile("[\"']")
Beispiel #2
0
 def reset (self):
     """DTDParser.reset
     Note that this overloads the XMLParser.reset() method.
     Called by the base class constructor, this method adds a private
     stack for the DTD element parse tree, and a map for the DTD
     elements.
     """
     XMLParser.reset(self)
     self.__stack = []
     self.elements = {}