NativeXml v4.07(含全部源码)

上传者: pjdelphi | 上传时间: 2021-07-23 10:46:16 | 文件大小: 874KB | 文件类型: ZIP
强大的XML组件,可以将对象直接存入XML文件,非常实用,而且开源! 很不错,推荐大家使用! 原来一直使用Delphi自带的TXMLDocument类来进行XML文件的读写,虽然麻烦了一点,但功能上来说还不错。只是有一个地方让我实在不舒服 - 每次创建TXMLDocument类实例的时候必须传入TComponent对象,这就意味着,如果我把对XML文件的读写封装到一个类里面,那么在创建这个自定义类的时候就必须也传入TComponent对象。 我尝试过很多方法,但是都无法避免,最后试着上网找了找,于是就找到了NativeXML这个库。 下载之后马上打开Demo看了看,cool,创建TNativeXML的时候只需要传入xml文件路径就可以,再往下看就让我开始惊喜了。它已经把大多数操作都封装好了,而且还具有把任意对象序列化的能力。 比如,你能把整个Form通过 TsdXmlObjectWriter = class(TPersistent) 类存入一个XML文件,下次再读取。这样使得远程传输对象变得很简单了。 下面就是一个使用NativeXML库的例子: 目标XML结构: 2000-01-01 delphi 代码: procedure WriteTest; var xml : TNativeXML; n_bs : TXMLNode; begin //建立根节点 xml := TNativeXml.CreateName('bookshift'); xml.EncodingString := 'GB2312'; //输出风格为易读 xml.XmlFormat := xfReadable; //建立Book节点 n_bs := xml.Root.NodeNew('book'); //写入Book节点的属性 n_bs.WriteAttribuiteString('author','test_author'); //建立Book节点下属date节点并写入值 n_bs.WriteString('date','2000-01-01'); xml.SaveToFile('test.xml'); end; 打开test.xml文件看看吧,和上面的格式一摸一样。 很简单吧,我用这个库重写了原来的XML访问类,大约节省了40%的代码量。

文件下载

资源详情

