Connecting Tech Pros Worldwide Forums | Help | Site Map

C++ & parsing streams

The Determinant
Guest
 
Posts: n/a
#1: Jul 22 '05
Hi,

I need to write and read (parse) a stream of bytes from a file. The
data will be stored/read with C++'s read/write file functions. The
data will be tagged and store in an XML like format. Is there any C++
code that‘s available for free? I Google the internet but I'm not
finding any source code. I found only some libraries. I need the
actual C++ header and cpp (cxx) files. Can someone point me to
something?

Thanks

Phil Staite
Guest
 
Posts: n/a
#2: Jul 22 '05

re: C++ & parsing streams


You say "...XML like format..." which to me means not XML but perhaps some
proprietary or "home grown" format. So your chances of finding a specific
parser for that are slim. However, std::string and STL have some facilities
for string parsing. Also, even plain old std::getline() can chop up an
input stream into delimited chunks.


Jeff Flinn
Guest
 
Posts: n/a
#3: Jul 22 '05

re: C++ & parsing streams



"The Determinant" <the_determinant@hotmail.com> wrote in message
news:859628de.0411120806.4793abf0@posting.google.c om...[color=blue]
> Hi,
>
> I need to write and read (parse) a stream of bytes from a file. The
> data will be stored/read with C++'s read/write file functions. The
> data will be tagged and store in an XML like format. Is there any C++
> code that's available for free? I Google the internet but I'm not
> finding any source code. I found only some libraries. I need the
> actual C++ header and cpp (cxx) files. Can someone point me to
> something?[/color]


See http://www.boost.org/libs/spirit/index.html for an embedded C++ parser.

Jeff F


Closed Thread