grunt-convert
Version:
Convert between XML, JSON and YAML, from one format to another.
39 lines (35 loc) • 493 B
Markdown
## Convert XML to YAML
```js
grunt.initConfig({
convert: {
options: {
explicitArray: false,
},
xml2yml: {
src: ['convert.xml'],
dest: 'dist/convert.yml'
}
}
});
```
## Convert XML to JSON
```js
grunt.initConfig({
convert: {
options: {
explicitArray: false,
},
xml2json: {
files: [
{
expand: true,
cwd: 'test/fixtures/',
src: ['**/*.xml'],
dest: 'tmp/result/',
ext: '.json'
}
]
},
}
});
```