Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XML string [Thread Next] Re: XML stringTo: NULL Date: 5/3/2007 4:44:00 PM
thanks for the reply,
XmlDocument doc = new XmlDocument();
doc.Load(XMLfileName);
string xpath = "//CustomeSettings/ConnectionString/myCon";
XmlNode xn = doc.SelectSingleNode(xpath);
Properties.Settings.Default.DatagridTestConnectionString = xn.InnerText;
-----XML file against which i am testing-----
<CustomeSettings>
<ConnectionString>
<myCon>
<ConnectionName>"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\db\DatagridTest.mdb"</ConnectionName>
</myCon>
<myCon>
<ConnectionName>Inr</ConnectionName>
</myCon>
</ConnectionString>
<CADTemplateFiles>
</CADTemplateFiles>
<ExcelTemplateFiles>
</ExcelTemplateFiles>
</CustomeSettings>
"Martin Honnen" <mahotrash@y...> wrote in message
news:OLyQBTZjHHA.4188@T......
> Irfan wrote:
>
>> I retreve some text using XmlNode.InnerText but it always comes attached
>> with "\" before and after the text that i retrieve.
>> ("\MyText\"")
>> Is it possible to get rid of it.
>>
>> If I print it in output screen the value is OK ( just a normal single
>> quote "MyText"), but when i save value in the Settings file,
>> it retians these quotes.
>
> Can you show us exactly how you save InnerText in a settings file? I am
> pretty sure that the XML API with InnerText does not put any escaped
> quotes around the text so it is more likely that they are added later or
> that you just see them in the IDE.
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
