C++ & parsing streams

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • The Determinant

    #1

    C++ & parsing streams

    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

    #2
    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.


    Comment

    • Jeff Flinn

      #3
      Re: C++ & parsing streams


      "The Determinant" <the_determinan t@hotmail.com> wrote in message
      news:859628de.0 411120806.4793a bf0@posting.goo gle.com...[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


      Comment

      Working...