I have the following xml file:
This is trivial, assuming you're willing to re-write your properties file into the standard Java format. Assume you have the following in a file called props.xml
:
This is a comment
A
B
C
D
E
F
Then read properties from the file like this:
java.util.Properties prop = new Properties();
prop.loadFromXML(new FileInputStream("props.xml"));
System.out.println(prop.getProperty("propF"));