问题描述
|
我有一些这样的XML
<case>
<tab tabdescription=\"text here\">
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
</tab>
<tab tabdescription=\"text here\">
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
</tab>
<tab tabdescription=\"text here\">
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
<subtab subtab_description=\"subtab description here\" subttab_text=\"subtab text here\" />
</tab>
<exhibit exhibitdescription=\"exhibit description here\">
<exhibitfilename>FileName.File</exhibitfilename />
</exhibit>
<exhibit exhibitdescription=\"exhibit description here\">
<exhibitfilename>FileName.File</exhibitfilename />
</exhibit>`
<exhibit exhibitdescription=\"exhibit description here\">
<exhibitfilename>FileName.File</exhibitfilename />
</exhibit>
</case>
在我的C#代码中,我有一个tab对象,其中包含tabdescription属性和List<subtab>
对象,并且subtab对象包含subtabdescription属性和subtabtext属性。我也有一个带有ExhibitionDescription和Exhibitfilename属性的Exhibition对象。
我需要填充这些对象,以使完成后我将拥有三个选项卡对象,每个选项卡包含其3个子选项卡对象,并填充了所有适当的字段。我还需要3个展览对象,并在其中填充各自的ExhibitionDescription和Exhibitfilename。
之前,我已经对ling到xml做过一些工作,但是我不必担心以xml的完美树表示形式获取对象,因为通常它们具有id,我可以在列表之后查看列表。事实,并正确分组项目。任何帮助都会很棒。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)