Exemplo n.º 1
0
 def __init__(self):
     XMLParser.__init__(self)
     self._data = ''
     self._in_a = 0
     self._a_title = ''
     self._a_href = ''
     self._entries = []
     self._current_entry = {}
Exemplo n.º 2
0
 def __init__(self, filename):
     XMLParser.__init__(self)
     self.elements = { 'doml': (self.handleStartDoml,
                                self.handleStopDoml),
                       'table': (self.handleStartTable,
                                 self.handleStopTable),
                       'column': (self.handleStartColumn,
                                  self.dummy),
                       'type': (self.handleStartType,
                                self.dummy),
                       'referenceObject': (self.handleStartReference,
                                           self.dummy)
                       }
     self.feed(open(filename).read())