Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
一个非常不言自明的问题,只是想知道为什么 Antbuild.xml文件中的空标签似乎总是在关闭之前省略空格/>,即使这是有效 XML 1.0 的要求?也许这是一个我不知道的约定,因为我是 Ant 新手,但我只是好奇。
build.xml
/>
关闭前的空格/>不是必需的。以下是等价的:
<foo/>
<foo />
一些 XML 编辑器在格式化时实际上会去掉这个空间(特别是 oXygen)。