>I've seen many rferences recently to 'Serilaization' in Dot Net and have never come across this concept in VFP.
>
>Anybody care to give an explanation of whet Serialization is and a few examples of how it can be used ?
>
>Regards,
>
>Gerard
Gerard,
Warning:I'm not very good with terminology
Serialize - convert and save a persistent version (conversion might be needed to transform say an object to human readable represantation - not necessarily be human readable).
XML classes are serializable. ie: A dataset is an object (for a moment forget it's also already an xml) with its tables, relations etc. When you serialize it you get something like:
<dataset>
...
</dataset>
Or think of a web service. Web services transfer their data using XML but under the hood you get 'deserialized' version as an object. You cannot directly save an object. To save it first you serialize and it's back an xml representation.
ie: Assuming you use VS.Net and added reference to below web service (LTBJ is my nearest airport's code which I got calling searchByCountry of web service)
{
Weather.GlobalWeather gw = new Weather.GlobalWeather();
Weather.WeatherReport wr = gw.getWeatherReport("LTBJ");
XmlSerializer xs = new XmlSerializer(typeof(Weather.WeatherReport));
TextWriter writer = new StreamWriter("c:\\temp\\weatherreport.xml");
xs.Serialize(writer, wr);
}
you'd see that wr is an object in IDE with some public fields (some of them are arrays).
Cetin