0
0
mirror of https://github.com/zeux/pugixml.git synced 2026-01-18 17:21:30 +01:00

1846 Commits

Author SHA1 Message Date
Arseny Kapoulkine
710052066c Update copyright year to 2026 2026-01-02 09:58:14 -08:00
Arseny Kapoulkine
61c944895e docs: Fix typo in comment
The remove_attribute call removes 'value' attribute; 'id' attribute is
removed later in the sample.

Fixes #684.
2025-09-01 14:45:30 -07:00
Arseny Kapoulkine
e86ffc5b47 Merge pull request #683 from sankhesh/global_ctor
Remove global constructor from pugixml
2025-08-25 17:48:12 -07:00
Sankhesh Jhaveri
706982acd6 Remove global constructor from pugixml
This avoids any consumers of pugixml from seeing an unwanted global.
2025-08-25 17:05:12 -04:00
Arseny Kapoulkine
5a1892b321 Fix minor stylistic/"analysis" nits
- Explicitly ignore strcpy_insitu return value in node_copy_string; if it
fails, we must be out of memory and we leave the relevant destination
fields empty, similarly to other OOMs during copying

- Use the same code for eval_number of string/node set; these are slightly
different semantically, as eval_string is an implicit conversion, but the
code ends up the same.

Closes #674, #675.
2025-05-15 12:13:30 +03:00
Thrita
c4cca93ad1 PUGIXML_BUILD_APPLE_FRAMEWORK now includes framework headers (#655) 2025-05-07 22:11:31 +03:00
Arseny Kapoulkine
b0801735cd Merge pull request #672 from mosfet80/patch-1
Update build.yml to fix node deprecation warnings
2025-04-24 08:07:32 -07:00
mosfet80
390515a31b Update build.yml
Update default runtime to node20 (fix node deprecation warning)
2025-04-24 09:54:53 +02:00
Arseny Kapoulkine
657c33ae34 XPath: Silence static analysis false positive
klockworks reports that var->name() may be NULL; it can never be NULL
for a valid variable, but this check costs us nothing to add so we might
as well add it.
2025-04-17 10:48:19 -07:00
Arseny Kapoulkine
3cdb7f4ae2 Coverity Scan fixes and adjustments
- In remove_duplicates, `sizeof(void**)` was used improperly for
  allocation and memsetting instead of `void*`; these are equivalent but
  the extra pointer is redundant.

- Remove `var_deref_model` silencing annotation, as it is now redundant
  due to changes in 709ba74b24
2025-04-17 10:39:52 -07:00
Arseny Kapoulkine
caade5a28a Merge pull request #665 from bilbothebaggins/master
#659 License Info Cleanup
2025-03-03 11:19:30 -08:00
Arseny Kapoulkine
7144cc453d Adjust comment structure slightly 2025-03-03 11:07:08 -08:00
bilbothebaggins
11090789b4 #659 License Info Cleanup
Added SPDX Headers; moved pugxml Public Domain reference to README.md
2025-03-02 10:39:08 +01:00
Arseny Kapoulkine
066b6583a4 Merge pull request #664 from zeux/emptybuf
Early out in load_buffer for empty inputs to avoid allocations
2025-02-19 09:33:22 -08:00
Arseny Kapoulkine
709ba74b24 Early out in load_buffer for empty inputs to avoid allocations
Previously, calling xml_document::load_string on an empty buffer
resulted in a single byte allocation for the buffer copy; this
allocation was redundant as no data was parsed, so we now add the same
early-out that already exists in xml_parser::parse to load_buffer_impl.
2025-02-19 08:19:28 -08:00
Arseny Kapoulkine
a340834408 Update upload-artifact to v4 to fix build due to deprecation 2025-02-16 08:24:54 -08:00
Arseny Kapoulkine
8f17faf1ca Merge pull request #663 from luzpaz/typo
docs: fix typo
2025-02-16 08:20:28 -08:00
Luz Paz
762abf1c57 docs: fix typo
Found via `codespell -q 3 -D ../dictionary.txt -L parametere,thirdparty`
2025-02-16 09:08:02 -05:00
Arseny Kapoulkine
a305d01bc8 Merge pull request #662 from e-kwsm/virtual
style: remove redundant 'virtual' for the 'override'-specified functions
2025-01-26 13:41:23 -08:00
Eisuke Kawashima
081e8a3227 style: remove redundant 'virtual' for the 'override'-specified functions 2025-01-25 11:06:11 +09:00
Arseny Kapoulkine
9d7fcbf741 docs: Update quickstart guide after version update 2025-01-10 11:22:25 -08:00
Arseny Kapoulkine
ee86beb30e scripts: Remove -appveyor version prefix from NuGet packages
This was originally intended as a safety measure to avoid mixing
packages built via AppVeyor vs packages built via other means, but this
just creates friction because of the need to edit the version field
before publishing the package.
latest v1.15
2025-01-10 10:15:31 -08:00
Arseny Kapoulkine
e7ed748b02 Update library version to 1.15 and update docs 2025-01-10 08:48:52 -08:00
Arseny Kapoulkine
b299231ff7 Update copyright year to 2025 2025-01-10 07:31:00 -08:00
Treata
06318b084a Add support for Apple framework builds (#653)
Add CMake option PUGIXML_BUILD_APPLE_FRAMEWORKS to build PugiXML as Apple Frameworks.

This is needed to be able to create iOS-derived compatible app bundles which need to embed PugiXML as framework, as using dylibs is prohibited by Apple.
2025-01-02 11:11:51 -08:00
Arseny Kapoulkine
4bc14418d1 Merge pull request #650 from hughsie/hughsie/sbom
Add a SBOM template in CycloneDX format
2024-11-29 08:04:18 -08:00
Richard Hughes
752afbf4df Add a SBOM template in CycloneDX format
Improve supply chain security by including a SBOM file with substituted values.

This will be used to construct a composite platform SBOM.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2024-11-26 18:07:45 +00:00
Arseny Kapoulkine
8c3038f9c8 Update CMake version to 3.5...3.30
This should retain compatibility with earlier version of CMake and suppress
the deprecation warning for quite some time.
2024-11-17 08:25:06 +09:00
Arseny Kapoulkine
f1f532acfc docs: Reword last bullet point of thread safety guarantees
This was worded somewhat confusingly; we should be explicit that it's
okay to access multiple documents concurrently as long as access to each
one is serialized.
2024-11-05 07:43:54 -08:00
Arseny Kapoulkine
3480faa837 Merge pull request #642 from zeux/string-view-def
Auto-detect std::string_view support by default
2024-11-04 10:20:38 -08:00
Arseny Kapoulkine
0f22f71f60 CMake now uses C++17 if supported by the compiler
We only set this when C++ version or requirement flag is not overridden
externally to be able to rely on CMake automatically downgrading the
standard version when the compiler doesn't support it.

CXX_STANDARD 17 also requires CMake 3.8 or later; on earlier versions we
use the old behavior and set C++11.
2024-10-30 14:18:39 -07:00
Arseny Kapoulkine
781e2dbe5d Merge pull request #643 from zeux/cmake-test
Enhance CMake testing in CI
2024-10-30 14:10:26 -07:00
Arseny Kapoulkine
f1f1b4e0dd Add basic CMake testing to AppVeyor
To reduce build time impact we just do a quick smoke test (configure &
build).
2024-10-30 13:27:13 -07:00
Arseny Kapoulkine
25b508056c Add unix-cmake test to GHA
To not inflate the build matrix too much, just use the default settings;
we mostly need this to test the CMake flow, not to test the actual code.
2024-10-30 13:02:56 -07:00
Arseny Kapoulkine
ae163d5f06 Enable C++17 support in VS2019 and VS2022 projects
This enables std::string_view support for NuGet builds
2024-10-30 11:46:36 -07:00
Arseny Kapoulkine
af6cbeb170 Enable C++17 standard in AppVeyor tests
To avoid increasing the build matrix we enable this unconditionally for
VS2019 and VS2022 to be able to test std::string_view. Note that we
already test VS2022 without this flag on GHA so this should catch any
regressions.
2024-10-30 11:25:17 -07:00
Arseny Kapoulkine
d5f14adb3c docs: Update documentation to address PUGIXML_HAS_STRING_VIEW changes
The PUGIXML_STRING_VIEW define is no longer necessary but
_HAS_STRING_VIEW can be enabled manually if the compiler supports it
without advertising C++17 support.
2024-10-30 10:36:36 -07:00
Arseny Kapoulkine
ca4f7cfecc Auto-detect std::string_view support by default
Instead of opting in std::string_view support via PUGIXML_STRING_VIEW
define, always enable it when C++17 is supported; this still requires
enabling C++17 support in the compiler, which this change doesn't
attempt to do yet.
2024-10-30 10:31:49 -07:00
dantargz
4d0043fb6c Update VERSION in Makefile and add documentation for string_view_t (#641)
We now document PUGIXML_HAS_STRING_VIEW and PUGIXML_STRING_VIEW (the latter will be removed in the future) configuration as well as string_view_t type and overloads.

Makefile also had to be fixed to recognize the version properly after pugixml.hpp changes.
2024-10-28 08:06:42 -07:00
Arseny Kapoulkine
2729d80c94 Makefile now defaults to cxxstd=any (#639)
This means that by default we inherit the default language version
supported by the compiler; this will help with string_view testing
in the future as it will "just work" out of the box once the define is
set.

This should also automatically enable CI coverage for string_view; C++11
is still explicitly tested in CI via cxxstd=c++11.
2024-10-28 08:05:36 -07:00
Arseny Kapoulkine
23e617b158 Warn if PUGIXML_STRING_VIEW is set without CMAKE_CXX_STANDARD (#638)
Even if the compiler supports C++17, we define CMAKE_CXX_STANDARD as 11
by default which implicitly disables string_view support; for now warn
in this case.
2024-10-26 10:20:06 -07:00
dantargz
13beda24b8 Add remaining std::string_view overloads (#636)
Add remaining overloads and supporting unit tests. This concludes the initial phase of std::string_view support; for now the support is still opt-in via PUGIXML_STRING_VIEW define, but that will become unnecessary (enabled-by-default) in a future version.
2024-10-24 14:10:09 -07:00
Arseny Kapoulkine
7e702740ff Merge pull request #623 from r-barnes/master
throw() -> noexcept
2024-10-22 18:59:45 -07:00
Arseny Kapoulkine
d713fd2315 Define PUGIXML_NOEXCEPT as throw()
This is necessary to avoid gcc warnings for exception::what()
2024-10-22 13:36:47 -07:00
dantargz
a0db6e2185 Initial support for std::string_view (#633)
When PUGIXML_STRING_VIEW define is set and C++17 is available, add std::string_view support to a few functions. In the future, string view support will be enabled without the need for an extra define, but for now the support is opt-in to reduce compatibility risks.

PR is based on initial contribution by @brandl-muc.
2024-10-22 13:31:54 -07:00
Arseny Kapoulkine
3b17184379 docs: Work around asciidoc bug with TOC numbering
For some reason using a code import right before a header breaks
numbering on that header; fix by moving the import above text.
2024-09-12 09:49:35 -07:00
Richard Barnes
6247ece208 throw() -> noexcept 2024-07-16 06:48:23 -07:00
Arseny Kapoulkine
30cc354fe3 Merge pull request #621 from aral-matrix/master
xmldocument::save: use encoding interpreted by get_write_encoding in buffered_writer constructor
2024-07-08 09:35:57 -07:00
aral-matrix
2039e448cf use encoding interpreted by get_write_encoding in buffered_writer constructor 2024-07-07 11:19:52 +02:00
Arseny Kapoulkine
2d42114ed1 Merge pull request #620 from zeux/nostl-warnfix
Work around 'unreferenced function' warnings in NO_STL builds
2024-07-06 08:55:52 -07:00