Click here to Skip to main content
15,112,662 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want extract key value pair from xml file in my java code.

My XML element that contain key value pair :

    <ip key=""  value="owner" />
    <ip key=""  value="cus" />

What I have tried:

 @XmlType(name = "", propOrder = {
 public static class dBIp {

     protected Map<String,String> ip;

     public Map<String,String> getIp() {
         if (ip == null) {
                ip = new HashMap<String,String>();
          return this.ip;


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900