PropertiesConfiguration propertiesConfiguration = new PropertiesConfiguration();//create a empty PropertiesConfiguration object
propertiesConfiguration.setIOFactory(org.apache.commons.configuration.PropertiesConfiguration.IOFactory ioFactory); // set the io factory for reader and writer configuration files (postfix with .properties)
propertiesConfiguration.setFileName(fileName); // specify the file location
propertiesConfiguration.load(); //read and parse the file and store in memory
CompositeConfiguration compositeConfiguration= new CompositeConfiguration(); //used to create an instance of configuration used for composite all kinds type of multi configuration files, such as properties and xml.etc
compositeConfiguration.addConfiguration(propertiesConfiguration);
propertiesConfiguration(new XMLConfiguration(filePath));