[lxml-dev] lxml and xmlsec
Hi! 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. Has anyone done it ? --Roland
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
On Tue, 2009-09-29 at 15:59 +0200, Roland Hedberg wrote:
Hi!
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. Has anyone done it ?
--Roland
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
I've gotten the two to work together, but I didn't try anything as hard
as that. I used this set of python bindings for xmlsec:
http://xmlsig.sourceforge.net/
And serialized from lxml and had that library reparse. If I had it to do
over again, I'd try this set of python bindings instead, since I had
crash issues with the first library when errors occured:
http://pyxmlsec.labs.libre-entreprise.org/index.php
It turned out that neither was actually suitable for my use case,
however, as libxmlsec didn't seem to be capable of signing a document
that the .NET 1.1 application I was talking to would accept. I ended up
being forced into creating a .NET service (with it's own dedicated
windows box!) just to handle the signing, as it was the only way I could
interop.
--
John Krukoff
participants (3)
-
John Krukoff
-
Roland Hedberg
-
Stefan Behnel