RE: [xml] python xmlReader remains in previous attribute

Stéphane Bidoul said:
--- Daniel Veillard <veillard redhat com> wrote:
On Tue, Jul 20, 2004 at 11:08:14AM +0100, Sitsofe Wheeler wrote:
The right number of node names are printed but after
reading the attributes all node names have the value
of the last read attribute.

  Looks like a stupid bug, is that in bugzilla ? If no, please
add it,

Ok, filed as

Someone kindly pointed out to me off the list that I can use
MoveToElement() to workaround this problem. I am aware of
MoveToElement() (see my previous post ) but
since the current behaviour of staying stuck on that attribute
underneath actually moving on is not documented I think it
should be changed.

Sorry, I forgot to cc the list.

Actually it is documented, in the .NET documentation.
I haven't checked recently but according to their example and my
memories it's the expected behaviour, so I don't think
it should be changed, since the libxml2 XmlReader is supposed
to work like the .NET one.


Hmm... now I'm a bit confused.  I was just in the midst of debugging
the problem (which is within the library itself, and not just a
python interface problem) when Stéphane's post arrived.  I have read
the data from the posted link (which describes how to use the
MoveToElement method), but I can't see from there why the Read
method should *not* return the proper node name.  Could someone
elaborate whether Read should return the proper name, or not?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]