printing &Quote; text to a file

View: New views
3 Messages — Rating Filter:   Alert me  

printing &Quote; text to a file

by Justin Daubenmire-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
 
I need to print the actual text "&quote" (minus the quote marks) to a file and not have nant translate that to a " character.
 
I have tried ${'"'} but it still prints the " mark rather than the text ".
 
How can I get this to work?
 
I'm trying to put this escape sequence in a properties file and using this to merge:
 
      <filterchain>
        <expandproperties />
      </filterchain>
 
All merges fine accept the &quote; is translated to " during the process.
 
My property in the property file is like this:
 
<property name="connection.string" value="connection string=${'&quot;'}database=foo;uid=foo;pwd=foo;${'&quot;'}"/>
 
In the new file, I am expecting to see this:
&quot;database=foo;uid=foo;pwd=foo;&quot;
 
but get this...
 
"database=foo;uid=foo;pwd=foo;"
 
 
Thanks!
 
 
/Justin

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
NAnt-users mailing list
NAnt-users@...
https://lists.sourceforge.net/lists/listinfo/nant-users

Parent Message unknown Re: printing &Quote; text to a file

by Justin Daubenmire-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Craig that did it!
 
For anyone reading this, here was the syntax that worked:
 
 <property name="connection.string" value="connection string=${'&amp;quot;'}database=foo;uid=foo;pwd=foo;${'&amp;quot;'}"/>

The output was this:
 
&quot;database=foo;uid=foo;pwd=foo;&quot;
 
 
/Justin
 
 
 

From: Craig Beck [mailto:Craig.Beck@...]
Sent: Wednesday, October 21, 2009 10:40 AM
To: Justin Daubenmire
Subject: Re: [NAnt-users] printing &Quote; text to a file

Have you tied "&amp;quot;" yet?

Go with the flow. I it wants to translate the entities, then use the entity for the ampersand and let it get translated.


On Oct 21, 2009, at 7:28 AM, Justin Daubenmire wrote:

Hi,
 
I need to print the actual text "&quote" (minus the quote marks) to a file and not have nant translate that to a " character.
 
I have tried ${'&quot;'} but it still prints the " mark rather than the text &quot;.
 
How can I get this to work?
 
I'm trying to put this escape sequence in a properties file and using this to merge:
 
      <filterchain>
        <expandproperties />
      </filterchain>
 
All merges fine accept the &quote; is translated to " during the process.
 
My property in the property file is like this:
 
<property name="connection.string" value="connection string=${'&quot;'}database=foo;uid=foo;pwd=foo;${'&quot;'}"/>
 
In the new file, I am expecting to see this:
&quot;database=foo;uid=foo;pwd=foo;&quot;
 
but get this...
 
"database=foo;uid=foo;pwd=foo;"
 
 
Thanks!
 
 
/Justin
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
NAnt-users mailing list
NAnt-users@...
https://lists.sourceforge.net/lists/listinfo/nant-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
NAnt-users mailing list
NAnt-users@...
https://lists.sourceforge.net/lists/listinfo/nant-users

Re: printing &Quote; text to a file

by Bob Archer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

And, I don't even think you need the expression...

 

<property name="connection.string" value="connection string=&amp;quotdatabase=foo;uid=foo;pwd=foo;&amp;quot;"/>

 

Although I haven't tested it. YMMV.

 

BOb

 

 

 

From: Justin Daubenmire [mailto:justin@...]
Sent: Wednesday, October 21, 2009 11:16 AM
To: nant-users@...
Subject: Re: [NAnt-users] printing &Quote; text to a file

 

Thanks Craig that did it!

 

For anyone reading this, here was the syntax that worked:

 

 <property name="connection.string" value="connection string=${'&amp;quot;'}database=foo;uid=foo;pwd=foo;${'&amp;quot;'}"/>


The output was this:

 

&quot;database=foo;uid=foo;pwd=foo;&quot;

 

 

/Justin

 

 

 


From: Craig Beck [mailto:Craig.Beck@...]
Sent: Wednesday, October 21, 2009 10:40 AM
To: Justin Daubenmire
Subject: Re: [NAnt-users] printing &Quote; text to a file

Have you tied "&amp;quot;" yet?

 

Go with the flow. I it wants to translate the entities, then use the entity for the ampersand and let it get translated.

 

 

On Oct 21, 2009, at 7:28 AM, Justin Daubenmire wrote:



Hi,

 

I need to print the actual text "&quote" (minus the quote marks) to a file and not have nant translate that to a " character.

 

I have tried ${'&quot;'} but it still prints the " mark rather than the text &quot;.

 

How can I get this to work?

 

I'm trying to put this escape sequence in a properties file and using this to merge:

 

      <filterchain>
        <expandproperties />
      </filterchain>

 

All merges fine accept the &quote; is translated to " during the process.

 

My property in the property file is like this:

 

<property name="connection.string" value="connection string=${'&quot;'}database=foo;uid=foo;pwd=foo;${'&quot;'}"/>

 

In the new file, I am expecting to see this:

&quot;database=foo;uid=foo;pwd=foo;&quot;

 

but get this...

 

"database=foo;uid=foo;pwd=foo;"

 

 

Thanks!

 

 

/Justin

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
NAnt-users mailing list
NAnt-users@...
https://lists.sourceforge.net/lists/listinfo/nant-users

 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
NAnt-users mailing list
NAnt-users@...
https://lists.sourceforge.net/lists/listinfo/nant-users