xmlParser

所属分类:中间件编程
开发工具:C/C++
文件大小:560KB
下载次数:72
上传日期:2010-01-27 18:37:13
上 传 者yysober
说明:  xml解析程序,有例子程序。非常好用,linux,windows移植简单
(prase xml。)

文件列表:
utf8test.xml (671, 2008-03-15)
XMLNodeAutoexp.txt (6740, 2008-06-02)
xmlParser.cpp (107539, 2008-09-11)
xmlParser.dll (37888, 2008-09-11)
xmlParser.dsp (4470, 2008-03-15)
xmlParser.dsw (1154, 2008-03-15)
xmlParser.h (42981, 2008-08-20)
xmlParser.html (35806, 2008-08-09)
xmlParser.lib (43350, 2008-09-11)
xmlParser.ncb (82944, 2009-12-30)
xmlParser.opt (70144, 2009-12-30)
xmlParser.plg (1351, 2009-12-30)
xmlParserDLL.dsp (4544, 2008-03-15)
xmlParserTestDLL.dsp (4594, 2008-03-15)
xmlParserUnicode.dsp (4610, 2008-03-15)
xmlTest.cpp (16322, 2008-08-09)
xmlTestUnicode.cpp (15156, 2008-08-09)
Debug\vc60.idb (82944, 2009-12-30)
Debug\vc60.pdb (69632, 2009-12-30)
Debug\xmlParser.exe (274491, 2009-12-30)
Debug\xmlParser.ilk (284308, 2009-12-30)
Debug\xmlParser.obj (169962, 2009-12-30)
Debug\xmlParser.pch (304728, 2009-12-30)
Debug\xmlParser.pdb (500736, 2009-12-30)
Debug\xmlTest.obj (34933, 2009-12-30)
Debug (0, 2009-12-30)
Doc\html\annotated.html (2805, 2008-08-19)
Doc\html\doxygen.css (9096, 2008-08-19)
Doc\html\doxygen.png (1281, 2008-08-19)
Doc\html\files.html (1466, 2008-08-19)
Doc\html\functions.html (14728, 2008-08-19)
Doc\html\functions_enum.html (1857, 2008-08-19)
Doc\html\functions_eval.html (2750, 2008-08-19)
Doc\html\functions_func.html (11845, 2008-08-19)
Doc\html\functions_type.html (1853, 2008-08-19)
Doc\html\functions_vars.html (3462, 2008-08-19)
Doc\html\globals.html (8294, 2008-08-19)
Doc\html\globals_defs.html (2423, 2008-08-19)
Doc\html\globals_enum.html (1925, 2008-08-19)
Doc\html\globals_eval.html (5615, 2008-08-19)
... ...

