You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ron Coutts <Ro...@quadrus.com> on 2001/12/04 20:04:24 UTC

XML question related to build.xml development

Sorry for the slightly off topic question, but I thought many Ant users
may find the answer helpful when setting up build.xml files.
How does one 'escape' a quote character into XML. For example: 
<property name="foo" value="X" /> 
If now instead of X, I want to put "X" in there, (i.e. with the double
quotes).  How do I do that? The following doesn't seem to work. 
<properaty value="\"X\"" /> 
Ron 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XML question related to build.xml development

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Ron Coutts wrote:

> Sorry for the slightly off topic question, but I thought many Ant users
> may find the answer helpful when setting up build.xml files.
> How does one 'escape' a quote character into XML. For example: 
> <property name="foo" value="X" /> 
> If now instead of X, I want to put "X" in there, (i.e. with the double
> quotes).  How do I do that? The following doesn't seem to work. 
> <properaty value="\"X\"" /> 


&quot;



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XML question related to build.xml development

Posted by "Kyle R . Burton" <mo...@voicenet.com>.
> Sorry for the slightly off topic question, but I thought many Ant users
> may find the answer helpful when setting up build.xml files.
> How does one 'escape' a quote character into XML. For example: 
> <property name="foo" value="X" /> 
> If now instead of X, I want to put "X" in there, (i.e. with the double
> quotes).  How do I do that? The following doesn't seem to work. 
> <properaty value="\"X\"" /> 

XML supports ligatures similar to HTML.  So you can do:

  <property value="&quot;X&quot;">

It also supports numberd characters:

  &#143;

But I wouldn't recommend using numbered entities.  Hope this helps.



Best Regards,

Kyle R. Burton

-- 

------------------------------------------------------------------------------
Enter in.  Be one with the object of contemplation if you
wish to understand.  Don't be an outside observer of life.
Be life.
        -- T'ao-shan
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>