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

Change Encoding format on XML Header #32

Open Duskraelea opened 6 years ago

Duskraelea commented 6 years ago

Hello,

I have used option xmlHeader: true, which gives <?xml version="1.0" encoding="utf-8"?> on top of the XML.

However, I want to change "utf-8" to something else like "TIS-620", how do I do that? Thank you.

soldair commented 6 years ago

hey. you should add an argument here https://github.com/soldair/node-jsontoxml/blob/master/jsontoxml.js#L118

and submit a pull request =)