soldair / node-jsontoxml

this renders a simple javascript object structure into xml/html. js objects are easier to modify than strings so no need to parse a whole dom to reliably add a few elements. while this could support async callbacks it doesn't. if people need it i will be happy to add support.
MIT License
101 stars 38 forks source link

'name' attribute #3

Closed yocontra closed 13 years ago

yocontra commented 13 years ago

Doing something like

app.packs.pack = name: pack.name, required: 'yes', preselected: 'yes', id: pack.name, file: {src: dirs.temp, targetdir: '$INSTALL_PATH', override: 'asktrue'}

jsxml.obj_to_xml(app) = <packs/>

when it should be more like <packs><pack name="whatever" blahblahblah /></packs>

I'm assuming it has something to do with the name attribute (since it's meant to be used elsewhere)

yocontra commented 13 years ago

Agh nevermind I fixed it, seems I was just using something wrong. Closing this now

soldair commented 13 years ago

Cool well let me know if you find any issues :)