[XML-SIG] drv_javasax and InputSource

Martin v. Loewis martin@v.loewis.de
Mon, 14 Jan 2002 22:58:51 +0100

> - is this the expected behaviour? while normal in a java environment,
>   this is somewhat disturbing when porting python code to jython...

For Python, there is a somewhat generous interpretation of accepting
both file-like objects and URI strings in .parse(), it seems desirable
to continue to support this property.

> - what is the best way to create a java.io.InputStream from
>   an open python file (sorry if this is a jython FAQ), 
>   or even better an org.xml.sax.InputSource from 
>   a python xml.sax.xmlreader.InputSource? 

The first one certainly is Jython specific; not sure whether it is a
FAQ - in any case, I don't know the answer. As for the second one: If
you have solved the first one, just use the InputSource constructor
that expects an InputStream.