convert javascript object to xml with attributes feature
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
lib
src
test
.gitignore
.travis.yml
Cakefile
package.json
readme.md

readme.md

Kramer

A Javascript Object to XML Parser

Install

npm install kramer

Usage

var kramer = require('kramer');

var doc = {
  _: { version: '1', build: '2' },
  foo: {
    _: { cool: 'beans' },
    text: 'bar'
  }
}

var xml = kramer('root', doc);

console.log(xml);

Results

<root version='1' build='2'>
  <foo cool="beans">bar</foo>
</root>