mpareja/paprika — Issue #3: json to xml task
Author: prabirshrestha
Created: 2012-02-29 16:17:51+00:00
State: open

allow to generate xml file from a json object.

if the property name start with _ it is an attribute. ```_xmlns```

```javascript
xml({
file: path.join(root, 'Build/NuGet/Facebook/Facebook.nuspec'),
xml: {
'package': {
_xmlns: 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd',
metadata: {
id: 'Facebook',
version: version.full,
authors: 'Jim Jimmerman, Nathan Totten, Prabir Shrestha',
description: 'The Facebook C# SDK Core.',
language: 'en-US',
licenseUrl: 'http://facebooksdk.codeplex.com/license',
projectUrl: 'http://facebooksdk.codeplex.com',
iconUrl: 'http://bit.ly/facebooksdkicon',
requireLicenseAcceptance: true,
tags: 'Facebook',
dependencies: [
{ dependency: { _id: 'CodeContracts.Unofficial', _version: '1.0.0.2'} }
]
},
files: [
{ file: { _src: '../../Build/NuGet/Facebook/content/**/*.*', _target: 'content'} },
{ file: { _src: '../../Build/NuGet/Facebook/serializers/**/*.*', _target: 'serializers'} },
{ file: { _src: '../../Build/NuGet/Facebook/tools/**/*', _target: 'tools'} },
{ file: { _src: '../../Bin/Release/net40-client/**/*.dll', _target: 'lib/net40-client'} },
{ file: { _src: '../../Bin/Release/net40-client/**/*.xml', _target: 'lib/net40-client'} },
{ file: { _src: '../../Bin/Release/net35-client/**/*.dll', _target: 'lib/net35-client'} },
{ file: { _src: '../../Bin/Release/net35-client/**/*.xml', _target: 'lib/net35-client'} },
{ file: { _src: '../../Bin/Release/sl4/**/*.dll', _target: 'lib/sl4'} },
{ file: { _src: '../../Bin/Release/sl4/**/*.xml', _target: 'lib/sl4'} },
{ file: { _src: '../../Bin/Release/sl3-wp/**/*.dll', _target: 'lib/sl4'} },
{ file: { _src: '../../Bin/Release/sl3-wp/**/*.xml', _target: 'lib/sl3-wp'} },
]
}
}
});
```