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

Add support for processing instructions and comments #35

Open
ghost opened this issue Aug 29, 2017 · 2 comments
Open

Add support for processing instructions and comments #35

ghost opened this issue Aug 29, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 29, 2017

Currently xmlToJSON only support element, cdata, and text nodes.

@ghost ghost self-assigned this Aug 29, 2017
@ghost ghost added the enhancement label Aug 29, 2017
@ghost ghost added this to the 2.0 milestone Aug 29, 2017
@ghost ghost added the question label Sep 6, 2017
@ghost
Copy link
Author

ghost commented Sep 6, 2017

This is related to issue #21 . Without significantly altering the format of the JSON object, there is not a simple approach to maintaining ordering for same-key nodes that are interspersed with other nodes. Without strict ordering, context is lost for items such as comments and processing instructions. And in the end, you really should just parse the xml if you need that level of fidelity :)

@javadev
Copy link

javadev commented Jul 24, 2021

https://github.com/javadev/xml-to-json will help

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

No branches or pull requests

1 participant