|
-
Jun 21st, 2006, 11:08 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2.0] How to read tag from xmldocument?? SelectSingleNode method ??
I am reading connection string from config.xml file in the project.
The content of the config.xml file is as follows:
<settings>
<Connection>"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\IntradayPricing.mdb;User Id=admin;Password=;"</Connection>
</settings>
And I am reading the <Connection> tag in the code using:
string sConnectionstring = _config.SelectSingleNode("//Connection").InnerText;
where _config is an XMLDocument object and has the config.xml file in its memory.
when I see the value of sConnectionstring variable, I have the following content :
"\"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\IntradayPricing.mdb;User Id=admin;Password=;\""
for some reason the SelectSingNode method is padding an extra \ where ever there is a " character and because of this I am not able to connect to the data base.
How to read a tag from an xmldoc ?
thanks
nath
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|