Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

add sanitize options for toXml function. (& -> &, etc.) #58

Closed
wants to merge 1 commit into from

Conversation

miira
Copy link

@miira miira commented Jul 10, 2014

I needed to put '&' into the XML file in the entity form (&). The same sanitize function as in toJson function is used to achieve the result.

Second reason:
The options for toXml function were not used (resulted in [Object object] at the beginning of XML file, if you tried to use them), fixed README.

if (json instanceof Buffer) {
json = json.toString();
}

options = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need it to be global?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options? no. I just use the same style as in xml2json.js file.

@c4milo
Copy link
Contributor

c4milo commented Jul 11, 2014

thanks for your PR!. I will be looking into this as soon as I can.

@RickyJiao
Copy link

I also need this feature. I just created a issue before I noted this PR...

@sparkyfen
Copy link

👍 Do want this merged please!

@c4milo
Copy link
Contributor

c4milo commented Feb 20, 2015

@brutalhonesty I will review again today, fix conflicts and merge.

@sparkyfen
Copy link

@c4milo Thanks for the quick response! :)

c4milo added a commit that referenced this pull request Feb 20, 2015
@c4milo
Copy link
Contributor

c4milo commented Feb 20, 2015

@brutalhonesty done. I will publish a new version to npm soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants