-
Notifications
You must be signed in to change notification settings - Fork 208
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
Autoformat on Save and empty XML-Elements #430
Comments
I agree this is bug, thanks for the report, I will look into it. |
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 |
Formatting Options has new setting to format Xml attributes each on a separate line. Publish new version 2.9.0.16
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. |
Many thanks for the quick correction. Great job :-) |
Hello,
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.
Best regards
Plutowalker
The text was updated successfully, but these errors were encountered: