XML Serialization is what I’m looking for.
http://msdn.microsoft.com/library/?url=/library/en-us/cpguide/html/cpcon
serialization.asp
Thanks to all who’ve respond.
_____
From: PH [mailto:
[email protected]]
Posted At: Thursday, March 09, 2006 4:28 PM
Posted To: microsoft.public.dotnet.languages.csharp
Conversation: Reads XML node from App.Config and populates a Class
Subject: Re: Reads XML node from App.Config and populates a Class
Ok I might use that.
Thanks Igancio.
_____
From: Ignacio Machin ( .NET/ C# MVP ) [mailto:ignacio.machin AT
dot.state.fl.us]
Posted At: Thursday, March 09, 2006 4:05 PM
Posted To: microsoft.public.dotnet.languages.csharp
Conversation: Reads XML node from App.Config and populates a Class
Subject: Re: Reads XML node from App.Config and populates a Class
Hi,
What about a typed dataset?
If not you would have to create the method to populate the collection of
Customers , there is nothing in the framework to do that for you.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
You’re right.
It will be a XML file.
Now, I want to populate a Class instead of a Dataset.
Thanks
_____
From: Ignacio Machin ( .NET/ C# MVP ) [mailto:ignacio.machin AT
dot.state.fl.us]
Posted At: Thursday, March 09, 2006 1:17 PM
Posted To: microsoft.public.dotnet.languages.csharp
Conversation: Reads XML node from App.Config and populates a Class
Subject: Re: Reads XML node from App.Config and populates a Class
Hi,
Why you use app.config?
This file should content only the needed configuration for your app, no
data.
You can keep your data in a XML file that can be readed direcly in a
dataset.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Hi guys;
I got the following problem to solve, hope you can help me.
I got a XML node in App.Conf;
<CUSTOMERS>
<CUSTOMER>
<NAME =”Frank” />
<LASTNAME =”Smith”/>
<AGE= 34 />
</CUSTOMER>
<CUSTOMER>
<NAME =”Lisa” />
<LASTNAME =”Tucker”/>
<AGE= 42 />
</CUSTOMER>
<CUSTOMERS/>
I will like to populate a class called Customers that has the same
structure than the XML node Customers, with all the Customer nodes.
Is there any automated way to do this in the framework?
Thanks very much