My target is java 1.5 I have a custom configuration file provided from another software provider i need to read it
<?xml version="1.0" encoding="ISO-8859-1"?>
<environments>
<environment key="DEFAULT" description="Default">
<variable name="LOGGER_NAME" value="LCI"/>
<variable name="MAIL_SERVER" value="127.0.0.1"/>
......
</environment>
<environment key="TEST" description="Test">
<variable name="LOGGER_NAME" value="LCO"/>
<variable name="MAIL_SERVER" value="192.168.2.15"/>
......
</environment>
</environments>
I need to put it in a hash map and acces to it as.
MyPropertyManager.getProperty("DEFAULT","LOGGER_NAME")
I think that I can load infos in a HashMap where I can acces usingg key like DEFAULT.LOGGER_NAME
Can I use APACHE COMMONS Configuration (HOW?) or is too complex and is better to use Xpath?