667 Commits

Author SHA1 Message Date
Lee Thomason
c1f1de724f Merge pull request #575 from Dmitry-Me/extractDuplicatedString
Extract duplicated text string
2017-06-28 10:43:01 -07:00
Dmitry-Me
5d1aec10fa Extract duplicated text string 2017-06-28 14:51:17 +03:00
Lee Thomason
37bc3aca42 upping the version to 5.0.1 to fix release vs. source problem 2017-06-26 16:56:16 -07:00
Lee Thomason
8c9e3133c4 remove error string inline. hopefully helps with odd linking issues 2017-06-26 16:55:01 -07:00
Lee Thomason
563ee82093 Merge pull request #571 from hyperair/cmake-add-test
Use CTest to add xmltest as a testcase so `make test` works
2017-06-26 16:40:06 -07:00
Lee Thomason
4ee9ebdfd2 Merge pull request #570 from jasjuang/master
fix issue #516
2017-06-26 16:37:42 -07:00
Lee Thomason
a4f48c1167 Merge pull request #572 from Dmitry-Me/swapFoundAndExpected
"Found" and "expected" were swapped in some tests
2017-06-26 16:37:21 -07:00
Dmitry-Me
9832a5f05d "Found" and "expected" were swapped in some tests 2017-06-23 18:29:16 +03:00
Chow Loong Jin
48d45b29a9 Use make test in travis.yml 2017-06-22 01:20:55 +08:00
Chow Loong Jin
5381145957 Use CTest to add xmltest as a testcase so make test works 2017-06-22 01:14:07 +08:00
jasjuang
a5ab98a582 fix issue #516 2017-06-20 17:25:42 -07:00
Lee Thomason
369f306b37 Merge branch 'master' of github.com:leethomason/tinyxml2 2017-06-20 09:18:54 -07:00
Lee Thomason
8bba8b41d6 mark unused enums 2017-06-20 09:18:41 -07:00
Lee Thomason
3f169ac424 Merge pull request #568 from Dmitry-Me/checkParsingErrorEarlier
Test parsing result as early as possible
2017-06-20 09:17:21 -07:00
Lee Thomason
86be0cdfe5 Merge pull request #566 from redagito/master
CMake fix for static library only build
2017-06-20 09:08:39 -07:00
Dmitry-Me
aea64c4b75 Test parsing result as early as possible 2017-06-20 18:20:15 +03:00
Robert J
dfcf5488ea CMake fix for static library only build 2017-06-20 13:41:17 +02:00
Lee Thomason
9201bb96d3 Merge pull request #563 from Dmitry-Me/betterParameterNameInClone
Better parameter name
2017-06-19 14:23:39 -07:00
Dmitry-Me
3f63f21cf5 Better parameter name 2017-06-19 18:25:19 +03:00
Lee Thomason
9e2d29b373 weird compile issues 2017-06-16 09:51:11 -07:00
Lee Thomason
82bb074b49 tweak test 2017-06-16 09:48:20 -07:00
Lee Thomason
224ef775c6 add test case 2017-06-16 09:45:26 -07:00
Lee Thomason
8a763619ac fix incorrect factoring 2017-06-16 09:30:16 -07:00
Lee Thomason
bc527554e8 Merge pull request #558 from leethomason/clone
Support clone (deep copy) of XMLDocument and XMLNode
2017-06-15 12:01:48 -07:00
Lee Thomason
5cfb946953 Merge pull request #562 from Dmitry-Me/testMemoryLeaksInDebugHeap
Programmatically check no leaks are reported in the VC++ debug heap
2017-06-15 10:30:30 -07:00
Lee Thomason
275067a91f Merge pull request #561 from Dmitry-Me/unlinkedElementsAssertions
Unlinked nodes assertions
2017-06-15 10:29:07 -07:00
Dmitry-Me
ed78570c66 Programmatically check no leaks are reported in the VC++ debug heap 2017-06-15 13:39:53 +03:00
Dmitry-Me
c2f677b05e Unlinked nodes assertions 2017-06-15 12:44:27 +03:00
Lee Thomason
1346a174ae tweak comments. fix copy to self case. 2017-06-14 15:14:19 -07:00
Lee Thomason
1bbc66b193 Merge branch 'master' into clone 2017-06-14 15:10:37 -07:00
Lee Thomason
e84f68a68a Merge branch 'memleak2' 2017-06-14 15:03:32 -07:00
Lee Thomason
b754ddf0fb address feedback from review 2017-06-14 15:02:38 -07:00
Lee Thomason
7ce75bc2bb Merge pull request #557 from jasjuang/master
Resolve issue #526
2017-06-14 14:50:53 -07:00
Lee Thomason
816d3fa0cd Fix string leaking (and destructors not getting called) when there are XMLNodes that aren't in the document tree 2017-06-05 14:35:55 -07:00
Lee Thomason
53858b4490 minor formatting fix and very strange memory tracker missing 2017-06-01 19:09:16 -07:00
Lee Thomason
ced18c05b9 missing var?? 2017-06-01 18:50:12 -07:00
Lee Thomason
a30f8bd136 Merge remote-tracking branch 'origin/master' into clone 2017-06-01 18:46:53 -07:00
Lee Thomason
b29f556ab0 comment 2017-06-01 18:45:32 -07:00
Lee Thomason
7085f00e40 deep copy and clone 2017-06-01 18:09:43 -07:00
jasjuang
f66441e3e7 add in support for cmake export, manual Findtinyxml2.cmake is no longer needed 2017-06-01 17:25:30 -07:00
Lee Thomason
33a1f8bd6c Merge pull request #552 from Dmitry-Me/ensureNoOverrunBeforeCopy
Ensure no overrun before copying
2017-05-18 21:13:48 -07:00
Lee Thomason
7538286750 Merge pull request #535 from jnguyen75/build-tests-option
Added BUILD_TESTS option to enable/disable xmltest
2017-05-18 20:57:41 -07:00
Dmitry-Me
243ddf5304 Ensure no overrun before copying 2017-05-18 17:27:14 +03:00
Jimmy Nguyen
105f32f64d Merge remote-tracking branch 'origin/master' into build-tests-option 2017-05-11 16:19:30 -07:00
Lee Thomason
174a5df3a3 Merge pull request #551 from eco/patch-1
Add "d" library suffix for debug builds
2017-05-05 19:55:08 -07:00
Brad Anderson
9333cfd394 Add "d" library suffix for debug builds 2017-05-04 12:25:56 -06:00
Lee Thomason
7b40ce1942 Merge pull request #534 from jnguyen75/ref-test-resources
Refactor test resources: Use CMake to replace mkdir()
2017-04-28 11:21:39 -07:00
Lee Thomason
b840b7e673 Merge pull request #547 from Dmitry-Me/clarifyVariableNames
Clarify variable names
2017-04-12 10:22:34 -07:00
Dmitry-Me
10b8ecc99b Clarify variable names 2017-04-12 17:57:44 +03:00
Lee Thomason
2b0453f43e Merge pull request #545 from Dmitry-Me/fullyUseEnum
Fully use enum
2017-04-06 13:27:29 -07:00
Dmitry-Me
e503563f47 Fully use enum 2017-04-05 18:02:40 +03:00
Lee Thomason
fc05f63575 Merge pull request #543 from Dmitry-Me/pointerAssertInShallowEqual
Pointer assertion
2017-03-22 14:36:32 -07:00
Dmitry-Me
ba68a3aea6 Pointer assertion 2017-03-21 11:39:48 +03:00
Lee Thomason
395ea09f83 Merge pull request #538 from Dmitry-Me/suppressC6011
Suppress C6011 code analysis false positive warning
2017-03-06 12:49:35 -08:00
Lee Thomason
71e2c08a7e Merge pull request #537 from Dmitry-Me/clearerMemberName
Clearer variable name
2017-03-06 12:48:33 -08:00
Dmitry-Me
7221b49fea Suppress C6011 code analysis false positive warning 2017-03-03 15:45:51 +03:00
Dmitry-Me
ae8a82a734 Clearer variable name 2017-03-03 15:40:32 +03:00
Lee Thomason
92c0ef327f Merge pull request #527 from Dmitry-Me/reuseNodesCreationCode
Extract and reuse nodes creation code
2017-03-01 13:15:52 -08:00
Dmitry-Me
2aebfb7123 Extract and reuse nodes creation code 2017-02-27 15:53:40 +03:00
Jimmy Nguyen
1e0b4e6b8a Use generator expression to specify target output directory for resources directory 2017-02-21 12:31:23 -08:00
Jimmy Nguyen
7f2ce0dc0e Updated Windows build script to change directory instead of copying files to run xmltest 2017-02-21 12:27:59 -08:00
Jimmy Nguyen
6bf64fb149 Use CMake to create resources/out directory 2017-02-21 12:00:38 -08:00
Jimmy Nguyen
47c7d70064 Added BUILD_TESTS option to enable/disable building of xmltest 2017-02-21 11:29:24 -08:00
Lee Thomason
b37cb42b78 Merge pull request #513 from leethomason/bool-write
Bool serialization.
2017-02-17 12:39:06 -08:00
Lee Thomason
0f42e24c47 Merge pull request #529 from Winestone/master
Fix typo in CMakeLists.txt
2017-02-14 11:24:51 -08:00
Jimmy Nguyen
969b8c2234 Replaced DATA_COPY target with post build command to copy the resources directory 2017-02-13 23:40:16 -08:00
Jimmy Nguyen
5277134efa Removed empty install() command 2017-02-13 23:24:38 -08:00
Winestone
4a07484e47 Fix typo in CMakeLists.txt 2017-02-11 23:04:14 +11:00
Lee Thomason
962732fd3e Merge pull request #520 from Dmitry-Me/initMemberVars2
Initialize member variable
2017-02-05 15:56:13 -08:00
Dmitry-Me
d120d64b86 Initialize member variable 2017-01-27 18:35:02 +03:00
Lee Thomason
1f5ab7cd0b Merge pull request #517 from Dmitry-Me/initMemberVars
Initialize member variables
2017-01-24 10:38:49 -08:00
Dmitry-Me
f89bd3ef68 Initialize member variables 2017-01-18 18:33:55 +03:00
Lee Thomason
c5c99c2ba0 tweaks to bool serialization 2016-12-29 11:19:17 -08:00
Lee Thomason
f458d265c1 fix const. hopefully. 2016-12-26 22:47:25 -08:00
Lee Thomason
ce667c9233 ability to set bool write values 2016-12-26 16:45:30 -08:00
Lee Thomason
5b733ff481 Merge pull request #504 from Dmitry-Me/ensureLinkPointersAreNotOverwritten
Ensure existing attributes are not leaked on attribute insertion
2016-12-24 07:39:17 -08:00
Lee Thomason
c3a19156ff Merge pull request #510 from leethomason/kezenator-line-numbering
Kezenator line numbering
2016-12-24 07:38:43 -08:00
Lee Thomason
e90e901041 tweaks, clarification to line numbers 2016-12-24 07:34:39 -08:00
Lee Thomason
002713856b Merge remote-tracking branch 'origin/master' into kezenator-line-numbering 2016-12-24 07:27:40 -08:00
Lee Thomason
855a66c0ff Merge pull request #509 from leethomason/fix-win-dll-build
Fix windows dll build/run
2016-12-24 07:27:25 -08:00
Lee Thomason
ef7fe0fd98 fix windows dll build/run 2016-12-24 07:07:56 -08:00
Dmitry-Me
34a3f8e34d Ensure existing attributes are not leaked on attribute insertion 2016-12-19 12:05:21 +03:00
kezenator
19d8ea836f CodeReview Fix: GetLineNum()? 2016-11-29 19:50:27 +10:00
kezenator
e353181a46 CodeReview Fix: initialLineNum? Something a little more descriptive? 2016-11-29 19:49:07 +10:00
kezenator
e3d44159e3 CodeReview Fix: The initializer syntax isn't used. Should be 'int unusedLineNum = 0` 2016-11-29 19:47:55 +10:00
kezenator
4f756161d0 CodeReview Fix: The non-const reference syntax isn't used in the codebase. Should be a pointer. 2016-11-29 19:46:27 +10:00
kezenator
2489afcc61 Merge branch 'master' of https://github.com/leethomason/tinyxml2 2016-11-29 19:33:44 +10:00
kezenator
a43ff7210e Removed line numbering support as an advantage of TinyXML-1.
Added error reporting system that discusses the support for line number information.
2016-11-26 17:33:12 +10:00
kezenator
ec6941503c Added line number reporting to parse errors and to all nodes and attributes for parsed documents. 2016-11-26 17:21:43 +10:00
Lee Thomason
156bc1b99f Merge pull request #502 from Dmitry-Me/reuseClearError
Reuse code for error clearing
2016-11-25 22:06:11 -08:00
Lee Thomason
5bbb6fb052 Merge pull request #500 from Dmitry-Me/reuseAttributeCreation
Reuse attribute creation code
2016-11-25 22:05:34 -08:00
kezenator
5a70071241 Added static method to convert arbitrary ErrorID to a string.
Updated tests to print ErrorID and bool values as strings.
2016-11-26 13:54:42 +10:00
Dmitry-Me
0d2cef0cba Reuse code for error clearing 2016-11-25 18:39:52 +03:00
Dmitry-Me
a60caa28cc Reuse attribute creation code 2016-11-22 18:28:08 +03:00
Lee Thomason
f80d78d938 Merge pull request #499 from Dmitry-Me/unifyNullComparisons
Unify null pointer checks
2016-11-17 14:43:55 -08:00
Dmitry-Me
ebb1660c2f Unify null pointer checks 2016-11-16 17:22:45 +03:00
Lee Thomason
7de0b6dd8c Merge pull request #493 from leethomason/jwittner
Friendly API for attribute query.
2016-11-15 14:09:03 -08:00
Lee Thomason
d04f21cab8 Merge pull request #496 from Dmitry-Me/detectDeclarationPlacement
Declarations should occur before anything else
2016-11-15 14:08:04 -08:00
Dmitry-Me
446c3bcae3 Declarations should occur before anything else 2016-11-11 10:34:56 +03:00
Lee Thomason
cd47f8e0d3 Merge pull request #495 from Dmitry-Me/pointerAssertionAfterIdentify
Pointer post-assertion
2016-11-10 14:36:10 -08:00
Dmitry-Me
4336431272 Pointer post-assertion 2016-11-07 18:48:50 +03:00
Lee Thomason
13cbc9a708 add test files. fix doc. 2016-10-27 14:55:07 -07:00
Lee Thomason
c9a6102bf1 Merge branch 'master' of git://github.com/jwittner/tinyxml2 into jwittner-master 2016-10-27 14:33:52 -07:00
Lee Thomason
6bbcda0215 Merge pull request #490 from Dmitry-Me/avoidCastToSigned
Avoid cast to signed integer type
2016-10-17 15:34:20 -07:00
Lee Thomason
15ad07170d Merge pull request #489 from Armagetron/master
Use correct file pointer
2016-10-17 15:33:57 -07:00
Lee Thomason
ed2627e5a7 Merge pull request #487 from jwittner/dev/slnFixes
Fixes for Visual Studio builds and gitignore output
2016-10-17 15:33:26 -07:00
Dmitry-Me
c5f1e7ce6e Avoid cast to signed integer type 2016-10-14 10:33:02 +03:00
Armagetron
3c21d6fbb7 Use correct file pointer 2016-10-13 13:31:23 +02:00
Lee Thomason
f6106bec9a Merge pull request #488 from Dmitry-Me/reuseElementWithNameCheck
Reuse "is element with name" check
2016-10-12 15:23:39 -07:00
Dmitry-Me
ecb9b07476 Reuse "is element with name" check 2016-10-12 16:44:59 +03:00
Josh Wittner
edb3261c51 Ignore SLn output dirs, VC files 2016-10-11 19:04:15 -07:00
Josh Wittner
01f6cca9e1 Standardize output directory - fixes conflicts 2016-10-11 19:03:10 -07:00
Josh Wittner
513e69ba68 Merge branch 'master' of https://github.com/leethomason/tinyxml2 2016-10-11 19:00:53 -07:00
Josh Wittner
cf3dd09b08 Move implementations to cpp 2016-10-11 18:57:17 -07:00
Lee Thomason
e8157ff9ae Merge pull request #484 from kainjow/patch-2
Fix warning on PowerPC
2016-10-11 13:52:45 -07:00
Lee Thomason
b2f4dc2a7b Merge pull request #483 from kainjow/patch-1
Fix typo
2016-10-11 13:45:35 -07:00
Lee Thomason
0d3de1edbe Merge pull request #482 from Dmitry-Me/stringEqualAssertions
Assertions in string comparison
2016-10-11 13:11:06 -07:00
Kevin Wojniak
318252a973 Fix warning on PowerPC
GCC 5+ will generate "error: comparison is always true due to limited range of data type" when -Wextra is used because PowerPC by default uses unsigned char, so it can never be less than 0.
2016-10-07 10:37:02 -07:00
Kevin Wojniak
3c97724d0e Fix typo 2016-10-06 16:05:59 -07:00
Dmitry-Me
21f996960d Assertions in string comparison 2016-10-03 13:01:57 +03:00
Lee Thomason
f00c179eba Merge pull request #480 from kurylo/fix/2016-09-29-cmake-warning
Fix cmake warnings on new cmake versions.
2016-10-02 21:24:49 -07:00
Lee Thomason
7fcf31b2c3 Merge pull request #477 from bejado/XML_NO_ERROR_Comments
Update comments to reflect single successful return type
2016-10-02 21:22:42 -07:00
Lee Thomason
6f1ad6153e Merge pull request #471 from Dmitry-Me/loopInvariantAssertions
Loop invariant pointer assertions
2016-10-02 21:21:38 -07:00
Łukasz Kuryło
aad61870a9 Fix cmake warnings on new cmake versions. 2016-09-29 18:59:07 +02:00
Benjamin Doherty
3b9cf99916 Update comments to reflect single successful return type 2016-09-23 18:42:23 -06:00
Lee Thomason
e9b547a9ee Merge pull request #475 from Dmitry-Me/splitAccessAndAdjustment
Split access and pointer adjustment
2016-09-14 10:31:10 -07:00
Josh Wittner
3a621f5b6e Added default values TypeText accessors 2016-09-12 19:17:54 -07:00
Dmitry-Me
fed511276f Split access and pointer adjustment 2016-09-06 18:08:55 +03:00
Lee Thomason
584af57086 fix error string memory errors 2016-09-05 14:14:16 -07:00
Lee Thomason
2e14517c89 Merge pull request #474 from Dmitry-Me/unifyIncDecOps
Unify increments and decrements
2016-09-05 13:52:58 -07:00
Lee Thomason
24694e9519 Merge pull request #473 from Dmitry-Me/preferConstAccess
Use const where const is enough
2016-09-05 13:52:22 -07:00
Lee Thomason
0d667f8fef Merge pull request #472 from Dmitry-Me/pointerAssertionsStrPairSet
Pointer assertions for substring
2016-09-05 13:51:59 -07:00
Dmitry-Me
3161a33c86 Unify increments and decrements 2016-09-02 16:58:06 +03:00
Dmitry-Me
2449582eaf Use const where const is enough 2016-09-02 16:53:32 +03:00
Dmitry-Me
6fc38ec7cc Pointer assertions for substring 2016-09-01 17:59:44 +03:00
Dmitry-Me
f9f3c3e85c Loop invariant pointer assertions 2016-08-30 15:51:55 +03:00
Lee Thomason
4fe8c102da Merge pull request #469 from Trebgarta/master
Bool true/false rather than 0/1 : #399
2016-08-28 17:21:04 -07:00
Lee Thomason
a369d4b614 Merge pull request #468 from Dmitry-Me/reuseDeleteChild
Reuse DeleteChild()
2016-08-28 17:13:28 -07:00
Doruk Turak
1f212f3ab0 Bool-related tests modified to pass 2016-08-28 20:54:17 +02:00
Doruk Turak
de45d04711 SetAttribute: true/false rather 1/0 2016-08-28 20:47:08 +02:00
Dmitry-Me
9cb4eca596 Reuse DeleteChild() 2016-08-18 18:10:59 +03:00
Lee Thomason
0bb5901961 Merge pull request #466 from Dmitry-Me/makeCommentMoreConcise
Make comment more concise
2016-08-11 07:34:16 -07:00
Lee Thomason
9faf14df53 Merge pull request #465 from Dmitry-Me/unifyNodeDeletion
Unify node deletion
2016-08-11 07:33:53 -07:00
Lee Thomason
cb6461ca9c Merge pull request #464 from mwoehlke-kitware/elf-visibility
ELF visibility
2016-08-11 07:32:50 -07:00
Lee Thomason
c7805c541c Merge pull request #463 from Dmitry-Me/clarifyMemoryPoolParts
Clarify "block" and "chunk"
2016-08-11 07:28:08 -07:00
Dmitry-Me
caa72a641e Make comment more concise 2016-08-10 17:34:34 +03:00
Dmitry-Me
4de7abb573 Unify node deletion 2016-08-10 17:30:02 +03:00
Matthew Woehlke
8170bdc693 Build with hidden symbols by default
Turn on options to tell CMake to use -fvisibility=hidden by default (on
applicable platforms). This has some optimization benefits, and more
closely mirrors the Windows behavior of only exporting symbols marked
for export, which can help catch errors doing so on non-Windows
platforms.

This requires CMake 2.8.12 to be effective. (Otherwise, the logic will
simply have no effect.)
2016-08-09 13:21:06 -04:00
Matthew Woehlke
a8e7ea7fb0 Set ELF visibility
Set symbol visibility to "default" on non-Windows platforms. This allows
building with -fvisibility=hidden, which has various advantages, and
which some projects will almost certainly want to do.
2016-08-09 13:16:26 -04:00
Dmitry-Me
88145b8ae6 Clarify "block" and "chunk" 2016-08-09 17:59:31 +03:00
Lee Thomason
75c8f40640 Merge pull request #459 from Elbrasch/master
Added void XMLPrinter::PushText( int64_t value ), which was declared …
2016-08-05 13:10:16 -07:00
Lee Thomason
1043f6feed Merge pull request #460 from Dmitry-Me/pointerAssertion
Pointer assertion for contract clarity
2016-08-05 13:09:25 -07:00
Dmitry-Me
db02b21bc5 Pointer assertion for contract clarity 2016-08-04 17:16:05 +03:00
Stefan Asbeck
e1a82c1a50 Added void XMLPrinter::PushText( int64_t value ), which was declared but not implemented. 2016-08-04 09:12:45 +02:00
Lee Thomason
74d44acb17 fix compile issues on clang 2016-07-17 22:57:36 -07:00
Lee Thomason
c9445466de fix permissive casting. 2016-07-17 22:53:48 -07:00
Lee Thomason
5bf60e9dc6 try to fix the lld issue 2016-07-17 22:49:40 -07:00
Lee Thomason
6ba2a077ed upping the major version. lots of small (incompatible) changes, and the addition of int64 support. 2016-07-17 22:40:43 -07:00
Lee Thomason
af9bce1762 support user data 2016-07-17 22:35:52 -07:00
Lee Thomason
536a4cde37 Merge branch 'master' into int64support 2016-07-17 21:37:39 -07:00
Lee Thomason
098bd1f17a fix project file version 2016-07-17 21:35:10 -07:00
Lee Thomason
53b0727037 Merge pull request #453 from morinim/issue425
Fixes issue #425
2016-07-17 21:33:54 -07:00
Manlio Morini
0f45b2422f Fixes issue #425 2016-07-11 12:14:59 +02:00
Lee Thomason
d7e5f47524 Merge pull request #445 from kurylo/master
Add INCLUDE_DIRECTORIES on the targets for supported cmake versions.
2016-06-23 13:50:24 -07:00
Lukasz Kurylo
2818e67f31 Add INCLUDE_DIRECTORIES on the targets for supported cmake versions. 2016-06-22 19:22:57 +02:00
Lee Thomason
2fe47ead77 Merge pull request #443 from TheZoc/patch-1
Standardized static library output name
2016-06-09 16:25:14 -07:00
Felipe "Zoc" Silveira
04639a59a5 Standardized static library output name
Renamed ```tinyxml2.a``` to ```libtinyxml2.a```, to allow proper linking using the ```-l``` flag on gcc.
2016-06-08 19:11:37 -03:00
Lee Thomason
1889c3e679 try to make gcc happier 2016-06-04 20:22:57 -07:00
Lee Thomason
51c1271797 add int64 support 2016-06-04 20:18:49 -07:00
Lee Thomason
a572db13cf ps3 support 2016-06-04 19:16:24 -07:00
Lee Thomason
8553625730 one successful return type. simplify build on vs2015 2016-06-04 19:10:53 -07:00
Lee Thomason
df4ffc00d6 fix warning up from vs2015 2016-06-04 11:32:46 -07:00
Lee Thomason
41599e2583 Merge branch 'master' of git://github.com/TheZoc/tinyxml2 into TheZoc-master 2016-06-04 11:26:08 -07:00
Lee Thomason
ceb646812a Merge pull request #438 from TheZoc/osx-makefile
Updated Makefile to allow building TinyXML2 as a static library
2016-06-03 07:56:17 -07:00
Lee Thomason
d3f5c318ae remove unused XMLBase 2016-06-03 07:49:35 -07:00
Felipe "Zoc" Silveira
48daa2dd81 Updated Makefile to allow building TinyXML2 as a static library 2016-05-22 00:21:53 -03:00
Lee Thomason
31d6c877bd Merge pull request #435 from ongjunjie/master
minimize file copying on incremental builds
2016-05-14 10:46:04 -07:00
Felipe "Zoc" Silveira
1f16f9ddf5 Updated to VS 2015 2016-05-12 06:31:28 -03:00
Jun Jie
47f9931130 minimize file copying on incremental builds 2016-04-22 13:37:44 +08:00
Lee Thomason
bb4d246f7b update to VS 2013 2016-03-25 20:08:32 -07:00
Lee Thomason
97837e77f4 Merge pull request #428 from wvvelzen/WarningsFix
Fix 2 "Condition is always true" compiler warnings.
2016-03-25 07:41:51 -07:00
Lee Thomason
3d60e25c4a Merge pull request #427 from wvvelzen/bcb6fix
Fix for Borland C++ Builder 6
2016-03-25 07:41:05 -07:00
Wilfred van Velzen
0aeac18ad3 Fix 2 "Condition is always true" compiler warnings. 2016-03-25 14:14:03 +01:00
Wilfred van Velzen
67abee5610 Fix for Borland C++ Builder 6 2016-03-25 14:01:15 +01:00
Lee Thomason
fe5dbdb817 Merge pull request #414 from ReadmeCritic/master
Correct the capitalization of Xcode in README
2016-03-24 07:49:15 -07:00
Lee Thomason
d175e9de0b Merge pull request #413 from Darksun2010/master
space misses in the comment of CMakeLists.txt
2016-02-17 11:39:22 -08:00
ReadmeCritic
ff714133bc Correct the capitalization of Xcode in README 2016-02-17 09:24:03 -08:00
Darksun
6bf8a07587 space misses in the comment of CMakeLists.txt 2016-02-16 16:10:57 +08:00
Lee Thomason
c8dad95d44 Merge pull request #410 from Dmitry-Me/assertForFTellReturn
Assert to ensure ftell() behaves as expected by later code
2016-02-09 08:39:14 -08:00
Dmitry-Me
96b110d25e Assert to ensure ftell() behaves as expected by later code 2016-02-09 15:12:40 +03:00
Lee Thomason
9ff6654174 Merge pull request #407 from JarleStrand/fix-deletechild
Error fix DeleteChild
2016-01-04 07:40:22 -08:00
Jarle Strand
81abfd6d4c Error fix DeleteChild
Added call to Unlink in XMLNode::DeleteChild() so that references to
node are removed before memory is unallocated. This will ensure the
child is removed from parent and that no pointers are referring to the
unallocated memory. (Code is now aligned with the code in
XMLNode::DeleteChildren() )
2015-12-27 17:30:04 +01:00
Lee Thomason
9c8582c7c3 Merge pull request #401 from Dmitry-Me/assertForNonNullString
Assertion in StrPair::SetStr()
2015-12-09 11:36:59 -08:00
Dmitry-Me
0515fa9d27 Assertion in StrPair::SetStr() 2015-12-09 11:54:06 +03:00
Lee Thomason
f47b20f114 fix readme syntax 2015-10-19 22:55:32 -07:00
Lee Thomason
dffea5747b remove mystery comment 2015-10-19 22:51:49 -07:00
Lee Thomason
fe5b7a5cac Merge pull request #393 from Dmitry-Me/fixSetTextDescription
Fix SetText() description spelling
2015-10-19 17:13:45 -07:00
Dmitry-Me
9e9c85b3ae Fix SetText() description spelling 2015-10-19 18:04:46 +03:00
Lee Thomason
7bc9201322 remove static-assert accidentally checked in. 2015-10-09 14:45:08 -07:00
Lee Thomason
598a88d9fd used stdlib strncmp function 2015-10-09 14:42:12 -07:00
Lee Thomason
e4c0738318 Merge pull request #383 from Chocobo1/travis
CI improvements
2015-10-09 11:28:55 -07:00
Chocobo1
f2c6b118da readme.md: add CI build status badges 2015-10-02 22:09:12 +08:00
Chocobo1
a58de11b42 Add appveyor.yml 2015-10-02 18:08:48 +08:00
Chocobo1
87a8e71c20 TravisCI: support osx build 2015-10-02 17:53:31 +08:00
Lee Thomason
e4f8ba89d0 Merge pull request #381 from ya1gaurav/patch-1
Travis also support clang.
2015-09-29 19:50:14 -07:00
Lee Thomason
a589da416c Merge pull request #380 from Dmitry-Me/getRidOfWtypeLimits
Get rid of -Wtype-limits warning
2015-09-29 19:49:46 -07:00
Gaurav
60af433d31 Travis also support clang.
Add clang compiler to travis build support.
2015-09-28 13:32:30 +05:30
Dmitry-Me
901fed5f19 Get rid of -Wtype-limits warning 2015-09-25 10:29:51 +03:00
Lee Thomason
2aee5e1b37 Merge pull request #379 from renu555/renu555-patch-5
Build with travis CI on every pull request or commit
2015-09-24 10:31:39 -07:00
Lee Thomason
27eb078329 Merge pull request #372 from jasjuang/master
add in support for sudo make uninstall
2015-09-24 10:23:04 -07:00
renu555
d7f2cce11f Create .travis.yml 2015-09-24 14:02:02 +05:30
Lee Thomason
8ac308d433 Merge pull request #376 from renu555/renu555-patch-1
Build tinyxml2 as static library
2015-09-21 07:40:39 -07:00
renu555
871d72f3a8 Build tinyxml2 as static library
By Default shared libs are built
To build static library also configure  cmake with -DBUILD_STATIC_LIBS:BOOL=ON
To build only static library configure cmake with -DBILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON
2015-09-18 13:39:51 +05:30
Lee Thomason
b5d51e8f90 Merge pull request #371 from PKEuS/master
Declared *PRINTF wrappers as static
2015-08-20 07:37:00 -07:00
jasjuang
f6002e6a99 add in support for sudo make uninstall 2015-08-15 16:50:55 -07:00
PKEuS
cac75789ba Declared *PRINTF wrappers as static 2015-08-15 18:19:53 +02:00
Lee Thomason
2beb560a3e Merge pull request #367 from Dmitry-Me/preAssertsToEnsureNoBufferLeaks
Asserts to ensure old buffer is not leaked when allocating a new one
2015-08-14 13:57:53 -07:00
Dmitry-Me
96f38cca95 Asserts to ensure old buffer is not leaked when allocating a new one 2015-08-10 16:45:12 +03:00
Lee Thomason
bb8fd3c29c Merge pull request #364 from PKEuS/master
Moved include of <cstdarg> to cpp file
2015-08-07 15:51:02 -07:00
Lee Thomason
7ae888a601 Merge pull request #363 from Dmitry-Me/outputLengthAsserts
Asserts for formatted output length
2015-08-07 15:50:16 -07:00
Lee Thomason
d101a9b1a6 Merge pull request #366 from yang-le/master
add *.o to .gitignore
2015-08-07 15:46:51 -07:00
Yang Le
14d5490618 add *.o to .gitignore 2015-08-06 22:38:48 +08:00
Philipp Kloke
358202c77a Moved include of <cstdarg> to cpp file 2015-07-30 16:02:26 +02:00
Dmitry-Me
1d32e586d5 Asserts for formatted output length 2015-07-27 17:11:51 +03:00
Lee Thomason
78fca3db83 Merge pull request #361 from RossBencina/master
fix compiler warning (XCode 4.6.1 x86_64) tinyxml2.cpp:2146:77: Impli…
2015-07-23 17:00:05 -07:00
Lee Thomason
fd6ad7e3a7 Merge pull request #362 from Dmitry-Me/useElementName
Use "name" for element name
2015-07-23 16:59:20 -07:00
Dmitry-Me
886ad9787c Use "name" for element name 2015-07-22 11:00:51 +03:00
Ross Bencina
e7fa0e159e fix compiler warning (XCode 4.6.1 x86_64) tinyxml2.cpp:2146:77: Implicit conversion loses integer precision: 'const size_t' (aka 'const unsigned long') to 'const int' 2015-07-22 16:58:05 +10:00
Lee Thomason
eb89ef6f0d Merge pull request #360 from Dmitry-Me/documentConsistencyAsserts
Document consistency asserts
2015-07-21 16:20:12 -07:00
Dmitry-Me
66487eb8f9 Document consistency asserts 2015-07-20 18:21:04 +03:00
Lee Thomason
400e5b2d60 Merge pull request #358 from Dmitry-Me/betterDocumentWarningSuppression
Better document warning suppression code
2015-07-06 14:17:30 -07:00
Dmitry-Me
8dd493b268 Better document warning suppression code 2015-07-02 13:59:30 +03:00
Lee Thomason
4824e95bc0 Merge pull request #343 from Dmitry-Me/checkEntityWasPrinted
Ensure proper pattern was found and printed
2015-07-01 14:18:15 -07:00
Lee Thomason
70fd52a574 Merge pull request #354 from Dmitry-Me/properCapsVisualStudio
Proper capitalize Visual Studio in comment
2015-06-23 16:30:01 -07:00
Dmitry-Me
1ca593c4ca Proper capitalize Visual Studio in comment 2015-06-22 12:49:32 +03:00
Lee Thomason
aebaeea687 Merge pull request #353 from Dmitry-Me/unselessConst
Useless const
2015-06-19 16:55:19 -07:00
Lee Thomason
73f08a3185 Merge pull request #352 from Dmitry-Me/consistencyAsserts
Consistency asserts
2015-06-19 16:54:54 -07:00
Lee Thomason
aa8566b137 fix a macro version check 2015-06-19 16:52:40 -07:00
Dmitry-Me
7865aad09b Useless const 2015-06-19 16:23:35 +03:00
Dmitry-Me
2f5a103992 Consistency asserts 2015-06-18 16:40:09 +03:00
Lee Thomason
53db4a6cf4 move to cpp file. 2015-06-11 22:52:08 -07:00
pffang
1527cf4b2f Patch for Visual Studio 2003 and earlier.
This patch will be easy to extend in the future.
2015-06-09 13:57:11 +08:00
Lee Thomason
2b2649e1e4 Merge pull request #349 from Dmitry-Me/properHandleSmallBufferOnCe
Don't use -1 as buffer length
2015-06-08 17:14:14 -07:00
Dmitry-Me
687bf8211f Don't use -1 as buffer length 2015-06-08 18:06:44 +03:00
Dmitry-Me
39c399a0f2 Ensure proper pattern was found and printed 2015-05-28 15:32:27 +03:00
Lee Thomason
91f2dcfb5c Merge pull request #342 from Dmitry-Me/testErrorNames
Test error name is non-empty for the whole range
2015-05-26 11:09:12 -07:00
Lee Thomason
32de9f02f5 Merge pull request #341 from Dmitry-Me/cleanupComment
Remove redundant comment, fix typo and formatting
2015-05-26 09:18:55 -07:00
Dmitry-Me
a1beddf486 Test error name is non-empty for the whole range 2015-05-26 16:19:21 +03:00
Dmitry-Me
962083b9d1 Remove redundant comment, fix typo and formatting 2015-05-26 11:38:30 +03:00
Lee Thomason
735ce51124 Merge pull request #339 from Dmitry-Me/properFixGccSignCompare
Proper fix gcc -Wsign-compare
2015-05-25 10:40:45 -07:00
Dmitry-Me
ca86a0fa2a Proper fix gcc -Wsign-compare 2015-05-25 11:29:14 +03:00
Lee Thomason
c879a4d48c Merge pull request #338 from Dmitry-Me/removeAmbiguousEnumItems
Get rid of two distinct enum items with same same
2015-05-22 11:09:33 -07:00
Lee Thomason
949ae37e0a Merge pull request #337 from Dmitry-Me/checkEntityFoundExplicitly
Explicitly check entity was not found
2015-05-22 11:08:31 -07:00
Lee Thomason
03d0f4ea25 Merge branch 'SirR4T-assert-fires-when-calling-XMLDocument--Value' 2015-05-22 11:07:58 -07:00
Lee Thomason
8549202800 clean up Value of XMLDocument 2015-05-22 11:07:45 -07:00
Lee Thomason
c52aa55a86 Merge branch 'SirR4T-patch-1' 2015-05-22 11:00:59 -07:00
Lee Thomason
7a93b33160 tighten up the error checks 2015-05-22 11:00:32 -07:00
Lee Thomason
2ecc203835 Merge branch 'patch-1' of https://github.com/SirR4T/tinyxml2 into SirR4T-patch-1 2015-05-22 10:57:00 -07:00
Dmitry-Me
5420e547d3 Get rid of two distinct enum items with same same 2015-05-20 10:51:26 +03:00
Dmitry-Me
764545e02a Explicitly check entity was not found 2015-05-20 10:29:24 +03:00
Sarat Addepalli
3df007ef9d Fix and use correct pointers and types.
Should have been `XMLDeclaration* decl = ...` instead of `XMLElement* ele = ...`
2015-05-20 10:43:51 +05:30
Sarat Addepalli
96b4346660 Remove unnecessary cast in XMLNode::Value() 2015-05-20 10:36:06 +05:30
Sarat Addepalli
d608c561e0 Fix up xmltest.cpp
Fixed coding style in XMLTest(), and removed unused variable in testcase.
2015-05-20 10:19:00 +05:30
Lee Thomason
ff53d7172c Merge pull request #335 from SirR4T/SirR4T-add-DEBUG-macro-in-CMakeLists_txt
Define the `DEBUG` macro in CMakeLists.txt
2015-05-19 09:37:33 -07:00
Lee Thomason
1bf04fd755 Merge pull request #330 from Dmitry-Me/avoidUnneededPrinterCreation
Avoid unneeded printer object creation
2015-05-19 09:31:41 -07:00
Sarat Addepalli
9afd1d0ceb Clarify meaning of 'empty'
When `XMLDocument::Value()` is called, we intend to return NULL (`( const char* )0`). State that explicitly in the documentation, so as to disambiguate between "empty string" (`""`) and NULL.
2015-05-19 12:56:27 +05:30
Sarat Addepalli
9c3122b89b Bypass asserts for XMLDocument::Value()
When the node is an XMLDocument, bypass calling the `_value.GetStr()` function, since we know we have to return `( const char* )0` inevitably.

This fixes #323
2015-05-19 12:49:32 +05:30
Sarat Addepalli
13b2d73427 Add null-checks in XMLTest()
When either `expected` or `found` is `NULL`, `XMLTest()` will segfault on `strcmp()`.
This patch adds null-checks, and passes the test if both `expected` and `found` are `NULL`.
2015-05-19 12:44:57 +05:30
Sarat Addepalli
a7edb883f0 Add a test case for issue #323
When compiled in "debug mode", this test case verifies that an assert is fired, when `XMLDocument::Value()` is called.
2015-05-19 12:39:27 +05:30
Sarat Addepalli
39a77dd825 Define the DEBUG macro in CMakeLists.txt
Fixes #334
2015-05-19 12:27:59 +05:30
Sarat Addepalli
8e85afa406 Fix whitespaces in xmltest.cpp 2015-05-19 09:07:03 +05:30
Sarat Addepalli
2f0d173f94 Fix whitespaces in tinyxml2.cpp 2015-05-19 09:02:16 +05:30
Sarat Addepalli
a0f499dda1 Fix ParseDeep() to close issue #332
If the node to be added is an XML Declaration, then check if the document has any children already.
XML Declarations can only be the FirstChild() s of an XML Document.
2015-05-18 09:25:17 +05:30
Sarat Addepalli
2bb6bb5bee Add a test case for issue #332
XML Declarations can occur only at the beginning of an XML Document.
Parse() should throw an error, for not well-formed XML Documents.
2015-05-18 09:16:34 +05:30
Dmitry-Me
67c429e4b4 Avoid unneeded printer object creation 2015-05-08 18:08:18 +03:00
Lee Thomason
e5e5541af6 Merge pull request #328 from Dmitry-Me/firstCheckThenConvert
First check, then convert
2015-05-07 13:54:31 -07:00
Dmitry-Me
72801b8b20 First check, then convert 2015-05-07 09:41:39 +03:00
Lee Thomason
89df56c046 Merge pull request #327 from Dmitry-Me/ensureFileSizeFitsInSizeT
Ensure file contents fit into size_t range
2015-05-06 16:40:01 -07:00
Dmitry-Me
2a8b1f5789 Ensure file contents fit into size_t range 2015-04-30 14:58:57 +03:00
Lee Thomason
882e89e601 Merge pull request #326 from Dmitry-Me/cleanupPointersComparison
Unify pointers comparison, consistency asserts
2015-04-27 16:57:37 -07:00
Lee Thomason
a295da4302 Merge pull request #324 from Dmitry-Me/checkWithoutClangTautological
Range check without clang "always true" warning
2015-04-27 16:56:24 -07:00
Dmitry-Me
69d521d354 Unify pointers comparison, consistency asserts 2015-04-20 18:05:53 +03:00
Dmitry-Me
2ad4320339 Range check without clang "always true" warning 2015-04-16 12:18:58 +03:00
Lee Thomason
4f0c2ffcab fix 'always true' warning 2015-04-13 13:58:20 -07:00
Lee Thomason
70f2c740c0 Merge pull request #322 from Dmitry-Me/detectParsingErrorEarlier
Detect parsing error earlier when looking at end of tag
2015-04-13 13:43:07 -07:00
Dmitry-Me
ccd267a782 Detect parsing error earlier when looking at end of tag 2015-04-10 15:42:54 +03:00
Lee Thomason
9f24acd369 Merge pull request #321 from Dmitry-Me/dontLeakTheElement
Don't leak the element
2015-04-09 14:49:59 -07:00
Lee Thomason
e3932d6b7f Merge pull request #319 from Dmitry-Me/getRidOfNull
Get rid of NULL, cleanup formatting
2015-04-09 14:49:25 -07:00
Lee Thomason
5ea4f3cb77 Merge pull request #315 from Dmitry-Me/orderPatternsAsTheyAreSearched
Order patterns the same way they are searched
2015-04-09 14:48:44 -07:00
Lee Thomason
2d39158eaa Merge pull request #317 from Dmitry-Me/moreConsistencyAsserts
More consistency asserts
2015-04-09 14:48:18 -07:00
Dmitry-Me
5daa54cf2b Don't leak the element 2015-04-08 17:45:07 +03:00
Dmitry-Me
e76b8519d1 Get rid of NULL, cleanup formatting 2015-04-08 13:41:40 +03:00
Dmitry-Me
9614f8ff74 More consistency asserts 2015-04-08 10:06:06 +03:00
Lee Thomason
4a0392dd9d Merge pull request #314 from Dmitry-Me/ensureEnumIsPrintedProperly
Ensure enum is printed properly
2015-04-07 09:55:18 -07:00
Lee Thomason
0aa957a352 Merge pull request #313 from Dmitry-Me/shouldBeNoErrorInitially
Test there's no error initially, proper swap "found" and "expected"
2015-04-07 09:53:24 -07:00
Dmitry-Me
400f1199ea Ensure enum is printed properly 2015-04-07 11:51:21 +03:00
Dmitry-Me
32533ca9c2 Test there's no error initially, proper swap "found" and "expected" 2015-04-07 10:37:39 +03:00
Lee Thomason
a1a4a13825 Merge pull request #312 from Dmitry-Me/newDocumentMustBeEmpty
Document must be initially empty
2015-04-06 14:26:23 -07:00
Lee Thomason
4034395d1a Merge pull request #311 from Dmitry-Me/betterParameterName
Better parameter name
2015-04-06 14:25:57 -07:00
Lee Thomason
2a2ed16ce1 Merge pull request #310 from Dmitry-Me/moreConst
Const qualifiers where access is const, unify formatting
2015-04-06 14:25:37 -07:00
Lee Thomason
1881344cb6 Merge pull request #309 from Dmitry-Me/makeParseDeepProtected
Make ParseDeep() protected
2015-04-06 14:25:00 -07:00
Dmitry-Me
48b5df0b9b Document must be initially empty 2015-04-06 18:20:25 +03:00
Dmitry-Me
040092215d Better parameter name 2015-04-06 18:07:18 +03:00
Dmitry-Me
2667aab551 Const qualifiers where access is const, unify formatting 2015-04-03 10:56:59 +03:00
Dmitry-Me
9b0f17753d Make ParseDeep() protected 2015-04-03 10:37:31 +03:00
Lee Thomason
51b33321be Merge pull request #308 from Dmitry-Me/mergePrintCalls
Merge Print() calls
2015-04-02 13:27:50 -07:00
Lee Thomason
8c067ab730 Merge pull request #307 from Dmitry-Me/simplifyOverengineeredCode
Simplify overengineered code
2015-04-02 13:27:17 -07:00
Lee Thomason
fb33e99a77 Merge pull request #306 from Dmitry-Me/printSubstringEntirely
Print entire substring instead of each character
2015-04-02 13:26:50 -07:00
Dmitry-Me
6a79c17c87 Merge Print() calls 2015-03-31 12:18:17 +03:00
Dmitry-Me
8d4e0ec528 Simplify overengineered code 2015-03-30 12:58:28 +03:00
Dmitry-Me
c505e136da Order patterns the same way they are searched 2015-03-30 09:54:36 +03:00
Dmitry-Me
d95172ba47 Print entire substring instead of each character 2015-03-30 08:11:18 +03:00
Lee Thomason
28c7c8c14f Merge pull request #305 from Dmitry-Me/errorShouldBeClearedAfterLoad
If LoadFile() fails then subsequent successful LoadFile() must clear the error
2015-03-26 11:19:28 -07:00
Lee Thomason
55c7879352 Merge branch 'Haloric-Issue-302' 2015-03-26 11:18:42 -07:00
Lee Thomason
f657783cf2 merge fix for save file error 2015-03-26 11:18:21 -07:00
Dmitry-Me
d9852a53af If LoadFile() fails then subsequent successful LoadFile() must clear the error 2015-03-25 10:17:49 +03:00
Lee Thomason
ea21390f28 Merge branch 'Haloric-Issue299' 2015-03-24 11:18:12 -07:00
Lee Thomason
3ccb1cec29 minor formatting cleanup 2015-03-24 11:17:44 -07:00
Ant Mitchell
189198f19c Issue 302: clear any previous save error 2015-03-24 16:20:36 +00:00
Ant Mitchell
148cc1a0a5 Issue 299 - test for code changes 2015-03-24 15:12:35 +00:00
Ant Mitchell
7e744771ad Issue299 - Allow Accept() to work with element trees that are not
linked in to the owning document.
2015-03-24 14:33:28 +00:00
Lee Thomason
32cca51ac5 Merge pull request #300 from davidsanfal/master
Add biicode support to TinyXML-2
2015-03-20 21:29:37 -07:00
Lee Thomason
01969dcde2 Merge remote-tracking branch 'origin/master' 2015-03-17 21:31:57 -07:00
Lee Thomason
1977a7258c setting the version to 3.0.0 2015-03-17 21:30:01 -07:00
Lee Thomason
2b1e18185c Merge pull request #298 from Dmitry-Me/fixCommentTypo
Fix comment typo
2015-03-16 11:57:38 -07:00
Lee Thomason
5ea1cf33f3 Merge pull request #297 from Dmitry-Me/betterAssertsInParsing
Better asserts in parsing
2015-03-16 11:57:13 -07:00
David
4633c3aa27 add biicode support 2015-03-16 10:41:00 +01:00
Dmitry-Me
2f465c412a Fix comment typo 2015-03-16 11:08:23 +03:00
Dmitry-Me
3dc797b2a4 Better asserts in parsing 2015-03-16 11:06:46 +03:00
Lee Thomason
b53aaa885d set the version to 2.3.0 2015-03-15 16:18:35 -07:00
Lee Thomason
245bee08d6 Merge pull request #296 from Dmitry-Me/assertForImpossibleCase
Assert for impossible case
2015-03-15 16:14:12 -07:00
Lee Thomason
80647bde2e Merge remote-tracking branch 'origin/master' 2015-03-15 16:12:51 -07:00
Lee Thomason
7265b763fc merge change; add extra assert 2015-03-15 16:11:47 -07:00
Lee Thomason
ed9aa5a48e Merge pull request #293 from Dmitry-Me/resolveIssue291
Resolve crash when printing malformed entities - issue 291
2015-03-15 16:06:42 -07:00
Dmitry-Me
33bb764d12 Assert for impossible case 2015-03-14 17:14:00 +03:00
Dmitry-Me
bab9b6d59c More asserts in numbers parsing 2015-03-14 16:41:46 +03:00
Dmitry-Me
6f51c803a1 Resolve crash when printing malformed entities - issue 291 2015-03-14 13:25:03 +03:00
Lee Thomason
0f922e7c9a Merge pull request #289 from Dmitry-Me/fixNullPointerDereference
Fix null pointer dereference planted in PR287 and reported in PR288
2015-03-05 10:36:31 -08:00
Dmitry-Me
9fcb876d3b Fix null pointer dereference planted in PR287 and reported in PR288 2015-03-05 17:53:34 +03:00
Lee Thomason
f12ece06fa Merge pull request #287 from Dmitry-Me/preAndPostAssertsInIdentify
Add and make use of pre- and post-asserts in XMLDocument::Identify()
2015-03-04 15:38:37 -08:00
Dmitry-Me
023846628d Add and make use of pre- and post-asserts in XMLDocument::Identify() 2015-03-03 16:02:13 +03:00
Lee Thomason
1354ffabb6 Merge pull request #284 from Dmitry-Me/testDocumentBeforeClearing
Test document had content to clear
2015-02-09 12:12:10 -08:00
Dmitry-Me
aaa4ceab5e Test document had content to clear 2015-02-06 16:00:46 +03:00
Lee Thomason
03824c305d Merge pull request #280 from Dmitry-Me/moveDeclarationToFirstUse
Move declaration to actual first use
2015-01-19 15:38:04 -08:00
Dmitry-Me
6acc9a5469 Move declaration to actual first use 2015-01-15 13:27:47 +03:00
Lee Thomason
b733c26bfe Merge pull request #278 from Dmitry-Me/wrongBoundConstraints
Use proper constraints for int variable
2015-01-13 21:45:29 -08:00
Lee Thomason
2875d842de Merge pull request #277 from Dmitry-Me/preAssertsToClarifyBufferUsage
Pre-asserts to clarify buffer usage
2015-01-13 21:44:54 -08:00
Lee Thomason
e94bde04d2 Merge pull request #276 from Dmitry-Me/removeRedundantParametersList
Remove redundant parameters list
2015-01-13 21:44:10 -08:00
Dmitry-Me
ed7a7dc985 Use proper constraints for int variable 2015-01-14 08:36:12 +03:00
Dmitry-Me
30bdc9735b Pre-asserts to clarify buffer usage 2015-01-14 08:32:23 +03:00
Dmitry-Me
9a5a48dbd2 Remove redundant parameters list 2015-01-14 08:27:32 +03:00
Lee Thomason
38b49ae042 Merge pull request #275 from Dmitry-Me/moreOverflowChecks
More overflow checks
2015-01-13 13:40:25 -08:00
Lee Thomason
d95716bd79 Merge pull request #273 from Dmitry-Me/moreChecksInUtfConversion
More checks inside UTF conversion
2015-01-13 13:39:46 -08:00
Lee Thomason
22f34982dc Merge pull request #271 from JayXon/optimizeLogo
lossless optimization on logo
2015-01-13 13:39:02 -08:00
Dmitry-Me
74fb870c36 More overflow checks 2015-01-13 10:27:36 +03:00
Lee Thomason
7e67bc89de minor formatting changes 2015-01-12 14:05:12 -08:00
Lee Thomason
ba7d9df976 Merge pull request #272 from Dmitry-Me/properTreatStrchrPostConditions
strchr() can only find what is was asked for
2015-01-12 13:58:15 -08:00
Dmitry-Me
bbaf1e1498 More checks inside UTF conversion 2015-01-12 14:07:10 +03:00
Dmitry-Me
9f56e12c16 strchr() can only find what is was asked for 2015-01-12 10:07:54 +03:00
JayXon
778b391286 lossless optimization on logo
was
325 KB (333,465 bytes)
now
209 KB (214,977 bytes)
2015-01-10 01:46:26 -05:00
Lee Thomason
d15686653a Merge pull request #269 from Dmitry-Me/makeFormattingConsistent
Fix formatting, get rid of useless if-else chain
2015-01-09 16:57:17 -08:00
Lee Thomason
f802660f7d Merge pull request #268 from Dmitry-Me/avoidRepeatedComparisons
Get rid of repeated comparisons
2015-01-09 16:56:40 -08:00
Lee Thomason
e4fe285427 Merge pull request #267 from Dmitry-Me/prohibitCopyAndAssignment
Prohibit copy and assigment where they are not supported
2015-01-09 16:55:27 -08:00
Lee Thomason
b389252931 Merge pull request #264 from Dmitry-Me/makeProhibitedStuffPrivate
Prohibited operations should be declared private
2015-01-09 16:55:07 -08:00
Lee Thomason
e53740ec6a Merge pull request #263 from Dmitry-Me/useProperConstCast
Use explicit const_cast
2015-01-09 14:29:05 -08:00
Dmitry-Me
257e11b25b Fix formatting, get rid of useless if-else chain 2015-01-09 15:50:47 +03:00
Dmitry-Me
3ae4f3eb3c Get rid of repeated comparisons 2015-01-09 15:44:16 +03:00
Dmitry-Me
3e0af3793e Prohibit copy and assigment where they are not supported 2015-01-09 15:30:00 +03:00
Dmitry-Me
f547a99619 Prohibited operations should be declared private 2015-01-09 15:17:09 +03:00
Dmitry-Me
e28be7530c Use explicit const_cast 2015-01-09 14:59:30 +03:00
Lee Thomason
3cebdc4fac clean up function names. clean up pointer 2015-01-05 17:16:28 -08:00
Lee Thomason
75b4e23957 Merge pull request #260 from Dmitry-Me/placeChecksInMoreNaturalOrder
Rearrange checks in more natural order
2015-01-05 17:07:50 -08:00
Lee Thomason
6e504e9baf Merge pull request #259 from Dmitry-Me/preAndPostAssertsInGetStr
Pointer asserts in GetStr()
2015-01-05 17:07:06 -08:00
Lee Thomason
59946f6f1a Merge pull request #258 from Dmitry-Me/clarifyIsNameStart
Clarify IsNameStartChar() - resolve issue 250
2015-01-05 17:06:30 -08:00
Lee Thomason
625402a01f Merge pull request #257 from Dmitry-Me/reusePreInsertMagic
Reuse pre-insert manipulations
2015-01-05 17:05:23 -08:00
Lee Thomason
56223ddaea Merge pull request #256 from Dmitry-Me/reuseParseAdjustments
Reuse code with pre-parse adjustments
2015-01-05 17:04:04 -08:00
Lee Thomason
deccff765f Merge pull request #254 from JayXon/onlyCheckElementPointerOnce
Only check ele pointer once
2015-01-05 17:00:43 -08:00
Dmitry-Me
7a7e5dc525 Rearrange checks in more natural order 2015-01-01 17:58:35 +03:00
Dmitry-Me
5ffa73e979 Pointer asserts in GetStr() 2015-01-01 17:47:40 +03:00
Dmitry-Me
ea617f9380 Clarify IsNameStartChar() - resolve issue 250 2015-01-01 16:32:01 +03:00
Dmitry-Me
74e394023a Reuse pre-insert manipulations 2015-01-01 16:26:17 +03:00
Dmitry-Me
97476b7b9e Reuse code with pre-parse adjustments 2015-01-01 16:15:57 +03:00
Lee Thomason
b4e81b014e Merge pull request #253 from Dmitry-Me/getRidOfC4127InAssert
Suppress C4127 in asserts
2014-12-26 16:25:14 -08:00
Lee Thomason
6d12b7bc3d Merge pull request #252 from Dmitry-Me/moreAdequateTestForEmpty
Better tests for empty document
2014-12-26 16:22:25 -08:00
Lee Thomason
5f06297230 Merge pull request #248 from JayXon/simplifyParseName
Simplify ParseName
2014-12-26 16:18:46 -08:00
Lee Thomason
9af6ccb3da fix whitespace conflict 2014-12-26 12:22:30 -08:00
Lee Thomason
78120c2a1e Merge pull request #249 from Dmitry-Me/unifySkipWhiteSpaceCallsAddAsserts
Unify SkipWhiteSpace()/ReadBOM() calls, add asserts
2014-12-26 12:22:55 -08:00
Lee Thomason
ac503ea88a Merge remote-tracking branch 'origin/master' 2014-12-26 12:20:18 -08:00
Lee Thomason
20806ce4e4 add an extra assert 2014-12-26 12:20:07 -08:00
JayXon
e4bf6e360d Only check ele pointer once 2014-12-26 01:00:24 -05:00
Dmitry-Me
4bcbf142a8 Suppress C4127 in asserts 2014-12-25 19:05:18 +03:00
Dmitry-Me
588bb8de49 Better tests for empty document 2014-12-25 18:59:18 +03:00
JayXon
ee525dba4d Simplify ParseName
Only the first char needs to be checked with IsNameStartChar, so check
it before the loop.
2014-12-24 04:01:42 -05:00
Dmitry-Me
bb836dce57 Unify SkipWhiteSpace()/ReadBOM() calls, add asserts 2014-12-24 11:54:05 +03:00
Lee Thomason
69242c4b9b Merge pull request #247 from Dmitry-Me/combineCheckWithDependentCall
Move the check into dependent call
2014-12-23 13:16:11 -08:00
Lee Thomason
ffee345723 Merge pull request #246 from Dmitry-Me/moveVariableDeclaration
Move variable declaration closer to where it's needed
2014-12-23 13:12:38 -08:00
Dmitry-Me
a092bc1f5a Move the check into dependent call 2014-12-23 17:57:05 +03:00
Dmitry-Me
5b4a5169e3 Move variable declaration closer to where it's needed 2014-12-23 17:36:28 +03:00
Lee Thomason
eaddfd8768 Merge pull request #245 from Dmitry-Me/ensureCapacityPreAsserts
Pre-asserts to ensure no overflow happens
2014-12-22 11:27:43 -08:00
Lee Thomason
4e5900c5e8 Merge pull request #244 from Dmitry-Me/unifyCharacterCasts
Unify character casts, reorganize checks
2014-12-22 11:26:52 -08:00
Lee Thomason
0b4bdd2a47 Merge pull request #243 from JayXon/simplify_node_logic
Simplify node logic
2014-12-22 11:22:47 -08:00
Dmitry-Me
9fae869124 Pre-asserts to ensure no overflow happens 2014-12-22 17:59:59 +03:00
Dmitry-Me
8b67d741d4 Unify character casts, reorganize checks 2014-12-22 11:35:12 +03:00
Lee Thomason
ebb0c8f904 fix compiler warning 2014-12-17 10:50:32 -08:00
Lee Thomason
7334f9efab fix a clang warning 2014-12-17 10:43:48 -08:00
Lee Thomason
cd011bc1b7 start working through memory bugs 2014-12-17 10:41:34 -08:00
JayXon
dbfdd8fdd5 Simplify node logic 2014-12-12 20:07:14 -05:00
Lee Thomason
ee2c46928e Merge pull request #240 from Dmitry-Me/simplifyNodeOwnershipTracking
Even more pointer pre-asserts
2014-12-12 15:37:22 -08:00
Dmitry-Me
ed2a407a88 Add more pointer pre-asserts 2014-12-12 10:38:48 +03:00
Lee Thomason
b38d29a8c5 Merge pull request #241 from Dmitry-Me/validatePoolBlockSizeBeforeAllocation
Validate pool block has the right size before calling placement new
2014-12-11 15:25:20 -08:00
Dmitry-Me
e6a95ce50e Validate pool block has the right size before calling placement new 2014-12-10 09:10:27 +03:00
Lee Thomason
f0e8fac4ee Merge pull request #239 from Dmitry-Me/addMorePointerAsserts
More pointer pre-asserts
2014-12-09 11:14:16 -08:00
Lee Thomason
489e5f30a2 Merge pull request #238 from Dmitry-Me/dontImplicitlyConvertErrorID
Should not check errorID with implicit conversion
2014-12-09 11:03:49 -08:00
Dmitry-Me
abb2d046d0 More pointers pre-asserts 2014-12-09 12:59:31 +03:00
Dmitry-Me
9bcd9c7674 Should not check errorID with implicit conversion 2014-12-09 10:58:14 +03:00
Lee Thomason
e6328b81f7 Merge pull request #237 from Dmitry-Me/resolveIssue176
Resolve issue 176
2014-12-08 11:56:17 -08:00
Dmitry-Me
a317bd66a6 Resolve issue 176 2014-12-08 10:35:37 +03:00
Lee Thomason
5c5307013a Merge pull request #235 from Dmitry-Me/reuseFindAttribute
Reuse const FindAttribute for non-const version thereof
2014-12-05 10:26:57 -08:00
Dmitry-Me
1227d51ed0 Reuse const FindAttribute for non-const version thereof 2014-12-05 13:41:45 +03:00
Lee Thomason
7254cf7e57 Merge pull request #234 from Dmitry-Me/errorCheckingNeverWorked
Error checking never actually checked anything
2014-11-28 13:54:55 -08:00
Dmitry-Me
ab37df8d67 Error checking never actually checked anything 2014-11-28 12:08:36 +03:00
Lee Thomason
2114e47453 Merge pull request #230 from antonindrawan/master
Compile TinyXml2 with the Dinkum C++ of QNX 6.5 and QNX 6.6.
2014-11-27 22:34:34 -08:00
Lee Thomason
18f5d7f133 Merge branch 'Dmitry-Me-properStrPairAssignment' 2014-11-27 22:31:37 -08:00
Lee Thomason
2965880447 switch to using pointer, not reference 2014-11-27 22:31:11 -08:00
Anton Indrawan
8a0006ceda Compile TinyXml2 with the Dinkum C++ of QNX 6.5 and QNX 6.6. Processed review comment from leethomason 2014-11-20 18:27:07 +01:00
Anton Indrawan
f59e2d6a89 Compile TinyXml2 with the Dinkum C++ of QNX 6.5 and QNX 6.6.
When we include c++ headers, we have to use explicit std::
2014-11-18 20:50:42 +01:00
Lee Thomason
f5d1d9ead2 Merge remote-tracking branch 'origin/master' 2014-11-15 17:56:08 -08:00
Lee Thomason
b2ec17dd5f very minor cleanup of commented out code 2014-11-15 17:55:40 -08:00
Lee Thomason
a94fc98396 Merge pull request #229 from xantares/test
Rename test, fixed cmake warning.
2014-11-15 17:55:14 -08:00
Lee Thomason
c82446c81e Merge pull request #228 from xantares/shared
Use BUILD_SHARED_LIBS cmake standard.
2014-11-15 17:55:04 -08:00
Lee Thomason
03494b189c Merge remote-tracking branch 'origin/master' into Dmitry-Me-properStrPairAssignment 2014-11-15 17:50:17 -08:00
Lee Thomason
575f190412 fix merge of operator= 2014-11-15 17:50:15 -08:00
Lee Thomason
327d5c142e Merge branch 'properStrPairAssignment' of https://github.com/Dmitry-Me/tinyxml2 into Dmitry-Me-properStrPairAssignment 2014-11-15 17:46:23 -08:00
Lee Thomason
92e521b431 add simple test for not-crashing 2014-11-15 17:45:51 -08:00
xantares
0b2c22bd46 Rename test, fixed cmake warning. 2014-11-14 19:46:18 +01:00
xantares
c8ec6fcab4 Use BUILD_SHARED_LIBS cmake standard. 2014-11-14 19:40:58 +01:00
Dmitry-Me
08b40dd8a5 Implement "move" equivalent of assignment operator for StrPair 2014-11-10 11:17:21 +03:00
Lee Thomason
1cd7e7422c Merge pull request #226 from Dmitry-Me/addPreAssertFixComment
Add pre-assert, fix comment
2014-11-08 16:58:16 -08:00
Dmitry-Me
66d2a84715 Add pre-assert, fix comment 2014-11-08 15:24:52 +03:00
Lee Thomason
97cfa03865 Merge pull request #221 from Dmitry-Me/reuseIsWhiteSpace
Reuse IsWhiteSpace(), move comment.
2014-10-31 15:55:20 -07:00
Dmitry-Me
fa20b227a3 Reuse IsWhiteSpace(), move comment. 2014-10-31 12:53:04 +03:00
Lee Thomason
0826e9632f Merge pull request #220 from tolga9009/patch-1
removing accidentally added newline
2014-10-30 16:49:10 -07:00
Tolga Cakir
78eee7299f removing accidentally added newline 2014-10-30 23:08:39 +01:00
Lee Thomason
4de01a9489 Merge pull request #218 from Dmitry-Me/enableLeakTracing
Enable dump of debug heap memory leaks
2014-10-30 14:17:34 -07:00
Lee Thomason
f07b952296 fix issue 184. clean up xcode project. 2014-10-30 13:25:12 -07:00
Dmitry-Me
99916599da Enable dump of debug heap memory leaks 2014-10-23 11:37:03 +04:00
Lee Thomason
d211bb1351 Merge pull request #216 from Dmitry-Me/removeRepeatedIndexAccesses
Bind reference to avoid repeated accesses by index
2014-10-01 14:22:38 -07:00
Dmitry-Me
d048f1e8e3 Bind reference to avoid repeated accesses by index 2014-10-01 10:30:16 +04:00
Lee Thomason
0895e78549 Merge pull request #215 from Dmitry-Me/duplicateVirtualCalls2
Remove unneeded virtual calls
2014-09-29 16:19:00 -07:00
Dmitry-Me
097339a099 Remove unneeded virtual calls 2014-09-29 13:20:29 +04:00
Lee Thomason
f2496f5824 Merge pull request #214 from Dmitry-Me/duplicateVirtualCalls
Eliminate repeated virtual calls
2014-09-27 15:58:19 -07:00
Lee Thomason
853de8169b Merge pull request #213 from Dmitry-Me/likelyWrongSignature
Function signature is most likely wrong
2014-09-27 15:57:53 -07:00
Lee Thomason
869f1487e2 Merge pull request #212 from Dmitry-Me/reuseConstForNonConst
Reuse const version for non-const one
2014-09-27 15:56:42 -07:00
Dmitry-Me
6d202ff20e Eliminate repeated virtual calls 2014-09-26 14:21:00 +04:00
Dmitry-Me
72bb0ecc39 Function signature is most likely wrong 2014-09-24 16:14:24 +04:00
Dmitry-Me
9de541f465 Reuse const version for non-const one 2014-09-24 14:21:36 +04:00
Lee Thomason
b0776aeead Merge pull request #210 from Dmitry-Me/removeUnneededCast
Remove unneeded cast, reduce duplication, move declarations to their fir...
2014-09-23 16:52:51 -07:00
Dmitry-Me
9fb2b0f42c Remove unneeded cast, reduce duplication, move declarations to their first use. 2014-09-23 17:27:39 +04:00
Lee Thomason
5321a0e21f setting the version to 2.2.0 2014-09-14 12:47:24 -07:00
Lee Thomason
c755667aa0 add an error message 2014-09-14 12:39:42 -07:00
Lee Thomason
331596e83c clean up the scope and names of the error code. 2014-09-11 14:56:43 -07:00
numatrumpet
cd8550c29c Without using preprocessor 2014-09-08 16:59:39 +09:00
numatrumpet
9f52ad5289 Makefile is recovered to original version 2014-09-08 16:41:33 +09:00
numatrumpet
003368429f ErrorNames is not implemented by vector<string> but *char[] 2014-09-08 16:36:28 +09:00
numatrumpet
8f5d3f8e80 make works correctly when using clang++ 2014-09-06 23:09:14 +09:00
numatrumpet
bb5ffac22d Using C++11, XMLUtil::ToErrorName(XMLError) returns the name of error type 2014-09-06 22:56:46 +09:00
Lee Thomason
fb732f97d4 Merge pull request #205 from Dmitry-Me/moveDefinitionsToLoopHeaders
Move loop variable definition into loop headers
2014-09-04 12:59:25 -07:00
Dmitry-Me
3659fe1d33 Move loop variable definition into loop headers 2014-09-04 11:33:49 +04:00
Lee Thomason
cf6d886903 Merge pull request #204 from Dmitry-Me/convertMacrosIntoFunctions
Convert DELETE_X macros into functions
2014-09-03 21:53:54 -07:00
Dmitry-Me
e3225b1c64 Convert DELETE_X macros into functions 2014-09-03 11:03:11 +04:00
Lee Thomason
30152836da Merge pull request #202 from Dmitry-Me/removeRepeatedVirtualCalls
Remove repeated virtual calls
2014-08-28 04:53:51 -07:00
Lee Thomason
83a6d8c373 Merge remote-tracking branch 'origin/master' 2014-08-27 14:45:53 -07:00
Lee Thomason
d526944e3c removed unused _accumulator 2014-08-27 14:45:35 -07:00
Dmitry-Me
b6b4e82626 Remove repeated virtual calls 2014-08-27 17:17:47 +04:00
Lee Thomason
59b9aaea43 Merge pull request #200 from Dmitry-Me/removeObsoleteComment
Remove obsolete comment
2014-08-25 13:46:37 -07:00
Dmitry-Me
ec19a0e513 Remove obsolete comment 2014-08-25 11:05:55 +04:00
Lee Thomason
b6ea923f0f Merge branch 'Dmitry-Me-makeCodeMoreDefensive' 2014-08-23 16:16:38 -07:00
Dmitry-Me
63f3de1a3c Make code more defensive
* initialize out-parameter for cases the callee fails to
* add assert for length being within range
* replace post-assert with pre-assert

Also replace the loop with an equivalent memcpy() call
2014-08-21 12:33:19 +04:00
Lee Thomason
dc50a31758 Merge pull request #197 from Dmitry-Me/dontAdjustStartWhenNeedsDelete
Assert when trying to adjust _start in "needs delete" mode.
2014-08-20 10:03:43 -07:00
Dmitry-Me
67a5bb0ac1 Assert when trying to adjust _start in "needs delete" mode. 2014-08-20 10:01:53 +04:00
Lee Thomason
0b26702ac9 Merge pull request #196 from Dmitry-Me/wrapFopenCalls
Wrap fopen()/fopen_s() calls to avoid duplication
2014-08-19 11:18:52 -07:00
Dmitry-Me
01578db56b Wrap fopen()/fopen_s() calls to avoid duplication 2014-08-19 10:18:48 +04:00
Lee Thomason
2af5679b26 Merge pull request #194 from Dmitry-Me/fixCStyleCast
Replace C-style cast with static_cast
2014-08-17 14:55:39 -07:00
Dmitry-Me
5657176b61 Replace C-style cast with static_cast 2014-08-15 11:03:47 +04:00
Lee Thomason
73c822c201 Merge pull request #193 from Dmitry-Me/shouldCheckFtellForError
Check ftell() result for error code before using it.
2014-08-14 16:46:13 -07:00
Dmitry-Me
acb9c9c260 Check ftell() result for error code before using it. 2014-08-04 09:49:25 +04:00
Lee Thomason
fca00d0ebc Merge pull request #191 from Dmitry-Me/dontIgnoreFgetcReturnValue
fgetc() is not required to clear the error indicator on success
2014-08-03 11:17:04 -07:00
Dmitry-Me
08e7f7be59 fgetc() is not required to clear the error indicator on success 2014-07-31 15:19:14 +04:00
Lee Thomason
84bd9624c6 Merge pull request #190 from pffang/master
WinCE Compatibility Fix
2014-07-12 11:22:30 -07:00
pffang
91d34a0989 WinCE Compatibility Fix 2014-07-10 10:02:35 +08:00
Lee Thomason
cf33e37d25 Merge pull request #187 from amai2012/master
Fix compiler warning: extra ';' after member function definition
2014-05-20 13:56:47 -07:00
Alexander Mai
d740b64044 Fix compiler warning: extra ';' after member function definition 2014-05-20 22:04:42 +02:00
Lee Thomason
500fb6aa21 Merge pull request #181 from eserdem/master
Fixed _CRT_SECURE_NO_WARNINGS macro redefinition warning
2014-04-17 10:07:50 -07:00
Serhat Eser Erdem
ca5d684a2b Fixed _CRT_SECURE_NO_WARNINGS macro redefinition warning 2014-04-17 14:06:15 +02:00
Lee Thomason
6ee53e7d49 setting the version to 2.1.0 2014-04-06 14:43:37 -07:00
Lee Thomason
256adb6371 missing default parameter for compact mode in XMLPrinter 2014-04-06 14:41:46 -07:00
Lee Thomason
98112fcdba minor doxygen file fix 2014-03-16 20:44:35 -07:00
Lee Thomason
433f1272d4 update readme 2014-03-16 20:22:12 -07:00
Lee Thomason
b59ac45131 setting the version to 2.0.2 2014-03-16 20:18:41 -07:00
Lee Thomason
a0744c8dca fix implementation of much simpler visual studio printing 2014-03-16 10:32:27 -07:00
Lee Thomason
8f7b87b323 Merge branch 'master' of https://github.com/pzychotic/tinyxml2 into pzychotic-master 2014-03-16 10:21:34 -07:00
Lee Thomason
686ef404b8 improve setversion script. set version 2.0.1 2014-03-16 10:16:49 -07:00
Lee Thomason
e7eb7d3327 Merge remote-tracking branch 'github/master' 2014-03-15 15:01:18 -07:00
Lee Thomason
5938e6f8a4 improving setversion.py 2014-03-15 15:00:54 -07:00
Thomas Roß
268c683fbd Use _vscprintf to calc length of expanded format string. 2014-03-13 23:35:16 +01:00
Lee Thomason
85afe9c5c7 setting version consistent with new guidelines. (not tagging...yet). 2014-02-23 21:42:16 -08:00
Lee Thomason
6324acd9f9 Merge branch 'uliwitness-overridecompactmode' 2014-02-23 21:08:22 -08:00
Lee Thomason
f4a8fbbdf7 minor edit 2014-02-22 17:04:53 -08:00
Lee Thomason
e693488742 fix compilation warning. 2014-02-22 16:27:27 -08:00
Uli Kusterer
613410095c Provide finer control over indentation inside the XMLPrinter. You'll have to subclass it to override its standard behaviour by overwriting CompactMode(). 2014-02-22 17:19:08 +01:00
Lee Thomason
5f88e72691 fix the build script. set the build properly 2014-02-21 22:57:38 -08:00
Lee Thomason
7de26f7dc7 Merge remote-tracking branch 'origin/master' 2014-02-21 22:47:21 -08:00
Lee Thomason
82d3200571 clean up some error checking logic 2014-02-21 22:47:18 -08:00
Lee Thomason
c18eb23326 spelling fixes and make PrintSpace() virtual and protected. 2014-02-21 17:31:17 -08:00
Uli Kusterer
5d1d27e88b Keep indentation control fully inside the XMLPrinter. You'll have to subclass it to override its standard behaviour by overwriting CompactMode(). 2014-02-20 11:50:22 +01:00
Uli Kusterer
07ac762b80 SetBoolFirstChild now makes sure its bool is not wrapped onto its own line. 2014-02-01 15:06:50 +01:00
Uli Kusterer
b85b4e0a60 Merge branch 'pernodecompactwhitespace'
* pernodecompactwhitespace:
  SetForceCompactMode() now also handles case of a single tag inside another correctly.
  Give tests a few more chances to fail, e.g. on tag sequences or attributes.
  Added SetForceCompactMode() for overriding the compact setting on a per-node level. All sub-nodes will be printed compact as well.

Conflicts:
	xmltest.cpp
2014-02-01 13:38:04 +01:00
Uli Kusterer
ca412e87f2 SetForceCompactMode() now also handles case of a single tag inside another correctly. 2014-02-01 13:35:05 +01:00
Uli Kusterer
15354f88c3 Give tests a few more chances to fail, e.g. on tag sequences or attributes. 2014-02-01 13:06:39 +01:00
Uli Kusterer
d5c9e8b81d Added SetForceCompactMode() for overriding the compact setting on a per-node level. All sub-nodes will be printed compact as well. 2014-02-01 12:57:57 +01:00
Uli Kusterer
593a33d061 Added SetForceCompactMode() for overriding the compact setting on a per-node level. All sub-nodes will be printed compact as well. 2014-02-01 12:48:51 +01:00
Uli Kusterer
53fe47c74e Remove long long stuff again. 2014-01-27 01:47:30 +01:00
Uli Kusterer
35ce309f73 Urk, forgot to build this one after merging and goofed a bit. 2014-01-25 03:37:16 +01:00
Uli Kusterer
2861a7e63a Merge branch 'master' of https://github.com/leethomason/tinyxml2
Conflicts:
	tinyxml2.cpp
	xmltest.cpp
2014-01-25 03:12:21 +01:00
Lee Thomason
5bb2d8079b add variants of SetText() to support types 2014-01-24 10:42:57 -08:00
Lee Thomason
9c0678a01d trim the test cases and review 2014-01-24 10:18:27 -08:00
Uli Kusterer
321072ee0b Add tests for SetText(). 2014-01-22 04:55:19 +01:00
Uli Kusterer
664d05662e Support for 'long long' number values. 2014-01-21 12:24:47 +01:00
Uli Kusterer
4cd1f269c2 Added IntText(), UnsignedText(), DoubleText() and FloatText() convenience wrappers. 2014-01-21 02:54:36 +01:00
Uli Kusterer
ff8e2041dd To bring BoolFirstChild() more in line with the other methods, reimplemented it in terms of a new QueryBoolFirstChild(). 2014-01-21 02:53:47 +01:00
Uli Kusterer
4af5573f42 Tests for SetBoolFirstChild and BoolFirstChild. 2014-01-21 02:36:47 +01:00
Uli Kusterer
c1c20bb196 Bools should really be implemented as self-closing <true /> and <false /> tags, not as 0/1 inside a tag, so removing those SetText variants again, in favor of SetBoolFirstChild() and BoolFirstChild() methods. 2014-01-21 02:23:20 +01:00
Uli Kusterer
7411c08e90 Add tests for SetText(). 2014-01-21 01:57:38 +01:00
Uli Kusterer
dcefa0e43f Add typed convenience setters for SetText(). 2014-01-21 01:36:41 +01:00
Uli Kusterer
869bb599c1 Make SetText() behave like the docs say. 2014-01-21 01:36:16 +01:00
Uli Kusterer
85fff5e50a Add comment for SetText(). 2014-01-21 01:35:30 +01:00
Uli Kusterer
8fe342a872 Add SetText() as analog to GetText(). 2014-01-21 01:12:47 +01:00
Lee Thomason
44ce7930b7 Merge branch 'master' of https://github.com/leethomason/tinyxml2 2014-01-14 12:30:18 -08:00
Lee Thomason
c3708ccf08 implement a fix to floating point precision as proposed by schuellc. 2014-01-14 12:30:03 -08:00
Lee Thomason
2ece2f1690 Merge pull request #150 from danmar/master
Fixed issue 147 (XMLDocument::LoadFile() may crash on non-regular file)
2014-01-10 13:35:19 -08:00
Daniel Marjamäki
ba4b328b3d Fixed issue 147 (XMLDocument::LoadFile() may crash on non-regular file) 2014-01-10 21:37:27 +01:00
Lee Thomason
343a5ff3bd Merge pull request #144 from sopvop/patch-1
add TINYXML2_EXPORT define when building shared lib
2013-12-12 13:47:11 -08:00
Leonid Onokhov
3dacebf8ee add TINYXML2_EXPORT define when building shared lib
otherwise it exports no symbols and msvc does not create import .lib
2013-12-12 15:07:34 +03:00
Lee Thomason
61871d60a6 Fix up the readme, add attribution for the logo. 2013-12-05 11:44:38 -08:00
Lee Thomason
ce0510ba2d rename Reset to Clear to be consistent with XMLDocument 2013-11-26 21:29:37 -08:00
Reinhard Klambauer
3bc3d4e24c Added a method to reset the memory buffer to the XMLPrinter class.
This enables to reset the printer memory to start again from the beginning.
2013-11-22 14:05:21 +01:00
Reinhard Klambauer
4e74b13e7a Added a method to reset the memory buffer of the DynArray class.
The the allocated memory will not be touched so the capacity keeps its current level.
2013-11-22 14:01:58 +01:00
Lee Thomason
370761b179 Merge pull request #140 from ledyba/check_data_len
you have to check len before accsessing "p".
2013-11-05 10:52:04 -08:00
psi
690ba07bda you have to check len before accsessing "p". 2013-11-03 10:54:33 +09:00
Lee Thomason
e1979a883b Merge pull request #139 from dennisjenkins75/master
Grammar error: there -> their.
2013-10-26 21:53:16 -07:00
Lee Thomason
5613cb9237 up the version 2013-10-26 21:52:35 -07:00
Lee Thomason
3b7927efb5 formatting tweaks 2013-10-26 21:50:46 -07:00
Dennis Jenkins
68a1c93e2e Grammar error: there -> their. 2013-10-25 23:01:34 -05:00
Michael Daumling
ed52328ced Insert() methods check for inserted XML to be in the same doc, and remove XML from old location if already inserted. 2013-10-23 07:47:29 +02:00
Lee Thomason
ab42b16bac Merge pull request #136 from FreakC/master
Issue #134
2013-10-22 11:36:29 -07:00
Michael Daumling
2162688ad3 Issue #134: Change 3 methods to not being inlined. They reference the StrPair class, which is not exported, thus creating linker problems with tinyxml2 in a DLL. 2013-10-22 17:03:37 +02:00
Lee Thomason
927fe73c5b Merge pull request #133 from dennisjenkins75/master
Small demo program to generate HTML5 via sub-classed tinyxml2::XMLPrinter
2013-10-16 13:59:10 -07:00
Dennis Jenkins
d31021392a Changed indentation style to match tinyxml2 project. 2013-10-11 16:59:49 -05:00
Dennis Jenkins
bc785155f2 Changed indentation style to match tinyxml2 project. 2013-10-11 16:55:14 -05:00
Dennis Jenkins
9460e5093c Demo/example/contrib of using tinyxml2 to generate confomant HTML5. 2013-10-11 16:48:55 -05:00
Lee Thomason
44ba601c5f Merge pull request #131 from dennisjenkins75/master
Minor tweaks to C++ encapsulation necessary to subclass XMLPrinter sufficiently to create XMLPrinterHTML5
2013-10-10 22:10:29 -07:00
Dennis Jenkins
59c75d3322 Added method DynArray::PeekTop(), provides useful abstraction in tinyxml2::XMLPrinterHTML5::CloseElement(). Made tinyxml2::CloseElement() and destructor virtual. Made tinyxml2::_SealElement(), _elementJustOpened and _stack all protected instead of private (needed in XMLPrinterHTML5 to selective prevent some elements from being self-closing). 2013-10-08 13:10:07 -05:00
Lee Thomason
74a81cf1d9 minor readme update 2013-09-12 23:59:43 -07:00
Lee Thomason
1f83145cb4 Merge branch 'master' of github.com:leethomason/tinyxml2 2013-09-12 23:53:47 -07:00
Lee Thomason
1688114e55 add logo 2013-09-12 23:53:08 -07:00
Lee Thomason
03238517b3 Merge pull request #125 from PKEuS/master
Added depth as constructor argument to XMLPrinter
2013-08-05 13:04:27 -07:00
PKEuS
1bfb95488f Added depth as constructor argument to XMLPrinter. This way, XML files that are not written with XMLDocument can be properly indented.
Removed unused forward declaration
2013-08-04 14:04:09 +02:00
Lee Thomason (grinliz)
db304256bb clean up the pass/fail logic, still return the same value from test if it fails 2013-07-31 12:24:52 -07:00
Lee Thomason
70d343f513 Merge pull request #124 from diasbruno/makefile-test
added test rule.
2013-07-31 12:21:42 -07:00
Lee Thomason
8b482728ef Merge pull request #123 from diasbruno/xmltest-return
xmltest: if one of the tests has failed, return > 0.
2013-07-31 12:21:25 -07:00
Lee Thomason
9c1ef1d4a3 Merge pull request #120 from PKEuS/master
Added support for building TinyXML into a .dll or .lib
2013-07-31 12:15:53 -07:00
Bruno Dias
032aa1b96c added test rule. 2013-07-31 12:01:12 -03:00
Bruno Dias
721b42da8e make the xmltest to return != 0, if one of the tests has failed. 2013-07-31 11:50:44 -03:00
PKEuS
95060350bd Removed dllexport/import attribute from private class, disable related warning C4251 2013-07-26 10:42:44 +02:00
PKEuS
0c55c70b11 Improved output paths in VS solution 2013-07-12 21:16:33 +02:00
PKEuS
16ed47dc14 Added support for building TinyXML as a .lib or .dll 2013-07-12 21:16:33 +02:00
Lee Thomason
1c9250cab5 Merge pull request #119 from PKEuS/master
Improved VS solution; fixed cppcheck messages
2013-07-07 17:37:22 -07:00
PKEuS
1c5f99e37c Fixed two cppcheck messages 2013-07-06 11:28:39 +02:00
PKEuS
632c57217c Improved VS solution: Added x64 configuration, enabled optimizations 2013-07-06 11:28:16 +02:00
Lee Thomason
392bcd2485 Merge pull request #114 from Vasily-Biryukov/doc
Small fixes in documentation
2013-05-20 13:00:15 -07:00
Vasily Biryukov
9a975b7bdb Small fixes in documentation 2013-05-19 17:01:05 +06:00
Lee Thomason
def0d2131a Merge pull request #112 from gupascal/master
Add a Code::Blocks project
2013-05-12 20:52:52 -07:00
Lee Thomason
6db1321100 Merge pull request #111 from pzychotic/master
Initialize pointers in constructor
2013-05-12 20:51:08 -07:00
Guillaume P
d60fe35073 Add a Code::Blocks project. 2013-05-12 15:11:37 +02:00
Thomas Roß
6189231187 Initialize pointers to satisfy static code analyser. 2013-05-12 14:07:38 +02:00
Lee Thomason (grinliz)
d6bd7360b8 fix floating point specifier and clean up a warning 2013-05-11 20:23:13 -07:00
Lee Thomason
f76fe94012 Merge pull request #110 from pzychotic/tests
Small test addition and fix
2013-05-11 20:11:55 -07:00
Lee Thomason
6a0db4f7e6 Merge pull request #109 from pzychotic/master
Fixed compiler warning for x64 build
2013-05-11 20:10:59 -07:00
Lee Thomason
576003627c Merge pull request #108 from ddiproietto/patch-1
Fixed compilation under MINGW64
2013-05-11 20:08:23 -07:00
Thomas Roß
a5221869c2 Added test for return value of QueryDoubleAttribute(). 2013-05-11 10:22:12 +02:00
Thomas Roß
36307f86da Fixed test input file not found when doing out-of-source builds. 2013-05-11 10:21:07 +02:00
Thomas Roß
1470edc595 Fixed compiler warning for x64 builds. 2013-05-10 15:44:12 +02:00
ddiproietto
a8ae1f6a4d Fixed compilation under MINGW64
Necessary on mingw64 2.22
2013-05-05 18:42:52 +03:00
Lee Thomason (grinliz)
d0a38c3a20 fix BOM preservation bugs. add new tests 2013-04-29 09:15:37 -07:00
Lee Thomason (grinliz)
1377fe7ec0 Merge branch 'master' of github.com:leethomason/tinyxml2 2013-04-20 15:11:42 -07:00
Lee Thomason
761c4c2ed5 Merge pull request #104 from Vasily-Biryukov/master
LoadFile() returns XML_NO_ERROR for empty documents
2013-04-20 15:11:24 -07:00
Lee Thomason (grinliz)
6faf169695 Merge branch 'master' of github.com:leethomason/tinyxml2 2013-04-20 14:58:12 -07:00
Lee Thomason (grinliz)
43229f91d4 whitespace 2013-04-20 14:57:59 -07:00
Vasily Biryukov
1cfafd0d24 Fixed: LoadFile() returns XML_NO_ERROR for empty documents. 2013-04-20 14:12:33 +06:00
Lee Thomason
c510a8c76e Merge pull request #100 from selfpoised/master
minor change: from " *end != 0 => *_end != 0"
2013-03-13 12:58:37 -07:00
selfpoised
4dd59bcdf4 Update tinyxml2.h
*end != 0 => *_end != 0
2013-03-13 16:54:15 +08:00
selfpoised
e77e19553d Update tinyxml2.h
format spaces
2013-03-13 14:08:29 +08:00
Lee Thomason
5a695f0e0c Merge pull request #99 from acmyo/typos
correct typos in comments / documentation
2013-03-09 20:40:55 -08:00
Andrew C. Martin
0fd8746f64 correct typos in comments / documentation 2013-03-09 20:09:45 -07:00
Lee Thomason (grinliz)
374c25e2a6 up the version to build 11 2013-02-01 19:45:01 -08:00
Lee Thomason (grinliz)
5efaa5f6bb Add the (very handy) QueryAttribute 2013-02-01 19:26:30 -08:00
Lee Thomason (grinliz)
61cea67517 removing debug output 2013-02-01 19:13:13 -08:00
Lee Thomason (grinliz)
ac83b4e278 adjust the size of the memory pools 2013-02-01 09:02:34 -08:00
Lee Thomason
c97ded4872 Merge pull request #98 from martinsh-shaiters/devel
Implementation & unit test for enhancement described in issue #74
2013-01-30 10:05:29 -08:00
Martinsh Shaiters
53ab79afad Add unit test for XMLDocument::Clear(). 2013-01-30 11:22:19 +02:00
Martinsh Shaiters
a9d42b0dd3 Replace InitDocument() with Clear() and make it part of the API. 2013-01-30 11:19:39 +02:00
Lee Thomason
8afdb09aa4 Merge pull request #97 from marek5335/master
Fix CMakeLists.txt for windows
2013-01-28 11:09:56 -08:00
Marek Pokorny
8e66b77c91 Fixed CMake config file to properly install on windows 2013-01-28 10:52:01 -08:00
Lee Thomason
86ca9dc1ee correctly set version via script 2013-01-28 07:31:59 -08:00
Lee Thomason
63339bcd7d up the version 2013-01-28 07:28:46 -08:00
Lee Thomason
0aecb5c770 Merge remote-tracking branch 'martinsh/issue#53-fix' 2013-01-28 07:23:19 -08:00
Martinsh Shaiters
95b3e6543b Add test case for element names with leading digit. 2013-01-26 23:08:10 +02:00
Martinsh Shaiters
c6d02f48d5 Implement new utility functions for testing validity of name and token characters. 2013-01-26 22:43:54 +02:00
Martinsh Shaiters
23e7ae6085 Add test for lead non-alpha characters in attribute names. 2013-01-26 20:15:44 +02:00
Lee Thomason
178e4ccd5b Add file load to xmltest. 2013-01-25 16:19:05 -08:00
Lee Thomason
980e535aae Merge pull request #91 from martinsh-shaiters/doxyfix
Example documentation moved to xmltest.cpp
2013-01-15 16:33:10 -08:00
Martinsh Shaiters
c9c8b77d87 Moves example documentation from xmltest.h to xmltest.cpp 2013-01-16 02:08:19 +02:00
Martinsh Shaiters
bbad12a922 Sets readme.md to be used as MainPage for generated documentation 2013-01-16 01:55:39 +02:00
Martinsh Shaiters
4504aab21d Upgrades dox to Doxyfile version 1.8.3
Upgrade removes deprecated options HTML_ALIGN_MEMBERS, SHOW_DIRECTORIES and USE_INLINE_TREES. These are deprecated since Doxygen release 1.8.1 (2012-05-09) [http://www.stack.nl/~dimitri/doxygen/changelog.html#1.8.1].
2013-01-16 00:54:58 +02:00
Lee Thomason
dfc494ffc5 Merge pull request #90 from martinsh-shaiters/mingw
Adds conditional include of io.h when compiling with MinGW
2013-01-15 13:47:59 -08:00
Lee Thomason
267d4d8f8e Merge pull request #88 from martinsh-shaiters/doxy
Eliminate warning about missing readme.txt, use readme.md
2013-01-15 13:47:14 -08:00
Martinsh Shaiters
39ddc268cb Adds conditional include of io.h when compiling with MinGW 2013-01-15 21:53:08 +02:00
Martinsh Shaiters
3acf157857 Eliminate warning about missing readme.txt, use readme.md 2013-01-15 06:20:22 +02:00
Lee Thomason
9352408301 Merge pull request #87 from MortenMacFly/master
Eliminate warnings with GCC/MinGW (Issue #83)
2013-01-14 11:10:43 -08:00
MortenMacFly
4ee49f1690 Eliminate warnings with GCC/MinGW 2013-01-14 20:03:14 +01:00
Lee Thomason
f563fa1a29 Merge pull request #85 from kainjow/master
Fixed some minor issues in the read me
2013-01-09 09:43:11 -08:00
Kevin Wojniak
273f7b4cf8 Fixed wrongly encoded apostrophe. Fixed typo. 2013-01-09 09:21:13 -08:00
Lee Thomason (grinliz)
15408a952d VS2010 Express solution files mangeled. Move to subdirectory and recreate 2013-01-08 08:46:50 -08:00
Lee Thomason
ec3454bafc Merge pull request #84 from Jerome7573/master
Reverting std lib is in std:: namespace and using .h versions instead
2013-01-07 15:07:23 -08:00
Jerome Martinez
242c3eaa33 Reverting std lib is in std:: namespace and using .h versions instead 2013-01-06 12:20:04 +01:00
Lee Thomason
a6412ac2d5 add a printing test 2012-12-13 15:39:11 -08:00
Lee Thomason
5b0a677712 fix incorrect assert on unused memory 2012-11-19 13:54:42 -08:00
Lee Thomason
998116e587 up the version 2012-11-12 13:04:56 -08:00
Lee Thomason
685b895172 trivial comment fix 2012-11-12 13:00:06 -08:00
Lee Thomason
8950b37aa0 Merge branch 'master' of https://github.com/leethomason/tinyxml2 2012-11-12 12:59:25 -08:00
Lee Thomason
248e523dad Merge pull request #80 from kainjow/master
Fix MSXML conflict
2012-11-12 12:59:18 -08:00
Lee Thomason
2fa8172236 type XMLError. fix some comments 2012-11-09 12:37:46 -08:00
Kevin Wojniak
04c22d250a Enclose code in namespace instead of 'using namespace' to resolve conflict on Windows with MSXML. Fixes issue #37. 2012-11-08 11:02:22 -08:00
Lee Thomason
67abded7f7 Merge branch 'master' of https://github.com/leethomason/tinyxml2 2012-10-25 16:12:48 -07:00
Lee Thomason
687f90e843 Merge pull request #76 from Jerome7573/master
Moved COUNT from private to public,
2012-10-24 10:20:38 -07:00
Lee Thomason
ae9ab0741e test case for unlinked nodes, commented out 2012-10-24 10:17:53 -07:00
Jerome Martinez
7921df1b47 Moved COUNT from private to public 2012-10-24 11:45:44 +02:00
Lee Thomason (grinliz)
856da21652 fix duplicated COUNT logic 2012-10-19 09:08:15 -07:00
Jerome Martinez
7fbefab95d std lib is in std:: namespace only and array definition is not possible with an enum 2012-10-19 11:30:33 +02:00
Lee Thomason
1aa8fc4a1e fix up rename on windows 2012-10-13 20:01:30 -07:00
Lee Thomason
624d43fc05 finish switching to _ for member vars 2012-10-12 10:58:48 -07:00
Lee Thomason
ed5c879dfe switch StrPair() over to _ for member vars 2012-10-12 10:09:48 -07:00
Lee Thomason
120b3a62be switch StrPair() over to _ for member vars 2012-10-12 10:06:59 -07:00
Lee Thomason
a9cf3f9f3f Switched to Artistic Style auto-formatting to allow integration of patches from other coding styles. 2012-10-11 16:56:51 -07:00
Lee Thomason
3572ae0308 Merge pull request #69 from sniperbat/master
just remove a compile warning :)
2012-10-11 09:48:06 -07:00
sniperbat
a5716b787a nothing but just remove compile warning 2012-10-11 15:22:28 +08:00
Lee Thomason
3cd66ee850 fix a fopen bug: rb should be w 2012-09-25 13:22:41 -07:00
Lee Thomason (grinliz)
99024dc20b Merge branch 'master' of github.com:leethomason/tinyxml2 2012-09-23 20:26:12 -07:00
Lee Thomason (grinliz)
fc6320e30a experimented with print f vs. g. increased version 2012-09-23 20:25:50 -07:00
Lee Thomason
ac8e0ce21c only turn off deprecated warnings for test file 2012-09-23 14:06:43 -07:00
Thomas Roß
0922b7389f Replaced pragmas with compiler define. 2012-09-23 16:31:22 +02:00
Lee Thomason (grinliz)
e2bcb32494 accept a nBytes argument for Parse() 2012-09-17 17:58:25 -07:00
Lee Thomason (grinliz)
2f1f6247e0 remove trailing spaces 2012-09-16 11:32:34 -07:00
Lee Thomason (grinliz)
6da5410110 changes for martell to clean up fopen 2012-09-09 22:05:49 -07:00
Lee Thomason (grinliz)
79869e77f9 changes for martell to clean up fopen 2012-09-09 22:04:52 -07:00
Lee Thomason (grinliz)
9b6011c478 working out whitespace notes 2012-09-09 19:12:06 -07:00
Martell
186476c665 Shut up visual studio 2012-09-06 16:41:46 +01:00
26 changed files with 7495 additions and 3707 deletions

9
.gitignore vendored
View File

@@ -3,7 +3,16 @@ Win32/
x64/
ipch/
resources/out/
tinyxml2/tinyxml2-cbp/bin/
tinyxml2/tinyxml2-cbp/obj/
tinyxml2/bin/
tinyxml2/temp/
*.sdf
*.suo
*.opensdf
*.user
*.depend
*.layout
*.o
*.vc.db
*.vc.opendb

15
.travis.yml Normal file
View File

@@ -0,0 +1,15 @@
language: cpp
os:
- linux
- osx
compiler:
- g++
- clang
before_script: cmake .
script:
- make -j3
- make test

View File

@@ -1,8 +1,19 @@
IF(BIICODE)
ADD_BIICODE_TARGETS()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/resources)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/resources DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
ENDIF()
RETURN()
ENDIF(BIICODE)
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
cmake_policy(VERSION 2.6)
if(POLICY CMP0063)
cmake_policy(SET CMP0063 OLD)
endif()
project(tinyxml2)
include(GNUInstallDirs)
include(CTest)
#enable_testing()
#CMAKE_BUILD_TOOL
@@ -10,65 +21,126 @@ include(GNUInstallDirs)
################################
# set lib version here
set(GENERIC_LIB_VERSION "1.0.7")
set(GENERIC_LIB_SOVERSION "1")
################################
# Add common source
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/.")
################################
# Add custom target to copy all data
set(TARGET_DATA_COPY DATA_COPY)
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(
${TARGET_DATA_COPY}
COMMAND ${CMAKE_COMMAND} -E echo "In source build")
else(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
make_directory(${CMAKE_CURRENT_BINARY_DIR}/resources/)
add_custom_target(
${TARGET_DATA_COPY}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/dream.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/utf8test.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/utf8testverify.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/)
endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
set(GENERIC_LIB_VERSION "5.0.1")
set(GENERIC_LIB_SOVERSION "5")
################################
# Add definitions
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
################################
# Add targets
set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libraries")
if(BUILD_STATIC_LIBS)
add_library(tinyxml2static STATIC tinyxml2.cpp tinyxml2.h)
set_target_properties(tinyxml2static PROPERTIES OUTPUT_NAME tinyxml2)
endif(BUILD_STATIC_LIBS)
# By Default shared libray is being built
# To build static libs also - Do cmake . -DBUILD_STATIC_LIBS:BOOL=ON
# User can choose not to build shared library by using cmake -DBUILD_SHARED_LIBS:BOOL=OFF
# To build only static libs use cmake . -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON
# To build the tests, use cmake . -DBUILD_TESTS:BOOL=ON
# To disable the building of the tests, use cmake . -DBUILD_TESTS:BOOL=OFF
option(BUILD_SHARED_LIBS "build as shared library" ON)
option(BUILD_STATIC_LIBS "build as static library" OFF)
option(BUILD_TESTS "build xmltest (deprecated: Use BUILD_TESTING)" ON)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")
if(BUILD_SHARED_LIBS)
add_library(tinyxml2 SHARED tinyxml2.cpp tinyxml2.h)
set_target_properties(tinyxml2 PROPERTIES
COMPILE_DEFINITIONS "TINYXML2_EXPORT"
VERSION "${GENERIC_LIB_VERSION}"
SOVERSION "${GENERIC_LIB_SOVERSION}")
add_executable(test xmltest.cpp)
add_dependencies(test tinyxml2)
add_dependencies(test ${TARGET_DATA_COPY})
target_link_libraries(test tinyxml2)
if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
target_include_directories(tinyxml2 PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>)
if(MSVC)
target_compile_definitions(tinyxml2 PUBLIC -D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
else()
include_directories(${PROJECT_SOURCE_DIR})
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
endif()
# export targets for find_package config mode
export(TARGETS tinyxml2
FILE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake)
install(TARGETS tinyxml2
EXPORT ${CMAKE_PROJECT_NAME}Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(BUILD_STATIC_LIBS)
install(TARGETS tinyxml2 tinyxml2static
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
else(BUILD_STATIC_LIBS)
install(TARGETS tinyxml2
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(BUILD_STATIC_LIBS)
add_library(tinyxml2_static STATIC tinyxml2.cpp tinyxml2.h)
set_target_properties(tinyxml2_static PROPERTIES
COMPILE_DEFINITONS "TINYXML2_EXPORT"
VERSION "${GENERIC_LIB_VERSION}"
SOVERSION "${GENERIC_LIB_SOVERSION}")
set_target_properties( tinyxml2_static PROPERTIES OUTPUT_NAME tinyxml2 )
target_compile_definitions(tinyxml2_static PUBLIC -D_CRT_SECURE_NO_WARNINGS)
if(DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
target_include_directories(tinyxml2_static PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>)
if(MSVC)
target_compile_definitions(tinyxml2_static PUBLIC -D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
else()
include_directories(${PROJECT_SOURCE_DIR})
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
endif()
# export targets for find_package config mode
export(TARGETS tinyxml2_static
FILE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake)
install(TARGETS tinyxml2_static
EXPORT ${CMAKE_PROJECT_NAME}Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(BUILD_TESTING AND BUILD_TESTS)
add_executable(xmltest xmltest.cpp)
if(BUILD_SHARED_LIBS)
add_dependencies(xmltest tinyxml2)
target_link_libraries(xmltest tinyxml2)
else(BUILD_STATIC_LIBS)
add_dependencies(xmltest tinyxml2_static)
target_link_libraries(xmltest tinyxml2_static)
endif()
# Copy test resources and create test output directory
add_custom_command(TARGET xmltest POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/resources $<TARGET_FILE_DIR:xmltest>/resources
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:xmltest>/resources/out
COMMENT "Configuring xmltest resources directory: ${CMAKE_BINARY_DIR}/resources"
)
add_test(NAME xmltest COMMAND xmltest)
endif()
install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
foreach(p LIB INCLUDE)
@@ -81,4 +153,24 @@ endforeach()
configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
#add_test(test ${SAMPLE_NAME} COMMAND $<TARGET_FILE:${SAMPLE_NAME}>)
# uninstall target
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
file(WRITE
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
"include(\${CMAKE_CURRENT_LIST_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake)\n")
install(FILES
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
DESTINATION lib/cmake/${CMAKE_PROJECT_NAME})
install(EXPORT ${CMAKE_PROJECT_NAME}Targets
DESTINATION lib/cmake/${CMAKE_PROJECT_NAME})

View File

@@ -1,4 +1,19 @@
all: xmltest
xmltest: xmltest.cpp tinyxml2.cpp tinyxml2.h
all: xmltest staticlib
rebuild: clean all
xmltest: xmltest.cpp libtinyxml2.a
clean:
rm -f *.o xmltest
$(RM) *.o xmltest libtinyxml2.a
test: clean xmltest
./xmltest
staticlib: libtinyxml2.a
libtinyxml2.a: tinyxml2.o
$(AR) $(ARFLAGS)s $@ $^
tinyxml2.o: tinyxml2.cpp tinyxml2.h

BIN
TinyXML2_small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

7
appveyor.yml Normal file
View File

@@ -0,0 +1,7 @@
before_build:
- cmake .
build_script:
- msbuild tinyxml2.sln /m /p:Configuration=Release /t:ALL_BUILD
- cd Release
- xmltest.exe

7
biicode.conf Normal file
View File

@@ -0,0 +1,7 @@
# Biicode configuration file
[paths]
/
[dependencies]
xmltest.cpp + resources/*.xml

21
cmake_uninstall.cmake.in Normal file
View File

@@ -0,0 +1,21 @@
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif(NOT "${rm_retval}" STREQUAL 0)
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)

108
contrib/html5-printer.cpp Normal file
View File

@@ -0,0 +1,108 @@
// g++ -Wall -O2 contrib/html5-printer.cpp -o html5-printer -ltinyxml2
// This program demonstrates how to use "tinyxml2" to generate conformant HTML5
// by deriving from the "tinyxml2::XMLPrinter" class.
// http://dev.w3.org/html5/markup/syntax.html
// In HTML5, there are 16 so-called "void" elements. "void elements" NEVER have
// inner content (but they MAY have attributes), and are assumed to be self-closing.
// An example of a self-closig HTML5 element is "<br/>" (line break)
// All other elements are called "non-void" and MUST never self-close.
// Examples: "<div class='lolcats'></div>".
// tinyxml2::XMLPrinter will emit _ALL_ XML elements with no inner content as
// self-closing. This behavior produces space-effeceint XML, but incorrect HTML5.
// Author: Dennis Jenkins, dennis (dot) jenkins (dot) 75 (at) gmail (dot) com.
// License: Same as tinyxml2 (zlib, see below)
// This example is a small contribution to the world! Enjoy it!
/*
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.
*/
#include <tinyxml2.h>
#include <iostream>
#if defined (_MSC_VER)
#define strcasecmp stricmp
#endif
using namespace tinyxml2;
// Contrived input containing a mix of void and non-void HTML5 elements.
// When printed via XMLPrinter, some non-void elements will self-close (not valid HTML5).
static const char input[] =
"<html><body><p style='a'></p><br/>&copy;<col a='1' b='2'/><div a='1'></div></body></html>";
// XMLPrinterHTML5 is small enough, just put the entire implementation inline.
class XMLPrinterHTML5 : public XMLPrinter
{
public:
XMLPrinterHTML5 (FILE* file=0, bool compact = false, int depth = 0) :
XMLPrinter (file, compact, depth)
{}
protected:
virtual void CloseElement () {
if (_elementJustOpened && !isVoidElement (_stack.PeekTop())) {
SealElementIfJustOpened();
}
XMLPrinter::CloseElement();
}
virtual bool isVoidElement (const char *name) {
// Complete list of all HTML5 "void elements",
// http://dev.w3.org/html5/markup/syntax.html
static const char *list[] = {
"area", "base", "br", "col", "command", "embed", "hr", "img",
"input", "keygen", "link", "meta", "param", "source", "track", "wbr",
NULL
};
// I could use 'bsearch', but I don't have MSVC to test on (it would work with gcc/libc).
for (const char **p = list; *p; ++p) {
if (!strcasecmp (name, *p)) {
return true;
}
}
return false;
}
};
int main (void) {
XMLDocument doc (false);
doc.Parse (input);
std::cout << "INPUT:\n" << input << "\n\n";
XMLPrinter prn (NULL, true);
doc.Print (&prn);
std::cout << "XMLPrinter (not valid HTML5):\n" << prn.CStr() << "\n\n";
XMLPrinterHTML5 html5 (NULL, true);
doc.Print (&html5);
std::cout << "XMLPrinterHTML5:\n" << html5.CStr() << "\n";
return 0;
}

2380
dox Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,8 @@
TinyXML-2
TinyXML-2 [![TravisCI Status](https://travis-ci.org/leethomason/tinyxml2.svg?branch=master)](https://travis-ci.org/leethomason/tinyxml2) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/leethomason/tinyxml2?branch=master&svg=true)](https://ci.appveyor.com/project/leethomason/tinyxml2)
=========
![TinyXML-2 Logo](http://www.grinninglizard.com/tinyxml2/TinyXML2_small.png)
TinyXML is a simple, small, efficient, C++ XML parser that can be
TinyXML-2 is a simple, small, efficient, C++ XML parser that can be
easily integrated into other programs.
The master is hosted on github:
@@ -15,7 +16,7 @@ Examples are in the "related pages" tab of the HTML docs.
What it does.
-------------
In brief, TinyXML parses an XML document, and builds from that a
In brief, TinyXML-2 parses an XML document, and builds from that a
Document Object Model (DOM) that can be read, modified, and saved.
XML stands for "eXtensible Markup Language." It is a general purpose
@@ -45,24 +46,26 @@ TinyXML-2 attempts to be a flexible parser, but with truly correct and
compliant XML output. TinyXML-2 should compile on any reasonably C++
compliant system. It does not rely on exceptions, RTTI, or the STL.
What it doesn<EFBFBD>t do.
What it doesn't do.
-------------------
TinyXML-2 doesn't parse or use DTDs (Document Type Definitions) or XSLs
(eXtensible Stylesheet Language.) There are other parsers out there
that are much more fully
featured. But they are also much bigger, take longer to set up in
your project, have a higher learning curve, and often have a more
restrictive license. If you are working with browsers or have more
complete XML needs, TinyXML-2 is not the parser for you.
that are much more fully featured. But they are also much bigger,
take longer to set up in your project, have a higher learning curve,
and often have a more restrictive license. If you are working with
browsers or have more complete XML needs, TinyXML-2 is not the parser for you.
TinyXML-1 vs. TinyXML-2
-----------------------
Which should you use? TinyXML-2 uses a similar API to TinyXML-1 and the same
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.
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 few memory allocations.
and uses far fewer memory allocations.
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
@@ -85,9 +88,8 @@ Advantages of TinyXML-2
Advantages of TinyXML-1
1. Can report the location of parsing errors.
2. Support for some C++ STL conventions: streams and strings
3. Very mature and well debugged code base.
1. Support for some C++ STL conventions: streams and strings
2. Very mature and well debugged code base.
Features
--------
@@ -104,10 +106,12 @@ by the Document. When the Document is deleted, so are all the nodes it contains.
### White Space
#### Whitespace Preservation (default)
Microsoft has an excellent article on white space: http://msdn.microsoft.com/en-us/library/ms256097.aspx
By default, TinyXML-2 preserves white space in a (hopefully) sane way that is almost complient with the
spec.(TinyXML-1 used a completely outdated model.)
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.)
As a first step, all newlines / carriage-returns / line-feeds are normalized to a
line-feed character, as required by the XML spec.
@@ -136,21 +140,31 @@ valuable. TinyXML-2 sees these as the same XML:
#### Whitespace Collapse
For some applications, it is preferable to collapse whitespace. TinyXML-2
supports this with the 'whitespace' parameter to the XMLDocument constructor.
For some applications, it is preferable to collapse whitespace. Collapsing
whitespace gives you "HTML-like" behavior, which is sometimes more suitable
for hand typed documents.
TinyXML-2 supports this with the 'whitespace' parameter to the XMLDocument constructor.
(The default is to preserve whitespace, as described above.)
However, you may also use COLLAPSE_WHITESPACE, which will:
* Remove leading and trailing whitespace
* Convert newlines and line-feeds into a space character
* Collapse a run of any number of space characters into a single space character
This can be useful for text documents stored in XML.
* Remove leading and trailing whitespace
* Convert newlines and line-feeds into a space character
* Collapse a run of any number of space characters into a single space character
Note that (currently) there is a performance impact for using COLLAPSE_WHITESPACE.
It essentially causes the XML to be parsed twice.
#### Error Reporting
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.
### Entities
TinyXML-2 recognizes the pre-defined "character entities", meaning special
@@ -162,7 +176,7 @@ characters. Namely:
&quot; "
&apos; '
These are recognized when the XML document is read, and translated to there
These are recognized when the XML document is read, and translated to their
UTF-8 equivalents. For instance, text with the XML of:
Far &amp; Away
@@ -171,7 +185,7 @@ will have the Value() of "Far & Away" when queried from the XMLText object,
and will be written back to the XML stream/file as an ampersand.
Additionally, any character can be specified by its Unicode code point:
The syntax "&#xA0;" or "&#160;" are both to the non-breaking space characher.
The syntax `&#xA0;` or `&#160;` are both to the non-breaking space character.
This is called a 'numeric character reference'. Any numeric character reference
that isn't one of the special entities above, will be read, but written as a
regular code point. The output is correct, but the entity syntax isn't preserved.
@@ -194,7 +208,7 @@ Or the XMLPrinter class:
Printing to memory is supported by the XMLPrinter.
XMLPrinter printer;
doc->Print( &printer );
doc.Print( &printer );
// printer.CStr() has a const char* to the XML
#### Print without an XMLDocument
@@ -258,9 +272,18 @@ There are 2 files in TinyXML-2:
And additionally a test file:
* xmltest.cpp
Simply compile and run. There is a visual studio 2010 project included, a simple Makefile,
an XCode 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.
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.
Versioning
----------
TinyXML-2 uses semantic versioning. http://semver.org/ Releases are now tagged in github.
Note that the major version will (probably) change fairly rapidly. API changes are fairly
common.
Documentation
-------------
@@ -301,5 +324,9 @@ in shaping what is a very successful library. Extra thanks to Yves
Berquin and Andrew Ellerton who were key contributors.
TinyXML-2 grew from that effort. Lee Thomason is the original author
of TinyXML-2 (and TinyXML-1) but hopefully TinyXML-2 will be improved
by many contributors.
of TinyXML-2 (and TinyXML-1) but TinyXML-2 has been and is being improved
by many contributors.
Thanks to John Mackay at http://john.mackay.rosalilastudio.com for the TinyXML-2 logo!

