[XML-SIG] xmllib on expat
Fri, 21 Jan 2000 18:48:51 -0800 (PST)
On Fri, 21 Jan 2000, Paul Prescod wrote:
> Here's my code:
> import pyexpat
> parser = pyexpat.ParserCreate()
> def show( *x ):
> print x
> data=open( "hamlet.xml" ).read()
> parser.Parse( data, 0 )
Try changing that 0 to a 1... meaning "end of input." It may be possible
that Expat is buffering the input for some weird reason.
Otherwise, the code looks fine to me. qp_xml uses pyexpat if you want a
short, simple reference.
> Also, I'm having trouble with pyexpat sometimes hanging depending on the
> buffer length. That code needs a general cleanup but its only 500 lines
> so we're not talking alot of code.
Never seen this.
Greg Stein, http://www.lyra.org/