Thibaut Barrère wrote:

Hi Koen

use " inside " (ie : OriginalValue="value="true""). The double quote is a special character in XML and must be escaped. See this page http://www.mountaindragon.com/html/iso.htm for more informations.

It's better to just use single quotes for the XML quotes, i.e.

<ReplaceText OriginalValue='value="true"' ReplaceValue='value="false"' />

XML allows either single or double quotes around attribute values, yet virtually everyone uses just the double quotes, so that many people don't even know that single quotes can be used. (I didn't, until several months ago.) It makes me wonder, given that single quotes are easier to type and easier on the eyes.

Gary

cheers

Thibaut
--
[blog] http://www.dotnetguru2.org/tbarrere

2005/11/30, Koen Mayens <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

    Hi, I'm quite new to nant,
    I have a small problem but can't find a solution.

    I have a function which replaces text in a textfile but a having
    trouble with the double quotes.
    In the task a have 2 attributes which are OriginalValue and
    ReplaceValue. Now I want to do something like this:

    <ReplaceText OriginalValue="value="true""
    ReplaceValue="value="false"" />

    Then I get the error about the double quotes.
    Anybody who knows how to solve this?

    Thanks









-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to