[XML-SIG] Re: Pyxie

Paul Prescod paul@prescod.net
Fri, 30 Jun 2000 09:25:05 -0500


> Sean, is "create a PYX stream" correct?
> 
> I read between the lines there and assumed Pyxie used pyexpat to parse
> the XML and "create PYX [events]", so no subprocess was used.  In
> which case the double parse isn't happening.

Pyxie uses a tempfile:

http://www.digitome.com/pyxie.py

import tempfile
tempfilename = tempfile.mktemp()
global tfo
tfo = open (tempfilename,"w")

def StartElementHandler(name,attrs):
	global tfo
	tfo.write ("(%s\n" % name)
	i = 0
	while i < len(attrs):
		tfo.write ("A%s %s\n" % (attrs[i] , attrs[i+1]))
		i = i + 2

-- 
 Paul Prescod - Not encumbered by corporate consensus
The calculus and the rich body of mathematical analysis to which it 
gave rise made modern science possible, but it was the algorithm that 
made the modern world possible.
	- The Advent of the Algorithm (pending), by David Berlinski