From: Lars M. G. <la...@ga...> - 2000-11-16 08:44:28
|
* Finn Bock | | What do we need to support the xml package in jython? There seems to | missing at least a sax drv_xxx for the common java sax libraries. | What else? It depends to some extent on what you want. Some of the packages, like xmlproc, for example, can be used in Jython as they are. I would guess that minidom and probably also 4DOM can be used in Jython as well. I think the main thing that is missing is a SAX driver that can map Java SAX 2.0 to Python SAX 2.0, since without this the Python DOMs can't create DOM trees from XML documents. This has been on my list of things to do for a while, but at the moment I've been too busy to do it. It's planned that this driver will be a part of a package called saxtools, which will again be part of the XML-SIG package. But if anyone wants to write such a driver (shouldn't be hard), feel free. I'll be happy to look over it and see that it is done correctly and also to put it into the XML-SIG saxtools. javadom.py should provide what is needed to use the Java DOM implementations with the same interface as the Python ones. Note that this uses Java code only to create DOM trees from XML documents. It hasn't been used for anything as far as I know, but it should still be useful as it stands, although it may need some tweaks here and there. eventdom by Paul Prescod is perhaps the most interesting piece of code that is difficult to port. It needs SAX, DOM and XPath in order to work, and it's the XPath part that may be difficult. It used to be based on Dieter Maurer's PyXPath and it may be that it still is. Whether PyXPath works in Jython or not I don't know. I hope this helps. --Lars M. |