请教一个问题啊:
这种格式的XML可不可能过一个类序列化出来?
怎么设计列,有没有关键代码?
<a>
<b b0="0" b1="1"/>
<c id="0" name="0"/>
<c id="1" name="1"/>
<c id="2" name="2"/>
</a>
这种格式的XML可不可能过一个类序列化出来?
怎么设计列,有没有关键代码?
<a>
<b b0="0" b1="1"/>
<c id="0" name="0"/>
<c id="1" name="1"/>
<c id="2" name="2"/>
</a>
一个model,存数据,一个write,一个reader.就搞定了。
{
public class_b b{get;set;}
public list<class_c> itemsOf_c{get;set;}
}public class class_b
{
public string b0{get;set;}
public string b1{get;set;}
}public class class_c
{
public string id{get;set;}
public string name{get;set;}
}
<b></b>
<cs>
<c></c>
<c></c>
</cs>
</a>