[XML-SIG] xmllib problems

Robin Becker robin@jessikat.demon.co.uk
Tue, 18 Apr 2000 13:01:28 +0100


I was being stupid complaining about the test_pyexpat & test_sax scripts
as these check their output. The error in xmllib I see is that cdata
gets called at odd points ie the following output is obtained with the
sample parser below.

start tag: <para>
handle_data:'aaa[stuff'
handle_data:']'
handle_data:'bbb'
end tag: </para>

the odd handle_data:']' doesn't happen with the xml-sig xmllib. I'm not
sure that this is a bug, but it causes me problems as I assumed I
wouldn't get this kind of split data.

from xmllib import TestXMLParser
class myParser(TestXMLParser):
        def __init__(self):
                TestXMLParser.__init__(self)

        def parse(self,text):
                self.reset()
                self.feed(text)
                self.close()

        def handle_data(self,data):
                print 'handle_data:\'%s\'' % data

_parser = myParser()

_parser.parse('<para>aaa[stuff]bbb</para>')



-- 
Robin Becker