I want to store the values contained in an XML file to a java String Object. Here is my XML code :
<properties>
<comment>test.xml</comment>
<entry key="1">test1</entry>
<entry key="2">test1,test2,test3</entry>
<entry key="3">test1,test2,test3</entry>
<properties>
I want 'values' to be stored in a string. Eg:
String msg;
if(msg.equals("1")){
String str1 = //get values of key "1" (ie) test1
}
else if(msg.equals("2")){
String str2 = //get values of key "2" (ie) test1,test2,test3
}
Is there any way to do it using HashMap or anything?? Thanks.