XMLParser v2.39 =============== 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". These comments can be transformed in full-fledged HTML documentation using the DOXYGEN software: simply type: "doxygen doxy.cfg" For more documentation, please refer either to the file "xmlParser.h" or "Doc/html/index.html". 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 EMT***). * 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 "Base*** 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 * 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 window (WIN32 only). * V2.06: August 16, 2006: 2 additions o added the method XMLNode::writeToFile to make it easier to write the content of an XMLNode to a file. o added support for Byte-order marks (or BOM). * V2.07: August 22, 2006: 1 additions o added _XMLUNICODE preprocessor variable to make it easy to force the library into either utf16-mode or utf8-mode. * V2.08: August 22, 2006: 1 bug fix o inside the tag content, the ">" and "/>" strings are not reported as errors anymore. * V2.09: August 31, 2006: 1 bug fix o the character entities of type K were not working properly (thanks to José Carlos Medeiros for notifying me!). * V2.10: September 21, 2006: 1 bug fix o two consecutive calls to the deleteNodeContent() function on the same node has now no effect (as it should be). (Thanks to Hartmut Lemmel for notifying me!) o improved compatibility to Borland C++ * V2.11: October 24, 2006: 3 additions, 1 bug fix. o added the function getParentNode(). Thanks to Jakub Siudzinski for notifying me a good way to do it easily. o added one parameter to the deleteNodeContent() function to force the deletion of the underlying XMLNode tree. This will release all the memory occupied by the XMLNode tree even if there still exist references to some part of the tree. o changed the usage of the base***Encode() function to reduce the number of malloc's (speed increase). o FIX: when parsing an XML string, if the TOP tag has no closing tag, the library now correctly reports "eXMLErrorMissingEndTag". * V2.12: October 25, 2006: 2 additions o refactoring of the Base*** functions to make things easier to use o added the _XMLPARSER_NO_MESSAGEBOX_ preprocessor variable (see header of xmlParser.cpp for explanation) * V2.13: October 31, 2006: 1 minor change, 1 bug fix o changed the signature of _strnicmp to allow easy compilation under linux . o FIX: size of buffer for the convertion from ascii/utf8 to utf-16 was incorrect. * V2.14: November 13, 2006: 1 minor change, 1 bug fix o changed the parseFile,openFileHelper,writeToFile functions so that the filename parameter is widechar when UNICODE=1 o fixed a bug in openFileHelper when sizeof(wchar_t)=4 * V2.15: December 22, 2006: 2 additions o added the parameter 'pos' to the addChild,addText,addClear methods to allow insertion of new components anywhere in an already existing XMLNode structure o added 'postionOf*' methods. * V2.16: December 27, 2006: 1 minor change o removed the un-necessary method "firstPosition()" & some code re-structuration. * V2.17: January 9, 2007: 1 addition, 1 minor change o added the preprocessor variable "XML_NO_WIDE_CHAR" to allow easy compilation on exotic compilers o added the "const" method qualifier to some methods. * V2.18: January 15, 2007: 1 bug fix o FIX: addChild(XMLNode x,int pos) was sometime inserting at the wrong position when pos!=-1 * V2.19: January 30, 2007: 1 bug fix, 3 additions. o FIX: Unknown Character Entities are now always reported correctly. Thanks to Vincent Vanhoucke. o The XML specification indicates that no white spaces should be lost when parsing the file. This is now possible setting the new global parameter "dropWhiteSpaces" to false. o The library now works under Windows CE 4.2, Windows Mobile (PPC) 2003(5) (xscale) and Mac OS X Tiger. Thanks to Zdenek Nemec. o The " tag. * V2.25: May 18, 2007: 1 bug fix o FIX: "UTF-16 to MCBS convertion" was loosing the last char. Thanks to Robert P. Beyer for noticing me! * V2.26: May 22, 2007: 1 bug fix o FIX: addClear method was not working properly. * V2.27: May 28, 2007: 2 additions, 1 minor change, 2 bug fix o FIX: one "bus error" on Solaris removed. Thanks to Joshua L. Schmiedlin for noticing me! o FIX: the function "myIsTextUnicode" was not working properly when sizeof(wchar_t)=4. Thanks to Nagesh Patil for noticing me! o renamed "free_XMLDLL" to "freeXMLString" and renamed "toXMLString" to "toXMLStringUnSafe" o added some tests to make "add*" and "update*" functions more robust to user errors o added the ToXMLStringTool class to allow easy creation of XML files using fprintf function. * V2.28: June 27, 2007: 2 additions, 2 minor changes o added native support for Shift-JIS character encoding. o added a primitive heuristic inside the "guessCharEncoding" function to handle the Shift-JIS character encoding. o modified slightly the "setGlobalOptions" function to handle several character encodings. o moved the function "toXMLUnSafe" inside the "ToXMLStringTool" class. * v2.29: July 3,2007: 1 bug fix o FIX: the clear tags are now case-sensitive. * v2.30: July 31,2007: 2 bug fixes, 1 addition o FIX: The error when parsing two successives " that are not at the root level are now always handled correctly o FIX: the "deleteNodeContent" function was previously generating a memory leak. o added the file "XMLNodeAutoexp.txt" that shows a user-friendly representation of a XMLNode inside the watch window of the Visual Studio .NET Debugger o added a new global option named "removeCommentsInMiddleOfText" to increase standard XML compliance. o improved error reporting: character's code above 255 is forbidden in MultiByte char mode o improved XML string rendering (function createXMLString): the XMLNode that only contains one text are now written on one line of text instead of three. o isolate the functions "xmltoc,xmltoi,xmltol,xmltof,xmltoa" so that they can be easily removed to reduced the number of dependencies of the library. o modified slightly the "ToXMLStringTool" class to make it easier to use * v2.37: March 24, 2008: 1 bux fix o FIX: compilation problem under solaris and under Borland 6.0 * v2.38: June 2, 2008: 3 additions o multibyte to widechar automatic convertion now uses BOM to guess if encoding.is UTF8 or ASCII o added doxygen-style comments for easier documentation and a simple "doxy.cfg" file o improved the "getChildNode(XMLCSTR name, int i)" method. * v2.39: August 9, 2008: 4 additions, 2 bug fixes o FIX: on some rare occasions, the createXMLString method returned a string that was not NULL terminated. o FIX: on some rare occasions, if there are two declaration term at the start of the XML file, then the parser cannot find the start tag. o added the "getChildNodeByPath" function o added the "xmltob" function and updated the "xmltoc" function o included the documentation in html-DOXYGEN format direclty inside the ZIP file o added support for GB2312 / Big5 / GBK character encodings

近期下载者

相关文件


收藏者