开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