Re: [xml] Does libxml2 create nodes on-the-fly?
- From: Daniel Veillard <veillard redhat com>
- To: xml gnome org
- Subject: Re: [xml] Does libxml2 create nodes on-the-fly?
- Date: Mon, 26 Jun 2006 05:17:37 -0400
On Mon, Jun 26, 2006 at 10:39:05AM +0200, Andreas Pakulat wrote:
On 24.06.06 09:12:47, Daniel Veillard wrote:
On Sat, Jun 24, 2006 at 12:26:47AM +0200, Andreas Pakulat wrote:
(though I'm not familiar with libxml2's C Interface, nor the
Python-C-Bridge-Stuff in general)...
Should be fairly simple, make a C python binding routine based on
existing ones in python/libxml.c , give it a significant name,
change the beginning to expect 2 python obect references as arguments,
see type.h to see how the C object is attached, get the two xmlNodePtr
associated. Compare them, and return an python 0 or 1, then register
the new routine at the end of libxml.c
now in libxml.py override the comparator operator to call that routine
in libxml2mod, add a python test case in test/ and bingo you're done :-)
Hmm, this thread looks interesting now :-)
Thanks to William Brack I could create a proper patch that enables
comparison of Python objects derived from xmlCore (i.e. xmlNode and all
subclasses). The bugreport is 345779 and I hope it'll make it into some
not-so-distant future version of libxml2.
See it wasn't that hard :-)
William will probably commit it later if he thinks it's ready for final
inclusion,
thanks, I hope doing those extra steps will help you use libxml2 in the
long term !
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]