[XML-SIG] Returning data from DocumentHandler

Bradley Marshall bradmars@yahoo.com
Thu, 24 Feb 2000 13:54:40 -0800 (PST)


Hey guys,

How do I return data from a ducumentHandler?  I am
using sax to build a data structure from xml files.  I
want to do something like :

class DocHandler(DocumentHandler):
....

    def endDocument(self):
	return self.data

Then I'm calling it like:

dh = docHandler()
p = parser()
p.setDocumentHandler(dh)
data = p.parseFile(file)
p.close()

but if I do :

print data

I get:
None

If I do all my manipulations in endDocument(), it's
fine, but I'd like to seperate those functionalities.

Thanks a lot,
Brad Marshall

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com