Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 88560 invoked from network); 27 Feb 2009 19:42:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2009 19:42:46 -0000 Received: (qmail 37137 invoked by uid 500); 27 Feb 2009 19:42:44 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 37105 invoked by uid 500); 27 Feb 2009 19:42:44 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 37094 invoked by uid 99); 27 Feb 2009 19:42:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2009 11:42:43 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of raleigh.rinehart@ti.com designates 198.47.26.152 as permitted sender) Received: from [198.47.26.152] (HELO comal.ext.ti.com) (198.47.26.152) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2009 19:42:35 +0000 Received: from dlep95.itg.ti.com ([157.170.170.107]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id n1RJg9VB005136 for ; Fri, 27 Feb 2009 13:42:14 -0600 Received: from dlee74.ent.ti.com (localhost [127.0.0.1]) by dlep95.itg.ti.com (8.13.8/8.13.8) with ESMTP id n1RJg9d5021551 for ; Fri, 27 Feb 2009 13:42:09 -0600 (CST) Received: from dlee06.ent.ti.com ([157.170.170.11]) by dlee74.ent.ti.com ([157.170.170.8]) with mapi; Fri, 27 Feb 2009 13:42:09 -0600 From: "Rinehart, Raleigh" To: Ant Users List Date: Fri, 27 Feb 2009 13:41:49 -0600 Subject: RE: How to replace a \ with  Or how do I replace anything with & Thread-Topic: How to replace a \ with  Or how do I replace anything with & Thread-Index: AcmZCY47uEhzrPWbRsCOgc8cphfYswACZSjg Message-ID: <981D0B4C9708CF41995970A0FD9B5DF201655A328F@dlee06.ent.ti.com> References: <54f4dff10902271030x586c0e64y49340c26c49beb92@mail.gmail.com> In-Reply-To: <54f4dff10902271030x586c0e64y49340c26c49beb92@mail.gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org > I am trying to replace a \ with the character sequence  > Don't ask why! Im not sure I know just yet. >=20 > If I use this method: >=20 > token=3D"\" value=3D"\" summary=3D"true"> >=20 > it just replaces \ with \ >=20 >=20 > If I use this method: >=20 > byline=3D"true"/> I get this error: > Unexpected internal error near index 1 >=20 > If I try to build up the sequence with multiple replaces, Ant won't let m= e > insert an & into the file, I get this error: > The entity name must immediately follow the '&' in the entity reference. > Or > "" is an invalid XML character. >=20 > This is running ant on windows. Would the results be different from unix? >=20 > Would sed work from unix? what is the best sed-like app for windows? >=20 > Thanks =20 Can't use & directly in XML as it is a special char. Need to use the entit= y ref so the parser does what you want. This should work for you: Hope this helps, -raleigh --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org