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: foo.bar.1=boo foo.bar.2=tiny etc. Also, XML is ordered whereas properties generally are not [though they can be easily enough]. Hen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
