michaelkourlas / node-js2xmlparser

Popular Node.js module for parsing JavaScript objects into XML
https://www.npmjs.org/package/js2xmlparser
Apache License 2.0
222 stars 52 forks source link

No more utf-8 encoding in xml tag #57

Closed jonathanasquier closed 7 years ago

jonathanasquier commented 7 years ago

Hi, I'm quite sad I can't get <?xml version='1.0' encoding='UTF-8'?> instead of <?xml version='1.0'?> with the latest npm version

Is there a way?

Thanks!

michaelkourlas commented 7 years ago

There definitely is -- you have to pass a particular option to the parse function. Check the docs for details.

On Jun 28, 2017 7:43 AM, Jonathan Asquier notifications@github.com wrote:

Hi, I'm quite sad I can't get <?xml version='1.0' encoding='UTF-8'?> instead of <?xml version='1.0'?> with the latest npm version

Is there a way?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/michaelkourlas/node-js2xmlparser/issues/57, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABmExJx3nkI9Sy6mWP2FZXcAeWIvULW2ks5sIjxJgaJpZM4OH2ab.

jonathanasquier commented 7 years ago

Found it in the examples! awesome thanks! :)