
Oct. 5, 2009
7:48 a.m.
Roland Hedberg wrote:
I need xmlsec and I'd like to use lxml instead of libxml, is it possible ? libxml is as it's distributed dependent on libxml, but I don't know how hard it would be to put together a lxmlsec where libxml was exchanged for lxml.
Depending on how much of xmlsec you need, it shouldn't be too hard to wrap the functionality in Cython and put together a new extension module. lxml.etree exports the main parts in a public API that should allow you to get to the libxml2 tree. The Cython tutorial below has a section on wrapping a C library: http://sage.math.washington.edu/home/dagss/cython-tutorial-preprint.pdf
Has anyone done it ?
From the archives, it looks like John Krukoff should have some experience with it.
Stefan