2011-04-15 46 views
3
<target name="three"> 
<echo message="A & B"/> 
</target> 

每當進出口運行這段代碼它顯示像The entity name must immediately follow the '&' in the entity reference. 錯誤我如何打印&乙 請幫我出球員如何打印A&B回聲消息Ant腳本內

回答

7

使用&amp;而不是&

+0

非常感謝馬修.. – picnic4u 2011-04-15 10:49:47

7

Ant腳本必須是有效的XML,所以需要符號XML轉義:

<target name="three"> 
<echo message="A &amp; B"/> 
</target>