xml-js
xml-js copied to clipboard
Empty xml when not options.compact
When there is not the option attribute compact: true, neither js2xml nor json2xml work, they return instead undefined
@euberdeveloper Experiencing exact same issues. I replaced an old XML parser in my project with this library and then wasted hours because of this issue. Thanks for telling that compact is working
@euberdeveloper , @sangupta007
Sorry for the inconveniences caused by this.
I admit the documentation doesn't tell or warn the library works in non-compact form by default. I got tripped into this issue many times myself 😅.
I will update the documentation to clarify this default. I might also let the library automatically switch the behavior to compact form if the input is in compact form.
Man, I spent few hours researching this issue until I found this report. I should have come here in the first place anyway.
Thanks @nashwaan for such a great library. Saved me a lot of work!