Open
Description
I am trying to model classes that can support mixed content. From the example at https://www.npmjs.com/package/js2xmlparser I could do this with
var js2xmlparser = require("js2xmlparser");
var obj = {
"phone": [
{
"@": {
"type": "home"
},
"#": "123-555-4567"
},
{
"@": {
"type": "cell"
},
"#": "890-555-1234"
}
],
"email": "john@smith.com"
};
console.log(js2xmlparser.parse("person", obj));
which gives me an xml
<?xml version='1.0'?>
<person>
<phone type='home'>123-555-4567</phone>
<phone type='cell'>890-555-1234</phone>
<email>john@smith.com</email>
</person>
How would I go about doing this using xml-decorators?
Metadata
Metadata
Assignees
Labels
No labels