Re: [xml] xmlReaderWalker and xmlNewTextReaderFilename

On Thu, Sep 02, 2004 at 12:30:47PM -0100, Philippe Brun (perso) wrote:

I noticed differences in the result of 2 functions taking 
xmlTextReaderPtr arguments depending on whether the reader was obtained 
from a xmlNewTextReaderFilename or from a xmlParseFile followed by a 
xmlReaderWalker :

1 - for a reader obtained from a xmlReaderWalker, after walking through 
an attribute list with xmlTextReaderMoveToNextAttribute function calls, 
one must return to the element with a xmlTextReaderMoveToElement.

This is not necessary if the reader was obtained from a 

I've seeen posts about xmlTextReaderMoveToElement, but afaik they didn't 
point this difference coming from the "origin" of the reader.

  Well this probably mean the fix made for the normal reader didn't work
for the walker. I find that surprizing but possible. Can you bugzilla with
a small example reproducing the problem (python or C)

2 - the call to xmlGetLineNo( xmlTextReaderCurrentNode( reader ) ) works 
fine if the reader was obtained from a xmlNewTextReaderFilename, but 
doesn't work in the other case.

  Possible too, line number are stored in various places, but in both case 
I would expect the nearest element to hold the line number. Same thing 
please bugzilla with an example.

Am I missing something ?

  I don't think so,


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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