Using XML file like .INI file


XML & Web services: Using XML file like .INI file

  1. Using XML file like .INI file (3 messages)

    I'm sure that everyone here is familiar with Windows .INI files. They are basically double-keyed entries (the first key is the section of the .INI file and the last key is the key itself).

    I want to create an XML file and do that kind of access. I'm having trouble sorting through IBM's DOM implementation on Visual Age to figure out how.

    Any "shoves" in the right direction would be helpful.
  2. Using XML file like .INI file[ Go to top ]

    I think DOM is a bit heavyweight technology for managing configuration files.

    On the other hand, you may want more flexibility, e.g. ability to write both

    <database driver="com.database.driver"/>



    So for my goals I use SAX parser to create Confguration object which is responsible to hold settings for entire application.
  3. Using XML file like .INI file[ Go to top ]

    Having to handle events in SAX is a major turnoff to me. I'm not really interested in doing that.
  4. Using XML file like .INI file[ Go to top ]

    the .ini file is pretty much a flat file and using dom for this purpose is surely an overkill unless you have an ini file which is just nested sections. You are better off with a linear parser than a DOM parser.