toxml

0.0.1 • Public • Published

toXML

Convert object to XML easy.

Installation

$ npm install toxml

Example

var toxml = require('toxml');
var xml = toxml({
    'root' : {
        'first' : 'param1',
        'child' : {
            '_attr' : {
                'xmlns' : 'http://com.example.webservice/',
                'lang' : 'en'
            },
            '_val' : {
                'child2' : 'children content',
                'child3' : 'children content'
            }
        }
    }
});

Output

<root><first>param1</first><child xmlns="http://com.example.webservice/" lang="en"><child2>children content</child2><child3>children content</child3></child></root>

License

This project is licensed under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i toxml

Weekly Downloads

0

Version

0.0.1

License

BSD

Last publish

Collaborators

  • smituk