Why do empty tags in Ant build files have space before the closing bracket?

Actually a pretty understandable question, it’s just interesting why empty tags in Ant files build.xmlalways seem to lower the space before closing />, although this is a requirement for valid XML 1.0? Perhaps this is an agreement that I would not know about, since I'm new to Ant, but I'm just curious.

+3
source share
1 answer

Space before closing />is optional. The following equivalents:

<foo/>

<foo />

Some XML editors will actually share this space when formatting (in particular, oXygen).

+4
source

Source: https://habr.com/ru/post/1795354/


All Articles