You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
changed the title [-]when transform json to xml ,i need control whether use self closing tag[/-][+]Add a closing tag flag for XML output[/+]on Oct 5, 2023
@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.
Do you see any issue with the name?
Activity
stleary commentedon Jun 16, 2023
@derily Can you provide a sample input and the output that you want to get?
derily commentedon Jun 20, 2023
input(JSONObject):
{ "name":"derily", "job":"" }output:
<name>derily</name> <job/>expect(just not use self closing tag syntax):
<name>derily</name> <job></job>stleary commentedon Jun 23, 2023
@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.
madhavgupta2011 commentedon Jul 10, 2023
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.
stleary commentedon Jul 10, 2023
@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.
madhavgupta2011 commentedon Jul 10, 2023
@stleary I have opened a pull request with my changes and added two unit test cases as well.
Can you please review it?
Link to PR
I couldn't get my head around XMLParserConfiguration so I used the appropriate changes.
stleary commentedon Oct 1, 2023
Fix in progress - #754.
stleary commentedon Oct 5, 2023
Re-opening since the PR was not accepted
[-]when transform json to xml ,i need control whether use self closing tag[/-][+]Add a closing tag flag for XML output[/+]stleary commentedon Oct 5, 2023
Please use XMLParserConfiguration for the implementation.
Fix: stleary#748
Fix: stleary#748
stleary commentedon Oct 5, 2023
See comments in your repo.
rudrajyotib commentedon Oct 23, 2023
@stleary - is this issue still open to be picked?
rudrajyotib commentedon Oct 24, 2023
@stleary - if no one else is working on it, can you assign it to my name?
stleary commentedon Oct 24, 2023
@rudrajyotib You can work on this issue. The new behavior should be opt-in, by adding a new property to XMLParserConfiguration.
rudrajyotib commentedon Oct 24, 2023
@stleary sure, I'll start working on it and share the design.
rudrajyotib commentedon Oct 25, 2023
@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.
Do you see any issue with the name?
stleary commentedon Oct 25, 2023
@rudrajyotib Please use
closeEmptyTagor something similar with fewer chars.stleary#748 - close XML tag explicitly for empty tags with configurat…
stleary#748 - javadoc updated for methods.
stleary#748 - PR comments - follow convention of configuration builder.
stleary commentedon Oct 28, 2023
Closing due to fixed in #820