Код: Выделить всё
1.2
DM/1.2
100
1
0
103
1
4
104
105
107
108
109
110
Код: Выделить всё
[XmlRoot("SyncML", Namespace = "SYNCML:SYNCML1.2")]
public class SyncML
{
[XmlElement]
public SyncHdr SyncHdr { get; set; }
[XmlArray("SyncBody")]
[XmlArrayItem("Status", Type = typeof(StatusCommand))]
[XmlArrayItem("Get", Type = typeof(GetCommand))]
public SyncBody SyncBody { get; set; }
}
public class SyncHdr
{
[XmlElement("VerDTD")]
public string VerDtd { get; set; }
[XmlElement("VerProto")]
public string VerProto { get; set; }
// etc.
}
public class SyncBody : List
{
}
public abstract class SyncCommand : List
{
[XmlElement("CmdID")]
public int CmdId { get; set; }
}
public class StatusCommand : SyncCommand
{
[XmlElement("MsgRef")]
public int MsgRef { get; set; }
[XmlElement("CmdRef")]
public int CmdRef { get; set; }
// etc.
}
public class GetCommand : SyncCommand
{
public List Items { get; set; }
}
public class Item
{
[XmlElement("Target")]
public Location Target { get; set; }
}
public class Location
{
[XmlElement("LocURI")]
public string LocUri { get; set; }
}
Подробнее здесь: https://stackoverflow.com/questions/767 ... d-elements
Мобильная версия