[XML-SIG] pDomlette bug/non standard method?

Alexandre Fayolle Alexandre.Fayolle@logilab.fr
Tue, 25 Sep 2001 10:43:41 +0200 (CEST)


On Mon, 24 Sep 2001, Alan Kernnedy wrote:

> Mike Olson wrote:
> 
> > Alan, what version of 4Suite are you using?
> 
> Mike,
> 
> I'm using version 0.11.0, on both Python 2.0 and 2.1, and getting these results.
> I ran this piece of code on both interpreters. The output follows.

You should upgrade to 0.11.1 which has support for both accessors :
>>> import sys
>>> print "Python version is:", sys.version
Python version is: 2.1 (#1, Jul 16 2001, 19:00:33) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)]
>>> print "PYTHONPATH is:", sys.path
PYTHONPATH is: ['', '/home/alf/Narval', '/usr/lib/python2.1',
'/usr/lib/python2.1/plat-linux2', '/usr/lib/python2.1/lib-tk',
'/usr/lib/python2.1/lib-dynload', '/usr/lib/python2.1/site-packages']
>>> import Ft.Lib.pDomlette
>>> print "4Version is:", Ft.__version__
4Version is: 0.11.1
>>> doc = "<doc>Some text</doc>"
>>> domTree = Ft.Lib.pDomlette.PyExpatReader().fromString(doc)
>>> textNode = domTree.documentElement.childNodes[0]
>>> print "textNode.data = \"%s\"" % textNode.data
textNode.data = "Some text"
>>> print "textNode.nodeValue = \"%s\"" % textNode.nodeValue
textNode.nodeValue = "Some text"



Alexandre Fayolle
-- 
LOGILAB, Paris (France).
http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org
Narval, the first software agent available as free software (GPL).