Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Reading a config file

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Christian Vest Hansen" <karmazilla AT gmail.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Reading a config file
  • Date: Sat, 21 Oct 2006 00:57:28 +0200

Nils Kilden-Pedersen does have a point about memory patterns of config
files. Once the needed data is loaded, the DOM tree can be garbage
collected - the whole thing might even still be in the Eden memory
space.

However, Michael Kay also have a point in that the statefulness of a
config file parse is quite limited. In fact, I currently only have two
tags that contain "valuable" data; the rest is just some simple
structuring.

I took a breif look at the Jakarte Configuration webpage, looked at
the runtime dependencies, and quickly decided against it. The whole
point of starting this discusion in the first place was reduction of
runtime overhead.

I've never paid much attension to .properties files, and actually only
encountered the log4j.properties incarnation in a couple of projects.
In my case, I need a list of things. To be concrete, I have a <topics>
tag containing a list of <topic> tags, and I've never seen this kind
of data structure be represented in a properties file, so I never
considered the option.

What I'm going to do now, is see if I can make the magic happen with
SAX, as Elliotte originally suggested. If I for some reason decide
against this plan in mid-air, I will fall back on plain ol' DOM as
plan B.

Sincerely,
Christian.

PS:
I'm surprised by the number of responses and suggestions. Thanks all
for your time and advice! :-)

--
"All good software releases were accidents corrected in the next version."




Archive powered by MHonArc 2.6.24.

Top of Page