Why don't empty tags in Ant build files have a space before the closing brace?
A pretty self-explanatory question really, just wondering why empty tags in Ant build.xml
开发者_开发问答files always seem to omit the space before the closing />
, even though this is a requirement for valid XML 1.0? Perhaps it's a convention that I wouldn't know about since I'm new to Ant, but I'm just curious.
A space before the closing />
isn't a requirement. The following are equivalent:
<foo/>
<foo />
Some XML editors will actually strip this space when formatting (oXygen in particular).
精彩评论