SimpleXML.pas is a library for XML parsing and converting to XML objects hierarchy and vice versa. This is a revised version of SimpleXML.pas introduced by Michael Vlasov in 2003. It is one of the smallest and fastest XML librarys availably for Delphi. The new version is not fully compatible to the old one, mainly because now the character conversion is done internal and not outside the library, as it was before. The format of the binary dump is changed, too.
Why using SimpleXML.pas?
========================
- small footprint
- faster as MSXML and several other libraries
- internal character conversion
- compatible with Unicode Delphi (2009)
Limits of SimpleXML.pas
=======================
- no UTF-16/32-File support
- only a limited number of character set are supported:
UTF-8, WINDOWS-1250..WINDOWS-1258, ISO-8859-1..ISO-8859-9
- No support for UFT8-Codes exceed 3 Bytes (Unicode Basic Multilingual Plane only)
Introduction for using SimpleXML.pas
====================================
LoadXmlDocument
create a new Instance of IXmlDocument. Now you are ready to use the XML data.
SelectSingleNode
Return a IXmlNode object or nil if the specified can not found. You can indicate a complete path.
Examble: XmlNode := XMLDoc.SelectSingleNode('data\fields')
SelectNodes
Resturn a list of nodes with specified name.
Examble: XmlNodeList := XMLDoc.SelectNodes('data\fields\field');
(Get all child nodes of the node "fields" with the name "field")
IXmlNode.Text
Get and set text(s) of the node. Text is saved as separate child node. This preserve the
position of the text in the XML tree.
IXmlNode.NodeName
Return the name of the node
IXmlNode.AppendElement()
Append a new child node to the current node
IXmlNode.NeedAttr()
Return Attribut string of an attribut with specified name or AttrNameID (see below).
IXmlNode.AttrNames[Index]
Return Attribut name for given index.
IXmlNode.AttrNameIDs[Index]
Return special "magic" number to identify a attribut in a fast way. This number is
valid as long the same name table is used.
IXmlDocument.Save()
Save the XML document to a file or stream.
Performance Hint
================
If you have to load/create very large XML-Files with many different names, you should create your own name table.
Example for 3.000.000 Nodes:
XMLDoc := CreateXmlDocument('', '', '', CreateNameTable(2029));
Try different table sizes to get the best compromise between speed and memory requirements. You can not benefit from the greater name table, if your XML-file have a lot of nodes/attributs with the same name.
没有合适的资源?快使用搜索试试~ 我知道了~
SimpleXML D6-D2010 改正版 Delphi下XML解析组件源代码
共15个文件
pas:2个
dcu:2个
txt:2个
4星 · 超过85%的资源 需积分: 10 55 下载量 113 浏览量
2010-10-28
22:55:04
上传
评论
收藏 470KB RAR 举报
温馨提示
SimpleXML D6-D2010 改正版 SimpleXML 一个可以解析 XML 文件的单元,之前在盒子发布的原版。 后来在用的过程中发现一 Bug,现在已改正。 主要为保存 XML 的时候,节点值太大时保存不正确, L > P < 2p 修改方法:TXmlSaver.SaveToBuffer。
资源推荐
资源详情
资源评论
收起资源包目录
haoxoingdi_SimpleXML D6-D2010 改正版.rar (15个子文件)
license.txt 1KB
XMLDemo.identcache 307B
XMLDemo.dproj.local 62B
UXMLDemo.dfm 3KB
SimpleXML.pas 154KB
UXMLDemo.dcu 11KB
XMLDemo.dproj 4KB
XMLDemo.exe 1001KB
SimpleXML.dcu 167KB
SimpleXML_Cyrillic.inc 2KB
XMLDemo.res 2KB
XMLDemo.dpr 430B
UXMLDemo.pas 4KB
readme.txt 3KB
未命名.JPG 30KB
共 15 条
- 1
资源评论
- xnekin2018-05-24文件里面的中文都是乱码要怎么调?
- mosane12012-12-20比Delphi自带的XML简洁方便。
cntlis
- 粉丝: 5
- 资源: 70
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 题目源码2024年强网杯全国网络安全挑战赛 PWN题目baby-heap源码
- 题目源码2024年强网杯全国网络安全挑战赛 PWN题目expect-number源码
- 省份劳动率最终.dta
- 题目源码2024年强网杯全国网络安全挑战赛 PWN题目prpr源码
- Rust Trait 静态派发与动态派发示例
- 拼多多官方_main_main_baidu_sem_dz1_ARM64.apk
- 小米机型小米助手界面检测当前机型 包括 Android 版本、MIUI 版本和固件详细信息
- share6620081042528496742.jpg
- 21英语210405010143罗杰_周霜红 文献综述.doc
- share6329583338574047795.jpg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功