Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

Third party XML/Config controls

Hi,

Does anyone know of any simple third-party controls that are either free/cost that handle xml reading and writing.  In particular I am interested in ones that can simply handle storing application config data such as selections from a tree control.

I have been faffing with app.config but now would like just to buy something that hides all the hard work!

Many thanks.

James.
0
JAMES
Asked:
JAMES
  • 4
  • 3
1 Solution
 
2266180Commented:
maybe the best solution for you in this case is to use serialization: you define a class that stores your data, and using serialization you save/load it. if you think you cannot do that class yourself, I'll do it in about 4 hours when I get home.
here are some pointers on how to to it:
http://support.microsoft.com/default.aspx?scid=kb;en-us;815813
http://www.dotnetjohn.com/articles.aspx?articleid=173
0
 
JAMESAuthor Commented:
Thanks ciuly,

I could plod through and do it - I just wanted a more efficient use of my time solution to something that is annoying long winded - ie buy it!
0
 
2266180Commented:
well, I don't know about such components because I always tend to either do it myself, or find something (free) that I can use.

I did a small search. is this what you are looking for?
http://www.codeproject.com/csharp/app_config.asp

also found a small example of what I was suggesting: http://www.cambiaresearch.com/cambia3/snippets/csharp/xml/XmlSimpleSerialization.aspx
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
JAMESAuthor Commented:
Hi,

The first article does not specify saving any data.

The second I am looking in to.

Thanks.
0
 
JAMESAuthor Commented:
..and the second example link shows a set amount of variables being saved.

I need to be able to save an unknown (at the time of development) amount.  In one case the layout might look like this - example data :-

Gender : Male
    Name: James
    Name: Pete
    Name: Mike
Gender : Female
    Name: Michelle

This type of data would be taken from my tree view.
0
 
2266180Commented:
well .. then you have no alternative but to write a small utility that saves and loads the classes using serialization. most of the examples out there are on known configuration. for unknown configuration, you will need to write something generic that can fit nicely in your app. serialization is a good alternative for this.
0
 
2266180Commented:
anotehr thing would be to use reflecation and get all properties and save them using a standard xml schema (like a property_name/property_value something). but for this one you will have to somehow know what properties you do not want to be saved (I figure this is possible, but if you are carefull and only use data classes, then you can skip)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now