aboutsummaryrefslogtreecommitdiffstats
path: root/src/nodejs/xmlGenerator.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodejs/xmlGenerator.js')
-rw-r--r--src/nodejs/xmlGenerator.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nodejs/xmlGenerator.js b/src/nodejs/xmlGenerator.js
index 97cd2ae..17143a8 100644
--- a/src/nodejs/xmlGenerator.js
+++ b/src/nodejs/xmlGenerator.js
@@ -26,7 +26,7 @@ exports.createNode = function (row) {
.att('v',escape(temp[x+1]));
}
return builder.toString({ pretty: true });
-}
+};
exports.createWay = function (row) {
var way = builder.begin('way')
@@ -41,14 +41,12 @@ exports.createWay = function (row) {
.att('k',escape(temp[x]))
.att('v',escape(temp[x+1]));
}
-
var temp = row.nodes.replace("{","").replace("}","").split(",");
- for(var x=0;x<temp.length;x++) {
- way.ele('nd')
- .att('ref',temp[x]);
+ for(var i=0;i<temp.length;i++) {
+ way.ele('nd').att('ref',temp[i]);
}
return builder.toString({pretty:'true'});
-}
+};
function toISO8601(date) {
//2007-03-31T00:09:22+01:00