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 351215 - TextReader can only parse files.
TextReader can only parse files.
Status: RESOLVED FIXED
Product: libxml++
Classification: Bindings
Component: TextReader
2.14.x
Other All
: Normal normal
: ---
Assigned To: Christophe de Vienne
Christophe de Vienne
Depends on:
Blocks:
 
 
Reported: 2006-08-13 23:32 UTC by Stef Walter
Modified: 2006-11-11 21:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implements missing functionality (2.46 KB, patch)
2006-08-13 23:33 UTC, Stef Walter
none Details | Review
Better patch with distinct constructor signatures. (2.13 KB, patch)
2006-08-14 16:41 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2006-08-13 23:32:33 UTC
Attached is a patch that adds two additional constructors to TextReader:

 TextReader(struct _xmlTextReader* cobj);
   - to allow usage with other sources

 TextReader(const char* data, int size = -1, 
            const Glib::ustring& uri = Glib::ustring());
   - parses in memory data
Comment 1 Stef Walter 2006-08-13 23:33:29 UTC
Created attachment 70837 [details] [review]
Implements missing functionality

LMK if it's okay to commit this (with an appropriate ChangeLog, of course).
Comment 2 Stef Walter 2006-08-14 16:41:00 UTC
Created attachment 70873 [details] [review]
Better patch with distinct constructor signatures.

The two TextReader constructor signatures, were far too close. I've removed the default argument for |size| in the case of the memory constructor.
Comment 3 Murray Cumming 2006-11-10 23:46:23 UTC
Looks good. I guess we should use size_t or Glib::ustring::size_type for the "int size" parameter.
Comment 4 Stef Walter 2006-11-11 21:29:27 UTC
Done. Defined size_type as a typedef as is done in the Parser class. 

2006-11-11  Nate Nielsen  <nielsen@memberwebs.com>

	* libxml++/parsers/textreader.cc
	* libxml++/parsers/textreader.h: TextReader() can now parse 
	memory buffers as well as files. Bug #351215