これが私が受け取る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に何か問題があるのを誰かが見ることができますか?