Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
1) Configuration file format (very handy, got to admit -- I'm doing this myself)
It's true that both can be changed at runtime, bundled in a .jar file, are human-readable, etc.Originally posted by Balaji Loganathan:
Lasse, my question may sound stupid, but what is advantage of using XML instead of .properties files escp for configurations ?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
It's true that both can be changed at runtime, bundled in a .jar file, are human-readable, etc.
The main reasons why I went for XML in my current project were:
1) The configuration file can become very complex, with an unknown number of certain type of entries. I've seen .properties files with all sorts of "prefix" based grouping solutions and all I can say is "yuck".
2) XML provides validation capabilities that I would need to code myself for a .properties file based solution
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
What are some other ways I can use XML in a simple web application? My web app is written in Java, servlets, jsp pages and the database is Oracle9i. I want to expand my experience, but don't know what task I can use XML to solve.
A. Valentin