这是我收到的 xml。
<ussd PDU="CTRL" MSISDN="*" STRING="2012/05/06 04:27:06 PM" TID="0" REQID="0" ENCODING="ASCII" TARIFF="*" STATUS="0"><cookie/></ussd>
这是我的班级结构:
[Serializable]
[XmlRoot(ElementName = "ussd", Namespace = "")]
public class ussd
{
[XmlAttribute(AttributeName = "PDU")]
public string PDU = string.Empty;
[XmlAttribute(AttributeName = "MSISDN")]
public string MSISDN = string.Empty;
[XmlAttribute(AttributeName = "STRING")]
public string STRING = string.Empty;
[XmlAttribute(AttributeName = "TID")]
public string TID = string.Empty;
[XmlAttribute(AttributeName = "REQID")]
public string REQID = string.Empty;
[XmlAttribute(AttributeName = "ENCODING")]
public string ENCODING = string.Empty;
[XmlAttribute(AttributeName = "TARIFF")]
public string TARIFF = string.Empty;
[XmlAttribute(AttributeName = "STATUS")]
public string STATUS = string.Empty;
}
为什么这个xml不能序列化到这个类中?任何人都可以看到我看不到的 xml 有什么问题吗?