| | |
File Path in XML
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Aug 2007
Posts: 78
Reputation:
Solved Threads: 0
Hi all,
I'm creating a progam in C# that reads a file location at start up and displays the parent folders in a combo box. This file location may change in future. So I intend to keep this in an xml file and allow the user to change it when needed. But how do I go about it? I have not done any coding with xml yet. So, please help.
Thanks
I'm creating a progam in C# that reads a file location at start up and displays the parent folders in a combo box. This file location may change in future. So I intend to keep this in an xml file and allow the user to change it when needed. But how do I go about it? I have not done any coding with xml yet. So, please help.
Thanks
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
here's a simple example, probably overkill for what you need
http://www.c-sharpcorner.com/UploadF...tMellli21.aspx
http://www.c-sharpcorner.com/UploadF...tMellli21.aspx
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
•
•
Hi all,
I'm creating a progam in C# that reads a file location at start up and displays the parent folders in a combo box. This file location may change in future. So I intend to keep this in an xml file and allow the user to change it when needed. But how do I go about it? I have not done any coding with xml yet. So, please help.
Thanks
C# Syntax (Toggle Plain Text)
using System.Xml; ... XmlDocument xd = new XmlDocument(); xd.Load ("myconfig.xml"); ...
•
•
Join Date: Aug 2007
Posts: 78
Reputation:
Solved Threads: 0
•
•
•
•
is that the debug value, or the displayed if you print it out value?
DirectoryInfo di =new DirectoryInfo(path);
is "\"C:\\\\Test\" and when it's @"C:\Test", it returns "@\"C:\\Test\""
The error is 'Illegal characters in path.'
Thanks
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
Without seeing the code for that the fact it says "@\"C:\\Test\"" for example, implies its encoding the whole @"C:\Test" as the filename, which is correct. " marks etc arent a valid file name, while c:\test can be.
If you're entering the path in a text box, dont enter the @ or " marks
If you're entering the path in a text box, dont enter the @ or " marks
Last edited by LizR; Jan 12th, 2009 at 8:47 am.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
![]() |
Similar Threads
- Search and replace multiple file (Python)
- Convert an XML file into a Binary Format File (C#)
- read xml file and display to many text box (C#)
- Open In New Window Php (PHP)
- Searching and Comparing strings from an XML Document (Python)
- compare 2 xml files with csharp (C#)
- XHTML Complient parser? (HTML and CSS)
Other Threads in the C# Forum
- Previous Thread: Speed up FTP
- Next Thread: A collection of TabPages without the tabsection
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox control conversion csharp custom data database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file finalyearproject form format forms function gdi+ getoutlookcontactusinfcsvfile globalization httpwebrequest image index input install installer java label list listbox mandelbrot math mono mouseclick mysql operator panel path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox serialization server silverlight sleep socket sql sql-server statistics stream string table text textbox thread time timer timespan update upload usercontrol users validate validation visualstudio webbrowser windows winforms wpf xml






