diff --git a/CMakeLists.txt b/CMakeLists.txt index b58f9eb..12cac92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,8 +10,8 @@ include(GNUInstallDirs) ################################ # set lib version here -set(GENERIC_LIB_VERSION "1.0.12") -set(GENERIC_LIB_SOVERSION "1") +set(GENERIC_LIB_VERSION "1.0.14") +set(GENERIC_LIB_SOVERSION "1") ################################ @@ -53,6 +53,7 @@ if(BUILD_STATIC_LIBS) endif(BUILD_STATIC_LIBS) add_library(tinyxml2 SHARED tinyxml2.cpp tinyxml2.h) set_target_properties(tinyxml2 PROPERTIES + COMPILE_DEFINITIONS "TINYXML2_EXPORT" VERSION "${GENERIC_LIB_VERSION}" SOVERSION "${GENERIC_LIB_SOVERSION}") diff --git a/dox b/dox index 7ab99ff..10878f4 100755 --- a/dox +++ b/dox @@ -32,7 +32,7 @@ PROJECT_NAME = "TinyXML-2" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 1.0.12 +PROJECT_NUMBER = 1.0.14 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer diff --git a/readme.md b/readme.md index 7644f41..8ecd536 100644 --- a/readme.md +++ b/readme.md @@ -51,11 +51,10 @@ What it doesn't do. TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) or XSLs (eXtensible Stylesheet Language.) There are other parsers out there -that are much more fully -featured. But they are also much bigger, take longer to set up in -your project, have a higher learning curve, and often have a more -restrictive license. If you are working with browsers or have more -complete XML needs, TinyXML-2 is not the parser for you. +that are much more fully featured. But they are also much bigger, +take longer to set up in your project, have a higher learning curve, +and often have a more restrictive license. If you are working with +browsers or have more complete XML needs, TinyXML-2 is not the parser for you. TinyXML-1 vs. TinyXML-2 ----------------------- @@ -309,8 +308,9 @@ in shaping what is a very successful library. Extra thanks to Yves Berquin and Andrew Ellerton who were key contributors. TinyXML-2 grew from that effort. Lee Thomason is the original author -of TinyXML-2 (and TinyXML-1) but hopefully TinyXML-2 will be improved +of TinyXML-2 (and TinyXML-1) but TinyXML-2 has been and is being improved by many contributors. -Thanks to John Mackay for the TinyXML-2 logo. +Thanks to John Mackay at http://john.mackay.rosalilastudio.com for the TinyXML-2 logo! + diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 3b665c4..4e79ef5 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -422,16 +422,19 @@ void XMLUtil::ToStr( bool v, char* buffer, int bufferSize ) TIXML_SNPRINTF( buffer, bufferSize, "%d", v ? 1 : 0 ); } - +/* + ToStr() of a number is a very tricky topic. + https://github.com/leethomason/tinyxml2/issues/106 +*/ void XMLUtil::ToStr( float v, char* buffer, int bufferSize ) { - TIXML_SNPRINTF( buffer, bufferSize, "%f", v ); + TIXML_SNPRINTF( buffer, bufferSize, "%.8g", v ); } void XMLUtil::ToStr( double v, char* buffer, int bufferSize ) { - TIXML_SNPRINTF( buffer, bufferSize, "%f", v ); + TIXML_SNPRINTF( buffer, bufferSize, "%.17g", v ); } @@ -497,12 +500,7 @@ char* XMLDocument::Identify( char* p, XMLNode** node ) } // What is this thing? - // - Elements start with a letter or underscore, but xml is reserved. - // - Comments: