Hello All ,
I have The Following Structure
public class GraphData
{
private List<RecordPerDay> recordPerDay;
public List<RecordPerDay> RecordPerDay
{
get { return recordPerDay; }
set { recordPerDay = value; }
}
}
public class RecordPerDay
{
private string date;
private List<Entry> entry;
[XmlAttribute]
public string Date
{
get { return date; }
set { date = value; }
}
public List<Entry> Entry
{
get { return entry; }
set { entry = value; }
}
}
The Previous code Generate The following XML
<GraphData>
<RecordPerDay>
<RecordPerDay Date="9/29/2010">
<Entry>
<Entry From="08:46:07" To="20:47:06" TypeId="1" />
<Entry From="08:52:21" To="08:53:17" TypeId="1" />
<Entry From="09:00:00" To="14:00:00" TypeId="1" />
</Entry>
</RecordPerDay>
<RecordPerDay Date="9/30/2010">
<Entry>
<Entry From="08:46:07" To="20:47:06" TypeId="1" />
<Entry From="08:52:21" To="08:53:17" TypeId="1" />
</Entry>
</RecordPerDay>
</RecordPerDay>
</GraphData>
but I need it to be in the following format
<GraphData>
<RecordPerDay Date="9/29/2010">
<Entry From="08:46:07" To="20:47:06" TypeId="1" />
<Entry From="08:52:21" To="08:53:17" TypeId="1" />
<Entry From="09:00:00" To="14:00:00" TypeId="1" />
</RecordPerDay>
<RecordPerDay Date="9/30/2010">
<Entry From="08:46:07" To="20:47:06" TypeId="1" />
<Entry From="08:52:21" To="08:53:17" TypeId="1" />
</RecordPerDay>
</GraphData>
Please Help me as soon as possible
Thanks in Advance