xmltools
xmltools copied to clipboard
Changing Auto-Close Tag option from True to False and reformatting does not work
Have tested this under current release 3.0.4.3 and pre-release 3.0.5.0.
If the Auto-Close Tag option is currently set to False and you change it to True then press CTRL-ALT-SHIFT-B to force a reformat of the XML, the tags are updated properly and you will only see the closing tag for those that have no value.
If the Auto-Close Tag options is currently set to True and you change it to False then press CTRL-ALT-SHIFT-B to force a reformat of the XML, the tags are NOT updated in the XML. It stays in the True mode and continues to show only the closing tags, not the opening and closing tags. The only way to get it to reformat properly is to reopen the file from disk and then redo Pretty Print
I think your observation is correct.
But, maybe being a bit pedantic, the feature is 'auto close tags', and not 'auto use regular close tags'. I don't think any of the xmltools versions ever did transform <something/>
to <something></something>
.
If we were to change this, then we would probably need a tri-state for this, something such as: { Leave as is, auto close, expand }
Ok and thanks for the response. Not a big issue as is. I typically want to see the empty tags so I turned the option to false and will likely leave it that way. I only ran into it and wanted to report it since when I made the change and wanted to go back to see how it worked I noticed it wasn't updating.
The idea of tri-state option is good and not as hard to implement. I'll do some test with that.