Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Escape { and } characters in config file

From: "Lonifasiko" <mloichate@-----.--->
To: NULL
Date: 7/5/2006 3:18:00 AM

I'm developing a Winforms application that reads some variable values
from a .config file(similar to XML file). Besides, I need to format the
value I read from the config file. I do it this way:

String.Format(ConfigurationManager.AppSettings["Javascript"], "6) //
Want to insert "6" value

I've got this in my .config file:

<add key ="Javascript" value="function GetKey(){key = new
Key('myKey'){0};var i = 'jjj';} " />

First, the encoding of the .config file was set to utf-8, but framework
threw me an error because didn't like single quotes. Then, I changed
the encoding to ISO-8859-1 and single quotes problem was solved. But
another problem has now appeared: don't like both { and } characters.

How can I escape { and } characters? Or maybe a neutral
encoding/escaping method that lets me read all values properly? Is
there any way I can get in my code this "as is":

function GetKey(){key = new Key('myKey')6;var i = 'jjj';}

Please don't know what else I can try........

Thanks very much in advance.



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent