Changeset 336 in josm for branch/0.5/src/org/openstreetmap
- Timestamp:
- 2007-10-02T23:23:09+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branch/0.5/src/org/openstreetmap/josm/io/RawGpsReader.java
r319 r336 94 94 } 95 95 tags.push(tag); 96 } 96 } else if (peek.equals("text")) { 97 String tag = tags.pop(); 98 if (tags.empty() || !tags.peek().equals("link")) { 99 tags.push(tag); 100 return; 101 } 102 String contents = new String(ch, start, length); 103 // we just want the contents of <link><text></text></link> to 104 // all be stored under link. 105 String oldContents = currentTagValues.get("link"); 106 if (oldContents == null) { 107 currentTagValues.put("link", contents); 108 } else { 109 currentTagValues.put("link", oldContents + contents); 110 } 111 tags.push(tag); 112 } 97 113 } 98 114 … … 109 125 newTrack(); 110 126 currentTagValues.clear(); 111 } 127 } else if (qName.equals("link")) { 128 String contents = currentTagValues.get(qName); 129 if (contents != null) { 130 // strip off leading and trailing whitespace 131 currentTagValues.put(qName, 132 contents 133 .replaceFirst("^\\s+", "") 134 .replaceFirst("\\s+$", "")); 135 } 136 } 112 137 tags.pop(); 113 138 }
Note:
See TracChangeset
for help on using the changeset viewer.