? I saw this in several places and, for example, it also does the automatic formatting of ...">

XML formatting conventions: why leave a space before / ">?

I saw this in several places and, for example, it also does the automatic formatting of XML Eclipse: put a space before the closing /> empty element.

Having

 <element attribute="value"/> 

will be formatted in

 <element attribute="value" /> 

Why would you do this? From an XML perspective, its equivalent. Is this a convention? Is it for readability?

+7
source share
1 answer

This will most likely be safe with XHTML XML, which requires space in some early XHTML browsers.

The best answer: Space before closing slash?

+5
source

All Articles