75 Commits
6.2.0 ... 7.1.0

Author SHA1 Message Date
Lee Thomason
9c740e8d23 setting the version to 7.1.0 2019-08-10 18:05:22 -07:00
Lee Thomason
50daa32fc2 minor fixes to test cases 2019-08-10 18:00:57 -07:00
Lee Thomason
f60928eaa4 Merge branch 'supplementary_test_case' of git://github.com/wangkirin/tinyxml2 into wangkirin-supplementary_test_case 2019-08-10 17:58:17 -07:00
Lee Thomason
4994f1cc57 Merge pull request #754 from wangkirin/reorg_file_path
adjust path of testfile `bomtest.xml` to `resources/out`
2019-08-10 17:54:54 -07:00
Lee Thomason
5bf58f0d1f Merge pull request #753 from orbitcowboy/master
Fixed -Wold-style-cast warnings from g++.
2019-08-10 17:53:39 -07:00
Lee Thomason
141d2117ba Merge pull request #751 from wangkirin/fix_comment
fix comment in Programmatic DOM test case
2019-08-10 17:52:25 -07:00
Lee Thomason
87aaa25922 Merge pull request #750 from equalent/patch-1
Fixed typos
2019-08-10 17:51:46 -07:00
Lee Thomason
c3601c62f6 Merge branch 'cugone-master' 2019-08-10 17:50:53 -07:00
Lee Thomason
effdf95f8c add test cases 2019-08-10 17:49:42 -07:00
Lee Thomason
c36d59f6b5 Merge branch 'master' of git://github.com/cugone/tinyxml2 into cugone-master 2019-08-10 17:40:46 -07:00
Lee Thomason
7fd646a8a2 support more bool options 2019-08-10 17:40:19 -07:00
Lee Thomason
1675bec2f2 Merge pull request #743 from deduktionstheorem/master
Issue 742: allow intermittent calls of XMLPrinter::ClearBuffer
2019-08-10 17:35:08 -07:00
wangkirin
f12d7a241f Supplement test case in xmltest.cpp 2019-07-03 14:48:44 +08:00
Wang Kirin
e08c2d2e0e adjust path of testfile bomtest.xml to resource/out 2019-05-30 15:25:04 +08:00
cugone
38f7d65b4a Merge pull request #1 from aaronkirkham/master
added uint64_t methods to XMLPrinter
2019-05-21 21:05:36 -05:00
aaronkirkham07@gmail.com
c341cea501 add missing uint64_t methods to XMLPrinter
add missing XMLElement::Unsigned64Attribute body
2019-05-22 00:05:27 +01:00
orbitcowboy
710a3324f4 Fixed -Wold-style-cast warnings from g++. 2019-05-16 15:30:47 +02:00
Wang Kirin
4add958b49 fix comment in Programmatic DOM test case 2019-04-29 09:54:45 +08:00
Andrey Tsurkan
eda7f81b1f Fixed typos 2019-04-25 17:35:17 +03:00
cugone
1dbfe31858 Missing uint64_t XMLElement::Unsigned64Text(uint64_t defaultValue) implementation 2019-04-12 17:33:49 -05:00
cugone
47e229e189 Forgot Text and XMLElement versions; 2019-04-12 17:27:28 -05:00
cugone
75a5acc6bb UnsignedInt64 support 2019-04-11 22:03:43 -05:00
Lee Thomason
61a4c7d507 Merge branch 'master' of github.com:leethomason/tinyxml2 2019-03-17 18:19:04 -07:00
Lee Thomason
db39dbc0fd add license and minor readme edit 2019-03-17 18:18:20 -07:00
Lee Thomason
eb2b8c47c4 Merge pull request #732 from orbitcowboy/master
Improved const correctness of local variables. There are no functiona…
2019-03-17 17:33:27 -07:00
Lee Thomason
bd5a1414df Merge pull request #731 from aarnchng/cmake_verspec
CMakeList.txt: fix wrong version
2019-03-17 17:32:20 -07:00
Stephan Friedrichs
e1b3013182 Issue 742: allow intermittent calls of XMLPrinter::ClearBuffer
XMLPrinter::ClearBuffer shouldn't set _firstElement to true, unless
called after the document is completely generated. Otherwise, the
layout of the XML file is messed up when the buffer is flushed
intermittently. This commit enables this using a default-initialized
parameter, chosen such that the existing behavior remains uneffected.
2019-03-07 21:30:23 +01:00
orbitcowboy
0e7f289590 Improved const correctness of local variables. There are no functional changes intended. 2019-01-15 11:28:49 +01:00
Aaron Yong
f5641e5470 CMakeList.txt: fix wrong version
Using find_package() with version argument, CMake return wrong version error. This commit resolves this.
2019-01-15 10:52:59 +08:00
Lee Thomason
8f4a9a8cc2 Merge pull request #721 from MortenMacFly/master
* removed merge artefact from Doxygen control file
2018-11-18 17:28:58 -08:00
Morten MacFly
d944ef762f * removed merge artifact from Doxygen control file 2018-11-18 08:23:51 +01:00
Lee Thomason
de6d164822 fix export issue and cmake. version to 7.0.1 2018-11-17 19:53:46 -08:00
Lee Thomason
08da3d91c9 Merge pull request #720 from scpeters/patch-1
tinyxml2.pc.in: restore prefix to lib/include dir
2018-11-17 19:46:18 -08:00
Steven Peters
e06a24016e tinyxml2.pc.in: use exec_prefix for libdir 2018-11-08 09:39:57 -08:00
Steven Peters
c3e09dabc6 tinyxml2.pc.in: restore prefix to lib/include dir 2018-11-07 16:34:34 -08:00
Lee Thomason
44ac395142 new docs 2018-11-06 09:38:38 -08:00
Lee Thomason
397f22581b setting the version to 7.0.0 2018-11-06 09:37:43 -08:00
Lee Thomason
dcedec857b Merge pull request #718 from bolry/patch-1
Correct assigment interface for StrPair
2018-11-06 09:10:21 -08:00
Lee Thomason
992e405384 Merge pull request #716 from Dmitry-Me/fixInt64Slicing
Fix slicing of int64_t
2018-11-06 09:09:57 -08:00
Lee Thomason
de6f6616cd Merge pull request #715 from Dmitry-Me/checkLastChildBeforeInsertion
Check the element is the last child of the document
2018-11-06 09:09:05 -08:00
Lee Thomason
b894947c94 Merge pull request #714 from Masadow/pic
Add support for position independant code compilation
2018-11-06 09:08:35 -08:00
Bo Rydberg
65c1b86582 Correct assigment interface for StrPair
Assigment operator takes non-const reference when const reference is the norm.
2018-10-19 18:45:53 +02:00
Dmitry-Me
ed3e9dc82e Fix slicing of int64_t 2018-10-17 00:27:33 +03:00
Dmitry-Me
1781494391 Check the element is the last child of the document 2018-10-16 00:11:39 +03:00
Masadow
4be5bc8059 Add support for position independant code compilation 2018-10-09 14:57:44 +02:00
Lee Thomason
7e8e249990 Merge pull request #707 from SwiftEngineering/issue_706
Issue_706: Make resources path relative to current source and binary dir
2018-09-30 17:16:57 -07:00
Lee Thomason
25b23b88e1 Merge pull request #703 from orbitcowboy/master
Added explicit-keyword to constructors having 1 argument.
2018-09-30 17:16:13 -07:00
Jacob Schloss
ade41cdfe9 Make resources folder for xml test relative to current source and binary directory 2018-09-20 13:27:40 -07:00
orbitcowboy
2cc8a4c712 Added explicit-keyword to constructors having 1 argument. 2018-09-05 08:46:21 +02:00
Lee Thomason
c07409b5c3 remove virtual call in destruction 2018-08-25 11:04:13 -07:00
Lee Thomason
3be5d2b74b Merge pull request #695 from leethomason/manydecs
Many declarations
2018-08-25 10:54:54 -07:00
Lee Thomason
92506ca698 Merge remote-tracking branch 'origin/master' into manydecs 2018-08-05 17:33:11 -07:00
Lee Thomason
baf8bc93a7 Merge pull request #690 from orbitcowboy/master
Fixed typos in comments. There are no functional changes intended.
2018-08-05 17:31:42 -07:00
Lee Thomason
db13a82e62 fix huge number of declaration security issue 2018-07-28 14:56:20 -07:00
orbitcowboy
22b21ec9bc Fixed typos in comments. There are no functional changes intended. 2018-07-17 11:52:57 +02:00
Lee Thomason
c483646db0 fix test cases 2018-06-29 15:57:55 -07:00
Lee Thomason
93a8fb18ea Merge branch 'issue647' 2018-06-29 15:53:32 -07:00
Lee Thomason
92fc089e17 remove deprecated errors. next version will be major. 2018-06-29 15:51:37 -07:00
Lee Thomason
9f14aca07f Merge pull request #645 from jasjuang/master
fix sidenote on issue #588
2018-06-29 15:48:03 -07:00
Lee Thomason
30d0c3d5f2 add assertion 2018-06-29 15:47:37 -07:00
Lee Thomason
2bdb13ae5e Merge pull request #686 from leethomason/issue647
Fix Query return type
2018-06-29 15:42:28 -07:00
Lee Thomason
233b2cb820 Merge pull request #685 from leethomason/deadcode
Remove dead yet conflicting method
2018-06-29 15:38:35 -07:00
Lee Thomason
fc80df3b39 fix query return type 2018-06-29 15:37:29 -07:00
Lee Thomason
70d942e307 remove dead yet conflicting method 2018-06-29 15:31:59 -07:00
Lee Thomason
1cc174c2da Merge pull request #682 from lsolanka/pr.unify-cmake-build
Unify the CMake targets for static and shared libraries
2018-06-29 15:15:28 -07:00
Lukas Solanka
1b029f2bdd add target_compile_definitions 2018-06-25 23:01:22 +01:00
Lukas Solanka
392ec18324 use configure_package_config_file() 2018-06-25 23:01:22 +01:00
Lukas Solanka
b7c169ccbc Replace absolute installation paths with relative 2018-06-25 23:01:22 +01:00
Lee Thomason
c0ff869500 Merge pull request #681 from johnb003/patch-1
CMakeLists.txt support for relocatable installs
2018-06-25 11:41:01 -07:00
John Butterfield
d89d6d9551 Updated CMakeLists.txt for relocatable installs
Forcing CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR to be absolute is unnecessary and results in absolute paths in the installation. This prevents relocatable prefix installations.
2018-06-20 18:58:09 -07:00
John Butterfield
b54cf3cb45 Made CMakeLists.txt installation relocatable.
The installation interface should really be a relative path.
2018-06-20 18:52:24 -07:00
Lee Thomason
a1d462d335 Merge pull request #670 from dquam/ProcessEntitiesBugWhenFalse
In PrintString, move the optimization under the if ( _processEntities…
2018-05-17 11:30:22 -07:00
Derek Quam
be69ae6352 In PrintString, move the optimization under the if ( _processEntities ) block and retain the strlen Write in the new else block. Added a test case. 2018-04-18 13:40:55 -05:00
Lee Thomason
3cdaf8b15e update the readme 2018-04-06 15:49:47 -07:00
jasjuang
ecbc16ae48 add namespace for cmake export 2018-03-23 09:52:19 -07:00
50 changed files with 762 additions and 540 deletions

View File

@@ -21,17 +21,15 @@ include(CTest)
################################ ################################
# set lib version here # set lib version here
set(GENERIC_LIB_VERSION "6.2.0") set(GENERIC_LIB_VERSION "7.1.0")
set(GENERIC_LIB_SOVERSION "6") set(GENERIC_LIB_SOVERSION "7")
################################ ################################
# Add definitions # Add definitions
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTINYXML2_DEBUG")
################################ ################################
# Add targets # Add targets
# By Default shared libray is being built # By Default shared library is being built
# To build static libs also - Do cmake . -DBUILD_STATIC_LIBS:BOOL=ON # To build static libs also - Do cmake . -DBUILD_STATIC_LIBS:BOOL=ON
# User can choose not to build shared library by using cmake -DBUILD_SHARED_LIBS:BOOL=OFF # User can choose not to build shared library by using cmake -DBUILD_SHARED_LIBS:BOOL=OFF
# To build only static libs use cmake . -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON # To build only static libs use cmake . -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON
@@ -39,28 +37,30 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTINYXML2_DEBUG")
# To disable the building of the tests, use cmake . -DBUILD_TESTS:BOOL=OFF # To disable the building of the tests, use cmake . -DBUILD_TESTS:BOOL=OFF
option(BUILD_SHARED_LIBS "build as shared library" ON) option(BUILD_SHARED_LIBS "build as shared library" ON)
option(BUILD_STATIC_LIBS "build as static library" OFF)
option(BUILD_TESTS "build xmltest (deprecated: Use BUILD_TESTING)" ON) option(BUILD_TESTS "build xmltest (deprecated: Use BUILD_TESTING)" ON)
# To allow using tinyxml in another shared library
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
# to distinguish between debug and release lib # to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d") set(CMAKE_DEBUG_POSTFIX "d")
if(BUILD_SHARED_LIBS) add_library(tinyxml2 tinyxml2.cpp tinyxml2.h)
add_library(tinyxml2 SHARED tinyxml2.cpp tinyxml2.h)
set_target_properties(tinyxml2 PROPERTIES set_target_properties(tinyxml2 PROPERTIES
COMPILE_DEFINITIONS "TINYXML2_EXPORT" COMPILE_DEFINITIONS "TINYXML2_EXPORT"
VERSION "${GENERIC_LIB_VERSION}" VERSION "${GENERIC_LIB_VERSION}"
SOVERSION "${GENERIC_LIB_SOVERSION}") SOVERSION "${GENERIC_LIB_SOVERSION}")
target_compile_definitions(tinyxml2 PUBLIC $<$<CONFIG:Debug>:TINYXML2_DEBUG>)
if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
target_include_directories(tinyxml2 PUBLIC target_include_directories(tinyxml2 PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>) $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
if(MSVC) if(MSVC)
target_compile_definitions(tinyxml2 PUBLIC -D_CRT_SECURE_NO_WARNINGS) target_compile_definitions(tinyxml2 PUBLIC -D_CRT_SECURE_NO_WARNINGS)
@@ -82,60 +82,17 @@ install(TARGETS tinyxml2
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(BUILD_STATIC_LIBS)
add_library(tinyxml2_static STATIC tinyxml2.cpp tinyxml2.h)
set_target_properties(tinyxml2_static PROPERTIES
COMPILE_DEFINITONS "TINYXML2_EXPORT"
VERSION "${GENERIC_LIB_VERSION}"
SOVERSION "${GENERIC_LIB_SOVERSION}")
set_target_properties( tinyxml2_static PROPERTIES OUTPUT_NAME tinyxml2 )
target_compile_definitions(tinyxml2_static PUBLIC -D_CRT_SECURE_NO_WARNINGS)
if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
target_include_directories(tinyxml2_static PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>)
if(MSVC)
target_compile_definitions(tinyxml2_static PUBLIC -D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
else()
include_directories(${PROJECT_SOURCE_DIR})
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
endif()
# export targets for find_package config mode
export(TARGETS tinyxml2_static
FILE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake)
install(TARGETS tinyxml2_static
EXPORT ${CMAKE_PROJECT_NAME}Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(BUILD_TESTING AND BUILD_TESTS) if(BUILD_TESTING AND BUILD_TESTS)
add_executable(xmltest xmltest.cpp) add_executable(xmltest xmltest.cpp)
if(BUILD_SHARED_LIBS) add_dependencies(xmltest tinyxml2)
add_dependencies(xmltest tinyxml2) target_link_libraries(xmltest tinyxml2)
target_link_libraries(xmltest tinyxml2)
else(BUILD_STATIC_LIBS)
add_dependencies(xmltest tinyxml2_static)
target_link_libraries(xmltest tinyxml2_static)
endif()
# Copy test resources and create test output directory # Copy test resources and create test output directory
add_custom_command(TARGET xmltest POST_BUILD add_custom_command(TARGET xmltest POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/resources $<TARGET_FILE_DIR:xmltest>/resources COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/resources $<TARGET_FILE_DIR:xmltest>/resources
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:xmltest>/resources/out COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:xmltest>/resources/out
COMMENT "Configuring xmltest resources directory: ${CMAKE_BINARY_DIR}/resources" COMMENT "Configuring xmltest resources directory: ${CMAKE_CURRENT_BINARY_DIR}/resources"
) )
add_test(NAME xmltest COMMAND xmltest WORKING_DIRECTORY $<TARGET_FILE_DIR:xmltest>) add_test(NAME xmltest COMMAND xmltest WORKING_DIRECTORY $<TARGET_FILE_DIR:xmltest>)
@@ -143,13 +100,6 @@ endif()
install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
foreach(p LIB INCLUDE)
set(var CMAKE_INSTALL_${p}DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY) configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
@@ -164,13 +114,22 @@ if(NOT TARGET uninstall)
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif() endif()
file(WRITE include(CMakePackageConfigHelpers)
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
"include(\${CMAKE_CURRENT_LIST_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake)\n") configure_package_config_file(
"Config.cmake.in"
"${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}"
)
write_basic_package_version_file(
"${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake"
VERSION ${GENERIC_LIB_VERSION}
COMPATIBILITY SameMajorVersion
)
install(FILES install(FILES
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}) DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME})
install(EXPORT ${CMAKE_PROJECT_NAME}Targets install(EXPORT ${CMAKE_PROJECT_NAME}Targets NAMESPACE tinyxml2::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}) DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME})

4
Config.cmake.in Normal file
View File

@@ -0,0 +1,4 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")

18
LICENSE.txt Normal file
View File

@@ -0,0 +1,18 @@
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.

View File

@@ -10,6 +10,7 @@ ARFLAGS = cr
RM = rm -f RM = rm -f
RANLIB = ranlib RANLIB = ranlib
MKDIR = mkdir -p MKDIR = mkdir -p
CXXFLAGS = -fPIC
INSTALL = install INSTALL = install
INSTALL_PROGRAM = $(INSTALL) INSTALL_PROGRAM = $(INSTALL)

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -67,7 +67,7 @@ $(function() {
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -67,7 +67,7 @@ $(function() {
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -96,7 +96,7 @@ Text "A Midsummer Night's Dream" </li>
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -73,7 +73,7 @@ $(function() {
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -83,7 +83,7 @@ $(function() {
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -75,7 +75,7 @@ $(function() {
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -95,7 +95,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -215,7 +215,7 @@ void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clas
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -105,7 +105,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -292,7 +292,7 @@ const char* xmlcstr = printer.CStr();
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -73,7 +73,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -79,7 +79,7 @@ $(function() {
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -105,7 +105,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -294,7 +294,7 @@ const char* xmlcstr = printer.CStr();
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -128,7 +128,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -140,7 +140,7 @@ void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clas
<tr class="separator:a1d033945b42e125d933d6231e4571552"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a1d033945b42e125d933d6231e4571552"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57400f816dbe7799ece33615ead9ab76"><td class="memItemLeft" align="right" valign="top"><a id="a57400f816dbe7799ece33615ead9ab76"></a> <tr class="memitem:a57400f816dbe7799ece33615ead9ab76"><td class="memItemLeft" align="right" valign="top"><a id="a57400f816dbe7799ece33615ead9ab76"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a57400f816dbe7799ece33615ead9ab76">ErrorLineNum</a> () const</td></tr> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a57400f816dbe7799ece33615ead9ab76">ErrorLineNum</a> () const</td></tr>
<tr class="memdesc:a57400f816dbe7799ece33615ead9ab76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the line where the error occured, or zero if unknown. <br /></td></tr> <tr class="memdesc:a57400f816dbe7799ece33615ead9ab76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the line where the error occurred, or zero if unknown. <br /></td></tr>
<tr class="separator:a57400f816dbe7799ece33615ead9ab76"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a57400f816dbe7799ece33615ead9ab76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65656b0b2cbc822708eb351504178aaf"><td class="memItemLeft" align="right" valign="top"><a id="a65656b0b2cbc822708eb351504178aaf"></a> <tr class="memitem:a65656b0b2cbc822708eb351504178aaf"><td class="memItemLeft" align="right" valign="top"><a id="a65656b0b2cbc822708eb351504178aaf"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a65656b0b2cbc822708eb351504178aaf">Clear</a> ()</td></tr> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a65656b0b2cbc822708eb351504178aaf">Clear</a> ()</td></tr>
@@ -734,7 +734,7 @@ doc.Print( &amp;printer );
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -106,7 +106,7 @@ $(function() {
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#ae0f62bc186c56c2e0483ebd52dbfbe34">Parent</a>() const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#ae0f62bc186c56c2e0483ebd52dbfbe34">Parent</a>() const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#aac667c513d445f8b783e1e15ef9d3551">PreviousSibling</a>() const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#aac667c513d445f8b783e1e15ef9d3551">PreviousSibling</a>() const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a872936cae46fb473eb47fec99129fc70">PreviousSiblingElement</a>(const char *name=0) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a872936cae46fb473eb47fec99129fc70">PreviousSiblingElement</a>(const char *name=0) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a042fc30504347b84a56cf863ad528a4f">QueryAttribute</a>(const char *name, int *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a5b7df3bed2b8954eabf227fa204522eb">QueryAttribute</a>(const char *name, int *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872">QueryBoolAttribute</a>(const char *name, bool *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872">QueryBoolAttribute</a>(const char *name, bool *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a3fe5417d59eb8f5c4afe924b7d332736">QueryBoolText</a>(bool *bval) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a3fe5417d59eb8f5c4afe924b7d332736">QueryBoolText</a>(bool *bval) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a5f0964e2dbd8e2ee7fce9beab689443c">QueryDoubleAttribute</a>(const char *name, double *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a5f0964e2dbd8e2ee7fce9beab689443c">QueryDoubleAttribute</a>(const char *name, double *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
@@ -117,40 +117,41 @@ $(function() {
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a120c538c8eead169e635dbc70fb226d8">QueryInt64Text</a>(int64_t *uval) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a120c538c8eead169e635dbc70fb226d8">QueryInt64Text</a>(int64_t *uval) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1">QueryIntAttribute</a>(const char *name, int *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1">QueryIntAttribute</a>(const char *name, int *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a926357996bef633cb736e1a558419632">QueryIntText</a>(int *ival) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a926357996bef633cb736e1a558419632">QueryIntText</a>(int *ival) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f">QueryUnsignedAttribute</a>(const char *name, unsigned int *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#adb8ae765f98d0c5037faec48deea78bc">QueryStringAttribute</a>(const char *name, const char **value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14d38aa4b5e18a46274a27425188a6a1">QueryUnsignedText</a>(unsigned *uval) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f">QueryUnsignedAttribute</a>(const char *name, unsigned int *value) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a11943abf2d0831548c3790dd5d9f119c">SetAttribute</a>(const char *name, const char *value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14d38aa4b5e18a46274a27425188a6a1">QueryUnsignedText</a>(unsigned *uval) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#aae6568c64c7f1cc88be8461ba41a79cf">SetAttribute</a>(const char *name, int value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a11943abf2d0831548c3790dd5d9f119c">SetAttribute</a>(const char *name, const char *value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ae143997e90064ba82326b29a9930ea8f">SetAttribute</a>(const char *name, unsigned value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#aae6568c64c7f1cc88be8461ba41a79cf">SetAttribute</a>(const char *name, int value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#aaeefdf9171fec91b13a776b42299b0dd">SetAttribute</a>(const char *name, int64_t value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ae143997e90064ba82326b29a9930ea8f">SetAttribute</a>(const char *name, unsigned value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#aa848b696e6a75e4e545c6da9893b11e1">SetAttribute</a>(const char *name, bool value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#aaeefdf9171fec91b13a776b42299b0dd">SetAttribute</a>(const char *name, int64_t value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a233397ee81e70eb5d4b814c5f8698533">SetAttribute</a>(const char *name, double value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#aa848b696e6a75e4e545c6da9893b11e1">SetAttribute</a>(const char *name, bool value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a554b70d882e65b28fc084b23df9b9759">SetAttribute</a>(const char *name, float value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a233397ee81e70eb5d4b814c5f8698533">SetAttribute</a>(const char *name, double value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a97712009a530d8cb8a63bf705f02b4f1">SetName</a>(const char *str, bool staticMem=false)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a554b70d882e65b28fc084b23df9b9759">SetAttribute</a>(const char *name, float value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a1f9c2cd61b72af5ae708d37b7ad283ce">SetText</a>(const char *inText)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a97712009a530d8cb8a63bf705f02b4f1">SetName</a>(const char *str, bool staticMem=false)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#aeae8917b5ea6060b3c08d4e3d8d632d7">SetText</a>(int value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a1f9c2cd61b72af5ae708d37b7ad283ce">SetText</a>(const char *inText)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a7bbfcc11d516598bc924a8fba4d08597">SetText</a>(unsigned value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#aeae8917b5ea6060b3c08d4e3d8d632d7">SetText</a>(int value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a7b62cd33acdfeff7ea2b1b330d4368e4">SetText</a>(int64_t value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a7bbfcc11d516598bc924a8fba4d08597">SetText</a>(unsigned value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ae4b543d6770de76fb6ab68e541c192a4">SetText</a>(bool value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a7b62cd33acdfeff7ea2b1b330d4368e4">SetText</a>(int64_t value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a67bd77ac9aaeff58ff20b4275a65ba4e">SetText</a>(double value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ae4b543d6770de76fb6ab68e541c192a4">SetText</a>(bool value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a51d560da5ae3ad6b75e0ab9ffb2ae42a">SetText</a>(float value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a67bd77ac9aaeff58ff20b4275a65ba4e">SetText</a>(double value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a002978fc889cc011d143185f2377eca2">SetUserData</a>(void *userData)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a51d560da5ae3ad6b75e0ab9ffb2ae42a">SetText</a>(float value)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a09dd68cf9eae137579f6e50f36487513">SetValue</a>(const char *val, bool staticMem=false)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a002978fc889cc011d143185f2377eca2">SetUserData</a>(void *userData)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ac035742d68b0c50c3f676374e59fe750">ShallowClone</a>(XMLDocument *document) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a09dd68cf9eae137579f6e50f36487513">SetValue</a>(const char *val, bool staticMem=false)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ad9ea913a460b48979bd83cf9871c99f6">ShallowEqual</a>(const XMLNode *compare) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ac035742d68b0c50c3f676374e59fe750">ShallowClone</a>(XMLDocument *document) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#aff47671055aa99840a1c1ebd661e63e3">ToComment</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ad9ea913a460b48979bd83cf9871c99f6">ShallowEqual</a>(const XMLNode *compare) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a174fd4c22c010b58138c1b84a0dfbd51">ToDeclaration</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#aff47671055aa99840a1c1ebd661e63e3">ToComment</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a836e2966ed736fc3c94f70e12a2a3357">ToDocument</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a174fd4c22c010b58138c1b84a0dfbd51">ToDeclaration</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ad9ff5c2dbc15df36cf664ce1b0ea0a5d">ToElement</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a836e2966ed736fc3c94f70e12a2a3357">ToDocument</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a41c55dab9162d1eb62db2008430e376b">ToText</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#ad9ff5c2dbc15df36cf664ce1b0ea0a5d">ToElement</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a8675a74aa0ada6eccab0c77ef3e5b9bd">ToUnknown</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a41c55dab9162d1eb62db2008430e376b">ToText</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#afea43a1d4aa33e3703ddee5fc9adc26c">UnsignedAttribute</a>(const char *name, unsigned defaultValue=0) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a8675a74aa0ada6eccab0c77ef3e5b9bd">ToUnknown</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a49bad014ffcc17b0b6119d5b2c97dfb5">UnsignedText</a>(unsigned defaultValue=0) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#afea43a1d4aa33e3703ddee5fc9adc26c">UnsignedAttribute</a>(const char *name, unsigned defaultValue=0) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a66344989a4b436155bcda72bd6b07b82">Value</a>() const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a49bad014ffcc17b0b6119d5b2c97dfb5">UnsignedText</a>(unsigned defaultValue=0) const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">tinyxml2::XMLElement</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a66344989a4b436155bcda72bd6b07b82">Value</a>() const</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td><td class="entry"></td></tr>
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -144,8 +144,12 @@ XMLError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="
XMLError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#acd5eeddf6002ef90806af794b9d9a5a5">QueryFloatAttribute</a> (const char *name, float *value) const</td></tr> XMLError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#acd5eeddf6002ef90806af794b9d9a5a5">QueryFloatAttribute</a> (const char *name, float *value) const</td></tr>
<tr class="memdesc:acd5eeddf6002ef90806af794b9d9a5a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1">QueryIntAttribute()</a> <br /></td></tr> <tr class="memdesc:acd5eeddf6002ef90806af794b9d9a5a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1">QueryIntAttribute()</a> <br /></td></tr>
<tr class="separator:acd5eeddf6002ef90806af794b9d9a5a5"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:acd5eeddf6002ef90806af794b9d9a5a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a042fc30504347b84a56cf863ad528a4f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a042fc30504347b84a56cf863ad528a4f">QueryAttribute</a> (const char *name, int *value) const</td></tr> <tr class="memitem:adb8ae765f98d0c5037faec48deea78bc"><td class="memItemLeft" align="right" valign="top"><a id="adb8ae765f98d0c5037faec48deea78bc"></a>
<tr class="separator:a042fc30504347b84a56cf863ad528a4f"><td class="memSeparator" colspan="2">&#160;</td></tr> XMLError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#adb8ae765f98d0c5037faec48deea78bc">QueryStringAttribute</a> (const char *name, const char **value) const</td></tr>
<tr class="memdesc:adb8ae765f98d0c5037faec48deea78bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1">QueryIntAttribute()</a> <br /></td></tr>
<tr class="separator:adb8ae765f98d0c5037faec48deea78bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b7df3bed2b8954eabf227fa204522eb"><td class="memItemLeft" align="right" valign="top">XMLError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a5b7df3bed2b8954eabf227fa204522eb">QueryAttribute</a> (const char *name, int *value) const</td></tr>
<tr class="separator:a5b7df3bed2b8954eabf227fa204522eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11943abf2d0831548c3790dd5d9f119c"><td class="memItemLeft" align="right" valign="top"><a id="a11943abf2d0831548c3790dd5d9f119c"></a> <tr class="memitem:a11943abf2d0831548c3790dd5d9f119c"><td class="memItemLeft" align="right" valign="top"><a id="a11943abf2d0831548c3790dd5d9f119c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a11943abf2d0831548c3790dd5d9f119c">SetAttribute</a> (const char *name, const char *value)</td></tr> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a11943abf2d0831548c3790dd5d9f119c">SetAttribute</a> (const char *name, const char *value)</td></tr>
<tr class="memdesc:a11943abf2d0831548c3790dd5d9f119c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the named attribute to value. <br /></td></tr> <tr class="memdesc:a11943abf2d0831548c3790dd5d9f119c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the named attribute to value. <br /></td></tr>
@@ -498,8 +502,8 @@ const char* xmlcstr = printer.CStr();
</div> </div>
</div> </div>
<a id="a042fc30504347b84a56cf863ad528a4f"></a> <a id="a5b7df3bed2b8954eabf227fa204522eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a042fc30504347b84a56cf863ad528a4f">&#9670;&nbsp;</a></span>QueryAttribute()</h2> <h2 class="memtitle"><span class="permalink"><a href="#a5b7df3bed2b8954eabf227fa204522eb">&#9670;&nbsp;</a></span>QueryAttribute()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@@ -508,7 +512,7 @@ const char* xmlcstr = printer.CStr();
<td class="mlabels-left"> <td class="mlabels-left">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">int tinyxml2::XMLElement::QueryAttribute </td> <td class="memname">XMLError tinyxml2::XMLElement::QueryAttribute </td>
<td>(</td> <td>(</td>
<td class="paramtype">const char *&#160;</td> <td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>name</em>, </td> <td class="paramname"><em>name</em>, </td>
@@ -531,7 +535,7 @@ const char* xmlcstr = printer.CStr();
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Given an attribute name, <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a042fc30504347b84a56cf863ad528a4f">QueryAttribute()</a> returns XML_SUCCESS, XML_WRONG_ATTRIBUTE_TYPE if the conversion can't be performed, or XML_NO_ATTRIBUTE if the attribute doesn't exist. It is overloaded for the primitive types, and is a generally more convenient replacement of <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1">QueryIntAttribute()</a> and related functions.</p> <p>Given an attribute name, <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a5b7df3bed2b8954eabf227fa204522eb">QueryAttribute()</a> returns XML_SUCCESS, XML_WRONG_ATTRIBUTE_TYPE if the conversion can't be performed, or XML_NO_ATTRIBUTE if the attribute doesn't exist. It is overloaded for the primitive types, and is a generally more convenient replacement of <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1">QueryIntAttribute()</a> and related functions.</p>
<p>If successful, the result of the conversion will be written to 'value'. If not successful, nothing will be written to 'value'. This allows you to provide default value:</p> <p>If successful, the result of the conversion will be written to 'value'. If not successful, nothing will be written to 'value'. This allows you to provide default value:</p>
<pre class="fragment">int value = 10; <pre class="fragment">int value = 10;
QueryAttribute( "foo", &amp;value ); // if "foo" isn't found, value will still be 10 QueryAttribute( "foo", &amp;value ); // if "foo" isn't found, value will still be 10
@@ -700,7 +704,7 @@ QueryIntAttribute( "foo", &amp;value ); // if "foo" isn't found, value will
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -84,13 +84,13 @@ $(function() {
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#a03ea6ec970a021b71bf1219a0f6717df">ToNode</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#a03ea6ec970a021b71bf1219a0f6717df">ToNode</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#a6ab9e8cbfb41417246e5657e3842c62a">ToText</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#a6ab9e8cbfb41417246e5657e3842c62a">ToText</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#aa387368a1ad8d843a9f12df863d298de">ToUnknown</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#aa387368a1ad8d843a9f12df863d298de">ToUnknown</a>()</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#a9c240a35c18f053509b4b97ddccd9793">XMLHandle</a>(XMLNode *node)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#a9c240a35c18f053509b4b97ddccd9793">XMLHandle</a>(XMLNode *node)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#aa2edbc1c0d3e3e8259bd98de7f1cf500">XMLHandle</a>(XMLNode &amp;node)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#aa2edbc1c0d3e3e8259bd98de7f1cf500">XMLHandle</a>(XMLNode &amp;node)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#afd8e01e6018c07347b8e6d80272466aa">XMLHandle</a>(const XMLHandle &amp;ref)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#afd8e01e6018c07347b8e6d80272466aa">XMLHandle</a>(const XMLHandle &amp;ref)</td><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html">tinyxml2::XMLHandle</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -181,7 +181,7 @@ if ( child2 )
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -105,7 +105,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -573,7 +573,7 @@ Text: the text string
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -98,7 +98,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -402,7 +402,7 @@ printer.CloseElement();
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -107,7 +107,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -302,7 +302,7 @@ const char* xmlcstr = printer.CStr();
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -105,7 +105,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -293,7 +293,7 @@ const char* xmlcstr = printer.CStr();
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -81,7 +81,7 @@ $(function() {
</table></div><!-- contents --> </table></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -130,7 +130,7 @@ virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" hr
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -71,7 +71,7 @@ $(function() {
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:27 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -338,7 +338,7 @@ $(function() {
<h3><a id="index_q"></a>- q -</h3><ul> <h3><a id="index_q"></a>- q -</h3><ul>
<li>QueryAttribute() <li>QueryAttribute()
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a042fc30504347b84a56cf863ad528a4f">tinyxml2::XMLElement</a> : <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a5b7df3bed2b8954eabf227fa204522eb">tinyxml2::XMLElement</a>
</li> </li>
<li>QueryBoolAttribute() <li>QueryBoolAttribute()
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872">tinyxml2::XMLElement</a> : <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872">tinyxml2::XMLElement</a>
@@ -385,6 +385,9 @@ $(function() {
<li>QueryIntValue() <li>QueryIntValue()
: <a class="el" href="classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993">tinyxml2::XMLAttribute</a> : <a class="el" href="classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993">tinyxml2::XMLAttribute</a>
</li> </li>
<li>QueryStringAttribute()
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#adb8ae765f98d0c5037faec48deea78bc">tinyxml2::XMLElement</a>
</li>
<li>QueryUnsignedAttribute() <li>QueryUnsignedAttribute()
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f">tinyxml2::XMLElement</a> : <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f">tinyxml2::XMLElement</a>
</li> </li>
@@ -533,7 +536,7 @@ $(function() {
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -338,7 +338,7 @@ $(function() {
<h3><a id="index_q"></a>- q -</h3><ul> <h3><a id="index_q"></a>- q -</h3><ul>
<li>QueryAttribute() <li>QueryAttribute()
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a042fc30504347b84a56cf863ad528a4f">tinyxml2::XMLElement</a> : <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a5b7df3bed2b8954eabf227fa204522eb">tinyxml2::XMLElement</a>
</li> </li>
<li>QueryBoolAttribute() <li>QueryBoolAttribute()
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872">tinyxml2::XMLElement</a> : <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872">tinyxml2::XMLElement</a>
@@ -385,6 +385,9 @@ $(function() {
<li>QueryIntValue() <li>QueryIntValue()
: <a class="el" href="classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993">tinyxml2::XMLAttribute</a> : <a class="el" href="classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993">tinyxml2::XMLAttribute</a>
</li> </li>
<li>QueryStringAttribute()
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#adb8ae765f98d0c5037faec48deea78bc">tinyxml2::XMLElement</a>
</li>
<li>QueryUnsignedAttribute() <li>QueryUnsignedAttribute()
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f">tinyxml2::XMLElement</a> : <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f">tinyxml2::XMLElement</a>
</li> </li>
@@ -533,7 +536,7 @@ $(function() {
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:27 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -82,7 +82,7 @@ $(function() {
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -82,29 +82,13 @@ $(function() {
<h2>What it doesn't do. </h2> <h2>What it doesn't do. </h2>
<p>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.</p> <p>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.</p>
<h2>TinyXML-1 vs. TinyXML-2 </h2> <h2>TinyXML-1 vs. TinyXML-2 </h2>
<p>TinyXML-2 is now the focus of all development, well tested, and your best choice unless you have a requirement to maintain TinyXML-1 code.</p> <p>TinyXML-2 is now the focus of all development, well tested, and your best choice between the two APIs. At this point, unless you are maintaining legacy code, you should choose TinyXML-2.</p>
<p>TinyXML-2 uses a similar API to TinyXML-1 and the same rich test cases. But the implementation of the parser is completely re-written to make it more appropriate for use in a game. It uses less memory, is faster, and uses far fewer memory allocations.</p> <p>TinyXML-2 uses a similar API to TinyXML-1 and the same rich test cases. But the implementation of the parser is completely re-written to make it more appropriate for use in a game. It uses less memory, is faster, and uses far fewer memory allocations.</p>
<p>TinyXML-2 has no requirement for STL, but has also dropped all STL support. All strings are query and set as 'const char*'. This allows the use of internal allocators, and keeps the code much simpler.</p> <p>TinyXML-2 has no requirement or support for STL. By returning <code>const char*</code> TinyXML-2 can be much more efficient with memory usage. (TinyXML-1 did support and use STL, but consumed much more memory for the DOM representation.)</p>
<p>Both parsers:</p>
<ol type="1">
<li>Simple to use with similar APIs.</li>
<li>DOM based parser.</li>
<li>UTF-8 Unicode support. <a href="http://en.wikipedia.org/wiki/UTF-8">http://en.wikipedia.org/wiki/UTF-8</a></li>
</ol>
<p>Advantages of TinyXML-2</p>
<ol type="1">
<li>The focus of all future dev.</li>
<li>Many fewer memory allocation (1/10th to 1/100th), uses less memory (about 40% of TinyXML-1), and faster.</li>
<li>No STL requirement.</li>
<li>More modern C++, including a proper namespace.</li>
<li>Proper and useful handling of whitespace</li>
</ol>
<p>Advantages of TinyXML-1</p>
<ol type="1">
<li>Support for some C++ STL conventions: streams and strings</li>
<li>Very mature and well debugged code base.</li>
</ol>
<h2>Features </h2> <h2>Features </h2>
<h3>Code Page</h3>
<p>TinyXML-2 uses UTF-8 exclusively when interpreting XML. All XML is assumed to be UTF-8.</p>
<p>Filenames for loading / saving are passed unchanged to the underlying OS.</p>
<h3>Memory Model</h3> <h3>Memory Model</h3>
<p>An XMLDocument is a C++ object like any other, that can be on the stack, or new'd and deleted on the heap.</p> <p>An XMLDocument is a C++ object like any other, that can be on the stack, or new'd and deleted on the heap.</p>
<p>However, any sub-node of the Document, XMLElement, XMLText, etc, can only be created by calling the appropriate XMLDocument::NewElement, NewText, etc. method. Although you have pointers to these objects, they are still owned by the Document. When the Document is deleted, so are all the nodes it contains.</p> <p>However, any sub-node of the Document, XMLElement, XMLText, etc, can only be created by calling the appropriate XMLDocument::NewElement, NewText, etc. method. Although you have pointers to these objects, they are still owned by the Document. When the Document is deleted, so are all the nodes it contains.</p>
@@ -114,7 +98,7 @@ $(function() {
<p>By default, TinyXML-2 preserves white space in a (hopefully) sane way that is almost compliant with the spec. (TinyXML-1 used a completely different model, much more similar to 'collapse', below.)</p> <p>By default, TinyXML-2 preserves white space in a (hopefully) sane way that is almost compliant with the spec. (TinyXML-1 used a completely different model, much more similar to 'collapse', below.)</p>
<p>As a first step, all newlines / carriage-returns / line-feeds are normalized to a line-feed character, as required by the XML spec.</p> <p>As a first step, all newlines / carriage-returns / line-feeds are normalized to a line-feed character, as required by the XML spec.</p>
<p>White space in text is preserved. For example: </p><pre class="fragment">&lt;element&gt; Hello, World&lt;/element&gt; <p>White space in text is preserved. For example: </p><pre class="fragment">&lt;element&gt; Hello, World&lt;/element&gt;
</pre><p>The leading space before the "Hello" and the double space after the comma are preserved. Line-feeds are preserved, as in this example: </p><pre class="fragment">&lt;element&gt; Hello again, </pre><p>The leading space before the "Hello" and the double space after the comma are preserved. Line-feeds are preserved, as in this example: </p><pre class="fragment">&lt;element&gt; Hello again,
World&lt;/element&gt; World&lt;/element&gt;
</pre><p>However, white space between elements is <b>not</b> preserved. Although not strictly compliant, tracking and reporting inter-element space is awkward, and not normally valuable. TinyXML-2 sees these as the same XML: </p><pre class="fragment">&lt;document&gt; </pre><p>However, white space between elements is <b>not</b> preserved. Although not strictly compliant, tracking and reporting inter-element space is awkward, and not normally valuable. TinyXML-2 sees these as the same XML: </p><pre class="fragment">&lt;document&gt;
&lt;data&gt;1&lt;/data&gt; &lt;data&gt;1&lt;/data&gt;
@@ -134,7 +118,7 @@ $(function() {
</ul> </ul>
<p>Note that (currently) there is a performance impact for using COLLAPSE_WHITESPACE. It essentially causes the XML to be parsed twice.</p> <p>Note that (currently) there is a performance impact for using COLLAPSE_WHITESPACE. It essentially causes the XML to be parsed twice.</p>
<h4>Error Reporting</h4> <h4>Error Reporting</h4>
<p>TinyXML-2 reports the line number of any errors in an XML document that cannot be parsed correctly. In addition, all nodes (elements, declarations, text, comments etc.) and attributes have a line number recorded as they are parsed. This allows an application that performs additional validation of the parsed XML document (e.g. application-implemented DTD validation) to report line number information in it's errors.</p> <p>TinyXML-2 reports the line number of any errors in an XML document that cannot be parsed correctly. In addition, all nodes (elements, declarations, text, comments etc.) and attributes have a line number recorded as they are parsed. This allows an application that performs additional validation of the parsed XML document (e.g. application-implemented DTD validation) to report line number information for error messages.</p>
<h3>Entities</h3> <h3>Entities</h3>
<p>TinyXML-2 recognizes the pre-defined "character entities", meaning special characters. Namely: </p><pre class="fragment">&amp;amp; &amp; <p>TinyXML-2 recognizes the pre-defined "character entities", meaning special characters. Namely: </p><pre class="fragment">&amp;amp; &amp;
&amp;lt; &lt; &amp;lt; &lt;
@@ -163,19 +147,19 @@ printer.PushAttribute( "foo", "bar" );
printer.CloseElement(); printer.CloseElement();
</pre><h2>Examples </h2> </pre><h2>Examples </h2>
<h4>Load and parse an XML file.</h4> <h4>Load and parse an XML file.</h4>
<pre class="fragment">/* ------ Example 1: Load and parse an XML file. ---- */ <pre class="fragment">/* ------ Example 1: Load and parse an XML file. ---- */
{ {
XMLDocument doc; XMLDocument doc;
doc.LoadFile( "dream.xml" ); doc.LoadFile( "dream.xml" );
} }
</pre><h4>Lookup information.</h4> </pre><h4>Lookup information.</h4>
<pre class="fragment">/* ------ Example 2: Lookup information. ---- */ <pre class="fragment">/* ------ Example 2: Lookup information. ---- */
{ {
XMLDocument doc; XMLDocument doc;
doc.LoadFile( "dream.xml" ); doc.LoadFile( "dream.xml" );
// Structure of the XML file: // Structure of the XML file:
// - Element "PLAY" the root Element, which is the // - Element "PLAY" the root Element, which is the
// FirstChildElement of the Document // FirstChildElement of the Document
// - - Element "TITLE" child of the root PLAY Element // - - Element "TITLE" child of the root PLAY Element
// - - - Text child of the TITLE Element // - - - Text child of the TITLE Element
@@ -199,7 +183,7 @@ printer.CloseElement();
<p>And additionally a test file:</p><ul> <p>And additionally a test file:</p><ul>
<li>xmltest.cpp</li> <li>xmltest.cpp</li>
</ul> </ul>
<p>Simply compile and run. There is a visual studio 2015 project included, a simple Makefile, an Xcode project, a Code::Blocks project, and a cmake CMakeLists.txt included to help you. The top of tinyxml.h even has a simple g++ command line if you are are *nix and don't want to use a build system.</p> <p>Simply compile and run. There is a visual studio 2017 project included, a simple Makefile, an Xcode project, a Code::Blocks project, and a cmake CMakeLists.txt included to help you. The top of tinyxml.h even has a simple g++ command line if you are are Unix/Linuk/BSD and don't want to use a build system.</p>
<h2>Versioning </h2> <h2>Versioning </h2>
<p>TinyXML-2 uses semantic versioning. <a href="http://semver.org/">http://semver.org/</a> Releases are now tagged in github.</p> <p>TinyXML-2 uses semantic versioning. <a href="http://semver.org/">http://semver.org/</a> Releases are now tagged in github.</p>
<p>Note that the major version will (probably) change fairly rapidly. API changes are fairly common.</p> <p>Note that the major version will (probably) change fairly rapidly. API changes are fairly common.</p>
@@ -222,7 +206,7 @@ printer.CloseElement();
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -22,7 +22,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;"> <td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">TinyXML-2 <div id="projectname">TinyXML-2
&#160;<span id="projectnumber">6.0.0</span> &#160;<span id="projectnumber">7.0.0</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -74,7 +74,7 @@ $(function() {
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13 </a> 1.8.13
</small></address> </small></address>

View File

@@ -1,6 +1,6 @@
var searchData= var searchData=
[ [
['queryattribute',['QueryAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a042fc30504347b84a56cf863ad528a4f',1,'tinyxml2::XMLElement']]], ['queryattribute',['QueryAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a5b7df3bed2b8954eabf227fa204522eb',1,'tinyxml2::XMLElement']]],
['queryboolattribute',['QueryBoolAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872',1,'tinyxml2::XMLElement']]], ['queryboolattribute',['QueryBoolAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872',1,'tinyxml2::XMLElement']]],
['querybooltext',['QueryBoolText',['../classtinyxml2_1_1_x_m_l_element.html#a3fe5417d59eb8f5c4afe924b7d332736',1,'tinyxml2::XMLElement']]], ['querybooltext',['QueryBoolText',['../classtinyxml2_1_1_x_m_l_element.html#a3fe5417d59eb8f5c4afe924b7d332736',1,'tinyxml2::XMLElement']]],
['queryboolvalue',['QueryBoolValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a5f32e038954256f61c21ff20fd13a09c',1,'tinyxml2::XMLAttribute']]], ['queryboolvalue',['QueryBoolValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a5f32e038954256f61c21ff20fd13a09c',1,'tinyxml2::XMLAttribute']]],
@@ -16,6 +16,7 @@ var searchData=
['queryintattribute',['QueryIntAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1',1,'tinyxml2::XMLElement']]], ['queryintattribute',['QueryIntAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1',1,'tinyxml2::XMLElement']]],
['queryinttext',['QueryIntText',['../classtinyxml2_1_1_x_m_l_element.html#a926357996bef633cb736e1a558419632',1,'tinyxml2::XMLElement']]], ['queryinttext',['QueryIntText',['../classtinyxml2_1_1_x_m_l_element.html#a926357996bef633cb736e1a558419632',1,'tinyxml2::XMLElement']]],
['queryintvalue',['QueryIntValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993',1,'tinyxml2::XMLAttribute']]], ['queryintvalue',['QueryIntValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993',1,'tinyxml2::XMLAttribute']]],
['querystringattribute',['QueryStringAttribute',['../classtinyxml2_1_1_x_m_l_element.html#adb8ae765f98d0c5037faec48deea78bc',1,'tinyxml2::XMLElement']]],
['queryunsignedattribute',['QueryUnsignedAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f',1,'tinyxml2::XMLElement']]], ['queryunsignedattribute',['QueryUnsignedAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f',1,'tinyxml2::XMLElement']]],
['queryunsignedtext',['QueryUnsignedText',['../classtinyxml2_1_1_x_m_l_element.html#a14d38aa4b5e18a46274a27425188a6a1',1,'tinyxml2::XMLElement']]], ['queryunsignedtext',['QueryUnsignedText',['../classtinyxml2_1_1_x_m_l_element.html#a14d38aa4b5e18a46274a27425188a6a1',1,'tinyxml2::XMLElement']]],
['queryunsignedvalue',['QueryUnsignedValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a48a7f3496f1415832e451bd8d09c9cb9',1,'tinyxml2::XMLAttribute']]] ['queryunsignedvalue',['QueryUnsignedValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a48a7f3496f1415832e451bd8d09c9cb9',1,'tinyxml2::XMLAttribute']]]

View File

@@ -1,6 +1,6 @@
var searchData= var searchData=
[ [
['queryattribute',['QueryAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a042fc30504347b84a56cf863ad528a4f',1,'tinyxml2::XMLElement']]], ['queryattribute',['QueryAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a5b7df3bed2b8954eabf227fa204522eb',1,'tinyxml2::XMLElement']]],
['queryboolattribute',['QueryBoolAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872',1,'tinyxml2::XMLElement']]], ['queryboolattribute',['QueryBoolAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872',1,'tinyxml2::XMLElement']]],
['querybooltext',['QueryBoolText',['../classtinyxml2_1_1_x_m_l_element.html#a3fe5417d59eb8f5c4afe924b7d332736',1,'tinyxml2::XMLElement']]], ['querybooltext',['QueryBoolText',['../classtinyxml2_1_1_x_m_l_element.html#a3fe5417d59eb8f5c4afe924b7d332736',1,'tinyxml2::XMLElement']]],
['queryboolvalue',['QueryBoolValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a5f32e038954256f61c21ff20fd13a09c',1,'tinyxml2::XMLAttribute']]], ['queryboolvalue',['QueryBoolValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a5f32e038954256f61c21ff20fd13a09c',1,'tinyxml2::XMLAttribute']]],
@@ -16,6 +16,7 @@ var searchData=
['queryintattribute',['QueryIntAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1',1,'tinyxml2::XMLElement']]], ['queryintattribute',['QueryIntAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a8a78bc1187c1c45ad89f2690eab567b1',1,'tinyxml2::XMLElement']]],
['queryinttext',['QueryIntText',['../classtinyxml2_1_1_x_m_l_element.html#a926357996bef633cb736e1a558419632',1,'tinyxml2::XMLElement']]], ['queryinttext',['QueryIntText',['../classtinyxml2_1_1_x_m_l_element.html#a926357996bef633cb736e1a558419632',1,'tinyxml2::XMLElement']]],
['queryintvalue',['QueryIntValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993',1,'tinyxml2::XMLAttribute']]], ['queryintvalue',['QueryIntValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993',1,'tinyxml2::XMLAttribute']]],
['querystringattribute',['QueryStringAttribute',['../classtinyxml2_1_1_x_m_l_element.html#adb8ae765f98d0c5037faec48deea78bc',1,'tinyxml2::XMLElement']]],
['queryunsignedattribute',['QueryUnsignedAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f',1,'tinyxml2::XMLElement']]], ['queryunsignedattribute',['QueryUnsignedAttribute',['../classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f',1,'tinyxml2::XMLElement']]],
['queryunsignedtext',['QueryUnsignedText',['../classtinyxml2_1_1_x_m_l_element.html#a14d38aa4b5e18a46274a27425188a6a1',1,'tinyxml2::XMLElement']]], ['queryunsignedtext',['QueryUnsignedText',['../classtinyxml2_1_1_x_m_l_element.html#a14d38aa4b5e18a46274a27425188a6a1',1,'tinyxml2::XMLElement']]],
['queryunsignedvalue',['QueryUnsignedValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a48a7f3496f1415832e451bd8d09c9cb9',1,'tinyxml2::XMLAttribute']]] ['queryunsignedvalue',['QueryUnsignedValue',['../classtinyxml2_1_1_x_m_l_attribute.html#a48a7f3496f1415832e451bd8d09c9cb9',1,'tinyxml2::XMLAttribute']]]

File diff suppressed because one or more lines are too long

6
dox
View File

@@ -38,11 +38,7 @@ PROJECT_NAME = "TinyXML-2"
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
<<<<<<< HEAD PROJECT_NUMBER = 7.1.0
PROJECT_NUMBER = 6.2.0
=======
PROJECT_NUMBER = 6.2.0
>>>>>>> master
# Using the PROJECT_BRIEF tag one can provide an optional one line description # 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 a # for a project that appears at the top of each page and should give viewer a

115
readme.md
View File

@@ -5,7 +5,7 @@ TinyXML-2
![TinyXML-2 Logo](http://www.grinninglizard.com/tinyxml2/TinyXML2_small.png) ![TinyXML-2 Logo](http://www.grinninglizard.com/tinyxml2/TinyXML2_small.png)
TinyXML-2 is a simple, small, efficient, C++ XML parser that can be TinyXML-2 is a simple, small, efficient, C++ XML parser that can be
easily integrated into other programs. easily integrated into other programs.
The master is hosted on github: The master is hosted on github:
@@ -18,30 +18,30 @@ Examples are in the "related pages" tab of the HTML docs.
What it does. What it does.
------------- -------------
In brief, TinyXML-2 parses an XML document, and builds from that a In brief, TinyXML-2 parses an XML document, and builds from that a
Document Object Model (DOM) that can be read, modified, and saved. Document Object Model (DOM) that can be read, modified, and saved.
XML stands for "eXtensible Markup Language." It is a general purpose XML stands for "eXtensible Markup Language." It is a general purpose
human and machine readable markup language to describe arbitrary data. human and machine readable markup language to describe arbitrary data.
All those random file formats created to store application data can All those random file formats created to store application data can
all be replaced with XML. One parser for everything. all be replaced with XML. One parser for everything.
http://en.wikipedia.org/wiki/XML http://en.wikipedia.org/wiki/XML
There are different ways to access and interact with XML data. There are different ways to access and interact with XML data.
TinyXML-2 uses a Document Object Model (DOM), meaning the XML data is parsed TinyXML-2 uses a Document Object Model (DOM), meaning the XML data is parsed
into a C++ objects that can be browsed and manipulated, and then into a C++ objects that can be browsed and manipulated, and then
written to disk or another output stream. You can also construct an XML document written to disk or another output stream. You can also construct an XML document
from scratch with C++ objects and write this to disk or another output from scratch with C++ objects and write this to disk or another output
stream. You can even use TinyXML-2 to stream XML programmatically from stream. You can even use TinyXML-2 to stream XML programmatically from
code without creating a document first. code without creating a document first.
TinyXML-2 is designed to be easy and fast to learn. It is one header and TinyXML-2 is designed to be easy and fast to learn. It is one header and
one cpp file. Simply add these to your project and off you go. one cpp file. Simply add these to your project and off you go.
There is an example file - xmltest.cpp - to get you started. There is an example file - xmltest.cpp - to get you started.
TinyXML-2 is released under the ZLib license, TinyXML-2 is released under the ZLib license,
so you can use it in open source or commercial code. The details so you can use it in open source or commercial code. The details
of the license are at the top of every source file. of the license are at the top of every source file.
@@ -53,50 +53,37 @@ What it doesn't do.
------------------- -------------------
TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) or XSLs TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) or XSLs
(eXtensible Stylesheet Language.) There are other parsers out there (eXtensible Stylesheet Language.) There are other parsers out there
that are much more fully featured. But they are also much bigger, that are much more fully featured. But they are generally bigger and
take longer to set up in your project, have a higher learning curve, more difficult to use. If you are working with
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. browsers or have more complete XML needs, TinyXML-2 is not the parser for you.
TinyXML-1 vs. TinyXML-2 TinyXML-1 vs. TinyXML-2
----------------------- -----------------------
TinyXML-2 is now the focus of all development, well tested, and your TinyXML-2 is now the focus of all development, well tested, and your
best choice unless you have a requirement to maintain TinyXML-1 code. best choice between the two APIs. At this point, unless you are maintaining
legacy code, you should choose TinyXML-2.
TinyXML-2 uses a similar API to TinyXML-1 and the same TinyXML-2 uses a similar API to TinyXML-1 and the same
rich test cases. But the implementation of the parser is completely re-written rich test cases. But the implementation of the parser is completely re-written
to make it more appropriate for use in a game. It uses less memory, is faster, to make it more appropriate for use in a game. It uses less memory, is faster,
and uses far fewer memory allocations. and uses far fewer memory allocations.
TinyXML-2 has no requirement for STL, but has also dropped all STL support. All TinyXML-2 has no requirement or support for STL. By returning `const char*`
strings are query and set as 'const char*'. This allows the use of internal TinyXML-2 can be much more efficient with memory usage. (TinyXML-1 did support
allocators, and keeps the code much simpler. and use STL, but consumed much more memory for the DOM representation.)
Both parsers:
1. Simple to use with similar APIs.
2. DOM based parser.
3. UTF-8 Unicode support. http://en.wikipedia.org/wiki/UTF-8
Advantages of TinyXML-2
1. The focus of all future dev.
2. Many fewer memory allocation (1/10th to 1/100th), uses less memory
(about 40% of TinyXML-1), and faster.
3. No STL requirement.
4. More modern C++, including a proper namespace.
5. Proper and useful handling of whitespace
Advantages of TinyXML-1
1. Support for some C++ STL conventions: streams and strings
2. Very mature and well debugged code base.
Features Features
-------- --------
### Code Page
TinyXML-2 uses UTF-8 exclusively when interpreting XML. All XML is assumed to
be UTF-8.
Filenames for loading / saving are passed unchanged to the underlying OS.
### Memory Model ### Memory Model
An XMLDocument is a C++ object like any other, that can be on the stack, or An XMLDocument is a C++ object like any other, that can be on the stack, or
@@ -123,13 +110,13 @@ White space in text is preserved. For example:
<element> Hello, World</element> <element> Hello, World</element>
The leading space before the "Hello" and the double space after the comma are The leading space before the "Hello" and the double space after the comma are
preserved. Line-feeds are preserved, as in this example: preserved. Line-feeds are preserved, as in this example:
<element> Hello again, <element> Hello again,
World</element> World</element>
However, white space between elements is **not** preserved. Although not strictly However, white space between elements is **not** preserved. Although not strictly
compliant, tracking and reporting inter-element space is awkward, and not normally compliant, tracking and reporting inter-element space is awkward, and not normally
valuable. TinyXML-2 sees these as the same XML: valuable. TinyXML-2 sees these as the same XML:
@@ -145,7 +132,7 @@ valuable. TinyXML-2 sees these as the same XML:
For some applications, it is preferable to collapse whitespace. Collapsing For some applications, it is preferable to collapse whitespace. Collapsing
whitespace gives you "HTML-like" behavior, which is sometimes more suitable whitespace gives you "HTML-like" behavior, which is sometimes more suitable
for hand typed documents. for hand typed documents.
TinyXML-2 supports this with the 'whitespace' parameter to the XMLDocument constructor. TinyXML-2 supports this with the 'whitespace' parameter to the XMLDocument constructor.
(The default is to preserve whitespace, as described above.) (The default is to preserve whitespace, as described above.)
@@ -166,7 +153,7 @@ cannot be parsed correctly. In addition, all nodes (elements, declarations,
text, comments etc.) and attributes have a line number recorded as they are parsed. text, comments etc.) and attributes have a line number recorded as they are parsed.
This allows an application that performs additional validation of the parsed This allows an application that performs additional validation of the parsed
XML document (e.g. application-implemented DTD validation) to report XML document (e.g. application-implemented DTD validation) to report
line number information in it's errors. line number information for error messages.
### Entities ### Entities
@@ -185,10 +172,10 @@ UTF-8 equivalents. For instance, text with the XML of:
Far &amp; Away Far &amp; Away
will have the Value() of "Far & Away" when queried from the XMLText object, will have the Value() of "Far & Away" when queried from the XMLText object,
and will be written back to the XML stream/file as an ampersand. and will be written back to the XML stream/file as an ampersand.
Additionally, any character can be specified by its Unicode code point: Additionally, any character can be specified by its Unicode code point:
The syntax `&#xA0;` or `&#160;` are both to the non-breaking space character. The syntax `&#xA0;` or `&#160;` are both to the non-breaking space character.
This is called a 'numeric character reference'. Any numeric character reference This is called a 'numeric character reference'. Any numeric character reference
that isn't one of the special entities above, will be read, but written as a that isn't one of the special entities above, will be read, but written as a
regular code point. The output is correct, but the entity syntax isn't preserved. regular code point. The output is correct, but the entity syntax isn't preserved.
@@ -234,7 +221,7 @@ Examples
#### Load and parse an XML file. #### Load and parse an XML file.
/* ------ Example 1: Load and parse an XML file. ---- */ /* ------ Example 1: Load and parse an XML file. ---- */
{ {
XMLDocument doc; XMLDocument doc;
doc.LoadFile( "dream.xml" ); doc.LoadFile( "dream.xml" );
@@ -242,22 +229,22 @@ Examples
#### Lookup information. #### Lookup information.
/* ------ Example 2: Lookup information. ---- */ /* ------ Example 2: Lookup information. ---- */
{ {
XMLDocument doc; XMLDocument doc;
doc.LoadFile( "dream.xml" ); doc.LoadFile( "dream.xml" );
// Structure of the XML file: // Structure of the XML file:
// - Element "PLAY" the root Element, which is the // - Element "PLAY" the root Element, which is the
// FirstChildElement of the Document // FirstChildElement of the Document
// - - Element "TITLE" child of the root PLAY Element // - - Element "TITLE" child of the root PLAY Element
// - - - Text child of the TITLE Element // - - - Text child of the TITLE Element
// Navigate to the title, using the convenience function, // Navigate to the title, using the convenience function,
// with a dangerous lack of error checking. // with a dangerous lack of error checking.
const char* title = doc.FirstChildElement( "PLAY" )->FirstChildElement( "TITLE" )->GetText(); const char* title = doc.FirstChildElement( "PLAY" )->FirstChildElement( "TITLE" )->GetText();
printf( "Name of play (1): %s\n", title ); printf( "Name of play (1): %s\n", title );
// Text is just another Node to TinyXML-2. The more // Text is just another Node to TinyXML-2. The more
// general way to get to the XMLText: // general way to get to the XMLText:
XMLText* textNode = doc.FirstChildElement( "PLAY" )->FirstChildElement( "TITLE" )->FirstChild()->ToText(); XMLText* textNode = doc.FirstChildElement( "PLAY" )->FirstChildElement( "TITLE" )->FirstChild()->ToText();
@@ -275,10 +262,10 @@ There are 2 files in TinyXML-2:
And additionally a test file: And additionally a test file:
* xmltest.cpp * xmltest.cpp
Simply compile and run. There is a visual studio 2015 project included, a simple Makefile, Simply compile and run. There is a visual studio 2017 project included, a simple Makefile,
an Xcode project, a Code::Blocks project, and a cmake CMakeLists.txt included to help you. an Xcode project, a Code::Blocks project, and a cmake CMakeLists.txt included to help you.
The top of tinyxml.h even has a simple g++ command line if you are are *nix and don't want The top of tinyxml.h even has a simple g++ command line if you are using Unix/Linux/BSD and
to use a build system. don't want to use a build system.
Versioning Versioning
---------- ----------
@@ -291,7 +278,7 @@ common.
Documentation Documentation
------------- -------------
The documentation is build with Doxygen, using the 'dox' The documentation is built with Doxygen, using the 'dox'
configuration file. configuration file.
License License
@@ -299,27 +286,27 @@ License
TinyXML-2 is released under the zlib license: TinyXML-2 is released under the zlib license:
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any warranty. In no event will the authors be held liable for any
damages arising from the use of this software. damages arising from the use of this software.
Permission is granted to anyone to use this software for any Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions: redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must 1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation software in a product, an acknowledgment in the product documentation
would be appreciated but is not required. would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and 2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software. must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source 3. This notice may not be removed or altered from any source
distribution. distribution.
Contributors Contributors
------------ ------------
Thanks very much to everyone who sends suggestions, bugs, ideas, and Thanks very much to everyone who sends suggestions, bugs, ideas, and
encouragement. It all helps, and makes this project fun. encouragement. It all helps, and makes this project fun.
The original TinyXML-1 has many contributors, who all deserve thanks The original TinyXML-1 has many contributors, who all deserve thanks

File diff suppressed because one or more lines are too long

View File

@@ -45,14 +45,14 @@ distribution.
{ {
va_list va; va_list va;
va_start( va, format ); va_start( va, format );
int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va ); const int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va );
va_end( va ); va_end( va );
return result; return result;
} }
static inline int TIXML_VSNPRINTF( char* buffer, size_t size, const char* format, va_list va ) static inline int TIXML_VSNPRINTF( char* buffer, size_t size, const char* format, va_list va )
{ {
int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va ); const int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va );
return result; return result;
} }
@@ -101,9 +101,9 @@ distribution.
#endif #endif
static const char LINE_FEED = (char)0x0a; // all line endings are normalized to LF static const char LINE_FEED = static_cast<char>(0x0a); // all line endings are normalized to LF
static const char LF = LINE_FEED; static const char LF = LINE_FEED;
static const char CARRIAGE_RETURN = (char)0x0d; // CR gets filtered out static const char CARRIAGE_RETURN = static_cast<char>(0x0d); // CR gets filtered out
static const char CR = CARRIAGE_RETURN; static const char CR = CARRIAGE_RETURN;
static const char SINGLE_QUOTE = '\''; static const char SINGLE_QUOTE = '\'';
static const char DOUBLE_QUOTE = '\"'; static const char DOUBLE_QUOTE = '\"';
@@ -197,7 +197,7 @@ char* StrPair::ParseText( char* p, const char* endTag, int strFlags, int* curLin
TIXMLASSERT(curLineNumPtr); TIXMLASSERT(curLineNumPtr);
char* start = p; char* start = p;
char endChar = *endTag; const char endChar = *endTag;
size_t length = strlen( endTag ); size_t length = strlen( endTag );
// Inner loop of text parsing. // Inner loop of text parsing.
@@ -310,7 +310,7 @@ const char* StrPair::GetStr()
const int buflen = 10; const int buflen = 10;
char buf[buflen] = { 0 }; char buf[buflen] = { 0 };
int len = 0; int len = 0;
char* adjusted = const_cast<char*>( XMLUtil::GetCharacterRef( p, buf, &len ) ); const char* adjusted = const_cast<char*>( XMLUtil::GetCharacterRef( p, buf, &len ) );
if ( adjusted == 0 ) { if ( adjusted == 0 ) {
*q = *p; *q = *p;
++p; ++p;
@@ -430,22 +430,22 @@ void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length
switch (*length) { switch (*length) {
case 4: case 4:
--output; --output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK); *output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
input >>= 6; input >>= 6;
//fall through //fall through
case 3: case 3:
--output; --output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK); *output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
input >>= 6; input >>= 6;
//fall through //fall through
case 2: case 2:
--output; --output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK); *output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
input >>= 6; input >>= 6;
//fall through //fall through
case 1: case 1:
--output; --output;
*output = (char)(input | FIRST_BYTE_MARK[*length]); *output = static_cast<char>(input | FIRST_BYTE_MARK[*length]);
break; break;
default: default:
TIXMLASSERT( false ); TIXMLASSERT( false );
@@ -582,12 +582,17 @@ void XMLUtil::ToStr( double v, char* buffer, int bufferSize )
} }
void XMLUtil::ToStr(int64_t v, char* buffer, int bufferSize) void XMLUtil::ToStr( int64_t v, char* buffer, int bufferSize )
{ {
// horrible syntax trick to make the compiler happy about %lld // horrible syntax trick to make the compiler happy about %lld
TIXML_SNPRINTF(buffer, bufferSize, "%lld", (long long)v); TIXML_SNPRINTF(buffer, bufferSize, "%lld", static_cast<long long>(v));
} }
void XMLUtil::ToStr( uint64_t v, char* buffer, int bufferSize )
{
// horrible syntax trick to make the compiler happy about %llu
TIXML_SNPRINTF(buffer, bufferSize, "%llu", (long long)v);
}
bool XMLUtil::ToInt( const char* str, int* value ) bool XMLUtil::ToInt( const char* str, int* value )
{ {
@@ -612,13 +617,20 @@ bool XMLUtil::ToBool( const char* str, bool* value )
*value = (ival==0) ? false : true; *value = (ival==0) ? false : true;
return true; return true;
} }
if ( StringEqual( str, "true" ) ) { static const char* TRUE[] = { "true", "True", "TRUE", 0 };
*value = true; static const char* FALSE[] = { "false", "False", "FALSE", 0 };
return true;
for (int i = 0; TRUE[i]; ++i) {
if (StringEqual(str, TRUE[i])) {
*value = true;
return true;
}
} }
else if ( StringEqual( str, "false" ) ) { for (int i = 0; FALSE[i]; ++i) {
*value = false; if (StringEqual(str, FALSE[i])) {
return true; *value = false;
return true;
}
} }
return false; return false;
} }
@@ -646,13 +658,23 @@ bool XMLUtil::ToInt64(const char* str, int64_t* value)
{ {
long long v = 0; // horrible syntax trick to make the compiler happy about %lld long long v = 0; // horrible syntax trick to make the compiler happy about %lld
if (TIXML_SSCANF(str, "%lld", &v) == 1) { if (TIXML_SSCANF(str, "%lld", &v) == 1) {
*value = (int64_t)v; *value = static_cast<int64_t>(v);
return true; return true;
} }
return false; return false;
} }
bool XMLUtil::ToUnsigned64(const char* str, uint64_t* value) {
unsigned long long v = 0; // horrible syntax trick to make the compiler happy about %llu
if(TIXML_SSCANF(str, "%llu", &v) == 1) {
*value = (uint64_t)v;
return true;
}
return false;
}
char* XMLDocument::Identify( char* p, XMLNode** node ) char* XMLDocument::Identify( char* p, XMLNode** node )
{ {
TIXMLASSERT( node ); TIXMLASSERT( node );
@@ -1017,7 +1039,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
break; break;
} }
int initialLineNum = node->_parseLineNum; const int initialLineNum = node->_parseLineNum;
StrPair endTag; StrPair endTag;
p = node->ParseDeep( p, &endTag, curLineNumPtr ); p = node->ParseDeep( p, &endTag, curLineNumPtr );
@@ -1029,18 +1051,28 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
break; break;
} }
XMLDeclaration* decl = node->ToDeclaration(); const XMLDeclaration* const decl = node->ToDeclaration();
if ( decl ) { if ( decl ) {
// Declarations are only allowed at document level // Declarations are only allowed at document level
bool wellLocated = ( ToDocument() != 0 ); //
if ( wellLocated ) { // Multiple declarations are allowed but all declarations
// Multiple declarations are allowed but all declarations // must occur before anything else.
// must occur before anything else //
for ( const XMLNode* existingNode = _document->FirstChild(); existingNode; existingNode = existingNode->NextSibling() ) { // Optimized due to a security test case. If the first node is
if ( !existingNode->ToDeclaration() ) { // a declaration, and the last node is a declaration, then only
wellLocated = false; // declarations have so far been added.
break; bool wellLocated = false;
}
if (ToDocument()) {
if (FirstChild()) {
wellLocated =
FirstChild() &&
FirstChild()->ToDeclaration() &&
LastChild() &&
LastChild()->ToDeclaration();
}
else {
wellLocated = true;
} }
} }
if ( !wellLocated ) { if ( !wellLocated ) {
@@ -1363,7 +1395,7 @@ char* XMLAttribute::ParseDeep( char* p, bool processEntities, int* curLineNumPtr
return 0; return 0;
} }
char endTag[2] = { *p, 0 }; const char endTag[2] = { *p, 0 };
++p; // move past opening quote ++p; // move past opening quote
p = _value.ParseText( p, endTag, processEntities ? StrPair::ATTRIBUTE_VALUE : StrPair::ATTRIBUTE_VALUE_LEAVE_ENTITIES, curLineNumPtr ); p = _value.ParseText( p, endTag, processEntities ? StrPair::ATTRIBUTE_VALUE : StrPair::ATTRIBUTE_VALUE_LEAVE_ENTITIES, curLineNumPtr );
@@ -1404,6 +1436,15 @@ XMLError XMLAttribute::QueryInt64Value(int64_t* value) const
} }
XMLError XMLAttribute::QueryUnsigned64Value(uint64_t* value) const
{
if(XMLUtil::ToUnsigned64(Value(), value)) {
return XML_SUCCESS;
}
return XML_WRONG_ATTRIBUTE_TYPE;
}
XMLError XMLAttribute::QueryBoolValue( bool* value ) const XMLError XMLAttribute::QueryBoolValue( bool* value ) const
{ {
if ( XMLUtil::ToBool( Value(), value )) { if ( XMLUtil::ToBool( Value(), value )) {
@@ -1460,6 +1501,12 @@ void XMLAttribute::SetAttribute(int64_t v)
_value.SetStr(buf); _value.SetStr(buf);
} }
void XMLAttribute::SetAttribute(uint64_t v)
{
char buf[BUF_SIZE];
XMLUtil::ToStr(v, buf, BUF_SIZE);
_value.SetStr(buf);
}
void XMLAttribute::SetAttribute( bool v ) void XMLAttribute::SetAttribute( bool v )
@@ -1546,6 +1593,13 @@ int64_t XMLElement::Int64Attribute(const char* name, int64_t defaultValue) const
return i; return i;
} }
uint64_t XMLElement::Unsigned64Attribute(const char* name, uint64_t defaultValue) const
{
uint64_t i = defaultValue;
QueryUnsigned64Attribute(name, &i);
return i;
}
bool XMLElement::BoolAttribute(const char* name, bool defaultValue) const bool XMLElement::BoolAttribute(const char* name, bool defaultValue) const
{ {
bool b = defaultValue; bool b = defaultValue;
@@ -1610,6 +1664,12 @@ void XMLElement::SetText(int64_t v)
SetText(buf); SetText(buf);
} }
void XMLElement::SetText(uint64_t v) {
char buf[BUF_SIZE];
XMLUtil::ToStr(v, buf, BUF_SIZE);
SetText(buf);
}
void XMLElement::SetText( bool v ) void XMLElement::SetText( bool v )
{ {
@@ -1674,6 +1734,19 @@ XMLError XMLElement::QueryInt64Text(int64_t* ival) const
} }
XMLError XMLElement::QueryUnsigned64Text(uint64_t* ival) const
{
if(FirstChild() && FirstChild()->ToText()) {
const char* t = FirstChild()->Value();
if(XMLUtil::ToUnsigned64(t, ival)) {
return XML_SUCCESS;
}
return XML_CAN_NOT_CONVERT_TEXT;
}
return XML_NO_TEXT_NODE;
}
XMLError XMLElement::QueryBoolText( bool* bval ) const XMLError XMLElement::QueryBoolText( bool* bval ) const
{ {
if ( FirstChild() && FirstChild()->ToText() ) { if ( FirstChild() && FirstChild()->ToText() ) {
@@ -1733,6 +1806,13 @@ int64_t XMLElement::Int64Text(int64_t defaultValue) const
return i; return i;
} }
uint64_t XMLElement::Unsigned64Text(uint64_t defaultValue) const
{
uint64_t i = defaultValue;
QueryUnsigned64Text(&i);
return i;
}
bool XMLElement::BoolText(bool defaultValue) const bool XMLElement::BoolText(bool defaultValue) const
{ {
bool b = defaultValue; bool b = defaultValue;
@@ -1820,7 +1900,7 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr )
TIXMLASSERT( attrib ); TIXMLASSERT( attrib );
attrib->_parseLineNum = _document->_parseCurLineNum; attrib->_parseLineNum = _document->_parseCurLineNum;
int attrLineNum = attrib->_parseLineNum; const int attrLineNum = attrib->_parseLineNum;
p = attrib->ParseDeep( p, _document->ProcessEntities(), curLineNumPtr ); p = attrib->ParseDeep( p, _document->ProcessEntities(), curLineNumPtr );
if ( !p || Attribute( attrib->Name() ) ) { if ( !p || Attribute( attrib->Name() ) ) {
@@ -1977,10 +2057,8 @@ const char* XMLDocument::_errorNames[XML_ERROR_COUNT] = {
"XML_ERROR_FILE_NOT_FOUND", "XML_ERROR_FILE_NOT_FOUND",
"XML_ERROR_FILE_COULD_NOT_BE_OPENED", "XML_ERROR_FILE_COULD_NOT_BE_OPENED",
"XML_ERROR_FILE_READ_ERROR", "XML_ERROR_FILE_READ_ERROR",
"UNUSED_XML_ERROR_ELEMENT_MISMATCH",
"XML_ERROR_PARSING_ELEMENT", "XML_ERROR_PARSING_ELEMENT",
"XML_ERROR_PARSING_ATTRIBUTE", "XML_ERROR_PARSING_ATTRIBUTE",
"UNUSED_XML_ERROR_IDENTIFYING_TAG",
"XML_ERROR_PARSING_TEXT", "XML_ERROR_PARSING_TEXT",
"XML_ERROR_PARSING_CDATA", "XML_ERROR_PARSING_CDATA",
"XML_ERROR_PARSING_COMMENT", "XML_ERROR_PARSING_COMMENT",
@@ -2128,7 +2206,7 @@ static FILE* callfopen( const char* filepath, const char* mode )
TIXMLASSERT( mode ); TIXMLASSERT( mode );
#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE) #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE)
FILE* fp = 0; FILE* fp = 0;
errno_t err = fopen_s( &fp, filepath, mode ); const errno_t err = fopen_s( &fp, filepath, mode );
if ( err ) { if ( err ) {
return 0; return 0;
} }
@@ -2186,7 +2264,7 @@ template
struct LongFitsIntoSizeTMinusOne { struct LongFitsIntoSizeTMinusOne {
static bool Fits( unsigned long value ) static bool Fits( unsigned long value )
{ {
return value < (size_t)-1; return value < static_cast<size_t>(-1);
} }
}; };
@@ -2231,7 +2309,7 @@ XMLError XMLDocument::LoadFile( FILE* fp )
const size_t size = filelength; const size_t size = filelength;
TIXMLASSERT( _charBuffer == 0 ); TIXMLASSERT( _charBuffer == 0 );
_charBuffer = new char[size+1]; _charBuffer = new char[size+1];
size_t read = fread( _charBuffer, 1, size, fp ); const size_t read = fread( _charBuffer, 1, size, fp );
if ( read != size ) { if ( read != size ) {
SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 ); SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 );
return _errorID; return _errorID;
@@ -2282,7 +2360,7 @@ XMLError XMLDocument::Parse( const char* p, size_t len )
SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 ); SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
return _errorID; return _errorID;
} }
if ( len == (size_t)(-1) ) { if ( len == static_cast<size_t>(-1) ) {
len = strlen( p ); len = strlen( p );
} }
TIXMLASSERT( _charBuffer == 0 ); TIXMLASSERT( _charBuffer == 0 );
@@ -2324,9 +2402,10 @@ void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ...
_errorLineNum = lineNum; _errorLineNum = lineNum;
_errorStr.Reset(); _errorStr.Reset();
size_t BUFFER_SIZE = 1000; const size_t BUFFER_SIZE = 1000;
char* buffer = new char[BUFFER_SIZE]; char* buffer = new char[BUFFER_SIZE];
TIXMLASSERT(sizeof(error) <= sizeof(int));
TIXML_SNPRINTF(buffer, BUFFER_SIZE, "Error=%s ErrorID=%d (0x%x) Line number=%d", ErrorIDToName(error), int(error), int(error), lineNum); TIXML_SNPRINTF(buffer, BUFFER_SIZE, "Error=%s ErrorID=%d (0x%x) Line number=%d", ErrorIDToName(error), int(error), int(error), lineNum);
if (format) { if (format) {
@@ -2415,13 +2494,13 @@ XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) :
} }
for( int i=0; i<NUM_ENTITIES; ++i ) { for( int i=0; i<NUM_ENTITIES; ++i ) {
const char entityValue = entities[i].value; const char entityValue = entities[i].value;
const unsigned char flagIndex = (unsigned char)entityValue; const unsigned char flagIndex = static_cast<unsigned char>(entityValue);
TIXMLASSERT( flagIndex < ENTITY_RANGE ); TIXMLASSERT( flagIndex < ENTITY_RANGE );
_entityFlag[flagIndex] = true; _entityFlag[flagIndex] = true;
} }
_restrictedEntityFlag[(unsigned char)'&'] = true; _restrictedEntityFlag[static_cast<unsigned char>('&')] = true;
_restrictedEntityFlag[(unsigned char)'<'] = true; _restrictedEntityFlag[static_cast<unsigned char>('<')] = true;
_restrictedEntityFlag[(unsigned char)'>'] = true; // not required, but consistency is nice _restrictedEntityFlag[static_cast<unsigned char>('>')] = true; // not required, but consistency is nice
_buffer.Push( 0 ); _buffer.Push( 0 );
} }
@@ -2496,10 +2575,10 @@ void XMLPrinter::PrintString( const char* p, bool restricted )
// Check for entities. If one is found, flush // Check for entities. If one is found, flush
// the stream up until the entity, write the // the stream up until the entity, write the
// entity, and keep looking. // entity, and keep looking.
if ( flag[(unsigned char)(*q)] ) { if ( flag[static_cast<unsigned char>(*q)] ) {
while ( p < q ) { while ( p < q ) {
const size_t delta = q - p; const size_t delta = q - p;
const int toPrint = ( INT_MAX < delta ) ? INT_MAX : (int)delta; const int toPrint = ( INT_MAX < delta ) ? INT_MAX : static_cast<int>(delta);
Write( p, toPrint ); Write( p, toPrint );
p += toPrint; p += toPrint;
} }
@@ -2523,14 +2602,16 @@ void XMLPrinter::PrintString( const char* p, bool restricted )
++q; ++q;
TIXMLASSERT( p <= q ); TIXMLASSERT( p <= q );
} }
// Flush the remaining string. This will be the entire
// string if an entity wasn't found.
if ( p < q ) {
const size_t delta = q - p;
const int toPrint = ( INT_MAX < delta ) ? INT_MAX : static_cast<int>(delta);
Write( p, toPrint );
}
} }
// Flush the remaining string. This will be the entire else {
// string if an entity wasn't found. Write( p );
TIXMLASSERT( p <= q );
if ( !_processEntities || ( p < q ) ) {
const size_t delta = q - p;
const int toPrint = ( INT_MAX < delta ) ? INT_MAX : (int)delta;
Write( p, toPrint );
} }
} }
@@ -2603,6 +2684,14 @@ void XMLPrinter::PushAttribute(const char* name, int64_t v)
} }
void XMLPrinter::PushAttribute(const char* name, uint64_t v)
{
char buf[BUF_SIZE];
XMLUtil::ToStr(v, buf, BUF_SIZE);
PushAttribute(name, buf);
}
void XMLPrinter::PushAttribute( const char* name, bool v ) void XMLPrinter::PushAttribute( const char* name, bool v )
{ {
char buf[BUF_SIZE]; char buf[BUF_SIZE];
@@ -2672,6 +2761,7 @@ void XMLPrinter::PushText( const char* text, bool cdata )
} }
} }
void XMLPrinter::PushText( int64_t value ) void XMLPrinter::PushText( int64_t value )
{ {
char buf[BUF_SIZE]; char buf[BUF_SIZE];
@@ -2679,6 +2769,15 @@ void XMLPrinter::PushText( int64_t value )
PushText( buf, false ); PushText( buf, false );
} }
void XMLPrinter::PushText( uint64_t value )
{
char buf[BUF_SIZE];
XMLUtil::ToStr(value, buf, BUF_SIZE);
PushText(buf, false);
}
void XMLPrinter::PushText( int value ) void XMLPrinter::PushText( int value )
{ {
char buf[BUF_SIZE]; char buf[BUF_SIZE];

View File

@@ -98,18 +98,18 @@ distribution.
/* Versioning, past 1.0.14: /* Versioning, past 1.0.14:
http://semver.org/ http://semver.org/
*/ */
static const int TIXML2_MAJOR_VERSION = 6; static const int TIXML2_MAJOR_VERSION = 7;
static const int TIXML2_MINOR_VERSION = 2; static const int TIXML2_MINOR_VERSION = 1;
static const int TIXML2_PATCH_VERSION = 0; static const int TIXML2_PATCH_VERSION = 0;
#define TINYXML2_MAJOR_VERSION 6 #define TINYXML2_MAJOR_VERSION 7
#define TINYXML2_MINOR_VERSION 2 #define TINYXML2_MINOR_VERSION 1
#define TINYXML2_PATCH_VERSION 0 #define TINYXML2_PATCH_VERSION 0
// A fixed element depth limit is problematic. There needs to be a // A fixed element depth limit is problematic. There needs to be a
// limit to avoid a stack overflow. However, that limit varies per // limit to avoid a stack overflow. However, that limit varies per
// system, and the capacity of the stack. On the other hand, it's a trivial // system, and the capacity of the stack. On the other hand, it's a trivial
// attack that can result from ill, malicious, or even correctly formed XML, // attack that can result from ill, malicious, or even correctly formed XML,
// so there needs to be a limit in place. // so there needs to be a limit in place.
static const int TINYXML2_MAX_ELEMENT_DEPTH = 100; static const int TINYXML2_MAX_ELEMENT_DEPTH = 100;
@@ -129,8 +129,10 @@ class XMLPrinter;
pointers into the XML file itself, and will apply normalization pointers into the XML file itself, and will apply normalization
and entity translation if actually read. Can also store (and memory and entity translation if actually read. Can also store (and memory
manage) a traditional char[] manage) a traditional char[]
Isn't clear why TINYXML2_LIB is needed; but seems to fix #719
*/ */
class StrPair class TINYXML2_LIB StrPair
{ {
public: public:
enum { enum {
@@ -190,7 +192,7 @@ private:
char* _end; char* _end;
StrPair( const StrPair& other ); // not supported StrPair( const StrPair& other ); // not supported
void operator=( StrPair& other ); // not supported, use TransferTo() void operator=( const StrPair& other ); // not supported, use TransferTo()
}; };
@@ -288,7 +290,7 @@ public:
return _mem; return _mem;
} }
T* Mem() { T* Mem() {
TIXMLASSERT( _mem ); TIXMLASSERT( _mem );
return _mem; return _mem;
} }
@@ -301,7 +303,7 @@ private:
TIXMLASSERT( cap > 0 ); TIXMLASSERT( cap > 0 );
if ( cap > _allocated ) { if ( cap > _allocated ) {
TIXMLASSERT( cap <= INT_MAX / 2 ); TIXMLASSERT( cap <= INT_MAX / 2 );
int newAllocated = cap * 2; const int newAllocated = cap * 2;
T* newMem = new T[newAllocated]; T* newMem = new T[newAllocated];
TIXMLASSERT( newAllocated >= _size ); TIXMLASSERT( newAllocated >= _size );
memcpy( newMem, _mem, sizeof(T)*_size ); // warning: not using constructors, only works for PODs memcpy( newMem, _mem, sizeof(T)*_size ); // warning: not using constructors, only works for PODs
@@ -334,7 +336,6 @@ public:
virtual void* Alloc() = 0; virtual void* Alloc() = 0;
virtual void Free( void* ) = 0; virtual void Free( void* ) = 0;
virtual void SetTracked() = 0; virtual void SetTracked() = 0;
virtual void Clear() = 0;
}; };
@@ -347,9 +348,9 @@ class MemPoolT : public MemPool
public: public:
MemPoolT() : _blockPtrs(), _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {} MemPoolT() : _blockPtrs(), _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {}
~MemPoolT() { ~MemPoolT() {
Clear(); MemPoolT< ITEM_SIZE >::Clear();
} }
void Clear() { void Clear() {
// Delete the blocks. // Delete the blocks.
while( !_blockPtrs.Empty()) { while( !_blockPtrs.Empty()) {
@@ -395,7 +396,7 @@ public:
++_nUntracked; ++_nUntracked;
return result; return result;
} }
virtual void Free( void* mem ) { virtual void Free( void* mem ) {
if ( !mem ) { if ( !mem ) {
return; return;
@@ -525,10 +526,8 @@ enum XMLError {
XML_ERROR_FILE_NOT_FOUND, XML_ERROR_FILE_NOT_FOUND,
XML_ERROR_FILE_COULD_NOT_BE_OPENED, XML_ERROR_FILE_COULD_NOT_BE_OPENED,
XML_ERROR_FILE_READ_ERROR, XML_ERROR_FILE_READ_ERROR,
UNUSED_XML_ERROR_ELEMENT_MISMATCH, // remove at next major version
XML_ERROR_PARSING_ELEMENT, XML_ERROR_PARSING_ELEMENT,
XML_ERROR_PARSING_ATTRIBUTE, XML_ERROR_PARSING_ATTRIBUTE,
UNUSED_XML_ERROR_IDENTIFYING_TAG, // remove at next major version
XML_ERROR_PARSING_TEXT, XML_ERROR_PARSING_TEXT,
XML_ERROR_PARSING_CDATA, XML_ERROR_PARSING_CDATA,
XML_ERROR_PARSING_COMMENT, XML_ERROR_PARSING_COMMENT,
@@ -572,7 +571,7 @@ public:
static bool IsWhiteSpace( char p ) { static bool IsWhiteSpace( char p ) {
return !IsUTF8Continuation(p) && isspace( static_cast<unsigned char>(p) ); return !IsUTF8Continuation(p) && isspace( static_cast<unsigned char>(p) );
} }
inline static bool IsNameStartChar( unsigned char ch ) { inline static bool IsNameStartChar( unsigned char ch ) {
if ( ch >= 128 ) { if ( ch >= 128 ) {
// This is a heuristic guess in attempt to not implement Unicode-aware isalpha() // This is a heuristic guess in attempt to not implement Unicode-aware isalpha()
@@ -583,7 +582,7 @@ public:
} }
return ch == ':' || ch == '_'; return ch == ':' || ch == '_';
} }
inline static bool IsNameChar( unsigned char ch ) { inline static bool IsNameChar( unsigned char ch ) {
return IsNameStartChar( ch ) return IsNameStartChar( ch )
|| isdigit( ch ) || isdigit( ch )
@@ -600,7 +599,7 @@ public:
TIXMLASSERT( nChar >= 0 ); TIXMLASSERT( nChar >= 0 );
return strncmp( p, q, nChar ) == 0; return strncmp( p, q, nChar ) == 0;
} }
inline static bool IsUTF8Continuation( char p ) { inline static bool IsUTF8Continuation( char p ) {
return ( p & 0x80 ) != 0; return ( p & 0x80 ) != 0;
} }
@@ -618,6 +617,7 @@ public:
static void ToStr( float v, char* buffer, int bufferSize ); static void ToStr( float v, char* buffer, int bufferSize );
static void ToStr( double v, char* buffer, int bufferSize ); static void ToStr( double v, char* buffer, int bufferSize );
static void ToStr(int64_t v, char* buffer, int bufferSize); static void ToStr(int64_t v, char* buffer, int bufferSize);
static void ToStr(uint64_t v, char* buffer, int bufferSize);
// converts strings to primitive types // converts strings to primitive types
static bool ToInt( const char* str, int* value ); static bool ToInt( const char* str, int* value );
@@ -626,7 +626,7 @@ public:
static bool ToFloat( const char* str, float* value ); static bool ToFloat( const char* str, float* value );
static bool ToDouble( const char* str, double* value ); static bool ToDouble( const char* str, double* value );
static bool ToInt64(const char* str, int64_t* value); static bool ToInt64(const char* str, int64_t* value);
static bool ToUnsigned64(const char* str, uint64_t* value);
// Changes what is serialized for a boolean value. // Changes what is serialized for a boolean value.
// Default to "true" and "false". Shouldn't be changed // Default to "true" and "false". Shouldn't be changed
// unless you have a special testing or compatibility need. // unless you have a special testing or compatibility need.
@@ -882,11 +882,11 @@ public:
Make a copy of this node and all its children. Make a copy of this node and all its children.
If the 'target' is null, then the nodes will If the 'target' is null, then the nodes will
be allocated in the current document. If 'target' be allocated in the current document. If 'target'
is specified, the memory will be allocated is the is specified, the memory will be allocated is the
specified XMLDocument. specified XMLDocument.
NOTE: This is probably not the correct tool to NOTE: This is probably not the correct tool to
copy a document, since XMLDocuments can have multiple copy a document, since XMLDocuments can have multiple
top level XMLNodes. You probably want to use top level XMLNodes. You probably want to use
XMLDocument::DeepCopy() XMLDocument::DeepCopy()
@@ -925,8 +925,8 @@ public:
*/ */
virtual bool Accept( XMLVisitor* visitor ) const = 0; virtual bool Accept( XMLVisitor* visitor ) const = 0;
/** /**
Set user data into the XMLNode. TinyXML-2 in Set user data into the XMLNode. TinyXML-2 in
no way processes or interprets user data. no way processes or interprets user data.
It is initially 0. It is initially 0.
*/ */
@@ -940,7 +940,7 @@ public:
void* GetUserData() const { return _userData; } void* GetUserData() const { return _userData; }
protected: protected:
XMLNode( XMLDocument* ); explicit XMLNode( XMLDocument* );
virtual ~XMLNode(); virtual ~XMLNode();
virtual char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr); virtual char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr);
@@ -1008,7 +1008,7 @@ public:
virtual bool ShallowEqual( const XMLNode* compare ) const; virtual bool ShallowEqual( const XMLNode* compare ) const;
protected: protected:
XMLText( XMLDocument* doc ) : XMLNode( doc ), _isCData( false ) {} explicit XMLText( XMLDocument* doc ) : XMLNode( doc ), _isCData( false ) {}
virtual ~XMLText() {} virtual ~XMLText() {}
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr );
@@ -1039,7 +1039,7 @@ public:
virtual bool ShallowEqual( const XMLNode* compare ) const; virtual bool ShallowEqual( const XMLNode* compare ) const;
protected: protected:
XMLComment( XMLDocument* doc ); explicit XMLComment( XMLDocument* doc );
virtual ~XMLComment(); virtual ~XMLComment();
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr); char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr);
@@ -1078,7 +1078,7 @@ public:
virtual bool ShallowEqual( const XMLNode* compare ) const; virtual bool ShallowEqual( const XMLNode* compare ) const;
protected: protected:
XMLDeclaration( XMLDocument* doc ); explicit XMLDeclaration( XMLDocument* doc );
virtual ~XMLDeclaration(); virtual ~XMLDeclaration();
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr );
@@ -1113,7 +1113,7 @@ public:
virtual bool ShallowEqual( const XMLNode* compare ) const; virtual bool ShallowEqual( const XMLNode* compare ) const;
protected: protected:
XMLUnknown( XMLDocument* doc ); explicit XMLUnknown( XMLDocument* doc );
virtual ~XMLUnknown(); virtual ~XMLUnknown();
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr );
@@ -1165,6 +1165,12 @@ public:
return i; return i;
} }
uint64_t Unsigned64Value() const {
uint64_t i = 0;
QueryUnsigned64Value(&i);
return i;
}
/// Query as an unsigned integer. See IntValue() /// Query as an unsigned integer. See IntValue()
unsigned UnsignedValue() const { unsigned UnsignedValue() const {
unsigned i=0; unsigned i=0;
@@ -1199,6 +1205,8 @@ public:
XMLError QueryUnsignedValue( unsigned int* value ) const; XMLError QueryUnsignedValue( unsigned int* value ) const;
/// See QueryIntValue /// See QueryIntValue
XMLError QueryInt64Value(int64_t* value) const; XMLError QueryInt64Value(int64_t* value) const;
/// See QueryIntValue
XMLError QueryUnsigned64Value(uint64_t* value) const;
/// See QueryIntValue /// See QueryIntValue
XMLError QueryBoolValue( bool* value ) const; XMLError QueryBoolValue( bool* value ) const;
/// See QueryIntValue /// See QueryIntValue
@@ -1214,7 +1222,9 @@ public:
void SetAttribute( unsigned value ); void SetAttribute( unsigned value );
/// Set the attribute to value. /// Set the attribute to value.
void SetAttribute(int64_t value); void SetAttribute(int64_t value);
/// Set the attribute to value. /// Set the attribute to value.
void SetAttribute(uint64_t value);
/// Set the attribute to value.
void SetAttribute( bool value ); void SetAttribute( bool value );
/// Set the attribute to value. /// Set the attribute to value.
void SetAttribute( double value ); void SetAttribute( double value );
@@ -1302,6 +1312,8 @@ public:
unsigned UnsignedAttribute(const char* name, unsigned defaultValue = 0) const; unsigned UnsignedAttribute(const char* name, unsigned defaultValue = 0) const;
/// See IntAttribute() /// See IntAttribute()
int64_t Int64Attribute(const char* name, int64_t defaultValue = 0) const; int64_t Int64Attribute(const char* name, int64_t defaultValue = 0) const;
/// See IntAttribute()
uint64_t Unsigned64Attribute(const char* name, uint64_t defaultValue = 0) const;
/// See IntAttribute() /// See IntAttribute()
bool BoolAttribute(const char* name, bool defaultValue = false) const; bool BoolAttribute(const char* name, bool defaultValue = false) const;
/// See IntAttribute() /// See IntAttribute()
@@ -1348,6 +1360,15 @@ public:
return a->QueryInt64Value(value); return a->QueryInt64Value(value);
} }
/// See QueryIntAttribute()
XMLError QueryUnsigned64Attribute(const char* name, uint64_t* value) const {
const XMLAttribute* a = FindAttribute(name);
if(!a) {
return XML_NO_ATTRIBUTE;
}
return a->QueryUnsigned64Value(value);
}
/// See QueryIntAttribute() /// See QueryIntAttribute()
XMLError QueryBoolAttribute( const char* name, bool* value ) const { XMLError QueryBoolAttribute( const char* name, bool* value ) const {
const XMLAttribute* a = FindAttribute( name ); const XMLAttribute* a = FindAttribute( name );
@@ -1384,14 +1405,14 @@ public:
} }
/** Given an attribute name, QueryAttribute() returns /** Given an attribute name, QueryAttribute() returns
XML_SUCCESS, XML_WRONG_ATTRIBUTE_TYPE if the conversion XML_SUCCESS, XML_WRONG_ATTRIBUTE_TYPE if the conversion
can't be performed, or XML_NO_ATTRIBUTE if the attribute can't be performed, or XML_NO_ATTRIBUTE if the attribute
doesn't exist. It is overloaded for the primitive types, doesn't exist. It is overloaded for the primitive types,
and is a generally more convenient replacement of and is a generally more convenient replacement of
QueryIntAttribute() and related functions. QueryIntAttribute() and related functions.
If successful, the result of the conversion If successful, the result of the conversion
will be written to 'value'. If not successful, nothing will will be written to 'value'. If not successful, nothing will
be written to 'value'. This allows you to provide default be written to 'value'. This allows you to provide default
@@ -1402,27 +1423,31 @@ public:
QueryAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10 QueryAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
@endverbatim @endverbatim
*/ */
int QueryAttribute( const char* name, int* value ) const { XMLError QueryAttribute( const char* name, int* value ) const {
return QueryIntAttribute( name, value ); return QueryIntAttribute( name, value );
} }
int QueryAttribute( const char* name, unsigned int* value ) const { XMLError QueryAttribute( const char* name, unsigned int* value ) const {
return QueryUnsignedAttribute( name, value ); return QueryUnsignedAttribute( name, value );
} }
int QueryAttribute(const char* name, int64_t* value) const { XMLError QueryAttribute(const char* name, int64_t* value) const {
return QueryInt64Attribute(name, value); return QueryInt64Attribute(name, value);
} }
int QueryAttribute( const char* name, bool* value ) const { XMLError QueryAttribute(const char* name, uint64_t* value) const {
return QueryUnsigned64Attribute(name, value);
}
XMLError QueryAttribute( const char* name, bool* value ) const {
return QueryBoolAttribute( name, value ); return QueryBoolAttribute( name, value );
} }
int QueryAttribute( const char* name, double* value ) const { XMLError QueryAttribute( const char* name, double* value ) const {
return QueryDoubleAttribute( name, value ); return QueryDoubleAttribute( name, value );
} }
int QueryAttribute( const char* name, float* value ) const { XMLError QueryAttribute( const char* name, float* value ) const {
return QueryFloatAttribute( name, value ); return QueryFloatAttribute( name, value );
} }
@@ -1448,7 +1473,13 @@ public:
a->SetAttribute(value); a->SetAttribute(value);
} }
/// Sets the named attribute to value. /// Sets the named attribute to value.
void SetAttribute(const char* name, uint64_t value) {
XMLAttribute* a = FindOrCreateAttribute(name);
a->SetAttribute(value);
}
/// Sets the named attribute to value.
void SetAttribute( const char* name, bool value ) { void SetAttribute( const char* name, bool value ) {
XMLAttribute* a = FindOrCreateAttribute( name ); XMLAttribute* a = FindOrCreateAttribute( name );
a->SetAttribute( value ); a->SetAttribute( value );
@@ -1530,7 +1561,7 @@ public:
@verbatim @verbatim
<foo>Hullaballoo!<b>This is text</b></foo> <foo>Hullaballoo!<b>This is text</b></foo>
@endverbatim @endverbatim
For this XML: For this XML:
@verbatim @verbatim
<foo /> <foo />
@@ -1544,15 +1575,17 @@ public:
/// Convenience method for setting text inside an element. See SetText() for important limitations. /// Convenience method for setting text inside an element. See SetText() for important limitations.
void SetText( int value ); void SetText( int value );
/// Convenience method for setting text inside an element. See SetText() for important limitations. /// Convenience method for setting text inside an element. See SetText() for important limitations.
void SetText( unsigned value ); void SetText( unsigned value );
/// Convenience method for setting text inside an element. See SetText() for important limitations. /// Convenience method for setting text inside an element. See SetText() for important limitations.
void SetText(int64_t value); void SetText(int64_t value);
/// Convenience method for setting text inside an element. See SetText() for important limitations.
void SetText(uint64_t value);
/// Convenience method for setting text inside an element. See SetText() for important limitations. /// Convenience method for setting text inside an element. See SetText() for important limitations.
void SetText( bool value ); void SetText( bool value );
/// Convenience method for setting text inside an element. See SetText() for important limitations. /// Convenience method for setting text inside an element. See SetText() for important limitations.
void SetText( double value ); void SetText( double value );
/// Convenience method for setting text inside an element. See SetText() for important limitations. /// Convenience method for setting text inside an element. See SetText() for important limitations.
void SetText( float value ); void SetText( float value );
/** /**
Convenience method to query the value of a child text node. This is probably best Convenience method to query the value of a child text node. This is probably best
@@ -1586,6 +1619,8 @@ public:
/// See QueryIntText() /// See QueryIntText()
XMLError QueryInt64Text(int64_t* uval) const; XMLError QueryInt64Text(int64_t* uval) const;
/// See QueryIntText() /// See QueryIntText()
XMLError QueryUnsigned64Text(uint64_t* uval) const;
/// See QueryIntText()
XMLError QueryBoolText( bool* bval ) const; XMLError QueryBoolText( bool* bval ) const;
/// See QueryIntText() /// See QueryIntText()
XMLError QueryDoubleText( double* dval ) const; XMLError QueryDoubleText( double* dval ) const;
@@ -1598,6 +1633,8 @@ public:
unsigned UnsignedText(unsigned defaultValue = 0) const; unsigned UnsignedText(unsigned defaultValue = 0) const;
/// See QueryIntText() /// See QueryIntText()
int64_t Int64Text(int64_t defaultValue = 0) const; int64_t Int64Text(int64_t defaultValue = 0) const;
/// See QueryIntText()
uint64_t Unsigned64Text(uint64_t defaultValue = 0) const;
/// See QueryIntText() /// See QueryIntText()
bool BoolText(bool defaultValue = false) const; bool BoolText(bool defaultValue = false) const;
/// See QueryIntText() /// See QueryIntText()
@@ -1626,11 +1663,7 @@ private:
XMLElement( const XMLElement& ); // not supported XMLElement( const XMLElement& ); // not supported
void operator=( const XMLElement& ); // not supported void operator=( const XMLElement& ); // not supported
XMLAttribute* FindAttribute( const char* name ) {
return const_cast<XMLAttribute*>(const_cast<const XMLElement*>(this)->FindAttribute( name ));
}
XMLAttribute* FindOrCreateAttribute( const char* name ); XMLAttribute* FindOrCreateAttribute( const char* name );
//void LinkAttribute( XMLAttribute* attrib );
char* ParseAttributes( char* p, int* curLineNumPtr ); char* ParseAttributes( char* p, int* curLineNumPtr );
static void DeleteAttribute( XMLAttribute* attribute ); static void DeleteAttribute( XMLAttribute* attribute );
XMLAttribute* CreateAttribute(); XMLAttribute* CreateAttribute();
@@ -1660,7 +1693,7 @@ class TINYXML2_LIB XMLDocument : public XMLNode
friend class XMLElement; friend class XMLElement;
// Gives access to SetError and Push/PopDepth, but over-access for everything else. // Gives access to SetError and Push/PopDepth, but over-access for everything else.
// Wishing C++ had "internal" scope. // Wishing C++ had "internal" scope.
friend class XMLNode; friend class XMLNode;
friend class XMLText; friend class XMLText;
friend class XMLComment; friend class XMLComment;
friend class XMLDeclaration; friend class XMLDeclaration;
@@ -1689,7 +1722,7 @@ public:
specified, TinyXML-2 will assume 'xml' points to a specified, TinyXML-2 will assume 'xml' points to a
null terminated string. null terminated string.
*/ */
XMLError Parse( const char* xml, size_t nBytes=(size_t)(-1) ); XMLError Parse( const char* xml, size_t nBytes=static_cast<size_t>(-1) );
/** /**
Load an XML file from disk. Load an XML file from disk.
@@ -1700,8 +1733,8 @@ public:
/** /**
Load an XML file from disk. You are responsible Load an XML file from disk. You are responsible
for providing and closing the FILE*. for providing and closing the FILE*.
NOTE: The file should be opened as binary ("rb") NOTE: The file should be opened as binary ("rb")
not text in order for TinyXML-2 to correctly not text in order for TinyXML-2 to correctly
do newline normalization. do newline normalization.
@@ -1831,7 +1864,7 @@ public:
const char* ErrorName() const; const char* ErrorName() const;
static const char* ErrorIDToName(XMLError errorID); static const char* ErrorIDToName(XMLError errorID);
/** Returns a "long form" error description. A hopefully helpful /** Returns a "long form" error description. A hopefully helpful
diagnostic with location, line number, and/or additional info. diagnostic with location, line number, and/or additional info.
*/ */
const char* ErrorStr() const; const char* ErrorStr() const;
@@ -1839,12 +1872,12 @@ public:
/// A (trivial) utility function that prints the ErrorStr() to stdout. /// A (trivial) utility function that prints the ErrorStr() to stdout.
void PrintError() const; void PrintError() const;
/// Return the line where the error occured, or zero if unknown. /// Return the line where the error occurred, or zero if unknown.
int ErrorLineNum() const int ErrorLineNum() const
{ {
return _errorLineNum; return _errorLineNum;
} }
/// Clear the document, resetting it to the initial state. /// Clear the document, resetting it to the initial state.
void Clear(); void Clear();
@@ -1907,8 +1940,8 @@ private:
// the stack. Track stack depth, and error out if needed. // the stack. Track stack depth, and error out if needed.
class DepthTracker { class DepthTracker {
public: public:
DepthTracker(XMLDocument * document) { explicit DepthTracker(XMLDocument * document) {
this->_document = document; this->_document = document;
document->PushDepth(); document->PushDepth();
} }
~DepthTracker() { ~DepthTracker() {
@@ -1996,10 +2029,10 @@ class TINYXML2_LIB XMLHandle
{ {
public: public:
/// Create a handle from any node (at any depth of the tree.) This can be a null pointer. /// Create a handle from any node (at any depth of the tree.) This can be a null pointer.
XMLHandle( XMLNode* node ) : _node( node ) { explicit XMLHandle( XMLNode* node ) : _node( node ) {
} }
/// Create a handle from a node. /// Create a handle from a node.
XMLHandle( XMLNode& node ) : _node( &node ) { explicit XMLHandle( XMLNode& node ) : _node( &node ) {
} }
/// Copy constructor /// Copy constructor
XMLHandle( const XMLHandle& ref ) : _node( ref._node ) { XMLHandle( const XMLHandle& ref ) : _node( ref._node ) {
@@ -2076,9 +2109,9 @@ private:
class TINYXML2_LIB XMLConstHandle class TINYXML2_LIB XMLConstHandle
{ {
public: public:
XMLConstHandle( const XMLNode* node ) : _node( node ) { explicit XMLConstHandle( const XMLNode* node ) : _node( node ) {
} }
XMLConstHandle( const XMLNode& node ) : _node( &node ) { explicit XMLConstHandle( const XMLNode& node ) : _node( &node ) {
} }
XMLConstHandle( const XMLConstHandle& ref ) : _node( ref._node ) { XMLConstHandle( const XMLConstHandle& ref ) : _node( ref._node ) {
} }
@@ -2199,7 +2232,8 @@ public:
void PushAttribute( const char* name, const char* value ); void PushAttribute( const char* name, const char* value );
void PushAttribute( const char* name, int value ); void PushAttribute( const char* name, int value );
void PushAttribute( const char* name, unsigned value ); void PushAttribute( const char* name, unsigned value );
void PushAttribute(const char* name, int64_t value); void PushAttribute( const char* name, int64_t value );
void PushAttribute( const char* name, uint64_t value );
void PushAttribute( const char* name, bool value ); void PushAttribute( const char* name, bool value );
void PushAttribute( const char* name, double value ); void PushAttribute( const char* name, double value );
/// If streaming, close the Element. /// If streaming, close the Element.
@@ -2211,8 +2245,10 @@ public:
void PushText( int value ); void PushText( int value );
/// Add a text node from an unsigned. /// Add a text node from an unsigned.
void PushText( unsigned value ); void PushText( unsigned value );
/// Add a text node from an unsigned. /// Add a text node from a signed 64bit integer.
void PushText(int64_t value); void PushText( int64_t value );
/// Add a text node from an unsigned 64bit integer.
void PushText( uint64_t value );
/// Add a text node from a bool. /// Add a text node from a bool.
void PushText( bool value ); void PushText( bool value );
/// Add a text node from a float. /// Add a text node from a float.
@@ -2258,10 +2294,10 @@ public:
If in print to memory mode, reset the buffer to the If in print to memory mode, reset the buffer to the
beginning. beginning.
*/ */
void ClearBuffer() { void ClearBuffer( bool resetToFirstElement = true ) {
_buffer.Clear(); _buffer.Clear();
_buffer.Push(0); _buffer.Push(0);
_firstElement = true; _firstElement = resetToFirstElement;
} }
protected: protected:

View File

@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@ prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix} exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_LIBDIR@ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
Name: TinyXML2 Name: TinyXML2
Description: simple, small, C++ XML parser Description: simple, small, C++ XML parser

194
xmltest.cpp Normal file → Executable file
View File

@@ -34,7 +34,7 @@ bool XMLTest (const char* testString, const char* expected, const char* found, b
pass = true; pass = true;
else if ( !expected || !found ) else if ( !expected || !found )
pass = false; pass = false;
else else
pass = !strcmp( expected, found ); pass = !strcmp( expected, found );
if ( pass ) if ( pass )
printf ("[pass]"); printf ("[pass]");
@@ -82,8 +82,15 @@ template< class T > bool XMLTest( const char* testString, T expected, T found, b
if ( !echo ) if ( !echo )
printf (" %s\n", testString); printf (" %s\n", testString);
else else {
printf (" %s [%d][%d]\n", testString, static_cast<int>(expected), static_cast<int>(found) ); char expectedAsString[64];
XMLUtil::ToStr(expected, expectedAsString, sizeof(expectedAsString));
char foundAsString[64];
XMLUtil::ToStr(found, foundAsString, sizeof(foundAsString));
printf (" %s [%s][%s]\n", testString, expectedAsString, foundAsString );
}
if ( pass ) if ( pass )
++gPass; ++gPass;
@@ -121,7 +128,7 @@ int example_1()
* @skip example_1() * @skip example_1()
* @until } * @until }
*/ */
int example_2() int example_2()
{ {
@@ -172,8 +179,8 @@ int example_3()
checking; working code should check for null checking; working code should check for null
pointers when walking an XML tree, or use pointers when walking an XML tree, or use
XMLHandle. XMLHandle.
(The XML is an excerpt from "dream.xml"). (The XML is an excerpt from "dream.xml").
@skip example_3() @skip example_3()
@until </PLAY>"; @until </PLAY>";
@@ -192,7 +199,7 @@ int example_3()
</ul> </ul>
</ul> </ul>
For this example, we want to print out the For this example, we want to print out the
title of the play. The text of the title (what title of the play. The text of the title (what
we want) is child of the "TITLE" element which we want) is child of the "TITLE" element which
is a child of the "PLAY" element. is a child of the "PLAY" element.
@@ -212,8 +219,8 @@ int example_3()
Text is just another Node in the XML DOM. And in Text is just another Node in the XML DOM. And in
fact you should be a little cautious with it, as fact you should be a little cautious with it, as
text nodes can contain elements. text nodes can contain elements.
@verbatim @verbatim
Consider: A Midsummer Night's <b>Dream</b> Consider: A Midsummer Night's <b>Dream</b>
@endverbatim @endverbatim
@@ -225,7 +232,7 @@ int example_3()
Noting that here we use FirstChild() since we are Noting that here we use FirstChild() since we are
looking for XMLText, not an element, and ToText() looking for XMLText, not an element, and ToText()
is a cast from a Node to a XMLText. is a cast from a Node to a XMLText.
*/ */
@@ -269,7 +276,7 @@ bool example_4()
@skip example_4() @skip example_4()
@until "</information>"; @until "</information>";
TinyXML-2 has accessors for both approaches. TinyXML-2 has accessors for both approaches.
When using an attribute, you navigate to the XMLElement When using an attribute, you navigate to the XMLElement
with that attribute and use the QueryIntAttribute() with that attribute and use the QueryIntAttribute()
@@ -454,9 +461,9 @@ int main( int argc, const char ** argv )
// Build: // Build:
// <element> // <element>
// <!--comment--> // <!--comment-->
// <sub attrib="0" />
// <sub attrib="1" /> // <sub attrib="1" />
// <sub attrib="2" /> // <sub attrib="2" >& Text!</sub>
// <sub attrib="3" >& Text!</sub>
// <element> // <element>
XMLDocument* doc = new XMLDocument(); XMLDocument* doc = new XMLDocument();
@@ -569,7 +576,7 @@ int main( int argc, const char ** argv )
XMLTest( "Bad XML", XML_ERROR_PARSING_ATTRIBUTE, doc.ErrorID() ); XMLTest( "Bad XML", XML_ERROR_PARSING_ATTRIBUTE, doc.ErrorID() );
const char* errorStr = doc.ErrorStr(); const char* errorStr = doc.ErrorStr();
XMLTest("Formatted error string", XMLTest("Formatted error string",
"Error=XML_ERROR_PARSING_ATTRIBUTE ErrorID=8 (0x8) Line number=3: XMLElement name=wrong", "Error=XML_ERROR_PARSING_ATTRIBUTE ErrorID=7 (0x7) Line number=3: XMLElement name=wrong",
errorStr); errorStr);
} }
@@ -651,7 +658,7 @@ int main( int argc, const char ** argv )
XMLTest( "Alternate query", true, iVal == iVal2 ); XMLTest( "Alternate query", true, iVal == iVal2 );
XMLTest( "Alternate query", true, dVal == dVal2 ); XMLTest( "Alternate query", true, dVal == dVal2 );
XMLTest( "Alternate query", true, iVal == ele->IntAttribute("int") ); XMLTest( "Alternate query", true, iVal == ele->IntAttribute("int") );
XMLTest( "Alternate query", true, dVal == ele->DoubleAttribute("double") ); XMLTest( "Alternate query", true, dVal == ele->DoubleAttribute("double") );
} }
{ {
@@ -766,7 +773,7 @@ int main( int argc, const char ** argv )
doc.Parse( str ); doc.Parse( str );
XMLTest( "Text in nested element", false, doc.Error() ); XMLTest( "Text in nested element", false, doc.Error() );
element = doc.RootElement(); element = doc.RootElement();
element->SetText("wolves"); element->SetText("wolves");
XMLTest( "SetText() prefix to nested non-text children.", "wolves", element->GetText() ); XMLTest( "SetText() prefix to nested non-text children.", "wolves", element->GetText() );
@@ -774,7 +781,7 @@ int main( int argc, const char ** argv )
doc.Parse( str ); doc.Parse( str );
XMLTest( "Empty self-closed element round 2", false, doc.Error() ); XMLTest( "Empty self-closed element round 2", false, doc.Error() );
element = doc.RootElement(); element = doc.RootElement();
element->SetText( "str" ); element->SetText( "str" );
XMLTest( "SetText types", "str", element->GetText() ); XMLTest( "SetText types", "str", element->GetText() );
@@ -797,6 +804,7 @@ int main( int argc, const char ** argv )
// ---------- Attributes --------- // ---------- Attributes ---------
{ {
static const int64_t BIG = -123456789012345678; static const int64_t BIG = -123456789012345678;
static const uint64_t BIG_POS = 123456789012345678;
XMLDocument doc; XMLDocument doc;
XMLElement* element = doc.NewElement("element"); XMLElement* element = doc.NewElement("element");
doc.InsertFirstChild(element); doc.InsertFirstChild(element);
@@ -857,7 +865,23 @@ int main( int argc, const char ** argv )
} }
XMLTest("Attribute: int64_t", BIG, element->Int64Attribute("attrib"), true); XMLTest("Attribute: int64_t", BIG, element->Int64Attribute("attrib"), true);
} }
{ {
element->SetAttribute("attrib", BIG_POS);
{
uint64_t v = 0;
XMLError queryResult = element->QueryUnsigned64Attribute("attrib", &v);
XMLTest("Attribute: uint64_t", XML_SUCCESS, queryResult, true);
XMLTest("Attribute: uint64_t", BIG_POS, v, true);
}
{
uint64_t v = 0;
int queryResult = element->QueryAttribute("attrib", &v);
XMLTest("Attribute: uint64_t", (int)XML_SUCCESS, queryResult, true);
XMLTest("Attribute: uint64_t", BIG_POS, v, true);
}
XMLTest("Attribute: uint64_t", BIG_POS, element->Unsigned64Attribute("attrib"), true);
}
{
element->SetAttribute("attrib", true); element->SetAttribute("attrib", true);
{ {
bool v = false; bool v = false;
@@ -924,7 +948,14 @@ int main( int argc, const char ** argv )
XMLTest("Element: int64_t", XML_SUCCESS, queryResult, true); XMLTest("Element: int64_t", XML_SUCCESS, queryResult, true);
XMLTest("Element: int64_t", BIG, v, true); XMLTest("Element: int64_t", BIG, v, true);
} }
} {
element->SetText(BIG_POS);
uint64_t v = 0;
XMLError queryResult = element->QueryUnsigned64Text(&v);
XMLTest("Element: uint64_t", XML_SUCCESS, queryResult, true);
XMLTest("Element: uint64_t", BIG_POS, v, true);
}
}
// ---------- XMLPrinter stream mode ------ // ---------- XMLPrinter stream mode ------
{ {
@@ -937,7 +968,8 @@ int main( int argc, const char ** argv )
printer.PushAttribute("attrib-int", int(1)); printer.PushAttribute("attrib-int", int(1));
printer.PushAttribute("attrib-unsigned", unsigned(2)); printer.PushAttribute("attrib-unsigned", unsigned(2));
printer.PushAttribute("attrib-int64", int64_t(3)); printer.PushAttribute("attrib-int64", int64_t(3));
printer.PushAttribute("attrib-bool", true); printer.PushAttribute("attrib-uint64", uint64_t(37));
printer.PushAttribute("attrib-bool", true);
printer.PushAttribute("attrib-double", 4.0); printer.PushAttribute("attrib-double", 4.0);
printer.CloseElement(); printer.CloseElement();
fclose(printerfp); fclose(printerfp);
@@ -957,7 +989,9 @@ int main( int argc, const char ** argv )
XMLTest("attrib-unsigned", unsigned(2), attrib->UnsignedValue(), true); XMLTest("attrib-unsigned", unsigned(2), attrib->UnsignedValue(), true);
attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-int64"); attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-int64");
XMLTest("attrib-int64", int64_t(3), attrib->Int64Value(), true); XMLTest("attrib-int64", int64_t(3), attrib->Int64Value(), true);
attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-bool"); attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-uint64");
XMLTest("attrib-uint64", uint64_t(37), attrib->Unsigned64Value(), true);
attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-bool");
XMLTest("attrib-bool", true, attrib->BoolValue(), true); XMLTest("attrib-bool", true, attrib->BoolValue(), true);
attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-double"); attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-double");
XMLTest("attrib-double", 4.0, attrib->DoubleValue(), true); XMLTest("attrib-double", 4.0, attrib->DoubleValue(), true);
@@ -1176,7 +1210,7 @@ int main( int argc, const char ** argv )
// But be sure there is an error string! // But be sure there is an error string!
const char* errorStr = doc.ErrorStr(); const char* errorStr = doc.ErrorStr();
XMLTest("Error string should be set", XMLTest("Error string should be set",
"Error=XML_ERROR_EMPTY_DOCUMENT ErrorID=15 (0xf) Line number=0", "Error=XML_ERROR_EMPTY_DOCUMENT ErrorID=13 (0xd) Line number=0",
errorStr); errorStr);
} }
@@ -1516,6 +1550,70 @@ int main( int argc, const char ** argv )
XMLTest( "Ill formed XML", true, doc.Error() ); XMLTest( "Ill formed XML", true, doc.Error() );
} }
{
//API:IntText(),UnsignedText(),Int64Text(),DoubleText(),BoolText() and FloatText() test
const char* xml = "<point> <IntText>-24</IntText> <UnsignedText>42</UnsignedText> \
<Int64Text>38</Int64Text> <BoolText>true</BoolText> <DoubleText>2.35</DoubleText> </point>";
XMLDocument doc;
doc.Parse(xml);
const XMLElement* pointElement = doc.RootElement();
int test1 = pointElement->FirstChildElement("IntText")->IntText();
XMLTest("IntText() test", -24, test1);
unsigned test2 = pointElement->FirstChildElement("UnsignedText")->UnsignedText();
XMLTest("UnsignedText() test", static_cast<unsigned>(42), test2);
int64_t test3 = pointElement->FirstChildElement("Int64Text")->Int64Text();
XMLTest("Int64Text() test", static_cast<int64_t>(38), test3);
double test4 = pointElement->FirstChildElement("DoubleText")->DoubleText();
XMLTest("DoubleText() test", 2.35, test4);
float test5 = pointElement->FirstChildElement("DoubleText")->FloatText();
XMLTest("FloatText()) test", 2.35f, test5);
bool test6 = pointElement->FirstChildElement("BoolText")->BoolText();
XMLTest("FloatText()) test", true, test6);
}
{
//API:ShallowEqual() test
const char* xml = "<playlist id = 'playlist'>"
"<property name = 'track_name'>voice</property>"
"</playlist>";
XMLDocument doc;
doc.Parse( xml );
const XMLNode* PlaylistNode = doc.RootElement();
const XMLNode* PropertyNode = PlaylistNode->FirstChildElement();
bool result;
result = PlaylistNode->ShallowEqual(PropertyNode);
XMLTest("ShallowEqual() test",false,result);
result = PlaylistNode->ShallowEqual(PlaylistNode);
XMLTest("ShallowEqual() test",true,result);
}
{
//API: previousSiblingElement() and NextSiblingElement() test
const char* xml = "<playlist id = 'playlist'>"
"<property name = 'track_name'>voice</property>"
"<entry out = '946' producer = '2_playlist1' in = '0'/>"
"<blank length = '1'/>"
"</playlist>";
XMLDocument doc;
doc.Parse( xml );
XMLElement* ElementPlaylist = doc.FirstChildElement("playlist");
XMLTest("previousSiblingElement() test",true,ElementPlaylist != 0);
const XMLElement* pre = ElementPlaylist->PreviousSiblingElement();
XMLTest("previousSiblingElement() test",true,pre == 0);
const XMLElement* ElementBlank = ElementPlaylist->FirstChildElement("entry")->NextSiblingElement("blank");
XMLTest("NextSiblingElement() test",true,ElementBlank != 0);
const XMLElement* next = ElementBlank->NextSiblingElement();
XMLTest("NextSiblingElement() test",true,next == 0);
const XMLElement* ElementEntry = ElementBlank->PreviousSiblingElement("entry");
XMLTest("PreviousSiblingElement test",true,ElementEntry != 0);
}
// QueryXYZText // QueryXYZText
{ {
const char* xml = "<point> <x>1.2</x> <y>1</y> <z>38</z> <valid>true</valid> </point>"; const char* xml = "<point> <x>1.2</x> <y>1</y> <z>38</z> <valid>true</valid> </point>";
@@ -1567,14 +1665,14 @@ int main( int argc, const char ** argv )
doc.Parse( xml ); doc.Parse( xml );
XMLTest( "Non-alpha element lead letter parses.", false, doc.Error() ); XMLTest( "Non-alpha element lead letter parses.", false, doc.Error() );
} }
{ {
const char* xml = "<element _attr1=\"foo\" :attr2=\"bar\"></element>"; const char* xml = "<element _attr1=\"foo\" :attr2=\"bar\"></element>";
XMLDocument doc; XMLDocument doc;
doc.Parse( xml ); doc.Parse( xml );
XMLTest("Non-alpha attribute lead character parses.", false, doc.Error()); XMLTest("Non-alpha attribute lead character parses.", false, doc.Error());
} }
{ {
const char* xml = "<3lement></3lement>"; const char* xml = "<3lement></3lement>";
XMLDocument doc; XMLDocument doc;
@@ -1610,7 +1708,7 @@ int main( int argc, const char ** argv )
doc.Clear(); doc.Clear();
XMLTest( "No error after Clear()", false, doc.Error() ); XMLTest( "No error after Clear()", false, doc.Error() );
} }
// ----------- Whitespace ------------ // ----------- Whitespace ------------
{ {
const char* xml = "<element>" const char* xml = "<element>"
@@ -1695,12 +1793,12 @@ int main( int argc, const char ** argv )
doc.Print( &printer ); doc.Print( &printer );
XMLTest( "BOM preservation (compare)", xml_bom_preservation, printer.CStr(), false, true ); XMLTest( "BOM preservation (compare)", xml_bom_preservation, printer.CStr(), false, true );
doc.SaveFile( "resources/bomtest.xml" ); doc.SaveFile( "resources/out/bomtest.xml" );
XMLTest( "Save bomtest.xml", false, doc.Error() ); XMLTest( "Save bomtest.xml", false, doc.Error() );
} }
{ {
XMLDocument doc; XMLDocument doc;
doc.LoadFile( "resources/bomtest.xml" ); doc.LoadFile( "resources/out/bomtest.xml" );
XMLTest( "Load bomtest.xml", false, doc.Error() ); XMLTest( "Load bomtest.xml", false, doc.Error() );
XMLTest( "BOM preservation (load)", true, doc.HasBOM(), false ); XMLTest( "BOM preservation (load)", true, doc.HasBOM(), false );
@@ -1782,6 +1880,7 @@ int main( int argc, const char ** argv )
XMLTest( "Insertion with removal parse round 4", false, doc.Error() ); XMLTest( "Insertion with removal parse round 4", false, doc.Error() );
subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree"); subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree");
two = doc.RootElement()->FirstChildElement("two"); two = doc.RootElement()->FirstChildElement("two");
XMLTest("<two> is the last child at root level", true, two == doc.RootElement()->LastChildElement());
doc.RootElement()->InsertEndChild(subtree); doc.RootElement()->InsertEndChild(subtree);
XMLPrinter printer4(0, true); XMLPrinter printer4(0, true);
acceptResult = doc.Accept(&printer4); acceptResult = doc.Accept(&printer4);
@@ -1809,7 +1908,7 @@ int main( int argc, const char ** argv )
} }
#if 1 #if 1
// the question being explored is what kind of print to use: // the question being explored is what kind of print to use:
// https://github.com/leethomason/tinyxml2/issues/63 // https://github.com/leethomason/tinyxml2/issues/63
{ {
//const char* xml = "<element attrA='123456789.123456789' attrB='1.001e9' attrC='1.0e-10' attrD='1001000000.000000' attrE='0.1234567890123456789'/>"; //const char* xml = "<element attrA='123456789.123456789' attrB='1.001e9' attrC='1.0e-10' attrD='1001000000.000000' attrE='0.1234567890123456789'/>";
@@ -1836,14 +1935,14 @@ int main( int argc, const char ** argv )
/* The result of this test is platform, compiler, and library version dependent. :(" /* The result of this test is platform, compiler, and library version dependent. :("
XMLPrinter printer; XMLPrinter printer;
doc.Print( &printer ); doc.Print( &printer );
XMLTest( "Float and double formatting.", XMLTest( "Float and double formatting.",
"<element attrA-f64=\"123456789.12345679\" attrB-f64=\"1001000000\" attrC-f64=\"1e+20\" attrD-f64=\"0.123456789\" attrA-f32=\"1.2345679e+08\" attrB-f32=\"1.001e+09\" attrC-f32=\"1e+20\" attrD-f32=\"0.12345679\"/>\n", "<element attrA-f64=\"123456789.12345679\" attrB-f64=\"1001000000\" attrC-f64=\"1e+20\" attrD-f64=\"0.123456789\" attrA-f32=\"1.2345679e+08\" attrB-f32=\"1.001e+09\" attrC-f32=\"1e+20\" attrD-f32=\"0.12345679\"/>\n",
printer.CStr(), printer.CStr(),
true ); true );
*/ */
} }
#endif #endif
{ {
// Issue #184 // Issue #184
// If it doesn't assert, it passes. Caused by objects // If it doesn't assert, it passes. Caused by objects
@@ -1862,7 +1961,7 @@ int main( int argc, const char ** argv )
doc.Clear(); doc.Clear();
} }
} }
{ {
// If this doesn't assert in TINYXML2_DEBUG, all is well. // If this doesn't assert in TINYXML2_DEBUG, all is well.
tinyxml2::XMLDocument doc; tinyxml2::XMLDocument doc;
@@ -1904,7 +2003,7 @@ int main( int argc, const char ** argv )
doc.Print( &printer ); doc.Print( &printer );
} }
{ {
// Issue 299. Can print elements that are not linked in. // Issue 299. Can print elements that are not linked in.
// Will crash if issue not fixed. // Will crash if issue not fixed.
XMLDocument doc; XMLDocument doc;
XMLElement* newElement = doc.NewElement( "printme" ); XMLElement* newElement = doc.NewElement( "printme" );
@@ -1967,7 +2066,7 @@ int main( int argc, const char ** argv )
{ {
// No matter - before or after successfully parsing a text - // No matter - before or after successfully parsing a text -
// calling XMLDocument::Value() used to cause an assert in debug. // calling XMLDocument::Value() used to cause an assert in debug.
// Null must be retured. // Null must be returned.
const char* validXml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" const char* validXml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
"<first />" "<first />"
"<second />"; "<second />";
@@ -1996,7 +2095,18 @@ int main( int argc, const char ** argv )
} }
{ {
// Evil memory leaks. const char* html("<!DOCTYPE html><html><body><p>test</p><p><br/></p></body></html>");
XMLDocument doc(false);
doc.Parse(html);
XMLPrinter printer(0, true);
doc.Print(&printer);
XMLTest(html, html, printer.CStr());
}
{
// Evil memory leaks.
// If an XMLElement (etc) is allocated via NewElement() (etc.) // If an XMLElement (etc) is allocated via NewElement() (etc.)
// and NOT added to the XMLDocument, what happens? // and NOT added to the XMLDocument, what happens?
// //
@@ -2039,6 +2149,18 @@ int main( int argc, const char ** argv )
XMLTest("Stack overflow prevented.", XML_ELEMENT_DEPTH_EXCEEDED, doc.ErrorID()); XMLTest("Stack overflow prevented.", XML_ELEMENT_DEPTH_EXCEEDED, doc.ErrorID());
} }
} }
{
const char* TESTS[] = {
"./resources/xmltest-5662204197076992.xml", // Security-level performance issue.
0
};
for (int i = 0; TESTS[i]; ++i) {
XMLDocument doc;
doc.LoadFile(TESTS[i]);
// Need only not crash / lock up.
XMLTest("Fuzz attack prevented.", true, true);
}
}
{ {
// Crashing reported via email. // Crashing reported via email.
const char* xml = const char* xml =
@@ -2093,7 +2215,7 @@ int main( int argc, const char ** argv )
XMLTest("Crash bug parsing - Accept()", true, acceptResult); XMLTest("Crash bug parsing - Accept()", true, acceptResult);
printf("%s\n", printer.CStr()); printf("%s\n", printer.CStr());
// No test; it only need to not crash. // No test; it only need to not crash.
// Still, wrap it up with a sanity check // Still, wrap it up with a sanity check
int nProperty = 0; int nProperty = 0;
for (const XMLElement* p = playlist->FirstChildElement("property"); p; p = p->NextSiblingElement("property")) { for (const XMLElement* p = playlist->FirstChildElement("property"); p; p = p->NextSiblingElement("property")) {