Changeset 3845 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-02-02T18:54:07+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/ServerSidePreferences.java
r3815 r3845 177 177 boolean res = false; 178 178 try { 179 /* TODO: parse collection! */ 179 180 XmlObjectParser.Uniform<Prop> parser = new XmlObjectParser.Uniform<Prop>(in, "tag", Prop.class); 180 181 for (Prop p : parser) { … … 200 201 continue; // do not upload password. It would get stored in plain! 201 202 } 202 b.append("<tag key='"); 203 b.append(XmlWriter.encode(p.getKey())); 204 b.append("' value='"); 205 b.append(XmlWriter.encode(p.getValue())); 206 b.append("' />\n"); 203 String r = p.getValue(); 204 if(r.contains("\u001e")) 205 { 206 b.append("<collection key='"); 207 b.append(XmlWriter.encode(p.getKey())); 208 b.append(">\n"); 209 for (String val : r.split("\u001e", -1)) 210 { 211 b.append(" <entry value='"); 212 b.append(XmlWriter.encode(val)); 213 b.append("' />\n"); 214 } 215 } 216 else 217 { 218 b.append("<tag key='"); 219 b.append(XmlWriter.encode(p.getKey())); 220 b.append("' value='"); 221 b.append(XmlWriter.encode(p.getValue())); 222 b.append("' />\n"); 223 } 207 224 } 208 225 b.append("</preferences>");
Note:
See TracChangeset
for help on using the changeset viewer.