Skip to content
Browse files

Switches from single to double quotes in json2xml script due to crapp…

…y commercial software. Closes #11
  • Loading branch information...
1 parent c2e83bd commit 4aec894b2ac97364a82b1ee91e2605d91de40d61 @c4milo c4milo committed Sep 8, 2012
Showing with 5 additions and 3 deletions.
  1. +1 −1 lib/json2xml.js
  2. +3 −1 package.json
  3. +1 −1 test/fixtures/domain.xml
View
2 lib/json2xml.js
@@ -26,7 +26,7 @@ module.exports = function toXml(json, xml) {
xml += obj[key];
} else {
xml = xml.replace(/>$/, '');
- xml += ' ' + key + "='" + obj[key] + "'>";
+ xml += ' ' + key + '="' + obj[key] + '">';
}
}
}
View
4 package.json
@@ -5,7 +5,9 @@
"description" : "Converts xml to json and viceverza, using node-expat.",
"repository": "git://github.com/buglabs/node-xml2json.git",
"main": "index",
- "contributors":[ {"name": "Camilo Aguilar", "email": "camilo@buglabs.net"}],
+ "contributors":[
+ {"name": "Camilo Aguilar", "email": "camilo@buglabs.net"}
+ ],
"dependencies": {
"node-expat": ">=1.4.1 <2.0.0"
}
View
2 test/fixtures/domain.xml
@@ -1 +1 @@
-<domain type='qemu'><name>QEmu-fedora-i686</name><uuid>c7a5fdbd-cdaf-9455-926a-d65c16db1809</uuid><memory>219200</memory><currentMemory>219200</currentMemory><vcpu>2</vcpu><os><type arch='i686' machine='pc'>hvm</type><boot dev='cdrom'></boot></os><devices><emulator>/usr/bin/qemu-system-x86_64</emulator><disk type='file' device='cdrom'><source file='/home/user/boot.iso'></source><target dev='hdc'></target><readonly></readonly></disk><disk type='file' device='disk'><source file='/home/user/fedora.img'></source><target dev='hda'></target></disk><interface type='network'><source network='default'></source></interface><graphics type='vnc' port='-1'></graphics></devices><ah type='rare' foo='bar'>cosa1</ah><ah type='normal'>cosa2</ah><ah>cosa3</ah></domain>
+<domain type="qemu"><name>QEmu-fedora-i686</name><uuid>c7a5fdbd-cdaf-9455-926a-d65c16db1809</uuid><memory>219200</memory><currentMemory>219200</currentMemory><vcpu>2</vcpu><os><type arch="i686" machine="pc">hvm</type><boot dev="cdrom"></boot></os><devices><emulator>/usr/bin/qemu-system-x86_64</emulator><disk type="file" device="cdrom"><source file="/home/user/boot.iso"></source><target dev="hdc"></target><readonly></readonly></disk><disk type="file" device="disk"><source file="/home/user/fedora.img"></source><target dev="hda"></target></disk><interface type="network"><source network="default"></source></interface><graphics type="vnc" port="-1"></graphics></devices><ah type="rare" foo="bar">cosa1</ah><ah type="normal">cosa2</ah><ah>cosa3</ah></domain>

0 comments on commit 4aec894

Please sign in to comment.
Something went wrong with that request. Please try again.