Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: feedback Pin
Colin Angus Mackay17-May-05 5:48
Colin Angus Mackay17-May-05 5:48 
GeneralReading all particular nodes with loop Pin
ksanju100017-May-05 3:23
ksanju100017-May-05 3:23 
GeneralRe: Reading all particular nodes with loop Pin
Marc Clifton17-May-05 3:34
mvaMarc Clifton17-May-05 3:34 
GeneralRe: Reading all particular nodes with loop Pin
mav.northwind17-May-05 3:52
mav.northwind17-May-05 3:52 
GeneralRe: Reading all particular nodes with loop Pin
niansah17-May-05 4:23
niansah17-May-05 4:23 
GeneralC#, LDAP, and Active Directory Pin
slvrscremr17-May-05 3:13
slvrscremr17-May-05 3:13 
GeneralRe: C#, LDAP, and Active Directory Pin
Scott Serl17-May-05 21:23
Scott Serl17-May-05 21:23 
GeneralNeed to Read XML File Pin
Jethro6317-May-05 2:37
Jethro6317-May-05 2:37 
Hi:

I've been told by people in the know, that the accepted way of storing program data (like screen coordinates, directory settings, etc.) in the .NET world is with XML files (as opposed to the registry or old fashioned INI files).

OK, I'll buy that. I have managed to create a simple XML file that writes two program settings, Start Directory and the maximum number of files. I threw in a comment just for the hell of it.

<datalocations startdir="C:\Marks\DataFind\GPS\" maxfiles="100">



What I would like to know is if it will be possible to read and alter this file in a random-access fashion. I was hoping that there would be some analogy to the old INI file approach where you had a key, a subkey, the value and possibly a default value if the key was not found. You could request to read or alter the settings of specific keys without disturbing the others and without having to read through the file sequentially to get to the key you are looking for.

I am just a bit overwhelmed by the number of XML classes. Admittedly, I do not know XML all that well, but I will say that, if I can help it, my file will not get any more complex than the sample I have provided above. There will be additional entries but I see no need for further nesting and "noding".

For now, I just want to be able to quickly read and update the StartDir and MaxFiles fields of the file without having to resort to a sequential read. Can this be done? Could you point me to the class or classes that would be most useful?

Thank you very much in advance,
Jethro
GeneralRe: Need to Read XML File Pin
Robert Rohde17-May-05 3:17
Robert Rohde17-May-05 3:17 
GeneralRe: Need to Read XML File Pin
Jethro6317-May-05 3:21
Jethro6317-May-05 3:21 
GeneralRe: Need to Read XML File Pin
Marc Clifton17-May-05 3:22
mvaMarc Clifton17-May-05 3:22 
GeneralRe: Need to Read XML File Pin
niansah17-May-05 3:45
niansah17-May-05 3:45 
GeneralCsharp plugin for eclipse Pin
17-May-05 1:33
suss17-May-05 1:33 
GeneralRe: Csharp plugin for eclipse Pin
Marc Clifton17-May-05 3:31
mvaMarc Clifton17-May-05 3:31 
GeneralRe: Csharp plugin for eclipse Pin
Anonymous18-May-05 2:28
Anonymous18-May-05 2:28 
GeneralRe: Csharp plugin for eclipse Pin
Marc Clifton18-May-05 2:40
mvaMarc Clifton18-May-05 2:40 
QuestionHow can I start/stop another Network computer SQL Server? Pin
pubududilena17-May-05 1:27
pubududilena17-May-05 1:27 
GeneralComboboxes in DataGrid question Pin
royg7717-May-05 0:48
royg7717-May-05 0:48 
GeneralRe: Comboboxes in DataGrid question Pin
MoustafaS17-May-05 1:20
MoustafaS17-May-05 1:20 
GeneralRe: Comboboxes in DataGrid question Pin
royg7717-May-05 1:25
royg7717-May-05 1:25 
GeneralHELP! (Im just confused) Pin
Anthony Mushrow17-May-05 0:37
professionalAnthony Mushrow17-May-05 0:37 
GeneralRe: HELP! (Im just confused) Pin
MoustafaS17-May-05 0:43
MoustafaS17-May-05 0:43 
GeneralRe: HELP! (Im just confused) Pin
Marc Clifton17-May-05 3:37
mvaMarc Clifton17-May-05 3:37 
GeneralFlickering problem Pin
sbozcan17-May-05 0:14
sbozcan17-May-05 0:14 
GeneralRe: Flickering problem Pin
_darkwalker17-May-05 21:29
_darkwalker17-May-05 21:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.