Link to home
Start Free TrialLog in
Avatar of JAMES
JAMES

asked on

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.
Avatar of 2266180
2266180
Flag of United States of America image

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
Avatar of JAMES
JAMES

ASKER

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!
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
Avatar of JAMES

ASKER

Hi,

The first article does not specify saving any data.

The second I am looking in to.

Thanks.
Avatar of JAMES

ASKER

..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.
ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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)