Class structure for deserializing

I have the following xml file

< xml version="1.0" encoding="utf-8" >
- <ArrayOfContextTallies xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <ContextTallies FirstSession="2006-08-01T16:06:13.5802194Z" MostRecentSession="2006-08-01T16:07:12.9243492Z" SessionCount="2" AbendCount="0" ElapsedSeconds="21.797014499999996">
<Context AppID="e55d4515-b600-4e0c-8a63-ea9c4069537f" Hash1="yj0qcDWupsMkCCG1zI8Q!WjnRSs" Hash2="REE2cXvXeB67RYhmplgbGgyAhwo" />
- <Items>
<Tally What="TestApp.exe.TestApp Form1.button1_Click" Count="1" />
<Tally What="TestApp.exe.TestApp Form1.button2_Click" Count="1" />
<Tally What="TestApp.exe.TestApp Form2.button1_Click" Count="1" />
</Items>
</ContextTallies>
</ArrayOfContextTallies>
I am trying to deserialize it for analysis I have the following class structure but it's not working what do I need to change

public class Tallies

{

private string mContext_AppID;

private string mHash1;

private string mHash2;

private DateTime mFirstSession;

private DateTime mMostRecentSession;

private int mSessionCount;

private int mAbendCount;

private double mElapsedSeconds;

private string mWhat;

public string ContextAppID { get { return mContext_AppID; } set { mContext_AppID = value; } }

public string Hash1 { get { return mHash1; } set { mHash1 = value; } }

public string Hash2 { get { return mHash2; } set { mHash2 = value; } }

public DateTime FirstSession { get { return mFirstSession; } set { mFirstSession = value; } }

public DateTime MostRecentSession { get { return mMostRecentSession; } set { mMostRecentSession = value; } }

public int SessionCount { get { return mSessionCount; } set { mSessionCount = value; } }

public int AbendCount { get { return mAbendCount; } set { mAbendCount = value; } }

public double ElapsedSeconds { get { return mElapsedSeconds; } set { mElapsedSeconds = value; } }

public string What { get { return mWhat; } set { mWhat = value; } }

public Tallies() { }

}

Thanks in advance.



Answer this question

Class structure for deserializing

  • http200

    If there is another form I can goto to get this figured out that would be helpful. Or if there is another way of going about getting at the information that would also be helpful. I have not done much with XML so any help here would be appreciated.

    Thanks,

    Matt


  • Class structure for deserializing