Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2b4664030 | ||
|
|
3cc2daf449 | ||
|
|
96aebcb8ae | ||
|
|
86591a97c3 | ||
|
|
8fef4591be | ||
|
|
cf466ce2a2 | ||
|
|
499750ad95 | ||
|
|
cd420ab193 | ||
|
|
d99aa003ba | ||
|
|
1e3d6f15f5 | ||
|
|
2e8a2a4e1c | ||
|
|
0bd2848f33 | ||
|
|
43d7d568a7 | ||
|
|
44236fef2c | ||
|
|
6909df2478 | ||
|
|
b15bc6bf1f | ||
|
|
33f709379a | ||
|
|
4d42ba7a60 | ||
|
|
d75a081aa3 | ||
|
|
1ade1d4bea | ||
|
|
94b19a3c45 | ||
|
|
76dec417a6 | ||
|
|
6699559320 | ||
|
|
dab3a2f858 | ||
|
|
60d9656cb7 | ||
|
|
08b966e24f | ||
|
|
2e357d19a3 | ||
|
|
b138778fd9 | ||
|
|
3cfe51b72d | ||
|
|
ef856bf975 | ||
|
|
efce4a8d7a | ||
|
|
a468d5c438 | ||
|
|
9d8d193288 |
@ -10,7 +10,6 @@ project(pugixml VERSION 1.14 LANGUAGES CXX)
|
|||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
include(CTest)
|
|
||||||
|
|
||||||
cmake_dependent_option(PUGIXML_USE_VERSIONED_LIBDIR
|
cmake_dependent_option(PUGIXML_USE_VERSIONED_LIBDIR
|
||||||
"Use a private subdirectory to install the headers and libraries" OFF
|
"Use a private subdirectory to install the headers and libraries" OFF
|
||||||
@ -26,7 +25,7 @@ cmake_dependent_option(PUGIXML_STATIC_CRT
|
|||||||
|
|
||||||
cmake_dependent_option(PUGIXML_BUILD_TESTS
|
cmake_dependent_option(PUGIXML_BUILD_TESTS
|
||||||
"Build pugixml tests" OFF
|
"Build pugixml tests" OFF
|
||||||
"BUILD_TESTING;CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
|
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
|
||||||
|
|
||||||
# Custom build defines
|
# Custom build defines
|
||||||
set(PUGIXML_BUILD_DEFINES CACHE STRING "Build defines for custom options")
|
set(PUGIXML_BUILD_DEFINES CACHE STRING "Build defines for custom options")
|
||||||
@ -43,6 +42,7 @@ cmake_dependent_option(PUGIXML_BUILD_SHARED_AND_STATIC_LIBS
|
|||||||
# Expose options from the pugiconfig.hpp
|
# Expose options from the pugiconfig.hpp
|
||||||
option(PUGIXML_WCHAR_MODE "Enable wchar_t mode" OFF)
|
option(PUGIXML_WCHAR_MODE "Enable wchar_t mode" OFF)
|
||||||
option(PUGIXML_COMPACT "Enable compact mode" OFF)
|
option(PUGIXML_COMPACT "Enable compact mode" OFF)
|
||||||
|
option(PUGIXML_INSTALL "Enable installation rules" ON)
|
||||||
|
|
||||||
# Advanced options from pugiconfig.hpp
|
# Advanced options from pugiconfig.hpp
|
||||||
option(PUGIXML_NO_XPATH "Disable XPath" OFF)
|
option(PUGIXML_NO_XPATH "Disable XPath" OFF)
|
||||||
@ -194,52 +194,56 @@ endif()
|
|||||||
|
|
||||||
configure_file(scripts/pugixml.pc.in pugixml.pc @ONLY)
|
configure_file(scripts/pugixml.pc.in pugixml.pc @ONLY)
|
||||||
|
|
||||||
if (NOT DEFINED PUGIXML_RUNTIME_COMPONENT)
|
export(TARGETS ${install-targets}
|
||||||
set(PUGIXML_RUNTIME_COMPONENT Runtime)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED PUGIXML_LIBRARY_COMPONENT)
|
|
||||||
set(PUGIXML_LIBRARY_COMPONENT Library)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED PUGIXML_DEVELOPMENT_COMPONENT)
|
|
||||||
set(PUGIXML_DEVELOPMENT_COMPONENT Development)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(namelink-component)
|
|
||||||
if (NOT CMAKE_VERSION VERSION_LESS 3.12)
|
|
||||||
set(namelink-component NAMELINK_COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
|
||||||
endif()
|
|
||||||
install(TARGETS ${install-targets}
|
|
||||||
EXPORT pugixml-targets
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${PUGIXML_RUNTIME_COMPONENT}
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_LIBRARY_COMPONENT} ${namelink-component}
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}
|
|
||||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir})
|
|
||||||
|
|
||||||
install(EXPORT pugixml-targets
|
|
||||||
NAMESPACE pugixml::
|
NAMESPACE pugixml::
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
FILE pugixml-targets.cmake)
|
||||||
|
|
||||||
export(EXPORT pugixml-targets
|
if(PUGIXML_INSTALL)
|
||||||
NAMESPACE pugixml::)
|
if (NOT DEFINED PUGIXML_RUNTIME_COMPONENT)
|
||||||
|
set(PUGIXML_RUNTIME_COMPONENT Runtime)
|
||||||
|
endif()
|
||||||
|
|
||||||
install(FILES
|
if (NOT DEFINED PUGIXML_LIBRARY_COMPONENT)
|
||||||
"${PROJECT_BINARY_DIR}/pugixml-config-version.cmake"
|
set(PUGIXML_LIBRARY_COMPONENT Library)
|
||||||
"${PROJECT_BINARY_DIR}/pugixml-config.cmake"
|
endif()
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
|
||||||
|
|
||||||
install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc
|
if (NOT DEFINED PUGIXML_DEVELOPMENT_COMPONENT)
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
set(PUGIXML_DEVELOPMENT_COMPONENT Development)
|
||||||
|
endif()
|
||||||
|
|
||||||
install(
|
set(namelink-component)
|
||||||
FILES
|
if (NOT CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
"${PROJECT_SOURCE_DIR}/src/pugiconfig.hpp"
|
set(namelink-component NAMELINK_COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||||
"${PROJECT_SOURCE_DIR}/src/pugixml.hpp"
|
endif()
|
||||||
DESTINATION
|
install(TARGETS ${install-targets}
|
||||||
${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
EXPORT pugixml-targets
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${PUGIXML_RUNTIME_COMPONENT}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_LIBRARY_COMPONENT} ${namelink-component}
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}
|
||||||
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir})
|
||||||
|
|
||||||
|
install(EXPORT pugixml-targets
|
||||||
|
NAMESPACE pugixml::
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
"${PROJECT_BINARY_DIR}/pugixml-config-version.cmake"
|
||||||
|
"${PROJECT_BINARY_DIR}/pugixml-config.cmake"
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||||
|
|
||||||
|
install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES
|
||||||
|
"${PROJECT_SOURCE_DIR}/src/pugiconfig.hpp"
|
||||||
|
"${PROJECT_SOURCE_DIR}/src/pugixml.hpp"
|
||||||
|
DESTINATION
|
||||||
|
${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (PUGIXML_BUILD_TESTS)
|
if (PUGIXML_BUILD_TESTS)
|
||||||
|
include(CTest)
|
||||||
set(fuzz-pattern "tests/fuzz_*.cpp")
|
set(fuzz-pattern "tests/fuzz_*.cpp")
|
||||||
set(test-pattern "tests/*.cpp")
|
set(test-pattern "tests/*.cpp")
|
||||||
if (CMAKE_VERSION VERSION_GREATER 3.11)
|
if (CMAKE_VERSION VERSION_GREATER 3.11)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2006-2023 Arseny Kapoulkine
|
Copyright (c) 2006-2024 Arseny Kapoulkine
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
|
|||||||
4
Makefile
4
Makefile
@ -27,7 +27,7 @@ ifeq ($(config),coverage)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(config),sanitize)
|
ifeq ($(config),sanitize)
|
||||||
CXXFLAGS+=-fsanitize=address,undefined -fno-sanitize=float-divide-by-zero,float-cast-overflow -fno-sanitize-recover=all
|
CXXFLAGS+=-fsanitize=address,undefined -fno-sanitize-recover=all
|
||||||
LDFLAGS+=-fsanitize=address,undefined
|
LDFLAGS+=-fsanitize=address,undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ endif
|
|||||||
|
|
||||||
fuzz_%: $(BUILD)/fuzz_%
|
fuzz_%: $(BUILD)/fuzz_%
|
||||||
@mkdir -p build/$@
|
@mkdir -p build/$@
|
||||||
$< build/$@ tests/data_fuzz_$* -max_len=1024 -dict=tests/fuzz_$*.dict
|
$< build/$@ tests/data_fuzz_$* -max_len=1024 -dict=tests/fuzz_$*.dict -fork=16
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILD)
|
rm -rf $(BUILD)
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
image:
|
image:
|
||||||
- Visual Studio 2022
|
- Visual Studio 2022
|
||||||
- Visual Studio 2019
|
- Visual Studio 2019
|
||||||
@ -18,8 +22,8 @@ test_script:
|
|||||||
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\tests\autotest-appveyor.ps1 15 }
|
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\tests\autotest-appveyor.ps1 15 }
|
||||||
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") { .\tests\autotest-appveyor.ps1 19 }
|
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") { .\tests\autotest-appveyor.ps1 19 }
|
||||||
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") { .\tests\autotest-appveyor.ps1 22 }
|
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") { .\tests\autotest-appveyor.ps1 22 }
|
||||||
- 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 config=coverage test && bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov 2>&1" }
|
- 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" }
|
||||||
- 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 config=coverage defines=PUGIXML_WCHAR_MODE test && bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov 2>&1" }
|
- 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" }
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: .\scripts\*.nupkg
|
- path: .\scripts\*.nupkg
|
||||||
|
|||||||
@ -46,7 +46,7 @@ Thanks to *Vyacheslav Egorov* for documentation proofreading and fuzz testing.
|
|||||||
The pugixml library is distributed under the MIT license:
|
The pugixml library is distributed under the MIT license:
|
||||||
|
|
||||||
....
|
....
|
||||||
Copyright (c) 2006-2023 Arseny Kapoulkine
|
Copyright (c) 2006-2024 Arseny Kapoulkine
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
@ -74,7 +74,7 @@ This means that you can freely use pugixml in your applications, both open-sourc
|
|||||||
|
|
||||||
....
|
....
|
||||||
This software is based on pugixml library (https://pugixml.org).
|
This software is based on pugixml library (https://pugixml.org).
|
||||||
pugixml is Copyright (C) 2006-2023 Arseny Kapoulkine.
|
pugixml is Copyright (C) 2006-2024 Arseny Kapoulkine.
|
||||||
....
|
....
|
||||||
|
|
||||||
[[install]]
|
[[install]]
|
||||||
@ -749,7 +749,7 @@ These flags control the resulting tree contents:
|
|||||||
* [[parse_embed_pcdata]]`parse_embed_pcdata` determines if PCDATA contents is to be saved as element values. Normally element nodes have names but not values; this flag forces the parser to store the contents as a value if PCDATA is the first child of the element node (otherwise PCDATA node is created as usual). This can significantly reduce the memory required for documents with many PCDATA nodes. To retrieve the data you can use `xml_node::value()` on the element nodes or any of the higher-level functions like `child_value` or `text`. This flag is *off* by default.
|
* [[parse_embed_pcdata]]`parse_embed_pcdata` determines if PCDATA contents is to be saved as element values. Normally element nodes have names but not values; this flag forces the parser to store the contents as a value if PCDATA is the first child of the element node (otherwise PCDATA node is created as usual). This can significantly reduce the memory required for documents with many PCDATA nodes. To retrieve the data you can use `xml_node::value()` on the element nodes or any of the higher-level functions like `child_value` or `text`. This flag is *off* by default.
|
||||||
Since this flag significantly changes the DOM structure it is only recommended for parsing documents with many PCDATA nodes in memory-constrained environments. This flag is *off* by default.
|
Since this flag significantly changes the DOM structure it is only recommended for parsing documents with many PCDATA nodes in memory-constrained environments. This flag is *off* by default.
|
||||||
|
|
||||||
* [[parse_merge_pcdata]]`parse_merge_pcdata` determines if PCDATA contents is to be merged with the previous PCDATA node when no intermediary nodes are present between them. If the PCDATA contains CDATA sections, PI nodes, or comments in between, and either of the flags <<parse_cdata,parse_cdata>> ,<<parse_pi,parse_pi>> ,<<parse_comments,parse_comments>> is not set, the contents of the PCDATA node will be merged with the previous one. This flag is *off* by default.
|
* [[parse_merge_pcdata]]`parse_merge_pcdata` determines if PCDATA contents is to be merged with the previous PCDATA node when no intermediary nodes are present between them. If the PCDATA contains CDATA sections, PI nodes, or comments in between, and either of the flags <<parse_cdata,parse_cdata>> ,<<parse_pi,parse_pi>> ,<<parse_comments,parse_comments>> is not set, the contents of the PCDATA node will be merged with the previous one. This flag is *off* by default. Note that this flag is not compatible with `parse_embed_pcdata`.
|
||||||
|
|
||||||
* [[parse_fragment]]`parse_fragment` determines if document should be treated as a fragment of a valid XML. Parsing document as a fragment leads to top-level PCDATA content (i.e. text that is not located inside a node) to be added to a tree, and additionally treats documents without element nodes as valid and permits multiple top-level element nodes (currently multiple top-level element nodes are also permitted when the flag is off, but that behavior should not be relied on). This flag is *off* by default.
|
* [[parse_fragment]]`parse_fragment` determines if document should be treated as a fragment of a valid XML. Parsing document as a fragment leads to top-level PCDATA content (i.e. text that is not located inside a node) to be added to a tree, and additionally treats documents without element nodes as valid and permits multiple top-level element nodes (currently multiple top-level element nodes are also permitted when the flag is off, but that behavior should not be relied on). This flag is *off* by default.
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="generator" content="Asciidoctor 2.0.18">
|
<meta name="generator" content="Asciidoctor 2.0.20">
|
||||||
<meta name="author" content="website, repository">
|
<meta name="author" content="website, repository">
|
||||||
<title>pugixml 1.14 manual</title>
|
<title>pugixml 1.14 manual</title>
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
||||||
@ -209,13 +209,10 @@ table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
|
|||||||
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
|
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
|
||||||
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
||||||
.exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
|
.exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
|
||||||
.exampleblock>.content>:first-child{margin-top:0}
|
|
||||||
.exampleblock>.content>:last-child{margin-bottom:0}
|
|
||||||
.sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
|
.sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
|
||||||
.sidebarblock>:first-child{margin-top:0}
|
|
||||||
.sidebarblock>:last-child{margin-bottom:0}
|
|
||||||
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
||||||
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
|
||||||
|
.exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
||||||
.literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
|
.literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
|
||||||
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
|
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
|
||||||
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
|
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
|
||||||
@ -394,7 +391,7 @@ b.conum *{color:inherit!important}
|
|||||||
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
|
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
|
||||||
h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
|
h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
|
||||||
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
|
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
|
||||||
p,blockquote,dt,td.content,span.alt,summary{font-size:1.0625rem}
|
p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
|
||||||
p{margin-bottom:1.25rem}
|
p{margin-bottom:1.25rem}
|
||||||
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
||||||
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
||||||
@ -710,7 +707,7 @@ No documentation is perfect; neither is this one. If you find errors or omission
|
|||||||
</div>
|
</div>
|
||||||
<div class="literalblock">
|
<div class="literalblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>Copyright (c) 2006-2023 Arseny Kapoulkine
|
<pre>Copyright (c) 2006-2024 Arseny Kapoulkine
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
@ -740,7 +737,7 @@ OTHER DEALINGS IN THE SOFTWARE.</pre>
|
|||||||
<div class="literalblock">
|
<div class="literalblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>This software is based on pugixml library (https://pugixml.org).
|
<pre>This software is based on pugixml library (https://pugixml.org).
|
||||||
pugixml is Copyright (C) 2006-2023 Arseny Kapoulkine.</pre>
|
pugixml is Copyright (C) 2006-2024 Arseny Kapoulkine.</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1802,7 +1799,7 @@ You should use the usual bitwise arithmetics to manipulate the bitmask: to enabl
|
|||||||
Since this flag significantly changes the DOM structure it is only recommended for parsing documents with many PCDATA nodes in memory-constrained environments. This flag is <strong>off</strong> by default.</p>
|
Since this flag significantly changes the DOM structure it is only recommended for parsing documents with many PCDATA nodes in memory-constrained environments. This flag is <strong>off</strong> by default.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p><a id="parse_merge_pcdata"></a><code>parse_merge_pcdata</code> determines if PCDATA contents is to be merged with the previous PCDATA node when no intermediary nodes are present between them. If the PCDATA contains CDATA sections, PI nodes, or comments in between, and either of the flags <a href="#parse_cdata">parse_cdata</a> ,<a href="#parse_pi">parse_pi</a> ,<a href="#parse_comments">parse_comments</a> is not set, the contents of the PCDATA node will be merged with the previous one. This flag is <strong>off</strong> by default.</p>
|
<p><a id="parse_merge_pcdata"></a><code>parse_merge_pcdata</code> determines if PCDATA contents is to be merged with the previous PCDATA node when no intermediary nodes are present between them. If the PCDATA contains CDATA sections, PI nodes, or comments in between, and either of the flags <a href="#parse_cdata">parse_cdata</a> ,<a href="#parse_pi">parse_pi</a> ,<a href="#parse_comments">parse_comments</a> is not set, the contents of the PCDATA node will be merged with the previous one. This flag is <strong>off</strong> by default. Note that this flag is not compatible with <code>parse_embed_pcdata</code>.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p><a id="parse_fragment"></a><code>parse_fragment</code> determines if document should be treated as a fragment of a valid XML. Parsing document as a fragment leads to top-level PCDATA content (i.e. text that is not located inside a node) to be added to a tree, and additionally treats documents without element nodes as valid and permits multiple top-level element nodes (currently multiple top-level element nodes are also permitted when the flag is off, but that behavior should not be relied on). This flag is <strong>off</strong> by default.</p>
|
<p><a id="parse_fragment"></a><code>parse_fragment</code> determines if document should be treated as a fragment of a valid XML. Parsing document as a fragment leads to top-level PCDATA content (i.e. text that is not located inside a node) to be added to a tree, and additionally treats documents without element nodes as valid and permits multiple top-level element nodes (currently multiple top-level element nodes are also permitted when the flag is off, but that behavior should not be relied on). This flag is <strong>off</strong> by default.</p>
|
||||||
@ -6156,7 +6153,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
|
|||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="footer-text">
|
<div id="footer-text">
|
||||||
Last updated 2023-09-07 11:54:45 -0700
|
Last updated 2024-01-26 09:23:09 -0800
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -255,7 +255,7 @@ If filing an issue is not possible due to privacy or other concerns, you can con
|
|||||||
The pugixml library is distributed under the MIT license:
|
The pugixml library is distributed under the MIT license:
|
||||||
|
|
||||||
....
|
....
|
||||||
Copyright (c) 2006-2023 Arseny Kapoulkine
|
Copyright (c) 2006-2024 Arseny Kapoulkine
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
@ -283,5 +283,5 @@ This means that you can freely use pugixml in your applications, both open-sourc
|
|||||||
|
|
||||||
....
|
....
|
||||||
This software is based on pugixml library (https://pugixml.org).
|
This software is based on pugixml library (https://pugixml.org).
|
||||||
pugixml is Copyright (C) 2006-2023 Arseny Kapoulkine.
|
pugixml is Copyright (C) 2006-2024 Arseny Kapoulkine.
|
||||||
....
|
....
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="generator" content="Asciidoctor 2.0.18">
|
<meta name="generator" content="Asciidoctor 2.0.20">
|
||||||
<meta name="author" content="website, repository">
|
<meta name="author" content="website, repository">
|
||||||
<title>pugixml 1.14 quick start guide</title>
|
<title>pugixml 1.14 quick start guide</title>
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
||||||
@ -209,13 +209,10 @@ table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
|
|||||||
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
|
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
|
||||||
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
||||||
.exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
|
.exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
|
||||||
.exampleblock>.content>:first-child{margin-top:0}
|
|
||||||
.exampleblock>.content>:last-child{margin-bottom:0}
|
|
||||||
.sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
|
.sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
|
||||||
.sidebarblock>:first-child{margin-top:0}
|
|
||||||
.sidebarblock>:last-child{margin-bottom:0}
|
|
||||||
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
||||||
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
|
||||||
|
.exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
||||||
.literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
|
.literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
|
||||||
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
|
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
|
||||||
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
|
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
|
||||||
@ -394,7 +391,7 @@ b.conum *{color:inherit!important}
|
|||||||
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
|
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
|
||||||
h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
|
h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
|
||||||
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
|
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
|
||||||
p,blockquote,dt,td.content,span.alt,summary{font-size:1.0625rem}
|
p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
|
||||||
p{margin-bottom:1.25rem}
|
p{margin-bottom:1.25rem}
|
||||||
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
||||||
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
||||||
@ -1057,7 +1054,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
|||||||
</div>
|
</div>
|
||||||
<div class="literalblock">
|
<div class="literalblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>Copyright (c) 2006-2023 Arseny Kapoulkine
|
<pre>Copyright (c) 2006-2024 Arseny Kapoulkine
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
@ -1087,7 +1084,7 @@ OTHER DEALINGS IN THE SOFTWARE.</pre>
|
|||||||
<div class="literalblock">
|
<div class="literalblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>This software is based on pugixml library (https://pugixml.org).
|
<pre>This software is based on pugixml library (https://pugixml.org).
|
||||||
pugixml is Copyright (C) 2006-2023 Arseny Kapoulkine.</pre>
|
pugixml is Copyright (C) 2006-2024 Arseny Kapoulkine.</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1101,7 +1098,7 @@ pugixml is Copyright (C) 2006-2023 Arseny Kapoulkine.</pre>
|
|||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="footer-text">
|
<div id="footer-text">
|
||||||
Last updated 2023-09-07 11:54:46 -0700
|
Last updated 2024-01-26 09:23:09 -0800
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
pugixml 1.14 - an XML processing library
|
pugixml 1.14 - an XML processing library
|
||||||
|
|
||||||
Copyright (C) 2006-2023, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
Copyright (C) 2006-2024, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||||
Report bugs and download new versions at https://pugixml.org/
|
Report bugs and download new versions at https://pugixml.org/
|
||||||
|
|
||||||
This is the distribution of pugixml, which is a C++ XML processing library,
|
This is the distribution of pugixml, which is a C++ XML processing library,
|
||||||
@ -26,7 +26,7 @@ The distribution contains the following folders:
|
|||||||
|
|
||||||
This library is distributed under the MIT License:
|
This library is distributed under the MIT License:
|
||||||
|
|
||||||
Copyright (c) 2006-2023 Arseny Kapoulkine
|
Copyright (c) 2006-2024 Arseny Kapoulkine
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
|
|||||||
@ -14,7 +14,7 @@ pugixml is used by a lot of projects, both open-source and proprietary, for perf
|
|||||||
This package contains builds for VS2013, VS2015, VS2017, VS2019 and VS2022, for both statically linked and DLL CRT; you can switch the CRT linkage in Project -> Properties -> Referenced Packages -> pugixml.</description>
|
This package contains builds for VS2013, VS2015, VS2017, VS2019 and VS2022, for both statically linked and DLL CRT; you can switch the CRT linkage in Project -> Properties -> Referenced Packages -> pugixml.</description>
|
||||||
<summary>Light-weight, simple and fast XML parser for C++ with XPath support</summary>
|
<summary>Light-weight, simple and fast XML parser for C++ with XPath support</summary>
|
||||||
<releaseNotes>https://pugixml.org/docs/manual.html#changes</releaseNotes>
|
<releaseNotes>https://pugixml.org/docs/manual.html#changes</releaseNotes>
|
||||||
<copyright>Copyright (c) 2006-2023 Arseny Kapoulkine</copyright>
|
<copyright>Copyright (c) 2006-2024 Arseny Kapoulkine</copyright>
|
||||||
<tags>native nativepackage</tags>
|
<tags>native nativepackage</tags>
|
||||||
</metadata>
|
</metadata>
|
||||||
</package>
|
</package>
|
||||||
|
|||||||
@ -31,7 +31,7 @@ BEGIN
|
|||||||
VALUE "FileDescription", "pugixml library\0"
|
VALUE "FileDescription", "pugixml library\0"
|
||||||
VALUE "FileVersion", PUGIXML_VERSION_NUMBER
|
VALUE "FileVersion", PUGIXML_VERSION_NUMBER
|
||||||
VALUE "InternalName", "pugixml.dll\0"
|
VALUE "InternalName", "pugixml.dll\0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2006-2023, by Arseny Kapoulkine\0"
|
VALUE "LegalCopyright", "Copyright (C) 2006-2024, by Arseny Kapoulkine\0"
|
||||||
VALUE "OriginalFilename", "pugixml.dll\0"
|
VALUE "OriginalFilename", "pugixml.dll\0"
|
||||||
VALUE "ProductName", "pugixml\0"
|
VALUE "ProductName", "pugixml\0"
|
||||||
VALUE "ProductVersion", PUGIXML_VERSION_NUMBER
|
VALUE "ProductVersion", PUGIXML_VERSION_NUMBER
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* pugixml parser - version 1.14
|
* pugixml parser - version 1.14
|
||||||
* --------------------------------------------------------
|
* --------------------------------------------------------
|
||||||
* Copyright (C) 2006-2023, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
* Copyright (C) 2006-2024, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||||
* Report bugs and download new versions at https://pugixml.org/
|
* Report bugs and download new versions at https://pugixml.org/
|
||||||
*
|
*
|
||||||
* This library is distributed under the MIT License. See notice at the end
|
* This library is distributed under the MIT License. See notice at the end
|
||||||
@ -52,7 +52,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2006-2023 Arseny Kapoulkine
|
* Copyright (c) 2006-2024 Arseny Kapoulkine
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person
|
* Permission is hereby granted, free of charge, to any person
|
||||||
* obtaining a copy of this software and associated documentation
|
* obtaining a copy of this software and associated documentation
|
||||||
|
|||||||
505
src/pugixml.cpp
505
src/pugixml.cpp
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* pugixml parser - version 1.14
|
* pugixml parser - version 1.14
|
||||||
* --------------------------------------------------------
|
* --------------------------------------------------------
|
||||||
* Copyright (C) 2006-2023, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
* Copyright (C) 2006-2024, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||||
* Report bugs and download new versions at https://pugixml.org/
|
* Report bugs and download new versions at https://pugixml.org/
|
||||||
*
|
*
|
||||||
* This library is distributed under the MIT License. See notice at the end
|
* This library is distributed under the MIT License. See notice at the end
|
||||||
@ -138,7 +138,7 @@ namespace pugi
|
|||||||
|
|
||||||
#ifndef PUGIXML_NO_STL
|
#ifndef PUGIXML_NO_STL
|
||||||
// String type used for operations that work with STL string; depends on PUGIXML_WCHAR_MODE
|
// String type used for operations that work with STL string; depends on PUGIXML_WCHAR_MODE
|
||||||
typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> > string_t;
|
typedef std::basic_string<PUGIXML_CHAR> string_t;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,14 +353,14 @@ namespace pugi
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Construct writer from an output stream object
|
// Construct writer from an output stream object
|
||||||
xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream);
|
xml_writer_stream(std::basic_ostream<char>& stream);
|
||||||
xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream);
|
xml_writer_stream(std::basic_ostream<wchar_t>& stream);
|
||||||
|
|
||||||
virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
|
virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::basic_ostream<char, std::char_traits<char> >* narrow_stream;
|
std::basic_ostream<char>* narrow_stream;
|
||||||
std::basic_ostream<wchar_t, std::char_traits<wchar_t> >* wide_stream;
|
std::basic_ostream<wchar_t>* wide_stream;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -700,8 +700,8 @@ namespace pugi
|
|||||||
|
|
||||||
#ifndef PUGIXML_NO_STL
|
#ifndef PUGIXML_NO_STL
|
||||||
// Print subtree to stream
|
// Print subtree to stream
|
||||||
void print(std::basic_ostream<char, std::char_traits<char> >& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;
|
void print(std::basic_ostream<char>& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;
|
||||||
void print(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, unsigned int depth = 0) const;
|
void print(std::basic_ostream<wchar_t>& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, unsigned int depth = 0) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Child nodes iterators
|
// Child nodes iterators
|
||||||
@ -1072,8 +1072,8 @@ namespace pugi
|
|||||||
|
|
||||||
#ifndef PUGIXML_NO_STL
|
#ifndef PUGIXML_NO_STL
|
||||||
// Load document from stream.
|
// Load document from stream.
|
||||||
xml_parse_result load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
|
xml_parse_result load(std::basic_istream<char>& stream, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
|
||||||
xml_parse_result load(std::basic_istream<wchar_t, std::char_traits<wchar_t> >& stream, unsigned int options = parse_default);
|
xml_parse_result load(std::basic_istream<wchar_t>& stream, unsigned int options = parse_default);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// (deprecated: use load_string instead) Load document from zero-terminated string. No encoding conversions are applied.
|
// (deprecated: use load_string instead) Load document from zero-terminated string. No encoding conversions are applied.
|
||||||
@ -1102,8 +1102,8 @@ namespace pugi
|
|||||||
|
|
||||||
#ifndef PUGIXML_NO_STL
|
#ifndef PUGIXML_NO_STL
|
||||||
// Save XML document to stream (semantics is slightly different from xml_node::print, see documentation for details).
|
// Save XML document to stream (semantics is slightly different from xml_node::print, see documentation for details).
|
||||||
void save(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
|
void save(std::basic_ostream<char>& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
|
||||||
void save(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default) const;
|
void save(std::basic_ostream<wchar_t>& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Save XML to file
|
// Save XML to file
|
||||||
@ -1439,12 +1439,12 @@ namespace pugi
|
|||||||
|
|
||||||
#ifndef PUGIXML_NO_STL
|
#ifndef PUGIXML_NO_STL
|
||||||
// Convert wide string to UTF8
|
// Convert wide string to UTF8
|
||||||
std::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const wchar_t* str);
|
std::basic_string<char> PUGIXML_FUNCTION as_utf8(const wchar_t* str);
|
||||||
std::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >& str);
|
std::basic_string<char> PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t>& str);
|
||||||
|
|
||||||
// Convert UTF8 to wide string
|
// Convert UTF8 to wide string
|
||||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const char* str);
|
std::basic_string<wchar_t> PUGIXML_FUNCTION as_wide(const char* str);
|
||||||
std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >& str);
|
std::basic_string<wchar_t> PUGIXML_FUNCTION as_wide(const std::basic_string<char>& str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Memory allocation function interface; returns pointer to allocated memory or NULL on failure
|
// Memory allocation function interface; returns pointer to allocated memory or NULL on failure
|
||||||
@ -1491,7 +1491,7 @@ namespace std
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2006-2023 Arseny Kapoulkine
|
* Copyright (c) 2006-2024 Arseny Kapoulkine
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person
|
* Permission is hereby granted, free of charge, to any person
|
||||||
* obtaining a copy of this software and associated documentation
|
* obtaining a copy of this software and associated documentation
|
||||||
|
|||||||
@ -45,7 +45,7 @@ foreach ($vs in $args)
|
|||||||
Add-AppveyorTest $target -Outcome Running
|
Add-AppveyorTest $target -Outcome Running
|
||||||
|
|
||||||
Write-Output "# Building $target.exe"
|
Write-Output "# Building $target.exe"
|
||||||
& cmd /c "cl.exe /Fe$target.exe /EHsc /W4 /WX $deflist $sources 2>&1" | Tee-Object -Variable buildOutput
|
& cmd /c "cl.exe /MP /Fe$target.exe /EHsc /W4 /WX $deflist $sources 2>&1" | Tee-Object -Variable buildOutput
|
||||||
|
|
||||||
if ($?)
|
if ($?)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,26 +1,46 @@
|
|||||||
#include "../src/pugixml.hpp"
|
#include "../src/pugixml.hpp"
|
||||||
|
#include "fuzzer/FuzzedDataProvider.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size)
|
||||||
{
|
{
|
||||||
char* text = new char[Size + 1];
|
FuzzedDataProvider fdp(Data, Size);
|
||||||
memcpy(text, Data, Size);
|
std::string text = fdp.ConsumeRandomLengthString(1024);
|
||||||
text[Size] = 0;
|
|
||||||
|
|
||||||
#ifdef PUGIXML_NO_EXCEPTIONS
|
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||||
pugi::xpath_query q(text);
|
|
||||||
#else
|
|
||||||
try
|
try
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
pugi::xpath_query q(text);
|
pugi::xpath_variable_set vars;
|
||||||
|
size_t var_count = fdp.ConsumeIntegralInRange<size_t>(0, 50);
|
||||||
|
std::vector<std::string> var_name_storage;
|
||||||
|
for (size_t i = 0; i < var_count; ++i)
|
||||||
|
{
|
||||||
|
var_name_storage.push_back(fdp.ConsumeRandomLengthString(128));
|
||||||
|
|
||||||
|
const int xpath_value_type_count = pugi::xpath_type_boolean + 1;
|
||||||
|
pugi::xpath_value_type value_type = static_cast<pugi::xpath_value_type>(fdp.ConsumeIntegralInRange(0, xpath_value_type_count));
|
||||||
|
vars.add(var_name_storage.back().c_str(), value_type);
|
||||||
|
}
|
||||||
|
pugi::xpath_query q(text.c_str(), &vars);
|
||||||
|
|
||||||
|
std::vector<uint8_t> xml_buffer = fdp.ConsumeBytes<uint8_t>(fdp.ConsumeIntegralInRange(0, 1024));
|
||||||
|
pugi::xml_document doc;
|
||||||
|
doc.load_buffer(xml_buffer.data(), xml_buffer.size(), pugi::parse_full);
|
||||||
|
|
||||||
|
q.evaluate_boolean(doc);
|
||||||
|
q.evaluate_number(doc);
|
||||||
|
q.evaluate_string(doc);
|
||||||
|
q.evaluate_node(doc);
|
||||||
|
q.evaluate_node_set(doc);
|
||||||
}
|
}
|
||||||
|
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||||
catch (pugi::xpath_exception&)
|
catch (pugi::xpath_exception&)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
delete[] text;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -573,7 +573,8 @@ TEST_XML(xpath_api_nodeset_move_assign_self, "<node><foo/><foo/><bar/></node>")
|
|||||||
|
|
||||||
test_runner::_memory_fail_threshold = 1;
|
test_runner::_memory_fail_threshold = 1;
|
||||||
|
|
||||||
set = std::move(*&set);
|
xpath_node_set* self = &set;
|
||||||
|
set = std::move(*self);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(xpath_api_query_move)
|
TEST(xpath_api_query_move)
|
||||||
@ -614,7 +615,8 @@ TEST(xpath_api_query_move)
|
|||||||
CHECK(q4);
|
CHECK(q4);
|
||||||
CHECK(q4.evaluate_boolean(c));
|
CHECK(q4.evaluate_boolean(c));
|
||||||
|
|
||||||
q4 = std::move(*&q4);
|
xpath_query* q4self = &q4;
|
||||||
|
q4 = std::move(*q4self);
|
||||||
|
|
||||||
CHECK(q4);
|
CHECK(q4);
|
||||||
CHECK(q4.evaluate_boolean(c));
|
CHECK(q4.evaluate_boolean(c));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user