// simple example of loading an xml file into Properties.
1
2 Properties properties = new Properties();
3 try {
4 InputStream xmlStream = getClass().getResourceAsStream("properties.xml");
5 if( xmlStream == null ) {
6 //throw some error
7 }
8 properties.loadFromXML(xmlStream);
9 } catch (IOException exception) {
10 // throw exception
11 }
1
2 <?xml version="1.0" encoding="UTF-8"?>
3 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
4 <properties>
5 <entry key="plugin.TestPlugin">com.plugin.test.TestPluginModule</entry>
6 <entry key="messages.TestPlugin">TestPluginMessages.properties</entry>
7 </properties>