[{"title":"( 47 个子文件 874KB ) NativeXml v4.07(含全部源码)","children":[{"title":"NativeXml407","children":[{"title":"LICENSE.txt <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"nativexml","children":[{"title":"demos","children":[{"title":"objecttoxml","children":[{"title":"form.xml <span style='color:#111;'> 138.45KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 2.92KB </span>","children":null,"spread":false},{"title":"ObjectToXmlMain.dfm <span style='color:#111;'> 201.48KB </span>","children":null,"spread":false},{"title":"ObjectToXmlMain.pas <span style='color:#111;'> 8.87KB </span>","children":null,"spread":false},{"title":"ObjectToXml.dpr <span style='color:#111;'> 315B </span>","children":null,"spread":false}],"spread":true},{"title":"linq","children":[{"title":"linq.dpr <span style='color:#111;'> 221B </span>","children":null,"spread":false},{"title":"main.pas <span style='color:#111;'> 4.12KB </span>","children":null,"spread":false},{"title":"main.dfm <span style='color:#111;'> 346B </span>","children":null,"spread":false}],"spread":true},{"title":"xmltest","children":[{"title":"xmltest.cfg <span style='color:#111;'> 740B </span>","children":null,"spread":false},{"title":"xmltestmain.dfm <span style='color:#111;'> 4.82KB </span>","children":null,"spread":false},{"title":"xmltest.dpr <span style='color:#111;'> 747B </span>","children":null,"spread":false},{"title":"xmltestmain.pas <span style='color:#111;'> 35.38KB </span>","children":null,"spread":false},{"title":"xmltest.res <span style='color:#111;'> 876B </span>","children":null,"spread":false},{"title":"xmltest.dof <span style='color:#111;'> 3.31KB </span>","children":null,"spread":false},{"title":"exe","children":[{"title":"test_hardworking.xml <span style='color:#111;'> 167B </span>","children":null,"spread":false},{"title":"test_flavien.xml <span style='color:#111;'> 196B </span>","children":null,"spread":false},{"title":"sample.xml <span style='color:#111;'> 369B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"xmleditorXE","children":[{"title":"XmlEditor.cfg <span style='color:#111;'> 744B </span>","children":null,"spread":false},{"title":"sdXmlOutputOptionsDlg.dfm <span style='color:#111;'> 2.13KB </span>","children":null,"spread":false},{"title":"XmlEditor.dof <span style='color:#111;'> 2.73KB </span>","children":null,"spread":false},{"title":"XmlEditor.dpr <span style='color:#111;'> 742B </span>","children":null,"spread":false},{"title":"sdXmlOutputOptionsDlg.pas <span style='color:#111;'> 658B </span>","children":null,"spread":false},{"title":"XmlEditorMain.dfm <span style='color:#111;'> 74.04KB </span>","children":null,"spread":false},{"title":"exe","children":null,"spread":false},{"title":"XmlEditor.dproj <span style='color:#111;'> 6.02KB </span>","children":null,"spread":false},{"title":"XmlEditorMain.pas <span style='color:#111;'> 28.49KB </span>","children":null,"spread":false},{"title":"dcu","children":null,"spread":false}],"spread":true},{"title":"xml_test_files","children":[{"title":"comments.xml <span style='color:#111;'> 285B </span>","children":null,"spread":false},{"title":"CDATA_section.xml <span style='color:#111;'> 1.40KB </span>","children":null,"spread":false},{"title":"basic_unicode.xml <span style='color:#111;'> 332B </span>","children":null,"spread":false},{"title":"sample_with_entity_references.svg <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"basic.xml <span style='color:#111;'> 147B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"NativeXml.pas <span style='color:#111;'> 307.32KB </span>","children":null,"spread":false},{"title":"NativeXmlObjectStorage.pas <span style='color:#111;'> 43.23KB </span>","children":null,"spread":false},{"title":"simdesign.inc <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false},{"title":"NativeXmlWin32Compat.pas <span style='color:#111;'> 16.70KB </span>","children":null,"spread":false},{"title":"NativeXmlOld.pas <span style='color:#111;'> 205.37KB </span>","children":null,"spread":false}],"spread":true},{"title":"extlib","children":[{"title":"eldos_aes","children":[{"title":"ElAES.pas <span style='color:#111;'> 136.28KB </span>","children":null,"spread":false},{"title":"ElAES.txt <span style='color:#111;'> 5.24KB </span>","children":null,"spread":false},{"title":"readme.txt <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"issues.txt <span style='color:#111;'> 2.99KB </span>","children":null,"spread":false},{"title":"docu","children":[{"title":"NativeXml.zip <span style='color:#111;'> 603.10KB </span>","children":null,"spread":false}],"spread":true},{"title":"general","children":[{"title":"sdStreams.pas <span style='color:#111;'> 7.58KB </span>","children":null,"spread":false},{"title":"sdDebug.pas <span style='color:#111;'> 5.41KB </span>","children":null,"spread":false},{"title":"sdStringTable.pas <span style='color:#111;'> 19.03KB </span>","children":null,"spread":false},{"title":"sdSortedLists.pas <span style='color:#111;'> 25.28KB </span>","children":null,"spread":false}],"spread":true},{"title":"readme.txt <span style='color:#111;'> 8.29KB </span>","children":null,"spread":false},{"title":"versions.txt <span style='color:#111;'> 13.36KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • oxiazong :
    :非常感谢,确实好用,顶楼主
    2019-01-30
  • nerdsu :
    谁用谁知道
    2018-11-28
  • terry811120 :
    不好用,demo都不能编译成功
    2017-10-09
  • wcaijbb :
    这个组件的官网有么
    2017-10-01
  • moyuehuanhun :
    确实是我想要的东西
    2017-08-10

免责申明

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