configurable space in XML Writer tag

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

configurable space in XML Writer tag

Peter Uhnak
Hi,

what would be the best approach to not generate space at the end of single tag?

Right now it generates
<item />

but I would like
<item/>

The space is added in XMLTagWriter>>writeEpilogue,

but to "cleanly" change it I would need to
* subclass tag writer
* subclass xml writer
* figure out how to provide different writer so it plays with XMLDocument>>printOn: 

and that certainly doesn't feel like a nice approach.

Maybe this can be made configurable in similar fashion to indentation?

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: configurable space in XML Writer tag

monty-3
It's changed to no longer emit that space. I was considering removing it, or at least making it configurable, anyway.

Reply | Threaded
Open this post in threaded view
|

Re: configurable space in XML Writer tag

Peter Uhnak
It's changed to no longer emit that space.

Thank you, however this could cause trouble for people needing the space. :)
Making it configurable makes a lot of sense if you version your XML files (with e.g. git) and interchange with other tools... that way you can produce same formatting from both tools and not create false changes.

Thanks!
Peter

On Fri, Apr 6, 2018 at 10:42 PM, monty <[hidden email]> wrote:
It's changed to no longer emit that space. I was considering removing it, or at least making it configurable, anyway.