mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Used original SAX handling form.
This commit is contained in:
parent
99b84bdaad
commit
6c4753f925
3 changed files with 14 additions and 15 deletions
|
@ -22,7 +22,7 @@ class PullDOM:
|
|||
|
||||
def setDocumentLocator( self, locator ): pass
|
||||
|
||||
def startElement( self, tagName , attrs ):
|
||||
def startElement( self, name, tagName , attrs ):
|
||||
if not hasattr( self, "curNode" ):
|
||||
# FIXME: hack!
|
||||
self.startDocument( )
|
||||
|
@ -42,7 +42,7 @@ class PullDOM:
|
|||
self.lastEvent=self.lastEvent[1]
|
||||
#self.events.append( (START_ELEMENT, node) )
|
||||
|
||||
def endElement( self, name ):
|
||||
def endElement( self, name, tagName ):
|
||||
node = self.curNode
|
||||
self.lastEvent[1]=[(END_ELEMENT, node), None ]
|
||||
self.lastEvent=self.lastEvent[1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue