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.
cntlis
- 粉丝: 5
- 资源: 70
最新资源
- Git操作图解(带VS2022集成Git工具)
- Android Studio Ladybug(android-studio-2024.2.1.12-mac-arm.zip.001)
- IKBC机械键盘固件.tar
- python源码教程,超级详细,附开发教程手册,python前端开发,入门级教程,第二章
- TCR+FC型svc无功补偿simulink仿真模型,一共两个仿真,如下图所示,两个其实大致内容差不多,只是封装不同,有详细资料,资料中有相关lunwen,有背景原理和分析,有使用说明,有建模仿真总结
- 蜘蛛分拣机器人工作站工程图机械结构设计图纸和其它技术资料和技术方案非常好100%好用.zip
- 字符串批处理工具(源程序+代码)
- PSAT( Power System Analysis Toolbox)最新说明书.zip
- HTML+JS获取地理位置(经纬度)
- 基于simulink的车辆坡度与质量识别模型,扩展卡尔曼滤波,估计曲线与实际误差合理
- HTML+JS教程-实现图片页面内拖拽、拖放
- python源码教程,超级详细,附开发教程手册,python前端开发,入门学习第三章
- 神经网络基本概念及其在人工智能领域的应用概述
- EEMD算法应用于信号去噪.zip
- 使用comsol仿真软件 利用双温方程模拟飞秒激光二维移动烧蚀材料 可看观察温度与应力分布 周期为10us,变形几何部分本人还在完善学习中 三维的也有 还有翻阅的lunwen文献一起打包
- Android Studio Ladybug(android-studio-2024.2.1.12-windows-exe.zip.002)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