Re: [xml] Question about parent/child (python-libxml2)
- From: "W. Borgert" <debacle debian org>
- To: Daniel Veillard <veillard redhat com>
- Cc: xml gnome org
- Subject: Re: [xml] Question about parent/child (python-libxml2)
- Date: Mon, 10 May 2004 06:05:32 +0000
On Sun, May 09, 2004 at 03:39:47PM -0400, Daniel Veillard wrote:
the para node has a list of children. The childens are a doubly
linked list (prev/next) .
what you want is the serialization of that list. You can serialize
each children independantly and concatenate the result.
I think, that I did exactly this in the first place :-) As
I wrote in my initial mail
dom = libxml2.parseDoc('''<?xml version="1.0"?>
<para role="x">Then, shalt thou count to
<emphasis>three</emphasis>, no more, no less.</para>''')
nodes = dom.xpathEval("//*[ role='x']")
for n in nodes:
for c in n.children:
if c.name == "comment":
"Then, shalt thou count to
, no more, no less."
So my question was/is: How can I get rid of the 'three'
(second last line)? Sorry for being not clear about the
W. Borgert <debacle debian org>, http://people.debian.org/~debacle/
] [Thread Prev