I have it as an XML file, and I would like to write a serializable class for use with XmlSerializer.Deserialize.
Here's the file:
<?xml version="1.0" encoding="UTF-8"?>
<dataroot
xmlns:od="urn:schemas-microsoft-com:officedata"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="AFFEANALLECT.xsd"
generated="2011-02-02T13:27:46">
<AFFEANALLECT>
<NUMEEMPL>4</NUMEEMPL>
<TYPETRAV>SOUD</TYPETRAV>
<CONTRAT>08245</CONTRAT>
<DATE>2008-03-27 14:09:59</DATE>
<STATION>02</STATION>
<HORAIRE>1</HORAIRE>
<ORIGINE>AFFE FIN</ORIGINE>
</AFFEANALLECT>
<AFFEANALLECT>
<NUMEEMPL>4</NUMEEMPL>
<TYPETRAV>SOUD</TYPETRAV>
<CONTRAT>08245</CONTRAT>
<DATE>2008-03-27 08:29:46</DATE>
<STATION>02</STATION>
<HORAIRE>1</HORAIRE>
<ORIGINE>AFFE DEBUT</ORIGINE>
</AFFEANALLECT>
</dataroot>
I did something similar for one AFFEANALLECT:
[Serializable()]
public class AFFEANALLECT
{
public string NUMEEMPL { get; set; }
public string TYPETRAV { get; set; }
public string CONTRAT { get; set; }
public string DATE { get; set; }
public string STATION { get; set; }
public string HORAIRE { get; set; }
public string ORIGINE { get; set; }
}
And it works great. Now the only thing AFFEANALLECT needs to do in some kind of hash array called "dataroot".
Could you point me in the right direction?
source
share