After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 708125 - xmlTextReaderReadState returns EOF when there are still nodes to be read
xmlTextReaderReadState returns EOF when there are still nodes to be read
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
2.7.8
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-15 20:18 UTC by Simon Kågedal
Modified: 2021-07-05 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test code that displays the problem (511 bytes, text/x-csrc)
2013-09-15 20:18 UTC, Simon Kågedal
Details
C# code for comparison (424 bytes, text/x-csharp)
2013-09-15 20:19 UTC, Simon Kågedal
Details

Description Simon Kågedal 2013-09-15 20:18:32 UTC
Created attachment 254988 [details]
test code that displays the problem

xmlTextReadReadState return 3 (that is, XML_TEXTREADER_MODE_EOF) rather than 1 (XML_TEXTREADER_MODE_INTERACTIVE) even though there are more nodes to be read.

Attached sample code does one read from the XML "<foo>bar</foo>" and then prints the state.  It prints 3.  I expected 1. 

My guess is that it does this because the parser itself has reached end of file.  This however makes this function not very useful, and differs from the behavior of ECMA/.NET API (tested with Mono; attaching this test code as well for reference).

My libxml2 version is 2.9.0 from Ubuntu 13.04.
Comment 1 Simon Kågedal 2013-09-15 20:19:03 UTC
Created attachment 254989 [details]
C# code for comparison
Comment 2 GNOME Infrastructure Team 2021-07-05 13:25:55 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.