json2xml
Simple JavaScript Object to XML string converter.
Last updated 4 years ago by estheban .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install json2xml 
SYNC missed versions from official npm registry.

node-json2xml

Description

Simple JavaScript Object to XML string converter.

Installation

Simplest way to install json2xml is to use npm, just npm install json2xml which will download json2xml and all dependencies.

Simple usage

var json2xml = require('json2xml');
json2xml({a:1});
//<a>1</a>

Options

add header:

json2xml({a:1}, { header:true });
//<?xml version="1.0" encoding="UTF-8"?><a>1</a>

add node attributes:

json2xml({a:1, attr:{b:2,c:3 }}, { attributes_key:'attr' });	
// <a b="2" c="3" >1</a>

Current Tags

  • 0.1.3                                ...           latest (4 years ago)

4 Versions

  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           7 years ago
  • 0.0.1                                ...           9 years ago

Copyright 2014 - 2016 © taobao.org |