aoot
Version:
Converts an array of objects to and from data formats JSON, CSV, TSV, XML and YAML
25 lines (23 loc) • 496 B
JavaScript
var aoot = require('aoot')
var data = require('./sample.json')
var XML = aoot.xml(data)
console.log(XML)
//
// <ROWSET>
// <ROW>
// <name>Montana</name>
// <age>27</age>
// <location>San Francisco</location>
// </ROW>
// <ROW>
// <name>George</name>
// <age>22</age>
// <location>San Francisco</location>
// </ROW>
// <ROW>
// <name>Chris</name>
// <age>25</age>
// <location>Costa Mesa</location>
// </ROW>
// </ROWSET>
```