Compare commits
63 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf15233ad8 | ||
|
|
8504195843 | ||
|
|
8db004b74c | ||
|
|
3d6a5477a7 | ||
|
|
bbbb8c9a90 | ||
|
|
e444268103 | ||
|
|
6ac05b2b9a | ||
|
|
655b15c078 | ||
|
|
59b01033f3 | ||
|
|
37ccc71008 | ||
|
|
3574d3e22f | ||
|
|
de62366e6a | ||
|
|
20f2d5eec7 | ||
|
|
a9c28ce3e3 | ||
|
|
2c642bf25e | ||
|
|
f4520c9905 | ||
|
|
1eb8a3f765 | ||
|
|
d09f879ada | ||
|
|
e620245043 | ||
|
|
d7455034ea | ||
|
|
7d9ca1e73c | ||
|
|
ad7bdf9ed2 | ||
|
|
8916a3c587 | ||
|
|
73f5409b62 | ||
|
|
ff61650517 | ||
|
|
9c740e8d23 | ||
|
|
a9a0ea22fb | ||
|
|
50daa32fc2 | ||
|
|
f60928eaa4 | ||
|
|
4994f1cc57 | ||
|
|
5bf58f0d1f | ||
|
|
141d2117ba | ||
|
|
87aaa25922 | ||
|
|
c3601c62f6 | ||
|
|
effdf95f8c | ||
|
|
c36d59f6b5 | ||
|
|
7fd646a8a2 | ||
|
|
1675bec2f2 | ||
|
|
d39b13bbb7 | ||
|
|
f12d7a241f | ||
|
|
e08c2d2e0e | ||
|
|
38f7d65b4a | ||
|
|
c341cea501 | ||
|
|
710a3324f4 | ||
|
|
4add958b49 | ||
|
|
eda7f81b1f | ||
|
|
1dbfe31858 | ||
|
|
47e229e189 | ||
|
|
75a5acc6bb | ||
|
|
61a4c7d507 | ||
|
|
db39dbc0fd | ||
|
|
eb2b8c47c4 | ||
|
|
bd5a1414df | ||
|
|
e1b3013182 | ||
|
|
0e7f289590 | ||
|
|
f5641e5470 | ||
|
|
8f4a9a8cc2 | ||
|
|
d944ef762f | ||
|
|
de6d164822 | ||
|
|
08da3d91c9 | ||
|
|
e06a24016e | ||
|
|
c3e09dabc6 | ||
|
|
44ac395142 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -18,3 +18,5 @@ tinyxml2/temp/
|
||||
*.o
|
||||
*.vc.db
|
||||
*.vc.opendb
|
||||
libtinyxml2.a
|
||||
xmltest
|
||||
|
||||
@@ -21,8 +21,8 @@ include(CTest)
|
||||
################################
|
||||
# set lib version here
|
||||
|
||||
set(GENERIC_LIB_VERSION "7.0.0")
|
||||
set(GENERIC_LIB_SOVERSION "7")
|
||||
set(GENERIC_LIB_VERSION "8.0.0")
|
||||
set(GENERIC_LIB_SOVERSION "8")
|
||||
|
||||
################################
|
||||
# Add definitions
|
||||
@@ -79,9 +79,15 @@ export(TARGETS tinyxml2
|
||||
|
||||
install(TARGETS tinyxml2
|
||||
EXPORT ${CMAKE_PROJECT_NAME}Targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
RUNTIME
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT tinyxml2_runtime
|
||||
LIBRARY
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT tinyxml2_libraries
|
||||
ARCHIVE
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT tinyxml2_libraries)
|
||||
|
||||
if(BUILD_TESTING AND BUILD_TESTS)
|
||||
add_executable(xmltest xmltest.cpp)
|
||||
@@ -98,10 +104,10 @@ if(BUILD_TESTING AND BUILD_TESTS)
|
||||
add_test(NAME xmltest COMMAND xmltest WORKING_DIRECTORY $<TARGET_FILE_DIR:xmltest>)
|
||||
endif()
|
||||
|
||||
install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT tinyxml2_headers)
|
||||
|
||||
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 COMPONENT tinyxml2_config)
|
||||
|
||||
# uninstall target
|
||||
if(NOT TARGET uninstall)
|
||||
@@ -121,9 +127,17 @@ configure_package_config_file(
|
||||
"${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
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME})
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}
|
||||
COMPONENT tinyxml2_config)
|
||||
|
||||
install(EXPORT ${CMAKE_PROJECT_NAME}Targets NAMESPACE tinyxml2::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME})
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}
|
||||
COMPONENT tinyxml2_config)
|
||||
|
||||
18
LICENSE.txt
Normal file
18
LICENSE.txt
Normal 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.
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -67,7 +67,7 @@ $(function() {
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -67,7 +67,7 @@ $(function() {
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -96,7 +96,7 @@ Text "A Midsummer Night's Dream" </li>
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -73,7 +73,7 @@ $(function() {
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -83,7 +83,7 @@ $(function() {
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -75,7 +75,7 @@ $(function() {
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -95,7 +95,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -215,7 +215,7 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -105,7 +105,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -292,7 +292,7 @@ const char* xmlcstr = printer.CStr();
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -73,7 +73,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -79,7 +79,7 @@ $(function() {
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -105,7 +105,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -294,7 +294,7 @@ const char* xmlcstr = printer.CStr();
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -128,7 +128,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -140,7 +140,7 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
<tr class="separator:a1d033945b42e125d933d6231e4571552"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a57400f816dbe7799ece33615ead9ab76"><td class="memItemLeft" align="right" valign="top"><a id="a57400f816dbe7799ece33615ead9ab76"></a>
|
||||
int </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"> </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"> </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"> </td></tr>
|
||||
<tr class="memitem:a65656b0b2cbc822708eb351504178aaf"><td class="memItemLeft" align="right" valign="top"><a id="a65656b0b2cbc822708eb351504178aaf"></a>
|
||||
void </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( &printer );
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</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 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 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 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>
|
||||
@@ -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><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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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 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><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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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_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#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_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#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#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#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_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#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_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#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_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 -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -144,8 +144,12 @@ XMLError </td><td class="memItemRight" valign="bottom"><a class="el" href="
|
||||
XMLError </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"> </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"> </td></tr>
|
||||
<tr class="memitem:a042fc30504347b84a56cf863ad528a4f"><td class="memItemLeft" align="right" valign="top">int </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="separator:a042fc30504347b84a56cf863ad528a4f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:adb8ae765f98d0c5037faec48deea78bc"><td class="memItemLeft" align="right" valign="top"><a id="adb8ae765f98d0c5037faec48deea78bc"></a>
|
||||
XMLError </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"> </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"> </td></tr>
|
||||
<tr class="memitem:a5b7df3bed2b8954eabf227fa204522eb"><td class="memItemLeft" align="right" valign="top">XMLError </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"> </td></tr>
|
||||
<tr class="memitem:a11943abf2d0831548c3790dd5d9f119c"><td class="memItemLeft" align="right" valign="top"><a id="a11943abf2d0831548c3790dd5d9f119c"></a>
|
||||
void </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"> </td><td class="mdescRight">Sets the named attribute to value. <br /></td></tr>
|
||||
@@ -498,8 +502,8 @@ const char* xmlcstr = printer.CStr();
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a042fc30504347b84a56cf863ad528a4f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a042fc30504347b84a56cf863ad528a4f">◆ </a></span>QueryAttribute()</h2>
|
||||
<a id="a5b7df3bed2b8954eabf227fa204522eb"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a5b7df3bed2b8954eabf227fa204522eb">◆ </a></span>QueryAttribute()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -508,7 +512,7 @@ const char* xmlcstr = printer.CStr();
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int tinyxml2::XMLElement::QueryAttribute </td>
|
||||
<td class="memname">XMLError tinyxml2::XMLElement::QueryAttribute </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const char * </td>
|
||||
<td class="paramname"><em>name</em>, </td>
|
||||
@@ -531,7 +535,7 @@ const char* xmlcstr = printer.CStr();
|
||||
</tr>
|
||||
</table>
|
||||
</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>
|
||||
<pre class="fragment">int value = 10;
|
||||
QueryAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
|
||||
@@ -700,7 +704,7 @@ QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</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 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 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><td class="entry"><a class="el" href="classtinyxml2_1_1_x_m_l_handle.html#aa2edbc1c0d3e3e8259bd98de7f1cf500">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 &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 &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 -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -181,7 +181,7 @@ if ( child2 )
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -105,7 +105,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -573,7 +573,7 @@ Text: the text string
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -98,7 +98,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -402,7 +402,7 @@ printer.CloseElement();
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -107,7 +107,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -302,7 +302,7 @@ const char* xmlcstr = printer.CStr();
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -105,7 +105,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -293,7 +293,7 @@ const char* xmlcstr = printer.CStr();
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -81,7 +81,7 @@ $(function() {
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -130,7 +130,7 @@ virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" hr
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -71,7 +71,7 @@ $(function() {
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:27 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -338,7 +338,7 @@ $(function() {
|
||||
|
||||
<h3><a id="index_q"></a>- q -</h3><ul>
|
||||
<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>QueryBoolAttribute()
|
||||
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872">tinyxml2::XMLElement</a>
|
||||
@@ -385,6 +385,9 @@ $(function() {
|
||||
<li>QueryIntValue()
|
||||
: <a class="el" href="classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993">tinyxml2::XMLAttribute</a>
|
||||
</li>
|
||||
<li>QueryStringAttribute()
|
||||
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#adb8ae765f98d0c5037faec48deea78bc">tinyxml2::XMLElement</a>
|
||||
</li>
|
||||
<li>QueryUnsignedAttribute()
|
||||
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f">tinyxml2::XMLElement</a>
|
||||
</li>
|
||||
@@ -533,7 +536,7 @@ $(function() {
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -338,7 +338,7 @@ $(function() {
|
||||
|
||||
<h3><a id="index_q"></a>- q -</h3><ul>
|
||||
<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>QueryBoolAttribute()
|
||||
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a14c1bb77c39689838be01838d86ca872">tinyxml2::XMLElement</a>
|
||||
@@ -385,6 +385,9 @@ $(function() {
|
||||
<li>QueryIntValue()
|
||||
: <a class="el" href="classtinyxml2_1_1_x_m_l_attribute.html#a6d5176260db00ea301c01af8457cd993">tinyxml2::XMLAttribute</a>
|
||||
</li>
|
||||
<li>QueryStringAttribute()
|
||||
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#adb8ae765f98d0c5037faec48deea78bc">tinyxml2::XMLElement</a>
|
||||
</li>
|
||||
<li>QueryUnsignedAttribute()
|
||||
: <a class="el" href="classtinyxml2_1_1_x_m_l_element.html#a26fc84cbfba6769dafcfbf256c05e22f">tinyxml2::XMLElement</a>
|
||||
</li>
|
||||
@@ -533,7 +536,7 @@ $(function() {
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:27 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -82,7 +82,7 @@ $(function() {
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -82,29 +82,13 @@ $(function() {
|
||||
<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>
|
||||
<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 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>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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
@@ -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>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"><element> Hello, World</element>
|
||||
</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"><element> 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"><element> Hello again,
|
||||
World</element>
|
||||
</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"><document>
|
||||
<data>1</data>
|
||||
@@ -134,7 +118,7 @@ $(function() {
|
||||
</ul>
|
||||
<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>
|
||||
<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>
|
||||
<p>TinyXML-2 recognizes the pre-defined "character entities", meaning special characters. Namely: </p><pre class="fragment">&amp; &
|
||||
&lt; <
|
||||
@@ -163,19 +147,19 @@ printer.PushAttribute( "foo", "bar" );
|
||||
printer.CloseElement();
|
||||
</pre><h2>Examples </h2>
|
||||
<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;
|
||||
doc.LoadFile( "dream.xml" );
|
||||
}
|
||||
</pre><h4>Lookup information.</h4>
|
||||
<pre class="fragment">/* ------ Example 2: Lookup information. ---- */
|
||||
<pre class="fragment">/* ------ Example 2: Lookup information. ---- */
|
||||
{
|
||||
XMLDocument doc;
|
||||
doc.LoadFile( "dream.xml" );
|
||||
|
||||
// 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
|
||||
// - - Element "TITLE" child of the root PLAY Element
|
||||
// - - - Text child of the TITLE Element
|
||||
@@ -199,7 +183,7 @@ printer.CloseElement();
|
||||
<p>And additionally a test file:</p><ul>
|
||||
<li>xmltest.cpp</li>
|
||||
</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>
|
||||
<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>
|
||||
@@ -222,7 +206,7 @@ printer.CloseElement();
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">TinyXML-2
|
||||
 <span id="projectnumber">6.0.0</span>
|
||||
 <span id="projectnumber">7.0.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -74,7 +74,7 @@ $(function() {
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Dec 10 2017 20:04:44 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.13
|
||||
</small></address>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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']]],
|
||||
['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']]],
|
||||
@@ -16,6 +16,7 @@ var searchData=
|
||||
['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']]],
|
||||
['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']]],
|
||||
['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']]]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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']]],
|
||||
['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']]],
|
||||
@@ -16,6 +16,7 @@ var searchData=
|
||||
['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']]],
|
||||
['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']]],
|
||||
['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']]]
|
||||
|
||||
File diff suppressed because one or more lines are too long
6
dox
6
dox
@@ -38,11 +38,7 @@ PROJECT_NAME = "TinyXML-2"
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
<<<<<<< HEAD
|
||||
PROJECT_NUMBER = 7.0.0
|
||||
=======
|
||||
PROJECT_NUMBER = 7.0.0
|
||||
>>>>>>> master
|
||||
PROJECT_NUMBER = 8.0.0
|
||||
|
||||
# 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
|
||||
|
||||
24
readme.md
24
readme.md
@@ -54,9 +54,8 @@ What it doesn't do.
|
||||
|
||||
TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) or XSLs
|
||||
(eXtensible Stylesheet Language.) There are other parsers out there
|
||||
that are much more fully featured. But they are also much bigger,
|
||||
take longer to set up in your project, have a higher learning curve,
|
||||
and often have a more restrictive license. If you are working with
|
||||
that are much more fully featured. But they are generally bigger and
|
||||
more difficult to use. If you are working with
|
||||
browsers or have more complete XML needs, TinyXML-2 is not the parser for you.
|
||||
|
||||
TinyXML-1 vs. TinyXML-2
|
||||
@@ -263,11 +262,24 @@ There are 2 files in TinyXML-2:
|
||||
And additionally a test file:
|
||||
* xmltest.cpp
|
||||
|
||||
Simply compile and run. There is a visual studio 2017 project included, a simple Makefile,
|
||||
Simply compile and run. There is a visual studio 2019 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
|
||||
The top of tinyxml.h even has a simple g++ command line if you are using Unix/Linux/BSD and
|
||||
don't want to use a build system.
|
||||
|
||||
Building TinyXML-2 - Using vcpkg
|
||||
--------------------------------
|
||||
|
||||
You can download and install TinyXML-2 using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
./vcpkg integrate install
|
||||
./vcpkg install tinyxml2
|
||||
|
||||
The TinyXML-2 port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||
|
||||
Versioning
|
||||
----------
|
||||
|
||||
@@ -279,7 +291,7 @@ common.
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
The documentation is build with Doxygen, using the 'dox'
|
||||
The documentation is built with Doxygen, using the 'dox'
|
||||
configuration file.
|
||||
|
||||
License
|
||||
|
||||
197
tinyxml2.cpp
197
tinyxml2.cpp
@@ -45,14 +45,14 @@ distribution.
|
||||
{
|
||||
va_list va;
|
||||
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 );
|
||||
return result;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -101,9 +101,9 @@ distribution.
|
||||
#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 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 SINGLE_QUOTE = '\'';
|
||||
static const char DOUBLE_QUOTE = '\"';
|
||||
@@ -197,7 +197,7 @@ char* StrPair::ParseText( char* p, const char* endTag, int strFlags, int* curLin
|
||||
TIXMLASSERT(curLineNumPtr);
|
||||
|
||||
char* start = p;
|
||||
char endChar = *endTag;
|
||||
const char endChar = *endTag;
|
||||
size_t length = strlen( endTag );
|
||||
|
||||
// Inner loop of text parsing.
|
||||
@@ -310,7 +310,7 @@ const char* StrPair::GetStr()
|
||||
const int buflen = 10;
|
||||
char buf[buflen] = { 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 ) {
|
||||
*q = *p;
|
||||
++p;
|
||||
@@ -430,22 +430,22 @@ void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length
|
||||
switch (*length) {
|
||||
case 4:
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
*output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
|
||||
input >>= 6;
|
||||
//fall through
|
||||
case 3:
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
*output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
|
||||
input >>= 6;
|
||||
//fall through
|
||||
case 2:
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
*output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
|
||||
input >>= 6;
|
||||
//fall through
|
||||
case 1:
|
||||
--output;
|
||||
*output = (char)(input | FIRST_BYTE_MARK[*length]);
|
||||
*output = static_cast<char>(input | FIRST_BYTE_MARK[*length]);
|
||||
break;
|
||||
default:
|
||||
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
|
||||
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 )
|
||||
{
|
||||
@@ -612,13 +617,20 @@ bool XMLUtil::ToBool( const char* str, bool* value )
|
||||
*value = (ival==0) ? false : true;
|
||||
return true;
|
||||
}
|
||||
if ( StringEqual( str, "true" ) ) {
|
||||
*value = true;
|
||||
return true;
|
||||
static const char* TRUE_VALS[] = { "true", "True", "TRUE", 0 };
|
||||
static const char* FALSE_VALS[] = { "false", "False", "FALSE", 0 };
|
||||
|
||||
for (int i = 0; TRUE_VALS[i]; ++i) {
|
||||
if (StringEqual(str, TRUE_VALS[i])) {
|
||||
*value = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( StringEqual( str, "false" ) ) {
|
||||
*value = false;
|
||||
return true;
|
||||
for (int i = 0; FALSE_VALS[i]; ++i) {
|
||||
if (StringEqual(str, FALSE_VALS[i])) {
|
||||
*value = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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
|
||||
if (TIXML_SSCANF(str, "%lld", &v) == 1) {
|
||||
*value = (int64_t)v;
|
||||
*value = static_cast<int64_t>(v);
|
||||
return true;
|
||||
}
|
||||
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 )
|
||||
{
|
||||
TIXMLASSERT( node );
|
||||
@@ -1017,7 +1039,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
|
||||
break;
|
||||
}
|
||||
|
||||
int initialLineNum = node->_parseLineNum;
|
||||
const int initialLineNum = node->_parseLineNum;
|
||||
|
||||
StrPair endTag;
|
||||
p = node->ParseDeep( p, &endTag, curLineNumPtr );
|
||||
@@ -1029,7 +1051,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
|
||||
break;
|
||||
}
|
||||
|
||||
XMLDeclaration* decl = node->ToDeclaration();
|
||||
const XMLDeclaration* const decl = node->ToDeclaration();
|
||||
if ( decl ) {
|
||||
// Declarations are only allowed at document level
|
||||
//
|
||||
@@ -1038,7 +1060,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
|
||||
//
|
||||
// Optimized due to a security test case. If the first node is
|
||||
// a declaration, and the last node is a declaration, then only
|
||||
// declarations have so far been addded.
|
||||
// declarations have so far been added.
|
||||
bool wellLocated = false;
|
||||
|
||||
if (ToDocument()) {
|
||||
@@ -1373,7 +1395,7 @@ char* XMLAttribute::ParseDeep( char* p, bool processEntities, int* curLineNumPtr
|
||||
return 0;
|
||||
}
|
||||
|
||||
char endTag[2] = { *p, 0 };
|
||||
const char endTag[2] = { *p, 0 };
|
||||
++p; // move past opening quote
|
||||
|
||||
p = _value.ParseText( p, endTag, processEntities ? StrPair::ATTRIBUTE_VALUE : StrPair::ATTRIBUTE_VALUE_LEAVE_ENTITIES, curLineNumPtr );
|
||||
@@ -1414,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
|
||||
{
|
||||
if ( XMLUtil::ToBool( Value(), value )) {
|
||||
@@ -1470,6 +1501,12 @@ void XMLAttribute::SetAttribute(int64_t v)
|
||||
_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 )
|
||||
@@ -1556,6 +1593,13 @@ int64_t XMLElement::Int64Attribute(const char* name, int64_t defaultValue) const
|
||||
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 b = defaultValue;
|
||||
@@ -1620,6 +1664,12 @@ void XMLElement::SetText(int64_t v)
|
||||
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 )
|
||||
{
|
||||
@@ -1684,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
|
||||
{
|
||||
if ( FirstChild() && FirstChild()->ToText() ) {
|
||||
@@ -1743,6 +1806,13 @@ int64_t XMLElement::Int64Text(int64_t defaultValue) const
|
||||
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 b = defaultValue;
|
||||
@@ -1830,7 +1900,7 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr )
|
||||
TIXMLASSERT( attrib );
|
||||
attrib->_parseLineNum = _document->_parseCurLineNum;
|
||||
|
||||
int attrLineNum = attrib->_parseLineNum;
|
||||
const int attrLineNum = attrib->_parseLineNum;
|
||||
|
||||
p = attrib->ParseDeep( p, _document->ProcessEntities(), curLineNumPtr );
|
||||
if ( !p || Attribute( attrib->Name() ) ) {
|
||||
@@ -1891,6 +1961,39 @@ XMLAttribute* XMLElement::CreateAttribute()
|
||||
return attrib;
|
||||
}
|
||||
|
||||
|
||||
XMLElement* XMLElement::InsertNewChildElement(const char* name)
|
||||
{
|
||||
XMLElement* node = _document->NewElement(name);
|
||||
return InsertEndChild(node) ? node : 0;
|
||||
}
|
||||
|
||||
XMLComment* XMLElement::InsertNewComment(const char* comment)
|
||||
{
|
||||
XMLComment* node = _document->NewComment(comment);
|
||||
return InsertEndChild(node) ? node : 0;
|
||||
}
|
||||
|
||||
XMLText* XMLElement::InsertNewText(const char* text)
|
||||
{
|
||||
XMLText* node = _document->NewText(text);
|
||||
return InsertEndChild(node) ? node : 0;
|
||||
}
|
||||
|
||||
XMLDeclaration* XMLElement::InsertNewDeclaration(const char* text)
|
||||
{
|
||||
XMLDeclaration* node = _document->NewDeclaration(text);
|
||||
return InsertEndChild(node) ? node : 0;
|
||||
}
|
||||
|
||||
XMLUnknown* XMLElement::InsertNewUnknown(const char* text)
|
||||
{
|
||||
XMLUnknown* node = _document->NewUnknown(text);
|
||||
return InsertEndChild(node) ? node : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// <ele></ele>
|
||||
// <ele>foo<b>bar</b></ele>
|
||||
@@ -2031,7 +2134,7 @@ XMLDocument::~XMLDocument()
|
||||
}
|
||||
|
||||
|
||||
void XMLDocument::MarkInUse(XMLNode* node)
|
||||
void XMLDocument::MarkInUse(const XMLNode* const node)
|
||||
{
|
||||
TIXMLASSERT(node);
|
||||
TIXMLASSERT(node->_parent == 0);
|
||||
@@ -2136,7 +2239,7 @@ static FILE* callfopen( const char* filepath, const char* mode )
|
||||
TIXMLASSERT( mode );
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE)
|
||||
FILE* fp = 0;
|
||||
errno_t err = fopen_s( &fp, filepath, mode );
|
||||
const errno_t err = fopen_s( &fp, filepath, mode );
|
||||
if ( err ) {
|
||||
return 0;
|
||||
}
|
||||
@@ -2194,7 +2297,7 @@ template
|
||||
struct LongFitsIntoSizeTMinusOne {
|
||||
static bool Fits( unsigned long value )
|
||||
{
|
||||
return value < (size_t)-1;
|
||||
return value < static_cast<size_t>(-1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2239,7 +2342,7 @@ XMLError XMLDocument::LoadFile( FILE* fp )
|
||||
const size_t size = filelength;
|
||||
TIXMLASSERT( _charBuffer == 0 );
|
||||
_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 ) {
|
||||
SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 );
|
||||
return _errorID;
|
||||
@@ -2290,7 +2393,7 @@ XMLError XMLDocument::Parse( const char* p, size_t len )
|
||||
SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
|
||||
return _errorID;
|
||||
}
|
||||
if ( len == (size_t)(-1) ) {
|
||||
if ( len == static_cast<size_t>(-1) ) {
|
||||
len = strlen( p );
|
||||
}
|
||||
TIXMLASSERT( _charBuffer == 0 );
|
||||
@@ -2332,7 +2435,7 @@ void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ...
|
||||
_errorLineNum = lineNum;
|
||||
_errorStr.Reset();
|
||||
|
||||
size_t BUFFER_SIZE = 1000;
|
||||
const size_t BUFFER_SIZE = 1000;
|
||||
char* buffer = new char[BUFFER_SIZE];
|
||||
|
||||
TIXMLASSERT(sizeof(error) <= sizeof(int));
|
||||
@@ -2424,13 +2527,13 @@ XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) :
|
||||
}
|
||||
for( int i=0; i<NUM_ENTITIES; ++i ) {
|
||||
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 );
|
||||
_entityFlag[flagIndex] = true;
|
||||
}
|
||||
_restrictedEntityFlag[(unsigned char)'&'] = true;
|
||||
_restrictedEntityFlag[(unsigned char)'<'] = true;
|
||||
_restrictedEntityFlag[(unsigned char)'>'] = true; // not required, but consistency is nice
|
||||
_restrictedEntityFlag[static_cast<unsigned char>('&')] = true;
|
||||
_restrictedEntityFlag[static_cast<unsigned char>('<')] = true;
|
||||
_restrictedEntityFlag[static_cast<unsigned char>('>')] = true; // not required, but consistency is nice
|
||||
_buffer.Push( 0 );
|
||||
}
|
||||
|
||||
@@ -2505,10 +2608,10 @@ void XMLPrinter::PrintString( const char* p, bool restricted )
|
||||
// Check for entities. If one is found, flush
|
||||
// the stream up until the entity, write the
|
||||
// entity, and keep looking.
|
||||
if ( flag[(unsigned char)(*q)] ) {
|
||||
if ( flag[static_cast<unsigned char>(*q)] ) {
|
||||
while ( p < q ) {
|
||||
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 );
|
||||
p += toPrint;
|
||||
}
|
||||
@@ -2536,7 +2639,7 @@ void XMLPrinter::PrintString( const char* p, bool restricted )
|
||||
// string if an entity wasn't found.
|
||||
if ( p < q ) {
|
||||
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 );
|
||||
}
|
||||
}
|
||||
@@ -2565,8 +2668,6 @@ void XMLPrinter::OpenElement( const char* name, bool compactMode )
|
||||
|
||||
if ( _textDepth < 0 && !_firstElement && !compactMode ) {
|
||||
Putc( '\n' );
|
||||
}
|
||||
if ( !compactMode ) {
|
||||
PrintSpace( _depth );
|
||||
}
|
||||
|
||||
@@ -2614,6 +2715,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 )
|
||||
{
|
||||
char buf[BUF_SIZE];
|
||||
@@ -2683,6 +2792,7 @@ void XMLPrinter::PushText( const char* text, bool cdata )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void XMLPrinter::PushText( int64_t value )
|
||||
{
|
||||
char buf[BUF_SIZE];
|
||||
@@ -2690,6 +2800,15 @@ void XMLPrinter::PushText( int64_t value )
|
||||
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 )
|
||||
{
|
||||
char buf[BUF_SIZE];
|
||||
|
||||
94
tinyxml2.h
94
tinyxml2.h
@@ -98,11 +98,11 @@ distribution.
|
||||
/* Versioning, past 1.0.14:
|
||||
http://semver.org/
|
||||
*/
|
||||
static const int TIXML2_MAJOR_VERSION = 7;
|
||||
static const int TIXML2_MAJOR_VERSION = 8;
|
||||
static const int TIXML2_MINOR_VERSION = 0;
|
||||
static const int TIXML2_PATCH_VERSION = 0;
|
||||
|
||||
#define TINYXML2_MAJOR_VERSION 7
|
||||
#define TINYXML2_MAJOR_VERSION 8
|
||||
#define TINYXML2_MINOR_VERSION 0
|
||||
#define TINYXML2_PATCH_VERSION 0
|
||||
|
||||
@@ -129,8 +129,10 @@ class XMLPrinter;
|
||||
pointers into the XML file itself, and will apply normalization
|
||||
and entity translation if actually read. Can also store (and memory
|
||||
manage) a traditional char[]
|
||||
|
||||
Isn't clear why TINYXML2_LIB is needed; but seems to fix #719
|
||||
*/
|
||||
class StrPair
|
||||
class TINYXML2_LIB StrPair
|
||||
{
|
||||
public:
|
||||
enum {
|
||||
@@ -301,7 +303,7 @@ private:
|
||||
TIXMLASSERT( cap > 0 );
|
||||
if ( cap > _allocated ) {
|
||||
TIXMLASSERT( cap <= INT_MAX / 2 );
|
||||
int newAllocated = cap * 2;
|
||||
const int newAllocated = cap * 2;
|
||||
T* newMem = new T[newAllocated];
|
||||
TIXMLASSERT( newAllocated >= _size );
|
||||
memcpy( newMem, _mem, sizeof(T)*_size ); // warning: not using constructors, only works for PODs
|
||||
@@ -560,7 +562,7 @@ public:
|
||||
TIXMLASSERT( p );
|
||||
return p;
|
||||
}
|
||||
static char* SkipWhiteSpace( char* p, int* curLineNumPtr ) {
|
||||
static char* SkipWhiteSpace( char* const p, int* curLineNumPtr ) {
|
||||
return const_cast<char*>( SkipWhiteSpace( const_cast<const char*>(p), curLineNumPtr ) );
|
||||
}
|
||||
|
||||
@@ -598,7 +600,7 @@ public:
|
||||
return strncmp( p, q, nChar ) == 0;
|
||||
}
|
||||
|
||||
inline static bool IsUTF8Continuation( char p ) {
|
||||
inline static bool IsUTF8Continuation( const char p ) {
|
||||
return ( p & 0x80 ) != 0;
|
||||
}
|
||||
|
||||
@@ -615,6 +617,7 @@ public:
|
||||
static void ToStr( float 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(uint64_t v, char* buffer, int bufferSize);
|
||||
|
||||
// converts strings to primitive types
|
||||
static bool ToInt( const char* str, int* value );
|
||||
@@ -623,7 +626,7 @@ public:
|
||||
static bool ToFloat( const char* str, float* value );
|
||||
static bool ToDouble( const char* str, double* 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.
|
||||
// Default to "true" and "false". Shouldn't be changed
|
||||
// unless you have a special testing or compatibility need.
|
||||
@@ -1162,6 +1165,12 @@ public:
|
||||
return i;
|
||||
}
|
||||
|
||||
uint64_t Unsigned64Value() const {
|
||||
uint64_t i = 0;
|
||||
QueryUnsigned64Value(&i);
|
||||
return i;
|
||||
}
|
||||
|
||||
/// Query as an unsigned integer. See IntValue()
|
||||
unsigned UnsignedValue() const {
|
||||
unsigned i=0;
|
||||
@@ -1196,6 +1205,8 @@ public:
|
||||
XMLError QueryUnsignedValue( unsigned int* value ) const;
|
||||
/// See QueryIntValue
|
||||
XMLError QueryInt64Value(int64_t* value) const;
|
||||
/// See QueryIntValue
|
||||
XMLError QueryUnsigned64Value(uint64_t* value) const;
|
||||
/// See QueryIntValue
|
||||
XMLError QueryBoolValue( bool* value ) const;
|
||||
/// See QueryIntValue
|
||||
@@ -1211,7 +1222,9 @@ public:
|
||||
void SetAttribute( unsigned value );
|
||||
/// Set the attribute to 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 );
|
||||
/// Set the attribute to value.
|
||||
void SetAttribute( double value );
|
||||
@@ -1299,6 +1312,8 @@ public:
|
||||
unsigned UnsignedAttribute(const char* name, unsigned defaultValue = 0) const;
|
||||
/// See IntAttribute()
|
||||
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()
|
||||
bool BoolAttribute(const char* name, bool defaultValue = false) const;
|
||||
/// See IntAttribute()
|
||||
@@ -1345,6 +1360,15 @@ public:
|
||||
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()
|
||||
XMLError QueryBoolAttribute( const char* name, bool* value ) const {
|
||||
const XMLAttribute* a = FindAttribute( name );
|
||||
@@ -1411,7 +1435,11 @@ public:
|
||||
return QueryInt64Attribute(name, value);
|
||||
}
|
||||
|
||||
XMLError 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 );
|
||||
}
|
||||
|
||||
@@ -1445,7 +1473,13 @@ public:
|
||||
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 ) {
|
||||
XMLAttribute* a = FindOrCreateAttribute( name );
|
||||
a->SetAttribute( value );
|
||||
@@ -1544,6 +1578,8 @@ public:
|
||||
void SetText( unsigned value );
|
||||
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
||||
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.
|
||||
void SetText( bool value );
|
||||
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
||||
@@ -1583,6 +1619,8 @@ public:
|
||||
/// See QueryIntText()
|
||||
XMLError QueryInt64Text(int64_t* uval) const;
|
||||
/// See QueryIntText()
|
||||
XMLError QueryUnsigned64Text(uint64_t* uval) const;
|
||||
/// See QueryIntText()
|
||||
XMLError QueryBoolText( bool* bval ) const;
|
||||
/// See QueryIntText()
|
||||
XMLError QueryDoubleText( double* dval ) const;
|
||||
@@ -1595,12 +1633,29 @@ public:
|
||||
unsigned UnsignedText(unsigned defaultValue = 0) const;
|
||||
/// See QueryIntText()
|
||||
int64_t Int64Text(int64_t defaultValue = 0) const;
|
||||
/// See QueryIntText()
|
||||
uint64_t Unsigned64Text(uint64_t defaultValue = 0) const;
|
||||
/// See QueryIntText()
|
||||
bool BoolText(bool defaultValue = false) const;
|
||||
/// See QueryIntText()
|
||||
double DoubleText(double defaultValue = 0) const;
|
||||
/// See QueryIntText()
|
||||
float FloatText(float defaultValue = 0) const;
|
||||
float FloatText(float defaultValue = 0) const;
|
||||
|
||||
/**
|
||||
Convenience method to create a new XMLElement and add it as last (right)
|
||||
child of this node. Returns the created and inserted element.
|
||||
*/
|
||||
XMLElement* InsertNewChildElement(const char* name);
|
||||
/// See InsertNewChildElement()
|
||||
XMLComment* InsertNewComment(const char* comment);
|
||||
/// See InsertNewChildElement()
|
||||
XMLText* InsertNewText(const char* text);
|
||||
/// See InsertNewChildElement()
|
||||
XMLDeclaration* InsertNewDeclaration(const char* text);
|
||||
/// See InsertNewChildElement()
|
||||
XMLUnknown* InsertNewUnknown(const char* text);
|
||||
|
||||
|
||||
// internal:
|
||||
enum ElementClosingType {
|
||||
@@ -1682,7 +1737,7 @@ public:
|
||||
specified, TinyXML-2 will assume 'xml' points to a
|
||||
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.
|
||||
@@ -1854,7 +1909,7 @@ public:
|
||||
char* Identify( char* p, XMLNode** node );
|
||||
|
||||
// internal
|
||||
void MarkInUse(XMLNode*);
|
||||
void MarkInUse(const XMLNode* const);
|
||||
|
||||
virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const {
|
||||
return 0;
|
||||
@@ -2192,7 +2247,8 @@ public:
|
||||
void PushAttribute( const char* name, const char* value );
|
||||
void PushAttribute( const char* name, int 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, double value );
|
||||
/// If streaming, close the Element.
|
||||
@@ -2204,8 +2260,10 @@ public:
|
||||
void PushText( int value );
|
||||
/// Add a text node from an unsigned.
|
||||
void PushText( unsigned value );
|
||||
/// Add a text node from an unsigned.
|
||||
void PushText(int64_t value);
|
||||
/// Add a text node from a signed 64bit integer.
|
||||
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.
|
||||
void PushText( bool value );
|
||||
/// Add a text node from a float.
|
||||
@@ -2251,10 +2309,10 @@ public:
|
||||
If in print to memory mode, reset the buffer to the
|
||||
beginning.
|
||||
*/
|
||||
void ClearBuffer() {
|
||||
void ClearBuffer( bool resetToFirstElement = true ) {
|
||||
_buffer.Clear();
|
||||
_buffer.Push(0);
|
||||
_firstElement = true;
|
||||
_firstElement = resetToFirstElement;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=@CMAKE_INSTALL_INCLUDEDIR@
|
||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
Name: TinyXML2
|
||||
Description: simple, small, C++ XML parser
|
||||
|
||||
@@ -37,60 +37,60 @@
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}</ProjectGuid>
|
||||
<RootNamespace>test</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
|
||||
@@ -38,60 +38,60 @@
|
||||
<ProjectGuid>{D1C528B6-AA02-4D29-9D61-DC08E317A70D}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>tinyxml2</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
|
||||
202
xmltest.cpp
Normal file → Executable file
202
xmltest.cpp
Normal file → Executable file
@@ -461,9 +461,9 @@ int main( int argc, const char ** argv )
|
||||
// Build:
|
||||
// <element>
|
||||
// <!--comment-->
|
||||
// <sub attrib="0" />
|
||||
// <sub attrib="1" />
|
||||
// <sub attrib="2" />
|
||||
// <sub attrib="3" >& Text!</sub>
|
||||
// <sub attrib="2" >& Text!</sub>
|
||||
// <element>
|
||||
|
||||
XMLDocument* doc = new XMLDocument();
|
||||
@@ -804,6 +804,7 @@ int main( int argc, const char ** argv )
|
||||
// ---------- Attributes ---------
|
||||
{
|
||||
static const int64_t BIG = -123456789012345678;
|
||||
static const uint64_t BIG_POS = 123456789012345678;
|
||||
XMLDocument doc;
|
||||
XMLElement* element = doc.NewElement("element");
|
||||
doc.InsertFirstChild(element);
|
||||
@@ -864,7 +865,23 @@ int main( int argc, const char ** argv )
|
||||
}
|
||||
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);
|
||||
{
|
||||
bool v = false;
|
||||
@@ -931,7 +948,14 @@ int main( int argc, const char ** argv )
|
||||
XMLTest("Element: int64_t", XML_SUCCESS, queryResult, 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 ------
|
||||
{
|
||||
@@ -944,6 +968,7 @@ int main( int argc, const char ** argv )
|
||||
printer.PushAttribute("attrib-int", int(1));
|
||||
printer.PushAttribute("attrib-unsigned", unsigned(2));
|
||||
printer.PushAttribute("attrib-int64", int64_t(3));
|
||||
printer.PushAttribute("attrib-uint64", uint64_t(37));
|
||||
printer.PushAttribute("attrib-bool", true);
|
||||
printer.PushAttribute("attrib-double", 4.0);
|
||||
printer.CloseElement();
|
||||
@@ -964,12 +989,111 @@ int main( int argc, const char ** argv )
|
||||
XMLTest("attrib-unsigned", unsigned(2), attrib->UnsignedValue(), true);
|
||||
attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-int64");
|
||||
XMLTest("attrib-int64", int64_t(3), attrib->Int64Value(), true);
|
||||
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);
|
||||
attrib = cdoc.FirstChildElement("foo")->FindAttribute("attrib-double");
|
||||
XMLTest("attrib-double", 4.0, attrib->DoubleValue(), true);
|
||||
}
|
||||
// Add API_testcatse :PushDeclaration();PushText();PushComment()
|
||||
{
|
||||
FILE* fp1 = fopen("resources/out/printer_1.xml", "w");
|
||||
XMLPrinter printer(fp1);
|
||||
|
||||
printer.PushDeclaration("version = '1.0' enconding = 'utf-8'");
|
||||
|
||||
printer.OpenElement("foo");
|
||||
printer.PushAttribute("attrib-text", "text");
|
||||
|
||||
printer.OpenElement("text");
|
||||
printer.PushText("Tinyxml2");
|
||||
printer.CloseElement();
|
||||
|
||||
printer.OpenElement("int");
|
||||
printer.PushText(int(11));
|
||||
printer.CloseElement();
|
||||
|
||||
printer.OpenElement("unsigned");
|
||||
printer.PushText(unsigned(12));
|
||||
printer.CloseElement();
|
||||
|
||||
printer.OpenElement("int64_t");
|
||||
printer.PushText(int64_t(13));
|
||||
printer.CloseElement();
|
||||
|
||||
printer.OpenElement("uint64_t");
|
||||
printer.PushText(uint64_t(14));
|
||||
printer.CloseElement();
|
||||
|
||||
printer.OpenElement("bool");
|
||||
printer.PushText(true);
|
||||
printer.CloseElement();
|
||||
|
||||
printer.OpenElement("float");
|
||||
printer.PushText("1.56");
|
||||
printer.CloseElement();
|
||||
|
||||
printer.OpenElement("double");
|
||||
printer.PushText("12.12");
|
||||
printer.CloseElement();
|
||||
|
||||
printer.OpenElement("comment");
|
||||
printer.PushComment("this is Tinyxml2");
|
||||
printer.CloseElement();
|
||||
|
||||
printer.CloseElement();
|
||||
fclose(fp1);
|
||||
}
|
||||
{
|
||||
XMLDocument doc;
|
||||
doc.LoadFile("resources/out/printer_1.xml");
|
||||
XMLTest("XMLPrinter Stream mode: load", XML_SUCCESS, doc.ErrorID(), true);
|
||||
|
||||
const XMLDocument& cdoc = doc;
|
||||
|
||||
const XMLElement* root = cdoc.FirstChildElement("foo");
|
||||
|
||||
const char* text_value;
|
||||
text_value = root->FirstChildElement("text")->GetText();
|
||||
XMLTest("PushText( const char* text, bool cdata=false ) test", "Tinyxml2", text_value);
|
||||
|
||||
int int_value;
|
||||
int_value = root->FirstChildElement("int")->IntText();
|
||||
XMLTest("PushText( int value ) test", 11, int_value);
|
||||
|
||||
unsigned unsigned_value;
|
||||
unsigned_value = root->FirstChildElement("unsigned")->UnsignedText();
|
||||
XMLTest("PushText( unsigned value ) test", (unsigned)12, unsigned_value);
|
||||
|
||||
int64_t int64_t_value;
|
||||
int64_t_value = root->FirstChildElement("int64_t")->Int64Text();
|
||||
XMLTest("PushText( int64_t value ) test", (int64_t) 13, int64_t_value);
|
||||
|
||||
uint64_t uint64_t_value;
|
||||
uint64_t_value = root->FirstChildElement("uint64_t")->Unsigned64Text();
|
||||
XMLTest("PushText( uint64_t value ) test", (uint64_t) 14, uint64_t_value);
|
||||
|
||||
float float_value;
|
||||
float_value = root->FirstChildElement("float")->FloatText();
|
||||
XMLTest("PushText( float value ) test", 1.56f, float_value);
|
||||
|
||||
double double_value;
|
||||
double_value = root->FirstChildElement("double")->DoubleText();
|
||||
XMLTest("PushText( double value ) test", 12.12, double_value);
|
||||
|
||||
bool bool_value;
|
||||
bool_value = root->FirstChildElement("bool")->BoolText();
|
||||
XMLTest("PushText( bool value ) test", true, bool_value);
|
||||
|
||||
const XMLComment* comment = root->FirstChildElement("comment")->FirstChild()->ToComment();
|
||||
const char* comment_value = comment->Value();
|
||||
XMLTest("PushComment() test", "this is Tinyxml2", comment_value);
|
||||
|
||||
const XMLDeclaration* declaration = cdoc.FirstChild()->ToDeclaration();
|
||||
const char* declaration_value = declaration->Value();
|
||||
XMLTest("PushDeclaration() test", "version = '1.0' enconding = 'utf-8'", declaration_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1263,7 +1387,7 @@ int main( int argc, const char ** argv )
|
||||
}
|
||||
|
||||
{
|
||||
// trying to repro ]1874301]. If it doesn't go into an infinite loop, all is well.
|
||||
// trying to repro [1874301]. If it doesn't go into an infinite loop, all is well.
|
||||
unsigned char buf[] = "<?xml version=\"1.0\" encoding=\"utf-8\"?><feed><![CDATA[Test XMLblablablalblbl";
|
||||
buf[60] = 239;
|
||||
buf[61] = 0;
|
||||
@@ -1523,6 +1647,70 @@ int main( int argc, const char ** argv )
|
||||
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
|
||||
{
|
||||
const char* xml = "<point> <x>1.2</x> <y>1</y> <z>38</z> <valid>true</valid> </point>";
|
||||
@@ -1702,12 +1890,12 @@ int main( int argc, const char ** argv )
|
||||
doc.Print( &printer );
|
||||
|
||||
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() );
|
||||
}
|
||||
{
|
||||
XMLDocument doc;
|
||||
doc.LoadFile( "resources/bomtest.xml" );
|
||||
doc.LoadFile( "resources/out/bomtest.xml" );
|
||||
XMLTest( "Load bomtest.xml", false, doc.Error() );
|
||||
XMLTest( "BOM preservation (load)", true, doc.HasBOM(), false );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user