XML or file parser?

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

    #1

    XML or file parser?

    I'm about 2 years out of school. The C++ development I have been doing
    has not required reading in from a config file. I haven't done file
    parsing since college.

    So I'm curious, hasn't there been some developments in this area in
    the last few years? I feel like XML would be useful for this. Ideally
    I want to characterize some strings that would otherwise be in a
    struct into its own, esily editable file. Does XML (or something else
    for that matter) provide an easy C++ class, etc. mechanism for
    extracting the data?

    I guess basically I'm asking for the full gammit of intro knowledge or
    should I use a space delimited .txt file and bust out my old ifstream
    knowledge. :)

    Thanks for all your help, this group is invaluable.

  • owebeeone@gmail.com

    #2
    Re: XML or file parser?

    On Nov 8, 3:08 am, Travis <travis.bow...@ gmail.comwrote:
    I'm about 2 years out of school. The C++ development I have been doing
    has not required reading in from a config file. I haven't done file
    parsing since college.
    >
    ....

    The Austria C++ "alpha" contains a config system that includes
    different types of data sources. The data source default is an XML
    file.
    >From the test case:
    .... this creates a "preference manager"
    Ptr< PreferenceManag er<* l_pm = new PreferenceManag er<>();

    .... this defines a "preference ".
    Preference< bool l_pref1( "pref1", false, "/FooProgram", l_pm );

    .... there is a notion of hierarchy ... e.g. "/FooProgram" is the area
    of a preference. You can set a preference in a config file that will
    set all the preferences of a particular name or set one specifically
    for an area. For example, the preference system is used to manage the
    logging levels for the Austria logging system and so you can turn on
    logging for all the subsystems or just one by using different path
    names.

    Comment

    • mczard@poczta.onet.pl

      #3
      Re: XML or file parser?

      On 7 Lis, 17:08, Travis <travis.bow...@ gmail.comwrote:
      I'm about 2 years out of school. The C++ development I have been doing
      has not required reading in from a config file. I haven't done file
      parsing since college.
      >
      So I'm curious, hasn't there been some developments in this area in
      the last few years? I feel likeXMLwould be useful for this. Ideally
      I want to characterize some strings that would otherwise be in a
      struct into its own, esily editable file. DoesXML(or something else
      for that matter) provide an easy C++ class, etc. mechanism for
      extracting the data?
      >
      I guess basically I'm asking for the full gammit of intro knowledge or
      should I use a space delimited .txt file and bust out my old ifstream
      knowledge. :)
      Hi!
      You have a problem that affects many programmers - there is much
      talk about XML, but it is not easily editable nor is it compatible
      with C++ data types.
      I recommend you trying data languages, that were designed especially
      to solve that problem, for example:





      Comment

      Working...