react-native-nitro-xlsx 0.1.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NitroXlsx.podspec +27 -27
- package/Package.swift +35 -10
- package/README.md +220 -58
- package/android/CMakeLists.txt +24 -27
- package/android/cpp-adapter.cpp +12 -0
- package/android/src/main/java/com/margelo/nitro/xlsx/NitroXlsxPackage.kt +9 -0
- package/cpp/HybridNitroXlsx.cpp +25 -179
- package/cpp/HybridNitroXlsx.hpp +2 -2
- package/cpp/HybridXlsxConditionalFormat.cpp +252 -0
- package/cpp/HybridXlsxConditionalFormat.hpp +62 -0
- package/cpp/HybridXlsxConditionalFormats.cpp +46 -0
- package/cpp/HybridXlsxConditionalFormats.hpp +28 -0
- package/cpp/HybridXlsxWorkbook.cpp +159 -196
- package/cpp/HybridXlsxWorkbook.hpp +7 -2
- package/cpp/HybridXlsxWorksheet.cpp +433 -62
- package/cpp/HybridXlsxWorksheet.hpp +73 -26
- package/cpp/XlsxCacheDir.cpp +76 -0
- package/cpp/XlsxCacheDir.hpp +27 -0
- package/cpp/XlsxError.hpp +68 -0
- package/cpp/XlsxJson.cpp +185 -0
- package/cpp/XlsxJson.hpp +36 -0
- package/ios/XlsxCacheDir.mm +60 -0
- package/nitrogen/generated/android/NitroXlsx+autolinking.cmake +2 -0
- package/nitrogen/generated/shared/c++/HybridNitroXlsxSpec.hpp +5 -3
- package/nitrogen/generated/shared/c++/HybridXlsxConditionalFormatSpec.cpp +54 -0
- package/nitrogen/generated/shared/c++/HybridXlsxConditionalFormatSpec.hpp +95 -0
- package/nitrogen/generated/shared/c++/HybridXlsxConditionalFormatsSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridXlsxConditionalFormatsSpec.hpp +68 -0
- package/nitrogen/generated/shared/c++/HybridXlsxWorkbookSpec.cpp +3 -0
- package/nitrogen/generated/shared/c++/HybridXlsxWorkbookSpec.hpp +6 -1
- package/nitrogen/generated/shared/c++/HybridXlsxWorksheetSpec.cpp +47 -19
- package/nitrogen/generated/shared/c++/HybridXlsxWorksheetSpec.hpp +52 -20
- package/package.json +3 -3
- package/scripts/run-cpp-tests.sh +14 -0
- package/src/__mocks__/react-native-nitro-modules.ts +1 -0
- package/src/__tests__/index.test.ts +76 -7
- package/src/index.ts +107 -18
- package/src/specs/NitroXlsx.nitro.ts +141 -44
- package/thirdparty/OpenXLSX/.clang-format +118 -0
- package/thirdparty/OpenXLSX/.clang-tidy +28 -0
- package/thirdparty/OpenXLSX/.gitignore +130 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_before_XMLNode_wrappers +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_with_XMLNode_wrappers_and_namespace_and_stripping +49 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_with_XMLNode_wrappers_and_namespace_char_support +49 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_with_XMLNode_wrappers_and_namespace_support +49 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-07-29-benchmarks_with_XMLNode_wrappers_and_namespaced_name_disabled +49 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-08-11-benchmarks_post-XLCellIterator-Rework +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-08-14-benchmarks_post-default-row-column-style-support +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-09-02-benchmarks +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-12-19-benchmarks +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2024-12-30-benchmarks-post-XLSharedStrings-by-ref +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-01-09-benchmarks-post-conditionalFormatsAndSheetProtection +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-01-10-benchmarks-post-XLCellValue-bugfix +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-01-31-benchmarks-post-XLComments-implementation +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-02-02-benchmarks-post-XLRowIterator-Rework +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-07-20-benchmarks-after-hiding-pugixml-internals +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/2025-08-29-benchmarks-after-code-review-with-libzip +46 -0
- package/thirdparty/OpenXLSX/Benchmarks/Benchmark.cpp +249 -0
- package/thirdparty/OpenXLSX/Benchmarks/CMakeLists.txt +19 -0
- package/thirdparty/OpenXLSX/CMakeLists.txt +466 -0
- package/thirdparty/OpenXLSX/Documentation/CMakeLists.txt +31 -0
- package/thirdparty/OpenXLSX/Documentation/Doxyfile.in +2471 -0
- package/thirdparty/OpenXLSX/Documentation/DoxygenLayout.xml +194 -0
- package/thirdparty/OpenXLSX/Documentation/customdoxygen.css +1355 -0
- package/thirdparty/OpenXLSX/Examples/CMakeLists.txt +103 -0
- package/thirdparty/OpenXLSX/Examples/Demo1.cpp +279 -0
- package/thirdparty/OpenXLSX/Examples/Demo10.cpp +545 -0
- package/thirdparty/OpenXLSX/Examples/Demo1A.cpp +137 -0
- package/thirdparty/OpenXLSX/Examples/Demo2.cpp +65 -0
- package/thirdparty/OpenXLSX/Examples/Demo3.cpp +89 -0
- package/thirdparty/OpenXLSX/Examples/Demo4.cpp +86 -0
- package/thirdparty/OpenXLSX/Examples/Demo5.cpp +77 -0
- package/thirdparty/OpenXLSX/Examples/Demo6.cpp +103 -0
- package/thirdparty/OpenXLSX/Examples/Demo7.cpp +79 -0
- package/thirdparty/OpenXLSX/Examples/Demo8.cpp +117 -0
- package/thirdparty/OpenXLSX/Examples/Demo9.cpp +363 -0
- package/thirdparty/OpenXLSX/Examples/cmake/FindLIBZIP.cmake +61 -0
- package/thirdparty/OpenXLSX/Examples/external/CustomZip/CustomZip.hpp +256 -0
- package/thirdparty/OpenXLSX/LICENSE.md +29 -0
- package/thirdparty/OpenXLSX/Makefile.GNU +530 -0
- package/thirdparty/OpenXLSX/Notes/TBDs.txt +16 -0
- package/thirdparty/OpenXLSX/Notes/confirmed-TBCs.txt +8 -0
- package/thirdparty/OpenXLSX/Notes/styles-missing-support.xml +12 -0
- package/thirdparty/OpenXLSX/Notes/todo-list.txt +108 -0
- package/thirdparty/OpenXLSX/OpenXLSX/CMakeLists.txt +631 -0
- package/thirdparty/OpenXLSX/OpenXLSX/OpenXLSX.hpp +63 -0
- package/thirdparty/OpenXLSX/OpenXLSX/OpenXLSXConfig.cmake +11 -0
- package/thirdparty/OpenXLSX/OpenXLSX/cmake/bundle_static_library.cmake +198 -0
- package/thirdparty/OpenXLSX/OpenXLSX/cmake/patch_pkg_config.cmake +69 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/IZipArchive.hpp +361 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/OpenXLSX-Exports.hpp +12 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCell.hpp +367 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCellIterator.hpp +252 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCellRange.hpp +223 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCellReference.hpp +317 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCellValue.hpp +793 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLColor.hpp +232 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLColumn.hpp +159 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLCommandQuery.hpp +228 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLComments.hpp +270 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLConstants.hpp +18 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLContentTypes.hpp +264 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLDateTime.hpp +175 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLDocument.hpp +505 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLDrawing.hpp +452 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLException.hpp +161 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLFormula.hpp +375 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLIterator.hpp +40 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLMergeCells.hpp +216 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLProperties.hpp +348 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLRelationships.hpp +348 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLRow.hpp +721 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLRowData.hpp +488 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLSharedStrings.hpp +204 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLSheet.hpp +1640 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLStyles.hpp +2390 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLTables.hpp +132 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLWorkbook.hpp +404 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLXmlData.hpp +283 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLXmlFile.hpp +194 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLXmlParser.hpp +282 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLXmlParserForwardDeclarations.hpp +85 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/XLZipArchive.hpp +232 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/detail/LibZip.hpp +447 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/detail/OpenXLSXFileSystemTools.hpp +207 -0
- package/thirdparty/OpenXLSX/OpenXLSX/headers/detail/Zippy.hpp +1375 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCell.cpp +340 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCellIterator.cpp +427 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCellRange.cpp +221 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCellReference.cpp +408 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLCellValue.cpp +519 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLColor.cpp +202 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLColumn.cpp +141 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLComments.cpp +637 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLContentTypes.cpp +329 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLDateTime.cpp +269 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLDocument.cpp +1678 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLDrawing.cpp +784 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLFormula.cpp +201 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLMergeCells.cpp +357 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLProperties.cpp +810 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLRelationships.cpp +529 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLRow.cpp +918 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLRowData.cpp +508 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLSharedStrings.cpp +220 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLSheet.cpp +1970 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLStyles.cpp +3014 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLTables.cpp +125 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLWorkbook.cpp +784 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLXmlData.cpp +247 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLXmlFile.cpp +160 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLXmlParser.cpp +261 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/XLZipArchive.cpp +266 -0
- package/thirdparty/OpenXLSX/OpenXLSX/sources/utilities/XLUtilities.hpp +478 -0
- package/thirdparty/OpenXLSX/README.md +1279 -0
- package/thirdparty/OpenXLSX/Scripts/cmake-cleanup.sh +102 -0
- package/thirdparty/OpenXLSX/Scripts/compile.sh +23 -0
- package/thirdparty/OpenXLSX/Scripts/demos-cleanup.sh +25 -0
- package/thirdparty/OpenXLSX/Scripts/demos-run-all.sh +60 -0
- package/thirdparty/OpenXLSX/Scripts/guarded-xml-format.sh +47 -0
- package/thirdparty/OpenXLSX/Scripts/make-gnu.sh +11 -0
- package/thirdparty/OpenXLSX/Scripts/uninstall-manifest.sh +48 -0
- package/thirdparty/OpenXLSX/Scripts/xml-format-all.sh +19 -0
- package/thirdparty/OpenXLSX/Scripts/xml-format.sh +38 -0
- package/thirdparty/OpenXLSX/Tests/CMakeLists.txt +37 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch.hpp +17799 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch_reporter_automake.hpp +68 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch_reporter_sonarqube.hpp +182 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch_reporter_tap.hpp +278 -0
- package/thirdparty/OpenXLSX/Tests/catch/catch_reporter_teamcity.hpp +212 -0
- package/thirdparty/OpenXLSX/Tests/main.cpp +55 -0
- package/thirdparty/OpenXLSX/Tests/testXLCell.cpp +176 -0
- package/thirdparty/OpenXLSX/Tests/testXLCellRange.cpp +180 -0
- package/thirdparty/OpenXLSX/Tests/testXLCellReference.cpp +160 -0
- package/thirdparty/OpenXLSX/Tests/testXLCellValue.cpp +366 -0
- package/thirdparty/OpenXLSX/Tests/testXLCellValueProxy.cpp +255 -0
- package/thirdparty/OpenXLSX/Tests/testXLColor.cpp +75 -0
- package/thirdparty/OpenXLSX/Tests/testXLDateTime.cpp +229 -0
- package/thirdparty/OpenXLSX/Tests/testXLDocument.cpp +197 -0
- package/thirdparty/OpenXLSX/Tests/testXLFormula.cpp +131 -0
- package/thirdparty/OpenXLSX/Tests/testXLRow.cpp +597 -0
- package/thirdparty/OpenXLSX/Tests/testXLSheet.cpp +77 -0
- package/thirdparty/OpenXLSX/Tests/ziptest-with-libs.cpp +88 -0
- package/thirdparty/OpenXLSX/Tests/ziptest.cpp +735 -0
- package/thirdparty/OpenXLSX/cmake/get-git-HEAD-ID.cmake +45 -0
- package/thirdparty/OpenXLSX/cmake/libopenxlsxCPackOptions.cmake.in +20 -0
- package/thirdparty/OpenXLSX/cmake/manage_dependency.cmake +813 -0
- package/thirdparty/OpenXLSX/cmake/recursive_library_type_test.cmake +52 -0
- package/thirdparty/OpenXLSX/gnu-make-crutch/OpenXLSX-Exports-shared.hpp +42 -0
- package/thirdparty/OpenXLSX/gnu-make-crutch/OpenXLSX-Exports-static.hpp +42 -0
- package/thirdparty/OpenXLSX/vcpkg.json +24 -0
- package/thirdparty/README.md +42 -0
- package/thirdparty/miniz/.clang-format +47 -0
- package/thirdparty/miniz/.travis.yml +2 -0
- package/thirdparty/miniz/CMakeLists.txt +333 -0
- package/thirdparty/miniz/CMakePresets.json +31 -0
- package/thirdparty/miniz/ChangeLog.md +272 -0
- package/thirdparty/miniz/Config.cmake.in +1 -0
- package/thirdparty/miniz/LICENSE +22 -0
- package/thirdparty/miniz/amalgamate.sh +57 -0
- package/thirdparty/miniz/examples/example1.c +105 -0
- package/thirdparty/miniz/examples/example2.c +164 -0
- package/thirdparty/miniz/examples/example3.c +269 -0
- package/thirdparty/miniz/examples/example4.c +102 -0
- package/thirdparty/miniz/examples/example5.c +327 -0
- package/thirdparty/miniz/examples/example6.c +189 -0
- package/thirdparty/miniz/meson.build +21 -0
- package/thirdparty/miniz/miniz.c +646 -0
- package/thirdparty/miniz/miniz.h +615 -0
- package/thirdparty/miniz/miniz.pc.in +13 -0
- package/thirdparty/miniz/miniz_common.h +89 -0
- package/thirdparty/miniz/miniz_export.h +20 -0
- package/thirdparty/miniz/miniz_tdef.c +1602 -0
- package/thirdparty/miniz/miniz_tdef.h +199 -0
- package/thirdparty/miniz/miniz_tinfl.c +778 -0
- package/thirdparty/miniz/miniz_tinfl.h +150 -0
- package/thirdparty/miniz/miniz_zip.c +4895 -0
- package/thirdparty/miniz/miniz_zip.h +454 -0
- package/thirdparty/miniz/readme.md +46 -0
- package/thirdparty/miniz/test.sh +36 -0
- package/thirdparty/miniz/tests/add_in_place_fuzzer.c +87 -0
- package/thirdparty/miniz/tests/catch_amalgamated.cpp +10795 -0
- package/thirdparty/miniz/tests/catch_amalgamated.hpp +13143 -0
- package/thirdparty/miniz/tests/checksum_fuzzer.c +26 -0
- package/thirdparty/miniz/tests/compress_fuzzer.c +91 -0
- package/thirdparty/miniz/tests/flush_fuzzer.c +88 -0
- package/thirdparty/miniz/tests/fuzz_main.c +55 -0
- package/thirdparty/miniz/tests/large_fuzzer.c +133 -0
- package/thirdparty/miniz/tests/main.cpp +185 -0
- package/thirdparty/miniz/tests/miniz_tdefl_fuzzer.cc +115 -0
- package/thirdparty/miniz/tests/miniz_tester.cpp +1881 -0
- package/thirdparty/miniz/tests/miniz_zip_validate_fuzzer.cc +71 -0
- package/thirdparty/miniz/tests/miniz_zip_writer_fuzzer.cc +96 -0
- package/thirdparty/miniz/tests/ossfuzz.sh +48 -0
- package/thirdparty/miniz/tests/small_fuzzer.c +126 -0
- package/thirdparty/miniz/tests/timer.cpp +152 -0
- package/thirdparty/miniz/tests/timer.h +40 -0
- package/thirdparty/miniz/tests/uncompress2_fuzzer.c +21 -0
- package/thirdparty/miniz/tests/uncompress_fuzzer.c +30 -0
- package/thirdparty/miniz/tests/zip.dict +9 -0
- package/thirdparty/miniz/tests/zip_fuzzer.c +63 -0
- package/thirdparty/pugixml/.codecov.yml +7 -0
- package/thirdparty/pugixml/.gitattributes +1 -0
- package/thirdparty/pugixml/CMakeLists.txt +330 -0
- package/thirdparty/pugixml/LICENSE.md +24 -0
- package/thirdparty/pugixml/Makefile +98 -0
- package/thirdparty/pugixml/README.md +81 -0
- package/thirdparty/pugixml/SECURITY.md +9 -0
- package/thirdparty/pugixml/appveyor.yml +50 -0
- package/thirdparty/pugixml/docs/config.adoc +7 -0
- package/thirdparty/pugixml/docs/images/dom_tree.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_link1.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_link2.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_pch1.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_pch2.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_pch3.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2005_pch4.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2010_link1.png +0 -0
- package/thirdparty/pugixml/docs/images/vs2010_link2.png +0 -0
- package/thirdparty/pugixml/docs/manual.adoc +3326 -0
- package/thirdparty/pugixml/docs/manual.html +6395 -0
- package/thirdparty/pugixml/docs/quickstart.adoc +287 -0
- package/thirdparty/pugixml/docs/quickstart.html +1107 -0
- package/thirdparty/pugixml/docs/samples/character.xml +8 -0
- package/thirdparty/pugixml/docs/samples/custom_memory_management.cpp +27 -0
- package/thirdparty/pugixml/docs/samples/include.cpp +64 -0
- package/thirdparty/pugixml/docs/samples/load_error_handling.cpp +33 -0
- package/thirdparty/pugixml/docs/samples/load_file.cpp +16 -0
- package/thirdparty/pugixml/docs/samples/load_memory.cpp +66 -0
- package/thirdparty/pugixml/docs/samples/load_options.cpp +30 -0
- package/thirdparty/pugixml/docs/samples/load_stream.cpp +97 -0
- package/thirdparty/pugixml/docs/samples/modify_add.cpp +29 -0
- package/thirdparty/pugixml/docs/samples/modify_base.cpp +43 -0
- package/thirdparty/pugixml/docs/samples/modify_remove.cpp +27 -0
- package/thirdparty/pugixml/docs/samples/save_custom_writer.cpp +116 -0
- package/thirdparty/pugixml/docs/samples/save_declaration.cpp +27 -0
- package/thirdparty/pugixml/docs/samples/save_file.cpp +17 -0
- package/thirdparty/pugixml/docs/samples/save_options.cpp +48 -0
- package/thirdparty/pugixml/docs/samples/save_stream.cpp +18 -0
- package/thirdparty/pugixml/docs/samples/save_subtree.cpp +26 -0
- package/thirdparty/pugixml/docs/samples/text.cpp +35 -0
- package/thirdparty/pugixml/docs/samples/transitions.xml +7 -0
- package/thirdparty/pugixml/docs/samples/traverse_base.cpp +51 -0
- package/thirdparty/pugixml/docs/samples/traverse_iter.cpp +27 -0
- package/thirdparty/pugixml/docs/samples/traverse_predicate.cpp +48 -0
- package/thirdparty/pugixml/docs/samples/traverse_rangefor.cpp +32 -0
- package/thirdparty/pugixml/docs/samples/traverse_walker.cpp +35 -0
- package/thirdparty/pugixml/docs/samples/tree.xml +12 -0
- package/thirdparty/pugixml/docs/samples/weekly-shift_jis.xml +78 -0
- package/thirdparty/pugixml/docs/samples/weekly-utf-16.xml +0 -0
- package/thirdparty/pugixml/docs/samples/weekly-utf-8.xml +78 -0
- package/thirdparty/pugixml/docs/samples/xgconsole.xml +12 -0
- package/thirdparty/pugixml/docs/samples/xpath_error.cpp +43 -0
- package/thirdparty/pugixml/docs/samples/xpath_query.cpp +36 -0
- package/thirdparty/pugixml/docs/samples/xpath_select.cpp +28 -0
- package/thirdparty/pugixml/docs/samples/xpath_variables.cpp +38 -0
- package/thirdparty/pugixml/readme.txt +50 -0
- package/thirdparty/pugixml/scripts/archive.py +54 -0
- package/thirdparty/pugixml/scripts/cocoapods_push.sh +4 -0
- package/thirdparty/pugixml/scripts/natvis/pugixml.natvis +77 -0
- package/thirdparty/pugixml/scripts/natvis/pugixml_compact.natvis +506 -0
- package/thirdparty/pugixml/scripts/nuget/build/native/pugixml-propertiesui.xml +17 -0
- package/thirdparty/pugixml/scripts/nuget/build/native/pugixml.targets +28 -0
- package/thirdparty/pugixml/scripts/nuget/pugixml.nuspec +20 -0
- package/thirdparty/pugixml/scripts/nuget_build.ps1 +60 -0
- package/thirdparty/pugixml/scripts/premake4.lua +92 -0
- package/thirdparty/pugixml/scripts/pugixml-config.cmake.in +12 -0
- package/thirdparty/pugixml/scripts/pugixml.pc.in +11 -0
- package/thirdparty/pugixml/scripts/pugixml.podspec +14 -0
- package/thirdparty/pugixml/scripts/pugixml.xcodeproj/project.pbxproj +212 -0
- package/thirdparty/pugixml/scripts/pugixml_airplay.mkf +13 -0
- package/thirdparty/pugixml/scripts/pugixml_codeblocks.cbp +44 -0
- package/thirdparty/pugixml/scripts/pugixml_codelite.project +56 -0
- package/thirdparty/pugixml/scripts/pugixml_dll.rc +45 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2005.vcproj +343 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2005_static.vcproj +343 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2008.vcproj +339 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2008_static.vcproj +339 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2010.vcxproj +191 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2010_static.vcxproj +191 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2013.vcxproj +199 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2013_static.vcxproj +199 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2015.vcxproj +172 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2015_static.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2017.vcxproj +172 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2017_static.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2019.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2019_static.vcxproj +180 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2022.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2022_static.vcxproj +180 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2026.vcxproj +176 -0
- package/thirdparty/pugixml/scripts/pugixml_vs2026_static.vcxproj +180 -0
- package/thirdparty/pugixml/scripts/sbom.cdx.json +47 -0
- package/thirdparty/pugixml/src/pugiconfig.hpp +81 -0
- package/thirdparty/pugixml/src/pugixml.cpp +13776 -0
- package/thirdparty/pugixml/src/pugixml.hpp +1604 -0
- package/thirdparty/pugixml/tests/allocator.cpp +175 -0
- package/thirdparty/pugixml/tests/allocator.hpp +10 -0
- package/thirdparty/pugixml/tests/autotest-appveyor.ps1 +93 -0
- package/thirdparty/pugixml/tests/cmake-appveyor.ps1 +57 -0
- package/thirdparty/pugixml/tests/data/empty.xml +0 -0
- package/thirdparty/pugixml/tests/data/large.xml +1 -0
- package/thirdparty/pugixml/tests/data/latintest_latin1.xml +1 -0
- package/thirdparty/pugixml/tests/data/latintest_utf8.xml +1 -0
- package/thirdparty/pugixml/tests/data/multiline.xml +3 -0
- package/thirdparty/pugixml/tests/data/small.xml +1 -0
- package/thirdparty/pugixml/tests/data/truncation.xml +19 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_be.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_be_bom.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_be_clean.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_be_nodecl.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_le.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_le_bom.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_le_clean.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf16_le_nodecl.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_be.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_be_bom.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_be_clean.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_be_nodecl.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_le.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_le_bom.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_le_clean.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf32_le_nodecl.xml +0 -0
- package/thirdparty/pugixml/tests/data/utftest_utf8.xml +87 -0
- package/thirdparty/pugixml/tests/data/utftest_utf8_bom.xml +87 -0
- package/thirdparty/pugixml/tests/data/utftest_utf8_clean.xml +84 -0
- package/thirdparty/pugixml/tests/data/utftest_utf8_nodecl.xml +86 -0
- package/thirdparty/pugixml/tests/data//321/202/320/265/321/201/321/202.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/basic.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/doctype.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/refs.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/types.xml +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/utf16.xml +0 -0
- package/thirdparty/pugixml/tests/data_fuzz_parse/utf32.xml +0 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/basic.xpath +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/functions.xpath +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/math.xpath +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/path.xpath +1 -0
- package/thirdparty/pugixml/tests/data_fuzz_xpath/predicate.xpath +1 -0
- package/thirdparty/pugixml/tests/fuzz_parse.cpp +14 -0
- package/thirdparty/pugixml/tests/fuzz_parse.dict +72 -0
- package/thirdparty/pugixml/tests/fuzz_setup.sh +11 -0
- package/thirdparty/pugixml/tests/fuzz_xpath.cpp +46 -0
- package/thirdparty/pugixml/tests/fuzz_xpath.dict +72 -0
- package/thirdparty/pugixml/tests/helpers.hpp +114 -0
- package/thirdparty/pugixml/tests/main.cpp +218 -0
- package/thirdparty/pugixml/tests/test.cpp +220 -0
- package/thirdparty/pugixml/tests/test.hpp +175 -0
- package/thirdparty/pugixml/tests/test_compact.cpp +150 -0
- package/thirdparty/pugixml/tests/test_deprecated.cpp +25 -0
- package/thirdparty/pugixml/tests/test_document.cpp +1910 -0
- package/thirdparty/pugixml/tests/test_dom_modify.cpp +2122 -0
- package/thirdparty/pugixml/tests/test_dom_text.cpp +601 -0
- package/thirdparty/pugixml/tests/test_dom_traverse.cpp +1481 -0
- package/thirdparty/pugixml/tests/test_header_guard.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_iosfwd_1.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_iosfwd_2.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_iostream_1.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_iostream_2.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_only_1.cpp +21 -0
- package/thirdparty/pugixml/tests/test_header_only_2.cpp +21 -0
- package/thirdparty/pugixml/tests/test_header_string_1.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_string_2.cpp +3 -0
- package/thirdparty/pugixml/tests/test_header_string_iostream.cpp +5 -0
- package/thirdparty/pugixml/tests/test_memory.cpp +303 -0
- package/thirdparty/pugixml/tests/test_parse.cpp +1463 -0
- package/thirdparty/pugixml/tests/test_parse_doctype.cpp +366 -0
- package/thirdparty/pugixml/tests/test_unicode.cpp +152 -0
- package/thirdparty/pugixml/tests/test_version.cpp +5 -0
- package/thirdparty/pugixml/tests/test_write.cpp +757 -0
- package/thirdparty/pugixml/tests/test_xpath.cpp +833 -0
- package/thirdparty/pugixml/tests/test_xpath_api.cpp +646 -0
- package/thirdparty/pugixml/tests/test_xpath_functions.cpp +844 -0
- package/thirdparty/pugixml/tests/test_xpath_operators.cpp +566 -0
- package/thirdparty/pugixml/tests/test_xpath_parse.cpp +428 -0
- package/thirdparty/pugixml/tests/test_xpath_paths.cpp +787 -0
- package/thirdparty/pugixml/tests/test_xpath_paths_abbrev_w3c.cpp +219 -0
- package/thirdparty/pugixml/tests/test_xpath_paths_w3c.cpp +312 -0
- package/thirdparty/pugixml/tests/test_xpath_variables.cpp +683 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_1.cpp +411 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_2.cpp +417 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_3.cpp +321 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_4.cpp +300 -0
- package/thirdparty/pugixml/tests/test_xpath_xalan_5.cpp +295 -0
- package/thirdparty/pugixml/tests/writer_string.cpp +79 -0
- package/thirdparty/pugixml/tests/writer_string.hpp +27 -0
- package/ios/dummy.swift +0 -2
- package/scripts/prepare-openxlsx.js +0 -109
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.5...3.30)
|
|
2
|
+
|
|
3
|
+
# Policy configuration; this *MUST* be specified before project is defined
|
|
4
|
+
if(POLICY CMP0091)
|
|
5
|
+
cmake_policy(SET CMP0091 NEW) # Enables use of MSVC_RUNTIME_LIBRARY
|
|
6
|
+
endif()
|
|
7
|
+
|
|
8
|
+
project(pugixml VERSION 1.16 LANGUAGES CXX)
|
|
9
|
+
|
|
10
|
+
include(CMakePackageConfigHelpers)
|
|
11
|
+
include(CMakeDependentOption)
|
|
12
|
+
include(GNUInstallDirs)
|
|
13
|
+
|
|
14
|
+
cmake_dependent_option(PUGIXML_USE_VERSIONED_LIBDIR
|
|
15
|
+
"Use a private subdirectory to install the headers and libraries" OFF
|
|
16
|
+
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
|
|
17
|
+
|
|
18
|
+
cmake_dependent_option(PUGIXML_USE_POSTFIX
|
|
19
|
+
"Use separate postfix for each configuration to make sure you can install multiple build outputs" OFF
|
|
20
|
+
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
|
|
21
|
+
|
|
22
|
+
cmake_dependent_option(PUGIXML_STATIC_CRT
|
|
23
|
+
"Use static MSVC RT libraries" OFF
|
|
24
|
+
"MSVC" OFF)
|
|
25
|
+
|
|
26
|
+
cmake_dependent_option(PUGIXML_BUILD_TESTS
|
|
27
|
+
"Build pugixml tests" OFF
|
|
28
|
+
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
|
|
29
|
+
|
|
30
|
+
# Custom build defines
|
|
31
|
+
set(PUGIXML_BUILD_DEFINES CACHE STRING "Build defines for custom options")
|
|
32
|
+
separate_arguments(PUGIXML_BUILD_DEFINES)
|
|
33
|
+
|
|
34
|
+
# Public headers
|
|
35
|
+
set(PUGIXML_HEADERS
|
|
36
|
+
${PROJECT_SOURCE_DIR}/src/pugiconfig.hpp
|
|
37
|
+
${PROJECT_SOURCE_DIR}/src/pugixml.hpp
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
set(PUGIXML_SOURCE ${PROJECT_SOURCE_DIR}/src/pugixml.cpp)
|
|
41
|
+
|
|
42
|
+
# Technically not needed for this file. This is builtin CMAKE global variable.
|
|
43
|
+
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
|
|
44
|
+
|
|
45
|
+
# Expose option to build PUGIXML as static as well when the global BUILD_SHARED_LIBS variable is set
|
|
46
|
+
cmake_dependent_option(PUGIXML_BUILD_SHARED_AND_STATIC_LIBS
|
|
47
|
+
"Build both shared and static libraries" OFF
|
|
48
|
+
"BUILD_SHARED_LIBS" OFF)
|
|
49
|
+
|
|
50
|
+
option(PUGIXML_INSTALL "Enable installation rules" ON)
|
|
51
|
+
cmake_dependent_option(PUGIXML_INSTALL_SOURCE
|
|
52
|
+
"Install pugixml.cpp alongside headers" OFF
|
|
53
|
+
"PUGIXML_INSTALL" OFF)
|
|
54
|
+
|
|
55
|
+
# Expose options from the pugiconfig.hpp
|
|
56
|
+
option(PUGIXML_WCHAR_MODE "Enable wchar_t mode" OFF)
|
|
57
|
+
option(PUGIXML_COMPACT "Enable compact mode" OFF)
|
|
58
|
+
option(PUGIXML_CHARCONV_FLOAT "Enable charconv number conversion" OFF)
|
|
59
|
+
|
|
60
|
+
# Advanced options from pugiconfig.hpp
|
|
61
|
+
option(PUGIXML_NO_XPATH "Disable XPath" OFF)
|
|
62
|
+
option(PUGIXML_NO_STL "Disable STL" OFF)
|
|
63
|
+
option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF)
|
|
64
|
+
mark_as_advanced(PUGIXML_NO_XPATH PUGIXML_NO_STL PUGIXML_NO_EXCEPTIONS)
|
|
65
|
+
|
|
66
|
+
if (APPLE)
|
|
67
|
+
option(PUGIXML_BUILD_APPLE_FRAMEWORK "Build as Apple Frameworks" OFF)
|
|
68
|
+
endif()
|
|
69
|
+
|
|
70
|
+
set(PUGIXML_PUBLIC_DEFINITIONS
|
|
71
|
+
$<$<BOOL:${PUGIXML_WCHAR_MODE}>:PUGIXML_WCHAR_MODE>
|
|
72
|
+
$<$<BOOL:${PUGIXML_COMPACT}>:PUGIXML_COMPACT>
|
|
73
|
+
$<$<BOOL:${PUGIXML_CHARCONV_FLOAT}>:PUGIXML_CHARCONV_FLOAT>
|
|
74
|
+
$<$<BOOL:${PUGIXML_NO_XPATH}>:PUGIXML_NO_XPATH>
|
|
75
|
+
$<$<BOOL:${PUGIXML_NO_STL}>:PUGIXML_NO_STL>
|
|
76
|
+
$<$<BOOL:${PUGIXML_NO_EXCEPTIONS}>:PUGIXML_NO_EXCEPTIONS>
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# This is used to backport a CMake 3.15 feature, but is also forwards compatible
|
|
80
|
+
if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
|
81
|
+
set(CMAKE_MSVC_RUNTIME_LIBRARY
|
|
82
|
+
MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<NOT:$<BOOL:${PUGIXML_STATIC_CRT}>>:DLL>)
|
|
83
|
+
endif()
|
|
84
|
+
|
|
85
|
+
# Set the default C++ standard to C++17 if not set; CMake will automatically downgrade this if the compiler does not support it
|
|
86
|
+
# When CMAKE_CXX_STANDARD_REQUIRED is set, we fall back to C++11 to avoid breaking older compilers
|
|
87
|
+
if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED AND NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMAKE_VERSION VERSION_LESS 3.8)
|
|
88
|
+
|
|
89
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
90
|
+
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
|
|
91
|
+
elseif (NOT DEFINED CMAKE_CXX_STANDARD)
|
|
92
|
+
set(CMAKE_CXX_STANDARD 11)
|
|
93
|
+
endif()
|
|
94
|
+
|
|
95
|
+
if (PUGIXML_USE_POSTFIX)
|
|
96
|
+
set(CMAKE_RELWITHDEBINFO_POSTFIX _r)
|
|
97
|
+
set(CMAKE_MINSIZEREL_POSTFIX _m)
|
|
98
|
+
set(CMAKE_DEBUG_POSTFIX _d)
|
|
99
|
+
endif()
|
|
100
|
+
|
|
101
|
+
if (CMAKE_VERSION VERSION_LESS 3.15)
|
|
102
|
+
set(msvc-rt $<TARGET_PROPERTY:MSVC_RUNTIME_LIBRARY>)
|
|
103
|
+
|
|
104
|
+
set(msvc-rt-mtd-shared $<STREQUAL:${msvc-rt},MultiThreadedDebugDLL>)
|
|
105
|
+
set(msvc-rt-mtd-static $<STREQUAL:${msvc-rt},MultiThreadedDebug>)
|
|
106
|
+
set(msvc-rt-mt-shared $<STREQUAL:${msvc-rt},MultiThreadedDLL>)
|
|
107
|
+
set(msvc-rt-mt-static $<STREQUAL:${msvc-rt},MultiThreaded>)
|
|
108
|
+
unset(msvc-rt)
|
|
109
|
+
|
|
110
|
+
set(msvc-rt-mtd-shared $<${msvc-rt-mtd-shared}:-MDd>)
|
|
111
|
+
set(msvc-rt-mtd-static $<${msvc-rt-mtd-static}:-MTd>)
|
|
112
|
+
set(msvc-rt-mt-shared $<${msvc-rt-mt-shared}:-MD>)
|
|
113
|
+
set(msvc-rt-mt-static $<${msvc-rt-mt-static}:-MT>)
|
|
114
|
+
endif()
|
|
115
|
+
|
|
116
|
+
set(versioned-dir $<$<BOOL:${PUGIXML_USE_VERSIONED_LIBDIR}>:/pugixml-${PROJECT_VERSION}>)
|
|
117
|
+
|
|
118
|
+
set(libs)
|
|
119
|
+
|
|
120
|
+
if (BUILD_SHARED_LIBS)
|
|
121
|
+
add_library(pugixml-shared SHARED
|
|
122
|
+
${PROJECT_SOURCE_DIR}/scripts/pugixml_dll.rc
|
|
123
|
+
${PUGIXML_SOURCE}
|
|
124
|
+
${PUGIXML_HEADERS})
|
|
125
|
+
add_library(pugixml::shared ALIAS pugixml-shared)
|
|
126
|
+
list(APPEND libs pugixml-shared)
|
|
127
|
+
string(CONCAT pugixml.msvc $<OR:
|
|
128
|
+
$<STREQUAL:${CMAKE_CXX_COMPILER_FRONTEND_VARIANT},MSVC>,
|
|
129
|
+
$<CXX_COMPILER_ID:MSVC>
|
|
130
|
+
>)
|
|
131
|
+
|
|
132
|
+
set_property(TARGET pugixml-shared PROPERTY EXPORT_NAME shared)
|
|
133
|
+
target_include_directories(pugixml-shared
|
|
134
|
+
PUBLIC
|
|
135
|
+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>)
|
|
136
|
+
target_compile_definitions(pugixml-shared
|
|
137
|
+
PUBLIC
|
|
138
|
+
${PUGIXML_BUILD_DEFINES}
|
|
139
|
+
${PUGIXML_PUBLIC_DEFINITIONS}
|
|
140
|
+
PRIVATE
|
|
141
|
+
PUGIXML_API=$<IF:${pugixml.msvc},__declspec\(dllexport\),__attribute__\(\(visibility\("default"\)\)\)>
|
|
142
|
+
)
|
|
143
|
+
target_compile_options(pugixml-shared
|
|
144
|
+
PRIVATE
|
|
145
|
+
${msvc-rt-mtd-shared}
|
|
146
|
+
${msvc-rt-mtd-static}
|
|
147
|
+
${msvc-rt-mt-shared}
|
|
148
|
+
${msvc-rt-mt-static})
|
|
149
|
+
target_compile_features(pugixml-shared
|
|
150
|
+
PRIVATE
|
|
151
|
+
$<$<BOOL:${PUGIXML_CHARCONV_FLOAT}>:cxx_std_17>
|
|
152
|
+
)
|
|
153
|
+
endif()
|
|
154
|
+
|
|
155
|
+
if (NOT BUILD_SHARED_LIBS OR PUGIXML_BUILD_SHARED_AND_STATIC_LIBS)
|
|
156
|
+
add_library(pugixml-static STATIC
|
|
157
|
+
${PUGIXML_SOURCE}
|
|
158
|
+
${PUGIXML_HEADERS})
|
|
159
|
+
add_library(pugixml::static ALIAS pugixml-static)
|
|
160
|
+
list(APPEND libs pugixml-static)
|
|
161
|
+
|
|
162
|
+
set_property(TARGET pugixml-static PROPERTY EXPORT_NAME static)
|
|
163
|
+
target_include_directories(pugixml-static
|
|
164
|
+
PUBLIC
|
|
165
|
+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>)
|
|
166
|
+
target_compile_definitions(pugixml-static
|
|
167
|
+
PUBLIC
|
|
168
|
+
${PUGIXML_BUILD_DEFINES}
|
|
169
|
+
${PUGIXML_PUBLIC_DEFINITIONS})
|
|
170
|
+
target_compile_options(pugixml-static
|
|
171
|
+
PRIVATE
|
|
172
|
+
${msvc-rt-mtd-shared}
|
|
173
|
+
${msvc-rt-mtd-static}
|
|
174
|
+
${msvc-rt-mt-shared}
|
|
175
|
+
${msvc-rt-mt-static})
|
|
176
|
+
target_compile_features(pugixml-static
|
|
177
|
+
PRIVATE
|
|
178
|
+
$<$<BOOL:${PUGIXML_CHARCONV_FLOAT}>:cxx_std_17>
|
|
179
|
+
)
|
|
180
|
+
endif()
|
|
181
|
+
|
|
182
|
+
if (BUILD_SHARED_LIBS)
|
|
183
|
+
set(pugixml-alias pugixml-shared)
|
|
184
|
+
else()
|
|
185
|
+
set(pugixml-alias pugixml-static)
|
|
186
|
+
endif()
|
|
187
|
+
add_library(pugixml INTERFACE)
|
|
188
|
+
target_link_libraries(pugixml INTERFACE ${pugixml-alias})
|
|
189
|
+
add_library(pugixml::pugixml ALIAS pugixml)
|
|
190
|
+
|
|
191
|
+
set_target_properties(${libs}
|
|
192
|
+
PROPERTIES
|
|
193
|
+
MSVC_RUNTIME_LIBRARY ${CMAKE_MSVC_RUNTIME_LIBRARY}
|
|
194
|
+
EXCLUDE_FROM_ALL ON
|
|
195
|
+
POSITION_INDEPENDENT_CODE ON
|
|
196
|
+
SOVERSION ${PROJECT_VERSION_MAJOR}
|
|
197
|
+
VERSION ${PROJECT_VERSION}
|
|
198
|
+
OUTPUT_NAME pugixml)
|
|
199
|
+
|
|
200
|
+
set_target_properties(${libs}
|
|
201
|
+
PROPERTIES
|
|
202
|
+
EXCLUDE_FROM_ALL OFF)
|
|
203
|
+
set(install-targets pugixml ${libs})
|
|
204
|
+
|
|
205
|
+
if (PUGIXML_BUILD_APPLE_FRAMEWORK)
|
|
206
|
+
set_target_properties(${libs} PROPERTIES
|
|
207
|
+
FRAMEWORK TRUE
|
|
208
|
+
FRAMEWORK_VERSION ${PROJECT_VERSION}
|
|
209
|
+
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.github.zeux.pugixml"
|
|
210
|
+
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
|
|
211
|
+
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
|
|
212
|
+
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO"
|
|
213
|
+
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO"
|
|
214
|
+
PUBLIC_HEADER "${PUGIXML_HEADERS}"
|
|
215
|
+
MACOSX_FRAMEWORK_IDENTIFIER "com.github.zeux.pugixml"
|
|
216
|
+
MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION}
|
|
217
|
+
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}
|
|
218
|
+
MACOSX_RPATH TRUE
|
|
219
|
+
)
|
|
220
|
+
endif()
|
|
221
|
+
|
|
222
|
+
configure_package_config_file(
|
|
223
|
+
"${PROJECT_SOURCE_DIR}/scripts/pugixml-config.cmake.in"
|
|
224
|
+
"${PROJECT_BINARY_DIR}/pugixml-config.cmake"
|
|
225
|
+
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
226
|
+
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
|
227
|
+
NO_SET_AND_CHECK_MACRO)
|
|
228
|
+
|
|
229
|
+
write_basic_package_version_file(
|
|
230
|
+
"${PROJECT_BINARY_DIR}/pugixml-config-version.cmake"
|
|
231
|
+
COMPATIBILITY SameMajorVersion)
|
|
232
|
+
|
|
233
|
+
if (PUGIXML_USE_POSTFIX)
|
|
234
|
+
if(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
|
235
|
+
set(LIB_POSTFIX ${CMAKE_RELWITHDEBINFO_POSTFIX})
|
|
236
|
+
elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel)
|
|
237
|
+
set(LIB_POSTFIX ${CMAKE_MINSIZEREL_POSTFIX})
|
|
238
|
+
elseif(CMAKE_BUILD_TYPE MATCHES Debug)
|
|
239
|
+
set(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
|
240
|
+
endif()
|
|
241
|
+
endif()
|
|
242
|
+
|
|
243
|
+
# Handle both relative and absolute paths (e.g. NixOS) for a relocatable package
|
|
244
|
+
if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
245
|
+
set(PUGIXML_PC_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
246
|
+
else()
|
|
247
|
+
set(PUGIXML_PC_INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
|
|
248
|
+
endif()
|
|
249
|
+
if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
|
|
250
|
+
set(PUGIXML_PC_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
|
|
251
|
+
else()
|
|
252
|
+
set(PUGIXML_PC_LIBDIR "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
|
|
253
|
+
endif()
|
|
254
|
+
configure_file(scripts/pugixml.pc.in pugixml.pc @ONLY)
|
|
255
|
+
|
|
256
|
+
export(TARGETS ${install-targets}
|
|
257
|
+
NAMESPACE pugixml::
|
|
258
|
+
FILE pugixml-targets.cmake)
|
|
259
|
+
|
|
260
|
+
if(PUGIXML_INSTALL)
|
|
261
|
+
if (NOT DEFINED PUGIXML_RUNTIME_COMPONENT)
|
|
262
|
+
set(PUGIXML_RUNTIME_COMPONENT Runtime)
|
|
263
|
+
endif()
|
|
264
|
+
|
|
265
|
+
if (NOT DEFINED PUGIXML_LIBRARY_COMPONENT)
|
|
266
|
+
set(PUGIXML_LIBRARY_COMPONENT Library)
|
|
267
|
+
endif()
|
|
268
|
+
|
|
269
|
+
if (NOT DEFINED PUGIXML_DEVELOPMENT_COMPONENT)
|
|
270
|
+
set(PUGIXML_DEVELOPMENT_COMPONENT Development)
|
|
271
|
+
endif()
|
|
272
|
+
|
|
273
|
+
set(namelink-component)
|
|
274
|
+
if (NOT CMAKE_VERSION VERSION_LESS 3.12)
|
|
275
|
+
set(namelink-component NAMELINK_COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
|
276
|
+
endif()
|
|
277
|
+
install(TARGETS ${install-targets}
|
|
278
|
+
EXPORT pugixml-targets
|
|
279
|
+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${PUGIXML_RUNTIME_COMPONENT}
|
|
280
|
+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_LIBRARY_COMPONENT} ${namelink-component}
|
|
281
|
+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}
|
|
282
|
+
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir}
|
|
283
|
+
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime OPTIONAL
|
|
284
|
+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
285
|
+
|
|
286
|
+
install(EXPORT pugixml-targets
|
|
287
|
+
NAMESPACE pugixml::
|
|
288
|
+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
|
289
|
+
|
|
290
|
+
install(FILES
|
|
291
|
+
"${PROJECT_BINARY_DIR}/pugixml-config-version.cmake"
|
|
292
|
+
"${PROJECT_BINARY_DIR}/pugixml-config.cmake"
|
|
293
|
+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
|
294
|
+
|
|
295
|
+
install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc
|
|
296
|
+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
|
297
|
+
|
|
298
|
+
install(FILES ${PUGIXML_HEADERS}
|
|
299
|
+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
|
300
|
+
|
|
301
|
+
if (PUGIXML_INSTALL_SOURCE)
|
|
302
|
+
install(FILES ${PUGIXML_SOURCE}
|
|
303
|
+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
|
304
|
+
endif()
|
|
305
|
+
endif()
|
|
306
|
+
|
|
307
|
+
if (PUGIXML_BUILD_TESTS)
|
|
308
|
+
include(CTest)
|
|
309
|
+
set(fuzz-pattern "tests/fuzz_*.cpp")
|
|
310
|
+
set(test-pattern "tests/*.cpp")
|
|
311
|
+
if (CMAKE_VERSION VERSION_GREATER 3.11)
|
|
312
|
+
list(INSERT fuzz-pattern 0 CONFIGURE_DEPENDS)
|
|
313
|
+
list(INSERT test-pattern 0 CONFIGURE_DEPENDS)
|
|
314
|
+
endif()
|
|
315
|
+
file(GLOB test-sources ${test-pattern})
|
|
316
|
+
file(GLOB fuzz-sources ${fuzz-pattern})
|
|
317
|
+
list(REMOVE_ITEM test-sources ${fuzz-sources})
|
|
318
|
+
|
|
319
|
+
add_custom_target(check
|
|
320
|
+
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
|
|
321
|
+
|
|
322
|
+
add_executable(pugixml-check ${test-sources})
|
|
323
|
+
add_test(NAME pugixml::test
|
|
324
|
+
COMMAND pugixml-check
|
|
325
|
+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
|
326
|
+
add_dependencies(check pugixml-check)
|
|
327
|
+
target_link_libraries(pugixml-check
|
|
328
|
+
PRIVATE
|
|
329
|
+
pugixml::pugixml)
|
|
330
|
+
endif()
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2006-2026 Arseny Kapoulkine
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
|
6
|
+
obtaining a copy of this software and associated documentation
|
|
7
|
+
files (the "Software"), to deal in the Software without
|
|
8
|
+
restriction, including without limitation the rights to use,
|
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the
|
|
11
|
+
Software is furnished to do so, subject to the following
|
|
12
|
+
conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be
|
|
15
|
+
included in all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
.SUFFIXES:
|
|
2
|
+
MAKEFLAGS+=-r
|
|
3
|
+
|
|
4
|
+
config=debug
|
|
5
|
+
defines=standard
|
|
6
|
+
cxxstd=any
|
|
7
|
+
|
|
8
|
+
BUILD=build/make-$(firstword $(CXX))-$(config)-$(defines)-$(cxxstd)
|
|
9
|
+
|
|
10
|
+
SOURCES=src/pugixml.cpp $(filter-out tests/fuzz_%,$(wildcard tests/*.cpp))
|
|
11
|
+
EXECUTABLE=$(BUILD)/test
|
|
12
|
+
|
|
13
|
+
VERSION=$(shell sed -n 's/.*version \(.*\).*/\1/p; /version/q' src/pugiconfig.hpp)
|
|
14
|
+
RELEASE=$(filter-out scripts/archive.py docs/%.adoc,$(shell git ls-files docs scripts src CMakeLists.txt LICENSE.md readme.txt))
|
|
15
|
+
|
|
16
|
+
CXXFLAGS=-g -Wall -Wextra -Werror -pedantic -Wundef -Wshadow -Wcast-align -Wcast-qual -Wold-style-cast -Wdouble-promotion
|
|
17
|
+
LDFLAGS=
|
|
18
|
+
|
|
19
|
+
ifeq ($(config),release)
|
|
20
|
+
CXXFLAGS+=-O3 -DNDEBUG
|
|
21
|
+
endif
|
|
22
|
+
|
|
23
|
+
ifeq ($(config),coverage)
|
|
24
|
+
CXXFLAGS+=-coverage
|
|
25
|
+
LDFLAGS+=-coverage
|
|
26
|
+
endif
|
|
27
|
+
|
|
28
|
+
ifeq ($(config),sanitize)
|
|
29
|
+
CXXFLAGS+=-fsanitize=address,undefined -fno-sanitize-recover=all
|
|
30
|
+
LDFLAGS+=-fsanitize=address,undefined
|
|
31
|
+
endif
|
|
32
|
+
|
|
33
|
+
ifeq ($(config),analyze)
|
|
34
|
+
CXXFLAGS+=--analyze
|
|
35
|
+
endif
|
|
36
|
+
|
|
37
|
+
ifneq ($(defines),standard)
|
|
38
|
+
COMMA=,
|
|
39
|
+
CXXFLAGS+=-D $(subst $(COMMA), -D ,$(defines))
|
|
40
|
+
endif
|
|
41
|
+
|
|
42
|
+
ifneq ($(findstring PUGIXML_NO_EXCEPTIONS,$(defines)),)
|
|
43
|
+
CXXFLAGS+=-fno-exceptions
|
|
44
|
+
endif
|
|
45
|
+
|
|
46
|
+
ifneq ($(cxxstd),any)
|
|
47
|
+
CXXFLAGS+=-std=$(cxxstd)
|
|
48
|
+
endif
|
|
49
|
+
|
|
50
|
+
OBJECTS=$(SOURCES:%=$(BUILD)/%.o)
|
|
51
|
+
|
|
52
|
+
all: $(EXECUTABLE)
|
|
53
|
+
|
|
54
|
+
ifeq ($(config),coverage)
|
|
55
|
+
test: $(EXECUTABLE)
|
|
56
|
+
-@find $(BUILD) -name '*.gcda' -exec rm {} +
|
|
57
|
+
./$(EXECUTABLE)
|
|
58
|
+
@gcov -b -o $(BUILD)/src/ pugixml.cpp.gcda | sed -e '/./{H;$!d;}' -e 'x;/pugixml.cpp/!d;'
|
|
59
|
+
@find . -name '*.gcov' -and -not -name 'pugixml.cpp.gcov' -exec rm {} +
|
|
60
|
+
@sed -i -e "s/#####\(.*\)\(\/\/ unreachable.*\)/ 1\1\2/" pugixml.cpp.gcov
|
|
61
|
+
else
|
|
62
|
+
test: $(EXECUTABLE)
|
|
63
|
+
./$(EXECUTABLE)
|
|
64
|
+
endif
|
|
65
|
+
|
|
66
|
+
fuzz_%: $(BUILD)/fuzz_%
|
|
67
|
+
@mkdir -p build/$@
|
|
68
|
+
$< build/$@ tests/data_fuzz_$* -max_len=1024 -dict=tests/fuzz_$*.dict -fork=16
|
|
69
|
+
|
|
70
|
+
clean:
|
|
71
|
+
rm -rf $(BUILD)
|
|
72
|
+
|
|
73
|
+
release: build/pugixml-$(VERSION).tar.gz build/pugixml-$(VERSION).zip
|
|
74
|
+
|
|
75
|
+
docs: docs/quickstart.html docs/manual.html
|
|
76
|
+
|
|
77
|
+
build/pugixml-%: .FORCE | $(RELEASE)
|
|
78
|
+
@mkdir -p $(BUILD)
|
|
79
|
+
TIMESTAMP=`git show v$(VERSION) -s --format=%ct` && python3 scripts/archive.py $@ pugixml-$(VERSION) $$TIMESTAMP $|
|
|
80
|
+
|
|
81
|
+
$(EXECUTABLE): $(OBJECTS)
|
|
82
|
+
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
|
|
83
|
+
|
|
84
|
+
$(BUILD)/fuzz_%: tests/fuzz_%.cpp src/pugixml.cpp
|
|
85
|
+
@mkdir -p $(BUILD)
|
|
86
|
+
$(CXX) $(CXXFLAGS) -fsanitize=address,fuzzer $^ -o $@
|
|
87
|
+
|
|
88
|
+
$(BUILD)/%.o: %
|
|
89
|
+
@mkdir -p $(dir $@)
|
|
90
|
+
$(CXX) $< $(CXXFLAGS) -c -MMD -MP -o $@
|
|
91
|
+
|
|
92
|
+
-include $(OBJECTS:.o=.d)
|
|
93
|
+
|
|
94
|
+
.SECONDEXPANSION:
|
|
95
|
+
docs/%.html: docs/%.adoc $$(shell sed -n 's/include\:\:\(.*\)\[.*/docs\/\1/p' docs/%.adoc)
|
|
96
|
+
asciidoctor -b html5 -a version=$(VERSION) $< -o $@
|
|
97
|
+
|
|
98
|
+
.PHONY: all test clean release .FORCE
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
pugixml [](https://github.com/zeux/pugixml/actions) [](https://ci.appveyor.com/project/zeux/pugixml) [](https://codecov.io/github/zeux/pugixml?branch=master) 
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification
|
|
5
|
+
capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
|
|
6
|
+
implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface
|
|
7
|
+
variants and conversions between different Unicode encodings (which happen automatically during parsing/saving).
|
|
8
|
+
|
|
9
|
+
pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface.
|
|
10
|
+
|
|
11
|
+
## Documentation
|
|
12
|
+
|
|
13
|
+
Documentation for the current release of pugixml is available on-line as two separate documents:
|
|
14
|
+
|
|
15
|
+
* [Quick-start guide](https://pugixml.org/docs/quickstart.html), that aims to provide enough information to start using the library;
|
|
16
|
+
* [Complete reference manual](https://pugixml.org/docs/manual.html), that describes all features of the library in detail.
|
|
17
|
+
|
|
18
|
+
You’re advised to start with the quick-start guide; however, many important library features are either not described in it at all or only mentioned briefly; if you require more information you should read the complete manual.
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
Here's an example of how code using pugixml looks; it opens an XML file, goes over all Tool nodes and prints tools that have a Timeout attribute greater than 0:
|
|
23
|
+
|
|
24
|
+
```c++
|
|
25
|
+
#include "pugixml.hpp"
|
|
26
|
+
#include <iostream>
|
|
27
|
+
|
|
28
|
+
int main()
|
|
29
|
+
{
|
|
30
|
+
pugi::xml_document doc;
|
|
31
|
+
pugi::xml_parse_result result = doc.load_file("xgconsole.xml");
|
|
32
|
+
if (!result)
|
|
33
|
+
return -1;
|
|
34
|
+
|
|
35
|
+
for (pugi::xml_node tool: doc.child("Profile").child("Tools").children("Tool"))
|
|
36
|
+
{
|
|
37
|
+
int timeout = tool.attribute("Timeout").as_int();
|
|
38
|
+
|
|
39
|
+
if (timeout > 0)
|
|
40
|
+
std::cout << "Tool " << tool.attribute("Filename").value() << " has timeout " << timeout << "\n";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
And the same example using XPath:
|
|
46
|
+
|
|
47
|
+
```c++
|
|
48
|
+
#include "pugixml.hpp"
|
|
49
|
+
#include <iostream>
|
|
50
|
+
|
|
51
|
+
int main()
|
|
52
|
+
{
|
|
53
|
+
pugi::xml_document doc;
|
|
54
|
+
pugi::xml_parse_result result = doc.load_file("xgconsole.xml");
|
|
55
|
+
if (!result)
|
|
56
|
+
return -1;
|
|
57
|
+
|
|
58
|
+
pugi::xpath_node_set tools_with_timeout = doc.select_nodes("/Profile/Tools/Tool[@Timeout > 0]");
|
|
59
|
+
|
|
60
|
+
for (pugi::xpath_node node: tools_with_timeout)
|
|
61
|
+
{
|
|
62
|
+
pugi::xml_node tool = node.node();
|
|
63
|
+
std::cout << "Tool " << tool.attribute("Filename").value() <<
|
|
64
|
+
" has timeout " << tool.attribute("Timeout").as_int() << "\n";
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
This library is available to anybody free of charge, under the terms of MIT License (see LICENSE.md).
|
|
73
|
+
|
|
74
|
+
This work is based on the pugxml parser, which carried the following Public Domain dedication:
|
|
75
|
+
|
|
76
|
+
// Pug XML Parser - Version 1.0002
|
|
77
|
+
// --------------------------------------------------------
|
|
78
|
+
// Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
|
|
79
|
+
// Released into the Public Domain. Use at your own risk.
|
|
80
|
+
// See pugxml.xml for further information, history, etc.
|
|
81
|
+
// Contributions by Neville Franks (readonly@getsoft.com).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Please verify that the vulnerabilities reported can be reproduced on the [latest released version](https://github.com/zeux/pugixml/releases).
|
|
6
|
+
|
|
7
|
+
## Reporting a Vulnerability
|
|
8
|
+
|
|
9
|
+
Vulnerabilities can be reported via e-mail to the [project maintainer](https://github.com/zeux).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
branches:
|
|
2
|
+
only:
|
|
3
|
+
- master
|
|
4
|
+
|
|
5
|
+
image:
|
|
6
|
+
- Visual Studio 2026
|
|
7
|
+
- Visual Studio 2022
|
|
8
|
+
- Visual Studio 2019
|
|
9
|
+
- Visual Studio 2017
|
|
10
|
+
- Visual Studio 2015
|
|
11
|
+
|
|
12
|
+
version: "{branch}-{build}"
|
|
13
|
+
|
|
14
|
+
for:
|
|
15
|
+
- matrix:
|
|
16
|
+
only:
|
|
17
|
+
- image: Visual Studio 2026
|
|
18
|
+
install:
|
|
19
|
+
- pip install --upgrade cmake
|
|
20
|
+
|
|
21
|
+
build_script:
|
|
22
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\scripts\nuget_build.ps1 2017}
|
|
23
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") { .\scripts\nuget_build.ps1 2019}
|
|
24
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") { .\scripts\nuget_build.ps1 2022}
|
|
25
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2026") { .\scripts\nuget_build.ps1 2026}
|
|
26
|
+
|
|
27
|
+
test_script:
|
|
28
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\cmake-appveyor.ps1 9 2008 }
|
|
29
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\cmake-appveyor.ps1 12 2013 }
|
|
30
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\cmake-appveyor.ps1 14 2015 }
|
|
31
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\tests\cmake-appveyor.ps1 15 2017 }
|
|
32
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") { .\tests\cmake-appveyor.ps1 16 2019 }
|
|
33
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") { .\tests\cmake-appveyor.ps1 17 2022 }
|
|
34
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2026") { .\tests\cmake-appveyor.ps1 18 2026 }
|
|
35
|
+
|
|
36
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\autotest-appveyor.ps1 9 x86 standard }
|
|
37
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\autotest-appveyor.ps1 10 x64 standard }
|
|
38
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\autotest-appveyor.ps1 11 x86 PUGIXML_WCHAR_MODE }
|
|
39
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\autotest-appveyor.ps1 12 x64 PUGIXML_COMPACT }
|
|
40
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\autotest-appveyor.ps1 14 x64 standard }
|
|
41
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\tests\autotest-appveyor.ps1 15 x86 standard }
|
|
42
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") { .\tests\autotest-appveyor.ps1 19 x86 PUGIXML_COMPACT }
|
|
43
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") { .\tests\autotest-appveyor.ps1 22 x64 PUGIXML_WCHAR_MODE }
|
|
44
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2026") { .\tests\autotest-appveyor.ps1 26 x64 standard }
|
|
45
|
+
|
|
46
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { & C:\cygwin\bin\bash.exe -c "PATH=/usr/bin:/usr/local/bin:$PATH; make -j2 config=coverage test && bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov 2>&1" }
|
|
47
|
+
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { & C:\cygwin\bin\bash.exe -c "PATH=/usr/bin:/usr/local/bin:$PATH; make -j2 config=coverage defines=PUGIXML_WCHAR_MODE test && bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov 2>&1" }
|
|
48
|
+
|
|
49
|
+
artifacts:
|
|
50
|
+
- path: .\scripts\*.nupkg
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|