如何设置我的类以反序列化以下混合内容 xml?
<employee>
<name>John Doe</name>
<remark>He is a <match>tall</match> and handsome man</remark>
</employee>
如何设置我的类以反序列化以下混合内容 xml?
<employee>
<name>John Doe</name>
<remark>He is a <match>tall</match> and handsome man</remark>
</employee>
这应该这样做。
[System.Xml.Serialization.XmlElementAttribute("match")]
public match[] match {
get {
return this._match;
}
设置 {
this._match = 值;
}
}
///
[System.Xml.Serialization.XmlTextAttribute()]
public string[] Text {
get {
return this.textField;
}
设置 {
this.textField = 值;
}
}