Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Data IO for project |
| Date | 2015-11-20 12:00 +1300 |
| Message-ID | <db72kqFjpqnU2@mid.individual.net> (permalink) |
| References | <n2kob0$68v$1@speranza.aioe.org> |
Morten W. Petersen wrote:
> Hi there.
>
> So I'm working on my XML parser, and a while back someone mentioned that
> having a feed(parser, data) function would be a good idea.
>
> But how do I make that work in practice? The XML parser loop would have
> to wait for new input, and what's a good way to design that? Same goes
> for output and waiting for write access.
>
> I also thought about creating high-level functions that can accept IO
> from either a file stream or a network stream. This could be built on
> top of the feed function.
what is wrong with a simple loop:
while( get data )
{
feed(parser, data)
}
?
the "get data" code can be what ever you decide to use to read the XML
data.
--
Ian Collins
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-19 16:03 +0100
Re: Data IO for project Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-19 08:12 -0800
Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-19 18:42 +0100
Re: Data IO for project Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-19 12:15 -0800
Re: Data IO for project Robert Wessel <robertwessel2@yahoo.com> - 2015-11-19 16:17 -0600
Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-20 01:16 +0100
Re: Data IO for project Robert Wessel <robertwessel2@yahoo.com> - 2015-11-20 00:15 -0600
Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-21 00:37 +0100
Re: Data IO for project Nobody <nobody@nowhere.invalid> - 2015-11-19 19:59 +0000
Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-20 01:26 +0100
Re: Data IO for project Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-19 16:46 -0800
Re: Data IO for project Nobody <nobody@nowhere.invalid> - 2015-11-20 05:08 +0000
Re: Data IO for project Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-20 02:21 -0800
Re: Data IO for project Ian Collins <ian-news@hotmail.com> - 2015-11-20 12:00 +1300
Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-20 01:19 +0100
Re: Data IO for project asetofsymbols@gmail.com - 2015-11-21 12:29 -0800
Re: Data IO for project Ian Collins <ian-news@hotmail.com> - 2015-11-22 12:13 +1300
csiph-web