commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: [Digester] The purpose of digester
Date Thu, 13 Feb 2003 18:01:27 GMT

On Thu, 13 Feb 2003, Craig R. McClanahan wrote:

> On Thu, 13 Feb 2003, Erik Price wrote:
> > Also, is there a compelling reason to use XML instead of Property files?
> >
> One key word:  hierarchies.
> If you're familiar with Tomcat, you've undoubtedly looked at server.xml
> files that sometimes have nested structures five or six levels deep.  With
> a properties file, you have to use huge long property names to distinguish
> the fact that you're setting (say) the auto-reload property of web
> application A instead of web application B.  With XML's nesting of
> elements, the nested elements are naturally scoped to the elements they
> are nested in, so you can use much shorter names.

Or you can use multiple properties files, nested in a directory structure.
This is what I do with simple-jndi currently.

The big sell for me with XML instead of Property files is not so much
hierarchies as lists. Properties are a big pain when you want to have a
collection of values, you end up with crap like:


Also, XML is ordered whereas properties generally are not [though they can
be easily enough].


View raw message