Reputation: 8451
I recently tried to use Apache Commons-Configuration to manage some local XML configuration files. It drastically falls short on ease of use (can't load empty config files, CombinedConfiguration requires utilization of underlying Configurations for most operations, etc), and consistency across its API (save operation posts no Events, Events are not universal).
Aside from the JDK Preferences which writes to the Registry (which I don't want), are there any other alternatives to managing file based preferences?
Using another file format is not an option.
Upvotes: 6
Views: 2850
Reputation: 26483
I have used XStream in the past for this, but it is just XML data-binding, mapping from file to objects. It puts the burden on you to provide higher level methods (in particular combining configurations, validation).
Upvotes: 1
Reputation: 2244
Your question does not make it clear whether you need to stay with an XML-based technology. If not, then you could do worse than to consider Json, YAML or (my favourite, and the one that I maintain) Config4*.
Upvotes: 0