Skip to content

Instantly share code, notes, and snippets.

@jamesjhedley
Forked from sleroux/gist:4040812
Created November 8, 2012 19:12
Show Gist options
  • Save jamesjhedley/4040869 to your computer and use it in GitHub Desktop.
Save jamesjhedley/4040869 to your computer and use it in GitHub Desktop.
var data2xml = require("data2xml");
var obj = [];
obj.push({
text: {
_attr: {
"xml:lang": "en"
},
_value: "French Stuff"
}
});
obj.push({
_value: 'English Stuff'
});
console.log(data2xml('Test', obj));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment