Re: [xml] Does libxml2 create nodes on-the-fly?
- From: Andreas Pakulat <apaku gmx de>
- To: xml gnome org
- Subject: Re: [xml] Does libxml2 create nodes on-the-fly?
- Date: Sun, 25 Jun 2006 21:56:26 +0200
On 24.06.06 09:12:47, Daniel Veillard 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
I had a shot now and also found xmlCore in libxml.py, where I could
provide __eq__ and __ne__. However somehow comparing the xmlNodePtr's
doesn't really work. Even for unequal python xmlNode's a
xmlNodePtr1 == xmlNodePtr2
returns true.
And I'm stuck there now, because I don't really know what else I could
use to compare the nodes... See Bug number 345779 for the patches.
Andreas
--
You don't become a failure until you're satisfied with being one.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]