0
resources/empty.xml Normal file
View File

View File

@@ -3,6 +3,7 @@
import re
import sys
import optparse
def fileProcess( name, lineFunction ):
filestream = open( name, 'r' )
@@ -25,16 +26,21 @@ def fileProcess( name, lineFunction ):
filestream.write( output );
filestream.close()
def echoInput( line ):
return line
major = input( "Major: " )
minor = input( "Minor: " )
build = input( "Build: " )
parser = optparse.OptionParser( "usage: %prog major minor build" )
(options, args) = parser.parse_args()
if len(args) != 3:
parser.error( "incorrect number of arguments" );
print "Setting dox,tinyxml2.h"
print "Version: " + `major` + "." + `minor` + "." + `build`
major = args[0]
minor = args[1]
build = args[2]
versionStr = major + "." + minor + "." + build
print ("Setting dox,tinyxml2.h")
print ("Version: " + major + "." + minor + "." + build)
#### Write the tinyxml.h ####
@@ -45,16 +51,16 @@ def engineRule( line ):
matchBuild = "static const int TIXML2_PATCH_VERSION"
if line[0:len(matchMajor)] == matchMajor:
print "1)tinyxml2.h Major found"
return matchMajor + " = " + `major` + ";\n"
print( "1)tinyxml2.h Major found" )
return matchMajor + " = " + major + ";\n"
elif line[0:len(matchMinor)] == matchMinor:
print "2)tinyxml2.h Minor found"
return matchMinor + " = " + `minor` + ";\n"
print( "2)tinyxml2.h Minor found" )
return matchMinor + " = " + minor + ";\n"
elif line[0:len(matchBuild)] == matchBuild:
print "3)tinyxml2.h Build found"
return matchBuild + " = " + `build` + ";\n"
print( "3)tinyxml2.h Build found" )
return matchBuild + " = " + build + ";\n"
else:
return line;
@@ -69,8 +75,8 @@ def doxRule( line ):
match = "PROJECT_NUMBER"
if line[0:len( match )] == match:
print "dox project found"
return "PROJECT_NUMBER = " + `major` + "." + `minor` + "." + `build` + "\n"
print( "dox project found" )
return "PROJECT_NUMBER = " + major + "." + minor + "." + build + "\n"
else:
return line;
@@ -85,8 +91,8 @@ def cmakeRule1( line ):
matchVersion = "set(GENERIC_LIB_VERSION"
if line[0:len(matchVersion)] == matchVersion:
print "1)tinyxml2.h Major found"
return matchVersion + " \"" + `major` + "." + `minor` + "." + `build` + "\")" + "\n"
print( "1)tinyxml2.h Major found" )
return matchVersion + " \"" + major + "." + minor + "." + build + "\")" + "\n"
else:
return line;
@@ -98,10 +104,20 @@ def cmakeRule2( line ):
matchSoversion = "set(GENERIC_LIB_SOVERSION"
if line[0:len(matchSoversion)] == matchSoversion:
print "1)tinyxml2.h Major found"
return matchSoversion + " \"" + `major` + "\")" + "\n"
print( "1)tinyxml2.h Major found" )
return matchSoversion + " \"" + major + "\")" + "\n"
else:
return line;
fileProcess( "CMakeLists.txt", cmakeRule2 )
print( "Release note:" )
print( '1. Build. g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe' )
print( '2. Commit. git commit -am"setting the version to ' + versionStr + '"' )
print( '3. Tag. git tag ' + versionStr )
print( ' OR git tag -a ' + versionStr + ' -m [tag message]' )
print( 'Remember to "git push" both code and tag. For the tag:' )
print( 'git push origin [tagname]')

