
Hi! I wonder if there is, or will be any Jython support of lxml? We are currently evaluating several possibilities to support several XML-features in Python and Jython together. This includes XPath, XSLT, XPointer. The last one is supported by libxml2 but I have not found any support inside lxml. Have I missed something? Will there be XPointer support in lxml in the future? About Jython: There is of course the possibility to use JNA to access the libxml2 library natively, but I do not comprehend how to access lxml from within Jython, since it is not a "normal" shared library, but a shared object created for CPython in Cython. Does anyone have any hint about that? Best regards Daniel

Hi, Daniel Albeseder wrote:
I wonder if there is, or will be any Jython support of lxml? We are currently evaluating several possibilities to support several XML-features in Python and Jython together. This includes XPath, XSLT, XPointer. The last one is supported by libxml2 but I have not found any support inside lxml. Have I missed something? Will there be XPointer support in lxml in the future?
That XPointer part of libxml2's API is not currently wrapped. If anyone writes the code, I'll be happy to include it.
About Jython: There is of course the possibility to use JNA to access the libxml2 library natively, but I do not comprehend how to access lxml from within Jython, since it is not a "normal" shared library, but a shared object created for CPython in Cython. Does anyone have any hint about that?
As lxml is written in Cython, the generated C code is heavily tied into CPython. So you will not be able to access lxml 'natively' from Jython. If you can afford to run a CPython interpreter next to Jython, tools like JPype may work for you. But I don't know of any library that provides portable support for XSLT for both CPython and Jython. Stefan
participants (2)
-
Daniel Albeseder
-
Stefan Behnel