node-xml2js
node-xml2js copied to clipboard
Same options from Parser to Builder produce a different output
Hi! I'm trying to parse, manipulate, and build an XML file.
I found the option to create an array of child (to maintain the order in built XML file), so i use it. But when i generate back the XML seems like tat the builder didn't see the options, so he generate a totally different output (put children as XML node, but should loop over them and generate the right tags).
It's possible that Builder didn't accept the same options as Parser?
Thanks in advance!
Yes, I don't think the code is well suited for roundtrips. The builder should just be removed :-(
Then there is now way to re-generate a correct XML? :(
Do you know some great alternative of your plugin? This is so good because is ridiculously easy to use, to read XML it's fantastic. The problem is only for the generation of XML with ordered childrens :(
Well, you can still use xml2js for parsing and construct XML in a different way.
xml2js is due for a proper rewrite but since I don't use it personally I have little time to spend on it.
Yes, i'm still using it to parsing.
I wrote a function that loop over an element (attributes and childrens) and generate full XML.
@Alex-Ferreli Would you mind sharing it ?
Nevermind #461 works great
Can we get #461 merged?