3273
tinyxml2.cpp Normal file → Executable file

File diff suppressed because it is too large Load Diff

2769
tinyxml2.h Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -1,26 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml2", "tinyxml2\tinyxml2.vcxproj", "{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}.Debug|Win32.ActiveCfg = Debug|Win32
{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}.Debug|Win32.Build.0 = Debug|Win32
{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}.Debug|x64.ActiveCfg = Debug|x64
{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}.Debug|x64.Build.0 = Debug|x64
{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}.Release|Win32.ActiveCfg = Release|Win32
{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}.Release|Win32.Build.0 = Release|Win32
{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}.Release|x64.ActiveCfg = Release|x64
{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

352
tinyxml2/test.vcxproj Normal file
View File

@@ -0,0 +1,352 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug-Dll|Win32">
<Configuration>Debug-Dll</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug-Dll|x64">
<Configuration>Debug-Dll</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug-Lib|Win32">
<Configuration>Debug-Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug-Lib|x64">
<Configuration>Debug-Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-Dll|Win32">
<Configuration>Release-Dll</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-Dll|x64">
<Configuration>Release-Dll</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-Lib|Win32">
<Configuration>Release-Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-Lib|x64">
<Configuration>Release-Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}</ProjectGuid>
<RootNamespace>test</RootNamespace>
<WindowsTargetPlatformVersion>8.1</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>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'">
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'">
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'">
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'">
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'">
<OutDir>$(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'">
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'">
<OutDir>$(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'">
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'">
<OutDir>$(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'">
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'">
<OutDir>$(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'">
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>TINYXML2_IMPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>TINYXML2_IMPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
<PreprocessorDefinitions>TINYXML2_IMPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SubSystem>Console</SubSystem>
<SetChecksum>true</SetChecksum>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
<PreprocessorDefinitions>TINYXML2_IMPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SubSystem>Console</SubSystem>
<SetChecksum>true</SetChecksum>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<SetChecksum>true</SetChecksum>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<SetChecksum>true</SetChecksum>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\xmltest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="tinyxml2.vcxproj">
<Project>{d1c528b6-aa02-4d29-9d61-dc08e317a70d}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\xmltest.cpp" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,3 @@
The (default) Release configuration of this project builds a ready to use static library.
The Debug configuration of this project builds an executable console application that
executes all tests provided for tinyxml2 in the xmltest.cpp file.

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="tinyxml2-cbp" />
<Option execution_dir="../" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Release">
<Option output="bin/Release/tinyxml2" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
<Option object_output="obj/Release/" />
<Option type="2" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
<Target title="Debug">
<Option output="bin/Debug/tinyxml2-cbp" prefix_auto="1" extension_auto="1" />
<Option working_dir="../../" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="../../tinyxml2.cpp" />
<Unit filename="../../tinyxml2.h" />
<Unit filename="../../xmltest.cpp">
<Option target="Debug" />
</Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>

56
tinyxml2/tinyxml2.sln Executable file
View File

@@ -0,0 +1,56 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml2", "tinyxml2.vcxproj", "{D1C528B6-AA02-4D29-9D61-DC08E317A70D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcxproj", "{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug-Dll|Win32 = Debug-Dll|Win32
Debug-Dll|x64 = Debug-Dll|x64
Debug-Lib|Win32 = Debug-Lib|Win32
Debug-Lib|x64 = Debug-Lib|x64
Release-Dll|Win32 = Release-Dll|Win32
Release-Dll|x64 = Release-Dll|x64
Release-Lib|Win32 = Release-Lib|Win32
Release-Lib|x64 = Release-Lib|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Dll|Win32.ActiveCfg = Debug-Dll|Win32
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Dll|Win32.Build.0 = Debug-Dll|Win32
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Dll|x64.ActiveCfg = Debug-Dll|x64
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Dll|x64.Build.0 = Debug-Dll|x64
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Lib|Win32.ActiveCfg = Debug-Lib|Win32
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Lib|Win32.Build.0 = Debug-Lib|Win32
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Lib|x64.ActiveCfg = Debug-Lib|x64
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Debug-Lib|x64.Build.0 = Debug-Lib|x64
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Dll|Win32.ActiveCfg = Release-Dll|Win32
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Dll|Win32.Build.0 = Release-Dll|Win32
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Dll|x64.ActiveCfg = Release-Dll|x64
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Dll|x64.Build.0 = Release-Dll|x64
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Lib|Win32.ActiveCfg = Release-Lib|Win32
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Lib|Win32.Build.0 = Release-Lib|Win32
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Lib|x64.ActiveCfg = Release-Lib|x64
{D1C528B6-AA02-4D29-9D61-DC08E317A70D}.Release-Lib|x64.Build.0 = Release-Lib|x64
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Dll|Win32.ActiveCfg = Debug-Dll|Win32
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Dll|Win32.Build.0 = Debug-Dll|Win32
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Dll|x64.ActiveCfg = Debug-Dll|x64
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Dll|x64.Build.0 = Debug-Dll|x64
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Lib|Win32.ActiveCfg = Debug-Lib|Win32
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Lib|Win32.Build.0 = Debug-Lib|Win32
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Lib|x64.ActiveCfg = Debug-Lib|x64
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Debug-Lib|x64.Build.0 = Debug-Lib|x64
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Dll|Win32.ActiveCfg = Release-Dll|Win32
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Dll|Win32.Build.0 = Release-Dll|Win32
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Dll|x64.ActiveCfg = Release-Dll|x64
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Dll|x64.Build.0 = Release-Dll|x64
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Lib|Win32.ActiveCfg = Release-Lib|Win32
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Lib|Win32.Build.0 = Release-Lib|Win32
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Lib|x64.ActiveCfg = Release-Lib|x64
{E8FB2712-8666-4662-A5B8-2B5B0FB1A260}.Release-Lib|x64.Build.0 = Release-Lib|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

368
tinyxml2/tinyxml2.vcxproj Normal file → Executable file
View File

@@ -1,158 +1,392 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<ProjectConfiguration Include="Debug-Dll|Win32">
<Configuration>Debug-Dll</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<ProjectConfiguration Include="Debug-Dll|x64">
<Configuration>Debug-Dll</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<ProjectConfiguration Include="Debug-Lib|Win32">
<Configuration>Debug-Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<ProjectConfiguration Include="Debug-Lib|x64">
<Configuration>Debug-Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-Dll|Win32">
<Configuration>Release-Dll</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-Dll|x64">
<Configuration>Release-Dll</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-Lib|Win32">
<Configuration>Release-Lib</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-Lib|x64">
<Configuration>Release-Lib</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{16A1D446-5415-444E-A7B4-F35B7DA7EE8C}</ProjectGuid>
<ProjectGuid>{D1C528B6-AA02-4D29-9D61-DC08E317A70D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>tinyxml2</RootNamespace>
<VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''">$(VCTargetsPath11)</VCTargetsPath>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)bin\$(ProjectName)\$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)temp\$(ProjectName)\$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;TINYXML2_EXPORT;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>NotSet</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Lib|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;TINYXML2_EXPORT;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>NotSet</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SetChecksum>true</SetChecksum>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;TINYXML2_EXPORT;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>NotSet</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SetChecksum>true</SetChecksum>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SetChecksum>true</SetChecksum>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Dll|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;TINYXML2_EXPORT;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>NotSet</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SetChecksum>true</SetChecksum>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Lib>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Lib>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Lib>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<ClCompile>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<ClCompile>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
<ClCompile>
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<ClCompile>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Lib>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Lib>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Lib>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
</ClCompile>
<ClCompile>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<ClCompile>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
<ClCompile>
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<ClCompile>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<StringPooling>true</StringPooling>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\tinyxml2.cpp" />
<ClCompile Include="..\xmltest.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\tinyxml2.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\readme.md" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

22
tinyxml2/tinyxml2.vcxproj.filters Normal file → Executable file
View File

@@ -1,27 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<ClCompile Include="..\tinyxml2.cpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\xmltest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\tinyxml2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\tinyxml2.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\readme.md">
<Filter>Source Files</Filter>
</None>
<ClInclude Include="..\tinyxml2.h" />
</ItemGroup>
</Project>

View File

@@ -96,6 +96,9 @@
/* Begin PBXProject section */
037AE058151CCC5200E0F29F /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0610;
};
buildConfigurationList = 037AE05B151CCC5200E0F29F /* Build configuration list for PBXProject "tinyxml2" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
@@ -134,6 +137,8 @@
buildSettings = {
CONFIGURATION_BUILD_DIR = "$(SYMROOT)/Debug";
COPY_PHASE_STRIP = NO;
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = DEBUG;
ONLY_ACTIVE_ARCH = YES;
SYMROOT = build;
};
name = Debug;
@@ -156,6 +161,7 @@
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INSTALL_PATH = /usr/local/bin;
MACOSX_DEPLOYMENT_TARGET = "";
PREBINDING = NO;
PRODUCT_NAME = xmltest;
};
@@ -171,6 +177,7 @@
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
INSTALL_PATH = /usr/local/bin;
MACOSX_DEPLOYMENT_TARGET = "";
PREBINDING = NO;
PRODUCT_NAME = tinyxml2;
ZERO_LINK = NO;

File diff suppressed because it is too large Load Diff

129
xmltest.h
View File

@@ -1,129 +0,0 @@
// Purely doxygen documentation
// What follows is the docs for the examples.
// I'd like the docs to be just before the
// actual examples in xmltest.cpp, but I
// can't seem to get doxygen to do that. It
// would be a wonderful patch if anyone figures
// it out.
/** @page Example-1 Load an XML File
* @dontinclude ./xmltest.cpp
* Basic XML file loading.
* The basic syntax to load an XML file from
* disk and check for an error. (ErrorID()
* will return 0 for no error.)
* @skip example_1()
* @until }
*/
/** @page Example-2 Parse an XML from char buffer
* @dontinclude ./xmltest.cpp
* Basic XML string parsing.
* The basic syntax to parse an XML for
* a char* and check for an error. (ErrorID()
* will return 0 for no error.)
* @skip example_2()
* @until }
*/
/** @page Example-3 Get information out of XML
@dontinclude ./xmltest.cpp
In this example, we navigate a simple XML
file, and read some interesting text. Note
that this is examlpe doesn't use error
checking; working code should check for null
pointers when walking an XML tree, or use
XMLHandle.
(The XML is an excerpt from "dream.xml").
@skip example_3
@until </PLAY>";
The structure of the XML file is:
<ul>
<li>(declaration)</li>
<li>(dtd stuff)</li>
<li>Element "PLAY"</li>
<ul>
<li>Element "TITLE"</li>
<ul>
<li>Text "A Midsummer Night's Dream"</li>
</ul>
</ul>
</ul>
For this example, we want to print out the
title of the play. The text of the title (what
we want) is child of the "TITLE" element which
is a child of the "PLAY" element.
We want to skip the declaration and dtd, so the
method FirstChildElement() is a good choice. The
FirstChildElement() of the Document is the "PLAY"
Element, the FirstChildElement() of the "PLAY" Element
is the "TITLE" Element.
@until ( "TITLE" );
We can then use the convenience function GetText()
to get the title of the play.
@until title );
Text is just another Node in the XML DOM. And in
fact you should be a little cautious with it, as
text nodes can contain elements.
@verbatim
Consider: A Midsummer Night's <b>Dream</b>
@endverbatim
It is more correct to actually query the Text Node
if in doubt:
@until title );
Noting that here we use FirstChild() since we are
looking for XMLText, not an element, and ToText()
is a cast from a Node to a XMLText.
*/
/** @page Example-4 Read attributes and text information.
@dontinclude ./xmltest.cpp
There are fundamentally 2 ways of writing a key-value
pair into an XML file. (Something that's always annoyed
me about XML.) Either by using attributes, or by writing
the key name into an element and the value into
the text node wrapped by the element. Both approaches
are illustrated in this example, which shows two ways
to encode the value "2" into the key "v":
@skip example_4
@until "</information>";
TinyXML-2 has accessors for both approaches.
When using an attribute, you navigate to the XMLElement
with that attribute and use the QueryIntAttribute()
group of methods. (Also QueryFloatAttribute(), etc.)
@skip XMLElement* attributeApproachElement
@until &v0 );
When using the text approach, you need to navigate
down one more step to the XMLElement that contains
the text. Note the extra FirstChildElement( "v" )
in the code below. The value of the text can then
be safely queried with the QueryIntText() group
of methods. (Also QueryFloatText(), etc.)
@skip XMLElement* textApproachElement
@until &v1 );
*/