读取字符串中的分号时,在nant脚本中出现xmlpoke的问题

我有一个试图在我的web.config中更改URL值的nant脚本,但Nant不断抛出此错误:
'=' is an unexpected token. The expected token is ';'. Line 1, position 80.
我将其追溯到nant脚本的URL中的分号。我首先在URL中使用分号的原因是因为web.config不喜欢&符号(&)。所以我不得不更换&用
&
。这是我的web.config值:
<appSettings>
    <add key="myUrl" value="http://www.google.com/whatever?id=myId&amp;fullScreen=1"/>
</appSettings>
我能够在web.config中xmlpo所有其他“添加键”但是这个,所以它不是一个xpath问题。 这是nant脚本:
<property name="myUrl" value="http://www.google.com/whatever?id=123456&amp;fullScreen=2"/>

<xmlpoke 
   file="${config.file}"
   xpath="/configuration/appSettings/add[@key = 'myUrl']/@value"
   value="${myUrl}">    
</xmlpoke>
所以问题不在于web.config中的分号,而是在nant脚本中使用分号。我想我需要以某种方式逃避nant脚本中的分号。任何人都知道如何做到这一点或其他什么来让它工作?     
已邀请:
已经16个小时了,不是任何人偷看的。幸运的是,经过几个小时的谷歌搜索,我找到了解决方案。 解决方案是使用
&amp;amp;
。我不知道为什么额外的
amp;
但它有效。 所以现在我的nant脚本看起来像这样:
<property name="myUrl" value="http://www.google.com/whatever?id=123456&amp;amp;fullScreen=2"/>
从nant-users邮件列表中获取信用额度,我刚刚订阅了:)     

要回复问题请先登录注册