XMLParser v2.36
===============
The library is composed by two files: "xmlParser.cpp" and "xmlParser.h".
These are the only 2 files that you need when using the library inside your own projects.
All the functions of the library are documented inside the comments of the file "xmlParser.h".
To use the unicode version of the library, you need to define the "_UNICODE" preprocessor
definition variable (inside your project definition file) (This is done automatically for you
when using Visual Studio).
Some small test examples are also given: see the files "xmlTest.cpp" and "xmlTestUnicode.cpp".
The examples are described inside the html file "xmlParser.html".
To build the examples:
- linux/unix: type "make"
- solaris: type "make -f makefile.solaris"
- windows: Visual Studio: double-click on xmlParser.dsw
(under Visual Studio .NET, the .dsp and .dsw files will be automatically converted to .vcproj and .sln files)
In order to build the examples you need some additional files:
- linux/unix: makefile
- solaris: makefile.solaris
- windows: Visual Studio: *.dsp, xmlParser.dsw and also xmlParser.lib and xmlParser.dll
WINDOWS:
Inside Visual C++, the "debug versions" of the memory allocation functions are
very slow: Do not forget to compile in "release mode" to get maximum speed.
When I have to debug a software that is using the XMLParser Library, it was usually
a nightmare because the library was sooOOOoooo slow in debug mode. To solve this
problem, during all the debugging session, I use a very fast DLL version of the
XMLParser Library (the DLL is compiled in release mode). Using the DLL version of
the XMLParser Library allows me to have lightening XML parsing speed even in debug!
Other than that, the DLL version is useless: In the release version of my tool,
I always use the normal, ".cpp"-based, XMLParser Library.
The file "XMLNodeAutoexp.txt" contains some tweaks that improve substancially
the display of the content of the XMLNode objects inside the Visual Studio
Debugger. Believe me, once you have seen inside the debugger the "smooth" display
of the XMLNode objects, you cannot live without it anymore!
LINUX:
The speed of the debug version of the XMLParser library is tolerable.
Change Log
----------
* V1.00: February 20, 2002: initial version by Martyn C Brown.
* V1.01: February 13, 2005: first bug-free "internet" release.
* V1.02: March 6, 2005: 2 minor changes:
o "parseString" function declaration changed to allow easy parsing from memory buffer
o Minor changes to allow easy compilation under old GCC under QNX
* V1.03: April 2,2005: 3 minors changes:
o When parsing from a user-supplied memory buffer, the library was previously modifying the content of the memory buffer. This is not the case anymore
o Non-unicode Windows version: You can now work with unicode XML files: They are converted to ANSI charset before being processed
o Added Visual Studio 6.0 project files
* V1.04: May 16, 2005: 3 minors changes, 1 bug fix:
o FIX: When creating an xml string with no formatting, the formatting did not work always (due to an un-initialized variable)
o Improved parsing speed (try increasing the constant "memoryIncrease" if you need more speed)
o Minor changes to allow easy compilation under MSYS/MINGW under Windows
o Added more character entities
* V1.05: May 31, 2005: 2 minors changes:
o Changed some "char *" to "const char *"
o Improved robustness against badly formed xml strings
* V1.06: July 11, 2005: 1 change, 1 bug fix:
o FIX: Some character entities were not previously correctly processed.
o Major speed improvement. The library is now at least 10 times faster. (Try increasing the constant "memoryIncrease" if you need more speed)
o moved the log file out of the HTML file
* V1.07: July 25, 2005: 1 change
o Added a pre-compiler directive named "APPROXIMATE_PARSING". See header of xmlParser.cpp for more info.
* V1.08: September 8,2005: 1 bug fix:
o FIX: on special cases, non-matching quotes were causing malfunction
* V1.09: November 22, 2005: 1 addition
o Added some new functions to be able to easily create a XML structure in memory
* V1.10: December 29, 2005: 2 minor change.
o Changed some formatting when rendering a XML tree to a string
o added the STRICT_PARSING option
* V1.11: December 31, 2005: 1 bug fix:
o FIX: reduced memory consumption.
* V1.12: January 4, 2006: 1 addition.
o added the function "removeNodeContent" to delete a subtree
* V1.13: February 25, 2006: 1 addition.
o added a primitive UNICODE support under linux (thanks to Sunny Bains)
* V1.14: April 24, 2006: 1 bug fix:
o FIX: memory allocation errors when the XML tree is created from scratch using "addChild" method.
* V1.15: April 28, 2006: 2 additions
o added some methods to delete attributes,clearTags and textFields from an XMLNode tree.
o added the "addChild(XMLNode x)" method
* V1.16: May 17, 2006: 1 bug fix:
o FIX: memory allocation errors under linux
* V1.17: May 28, 2006: 1 bug fix, 2 additions:
o FIX: character entities not always processed inside text block
o position of the eXMLErrorMissingEndTag error is computed
o added the eXMLErrorUnknownEscapeSequence
* V1.18: June 8, 2006: 1 bug fix, minors changes
o FIX: the 'eXMLErrorFirstTagNotFound' error was not reported.
* V1.19: July 4, 2006: 3 addition.
o added automatic convertion from/to UNICODE/ANSI in linux (this was already done in windows)
o added getChildNodeWithAttribute()
o added support for SOLARIS unicode (Thanks to Joseph Vijay!).
o added support for 32 bit unicode (so that the library works on Redhat Enterprise v4 EMT64).
* V1.20: July 22, 2006: 13 additions.
o added 9 "update" functions (like updateAttribute(LPCTSTR lpszNewValue, LPCTSTR lpszNewName=NULL,LPCTSTR lpszOldName);)
o added 4 functions that allows you to include any binary data (images, sounds,...) into an XML file or string using "Base64 encoding".
* V2.01: July 24, 2006: 1 major change, 2 minor change, 3 additions
o added extended support for strict UTF-8 character encoding (The characters in UTF-8 have different lengths (from 1 byte to 4 bytes)).
Chinese, cyrilic and other extended characters are now processed successfully.
o new character entities: This is now equivalent: 'A' or 'A' or 'A'
(The ascci code of 'A' is 65 in decimal and 0x41 in hexadecimal).
o added a function that try to guess if the encoding is UTF-8.
o the code has been modified in order to allow easy inclusion of new entities and new clearTags (minor change).
o the "updateAttribute" function is now adding a new attribute if the one to update is missing.
(same behavior for "updateText" and "updateClear").
o no more "stringDup" required for functions like "addText", "addAttribute",...
The old behavior is still accessible through functions like "addText_WOSD", "addAttribute_WOSD",...
("_WSOD" stands for "WithOut StringDup").
This change greatly simplifies the user's code (major update).
Unfortunately, old user's code must be updated to work with the new version.
Fortunately, all the user's code used to READ the content of an XML file is left unchanged:
Only the "creation of XML" and the "update of XML" user's code require a little updating work.
* V2.02: July 25, 2006: 1 minor change
o changed the function "createXMLTopNode()" to "createXMLTopNode(LPCTSTR lpszName, int isDeclaration=FALSE);".
* V2.03: July 28, 2006: 1 minor change
o changed LPTSTR to XMLSTR to avoid name-clash with the definitions in <winnt.h>
* V2.04: August 6, 2006: 1 addition
o added one heuristic inside the function "guessUTF8ParsingParameterValue".
* V2.05: August 15, 2006: 1 addition
o now displays the error message inside the method "openFileHelper" in a MessageBox windo
没有合适的资源?快使用搜索试试~ 我知道了~
xmlparser library
共19个文件
dsp:4个
txt:3个
cpp:3个
5星 · 超过95%的资源 需积分: 9 109 下载量 184 浏览量
2008-03-20
16:55:57
上传
评论 1
收藏 91KB ZIP 举报
温馨提示
一个老外用C++写的xml打包和解析的类,很简单,但是功能很强大,并且是跨平台的,我这两年一直在用,强烈建议大家使用!! 这是我目前用过的最好用的xmlparser.就包括两个文件xmlparser.h和xmlparser.cpp 这是2008.03.09的最新版本。
资源推荐
资源详情
资源评论
收起资源包目录
__xmlParser.zip (19个子文件)
xmlParser
XMLNodeAutoexp.txt 7KB
xmlParser.cpp 102KB
PMMLModel.xml 1KB
xmlParser.dll 36KB
xmlParserUnicode.dsp 5KB
xmlTestUnicode.cpp 14KB
xmlParser.dsw 1KB
xmlParser.h 31KB
xmlParser.html 35KB
xmlParser.lib 41KB
xmlParser.dsp 4KB
makefile 2KB
makefile.solaris 1KB
Readme.txt 16KB
xmlParserDLL.dsp 4KB
utf8test.xml 671B
xmlParserTestDLL.dsp 4KB
AFPL-license.txt 12KB
xmlTest.cpp 15KB
共 19 条
- 1
资源评论
- sdwangl2012-12-20这个东西挺好用的,比直接用DOM方便的多。
- scvegetable2013-03-13本想自己写个简单的,嫌麻烦,就下了这个,还是挺好用的,功能也挺强大
两万马力
- 粉丝: 25
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功