Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented buildObjectExplicit for building an xml string from a json object created with explicitChildren #307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flodev
Copy link

@flodev flodev commented Jul 4, 2016

  • fixed trimming of child text items
  • implemented that single text nodes wont get trimmed
  • fixed catching undefined text value
  • added comments, fixed non cdata values like numbers
  • added onclosetag and onopentag events

- fixed trimming of child text items
- implemented that single text nodes wont get trimmed
- fixed catching undefined text value
- added comments, fixed non cdata values like numbers
- added onclosetag and onopentag events
@flodev
Copy link
Author

flodev commented Jul 4, 2016

#299

@coveralls
Copy link

coveralls commented Jul 4, 2016

Coverage Status

Coverage increased (+0.5%) to 97.429% when pulling deff401 on flodev:master into 7b2a93a on Leonidas-from-XIV:master.

@mantasindrasius
Copy link

Is it possible to have this functionality soon please? Without proper XML serialization it draws this library unusable for our company's use case.

@mor-o
Copy link

mor-o commented Dec 18, 2017

can this please be merged?
we need this functionality as well

@danielle44
Copy link

@flodev Hi, Can this be merge soon please?

@yana-walkme
Copy link

hi @Leonidas-from-XIV
this PR is really important for us
and causing a bug that the parsing and building are not symmetric
we are using the parsing to get a JSON which we filter based on some criterias
and then we want to use the builder to build the XML again
while using the following options
var options = { preserveChildrenOrder: true, explicitChildren: true, charsAsChildren: true };

if the coverage increased and all tests passed, is there any other objection to merge this PR?

@Leonidas-from-XIV
Copy link
Owner

Leonidas-from-XIV commented Dec 18, 2017

What is blocking is that the branch is currently not mergeable because of conflicts with master. If someone is willing to rebase it and make sure there are no regressions I can merge it.

Although I would prefer that the buildObject function would detect the explicitChildren on its own but oh well.

@flodev
Copy link
Author

flodev commented Jan 10, 2018

Sorry I don't have time get into the code again.
My fork contains the functionality https://github.com/flodev/node-xml2js
I implemented the requirement once for a company. In addition my tests are covering that the input will match the output and it is considered as stable.
It worked for me. I don't now how many features were added to xml2js between July 2016 and now so you have to consider for yourself if this is an option.

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

Successfully merging this pull request may close these issues.

7 participants