打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
列如把listview的ITEM加载进去成XML的函数

列如把listview的ITEM加载进去成XML的函数

时间:2011-5-30来源:yang 作者: peng点击: 48次

列如把listview的ITEM加载进去成XML的函数
function GetxmlNode: string;
var
  nmm_ss: string;
  nmm_inti: Integer;
  nmm_xmldoc: TXMLDocument;
  root: IXMLNode;
  nmm_xmlnode: IXMLNode;
begin
  nmm_xmldoc := TXMLDocument.Create(Self);
  nmm_xmldoc.LoadFromFile(nmg_strpath + ‘UpdateFree.xml‘);
  root := nmm_xmldoc.DocumentElement;
  root := root.ChildNodes.First;
  root.ChildNodes.Clear;
  for nmm_inti := 0 to ListView1.Items.Count - 1 do
  begin
    nmm_xmlnode := root.AddChild(‘file‘);
    nmm_xmlnode.Attributes[‘name‘] := ListView1.Items[nmm_inti].SubItems.Strings[0];
    nmm_xmlnode.Attributes[‘version‘] := ListView1.Items[nmm_inti].SubItems.Strings[1];
    nmm_xmlnode.Attributes[‘dest‘] := ListView1.Items[nmm_inti].SubItems.Strings[2];
    nmm_xmlnode.Attributes[‘time‘] := ListView1.Items[nmm_inti].SubItems.Strings[3];
  end;
  nmm_xmldoc.SaveToFile(nmg_strpath + ‘UpdateFree.xml‘);
  nmm_xmldoc.Free;
end;

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
XML与C#完全版
[转载]JS创建XML
怎样在C#里对xml文件进行修改,新增,删除,插入操作?
用QTP调用外部vbs读写XML的例子
VB.NET中操作xml文件
xml增删改查
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服