create-xml-ls
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "create-xml-ls", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Another JS object to XML converter", | ||
@@ -12,3 +12,3 @@ "author": "Pedro Tacla Yamada <tacla.yamada@gmail.com>", | ||
"test": "npm run-script cc; npm run-script test-cc; mocha -R spec pub-test/*", | ||
"pre-publish": "npm run-script cc" | ||
"prepublish": "npm run-script cc" | ||
}, | ||
@@ -15,0 +15,0 @@ |
@@ -1,6 +0,42 @@ | ||
# create-xml-pure [![Build Status](https://secure.travis-ci.org/yamadapc/create-xml-ls.png?branch=master)](http://travis-ci.org/yamadapc/create-xml-ls) | ||
# create-xml-ls [![Build Status](https://secure.travis-ci.org/yamadapc/create-xml-ls.png?branch=master)](http://travis-ci.org/yamadapc/create-xml-ls) | ||
Another JS object to XML converter | ||
## Instalation | ||
```npm install create-xml-ls``` | ||
## Example | ||
### Javascript | ||
```javascript | ||
var createXml = require('create-xml-ls'); | ||
createXml({ | ||
something: { | ||
is: 'very', | ||
ugly: { | ||
$attr: { | ||
IMHO: 'it sucks' | ||
} | ||
but: 'sometimes we have to live with it' | ||
} | ||
} | ||
}); | ||
/* => | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<something> | ||
<is>very</is> | ||
<ugly IMHO="it sucks"> | ||
<but>sometimes we have to live with it</but> | ||
</ugly> | ||
</something> | ||
(though indentation is off by default and can be toggled with the pretty | ||
option) | ||
*/ | ||
``` | ||
## License | ||
Copyright (c) 2013 Pedro Yamada. Licensed under the MIT license. |
5581
43