-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add a closing tag flag for XML output #748
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
Comments
@derily Can you provide a sample input and the output that you want to get? |
input(JSONObject): |
@derily It might be possible to accommodate this with an XMLParserConfiguration option. If no one else picks this up, I will try to get something working this weekend. |
Hi, Can I take this up? I'm thinking of adding one more boolean parameter in toString() method of XML class and handle the string builder append as per the boolean parameter. Please let me know if this solution can be improved. I'm willing to take up on this issue. |
@madhavgupta2011 Thanks, yes you can work on this ticket - FYI you don't need to ask first. Please check whether you can use XMLParserConfiguration to trigger the new behavior. |
@stleary I have opened a pull request with my changes and added two unit test cases as well. I couldn't get my head around XMLParserConfiguration so I used the appropriate changes. |
Fix in progress - #754. |
Re-opening since the PR was not accepted |
Please use XMLParserConfiguration for the implementation. |
See comments in your repo. |
@stleary - is this issue still open to be picked? |
@stleary - if no one else is working on it, can you assign it to my name? |
@rudrajyotib You can work on this issue. The new behavior should be opt-in, by adding a new property to XMLParserConfiguration. |
@stleary sure, I'll start working on it and share the design. |
@stleary @johnjaylward - I am creating a configuration "explicitClosureOfEmptyTag" in XMLParserConfiguration. By default this value will be false, and an explicit end tag will not be created for tag with empty values. |
@rudrajyotib Please use |
Closing due to fixed in #820 |
when JSONObject value is empty string,i need XML.toString output
<name></name> not <name/>
The text was updated successfully, but these errors were encountered: