Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML - Saving/Reading/Writing Settings for a Windows Form

Status
Not open for further replies.

ChasBoots

MIS
Jul 23, 2002
24
US
I currently have a Windows form that has hardcoded some information that includes server FQDN's. For obvious reasons, I want to make this configurable within the app itself.

I assume I want to embed the following information into an XML file:

Code:
[u]Farm[/u]   [u]Server[/u]
Farm1  Server1
Farm2  Server2
  .       .
  .       .
  .       .
FarmX  ServerX


My first concern is to read the contents of this file so that I can use the FarmX/ServerX combination to take appropriate action.

Secondarily, I want to be able to add additional Farm/Server combinations and edit existing pairs as needed.

I have gotten thoroughly confused trying to research how to do this. I guess it's one of the pitfalls of learning on the fly. Nevertheless, I have faith that someone will point me in the right direction.

Thanks...
 
You might want to try a dataset/datagrid and the readxml method.

This is the easiest way to read and write xml in Windows.

I hope this helps.

Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.
 
Finding out how to accomplish what I wanted using a dataset was difficult. However, your suggestion of using the readxml method was a big help and got me what I wanted. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top