结构体和XML互转

上传者: spotian | 上传时间: 2021-08-31 22:39:12 | 文件大小: 43KB | 文件类型: RAR
1、结构体转XML:定义结构体,调用StructFillXml类的相关函数,可将结构体直接转换成XML字符串,支持嵌套结构体,示例中为4层结构体嵌套; 2、XML转结构体:这个不能直接转化,根据结构体定义,可生成XML转结构体的cs文件,可将生成文件中的类拷贝到你的工程中,调用相应函数,直接将第1步生成的XML字符串逆向转换为定义的结构体。

文件下载

资源详情

[{"title":"( 16 个子文件 43KB ) 结构体和XML互转","children":[{"title":"StructToXmlDemo.suo <span style='color:#111;'> 26.50KB </span>","children":null,"spread":false},{"title":"StructToXmlDemo","children":[{"title":"StructToXmlDemo.csproj <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 10.82KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false}],"spread":true},{"title":"StructFillXml.cs <span style='color:#111;'> 12.09KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"x86","children":[{"title":"Debug","children":[{"title":"ResolveAssemblyReference.cache <span style='color:#111;'> 5.78KB </span>","children":null,"spread":false},{"title":"StructToXmlDemo.csproj.FileListAbsolute.txt <span style='color:#111;'> 643B </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"StructToXmlDemo.pdb <span style='color:#111;'> 23.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 5.75KB </span>","children":null,"spread":false},{"title":"StructToXmlDemo.exe <span style='color:#111;'> 16.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"StructToXmlDemo.vshost.exe <span style='color:#111;'> 11.33KB </span>","children":null,"spread":false},{"title":"StructToXmlDemo.pdb <span style='color:#111;'> 23.50KB </span>","children":null,"spread":false},{"title":"StructToXmlDemo.exe <span style='color:#111;'> 16.50KB </span>","children":null,"spread":false},{"title":"typTRSubItemQC.cs <span style='color:#111;'> 6.42KB </span>","children":null,"spread":false},{"title":"StructToXmlDemo.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"StructToXmlDemo.sln <span style='color:#111;'> 887B </span>","children":null,"spread":false}],"spread":true}]

评论信息

  • wdechuangxinshiyan :
    可以使用,多谢分享
    2018-12-23
  • caofengtao1314 :
    谢谢,有参考价值
    2018-03-21
  • skysea1009 :
    测试一下,看看好不好
    2017-05-15
  • tongkanlun :
    可以使用,多谢分享
    2017-01-07
  • c471961491 :
    谢谢,有参考价值
    2016-07-15

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明