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
I think, i've found a little error today when using Autoformat on Saving of a XML-Document with empty XML-Elements in long format (<...></...>) in content. In my option XML Notepad insert not allowed Spaces and line breaks as value between the start-tag and end-tag. Outside of XML-Elements this is allowed and makes no problems but inside of a XML-Element this is problematic and changes the content of this XML-Element.
As exmaple the free texteditor Notepad++ with extension XML Tools works a little bit other. Notepad++ converts such empty XML-Elements in long format (<...></...>) to the correspoding short format (<.../>) without insert additional spaces or line breaks. That behaviour makes no problems and is also allowed in XML.
It would be nice if this point can be checked and corrected because XML Notepad is a great tool for me every day.
Alternativly, an empty XML-Element in long format can placed completely in one line but not start-tag and end-tag interrupted in two following lines. Both formats (long and short) are allowed in my option and equivalent. Personally I prefer the short format ... it's clearer in a greater structured XML content.
Activity
lovettchris commentedon Dec 10, 2024
I agree this is bug, thanks for the report, I will look into it.
plutowalker commentedon Dec 10, 2024
Alternativly, an empty XML-Element in long format can placed completely in one line but not start-tag and end-tag interrupted in two following lines. Both formats (long and short) are allowed in my option and equivalent. Personally I prefer the short format ... it's clearer in a greater structured XML content.
Best regards
Plutowalker
Fix issue #430: Autoformat on Save with empty XML-Elements.
lovettchris commentedon Dec 10, 2024
Fixed in https://github.com/microsoft/XmlNotepad/releases/tag/2.9.0.16. The fix was to move to a new version of the XmlWriter provided in the .NET frameworks and with this writer the whitespace is not inserted, and the full end tag is preserved.
plutowalker commentedon Dec 12, 2024
Many thanks for the quick correction. Great job :-)