[xml] xmlReaderWalker and xmlNewTextReaderFilename



Hi,

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 xmlNewTextReaderFilename.

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

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.

Am I missing something ?

Thank you for your help





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