This commit is contained in:
Scott E. Graves 2023-11-30 09:18:10 -06:00
parent 8436f2e2bb
commit 97487cf0c4
380 changed files with 144184 additions and 144135 deletions

3332
3rd_party/config.guess vendored

File diff suppressed because it is too large Load Diff

3584
3rd_party/config.sub vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

49192
3rd_party/json/json.hpp vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
comment: false comment: false
coverage: coverage:
status: status:
project: project:
default: default:
informational: true informational: true
patch: off patch: off

View File

@ -1,8 +1,8 @@
--- ---
name: Bug report name: Bug report
about: Create a report if you believe you've found a bug in this project; please use GitHub Discussions instead if you think the bug may be in your code. about: Create a report if you believe you've found a bug in this project; please use GitHub Discussions instead if you think the bug may be in your code.
title: '' title: ''
labels: bug labels: bug
assignees: '' assignees: ''
--- ---

View File

@ -1,5 +1,5 @@
blank_issues_enabled: false blank_issues_enabled: false
contact_links: contact_links:
- name: Help and support - name: Help and support
url: https://github.com/zeux/pugixml/discussions url: https://github.com/zeux/pugixml/discussions
about: Please use GitHub Discussions if you have questions or need help. about: Please use GitHub Discussions if you have questions or need help.

View File

@ -1,8 +1,8 @@
--- ---
name: Feature request name: Feature request
about: Suggest an idea for this project about: Suggest an idea for this project
title: '' title: ''
labels: enhancement labels: enhancement
assignees: '' assignees: ''
--- ---

View File

@ -1,52 +1,52 @@
name: build name: build
on: on:
push: push:
branches: branches:
- 'master' - 'master'
pull_request: pull_request:
jobs: jobs:
unix: unix:
strategy: strategy:
matrix: matrix:
os: [ubuntu, macos] os: [ubuntu, macos]
compiler: [g++, clang++] compiler: [g++, clang++]
defines: [standard, PUGIXML_WCHAR_MODE, PUGIXML_COMPACT, PUGIXML_NO_EXCEPTIONS] defines: [standard, PUGIXML_WCHAR_MODE, PUGIXML_COMPACT, PUGIXML_NO_EXCEPTIONS]
exclude: exclude:
- os: macos - os: macos
compiler: g++ compiler: g++
name: ${{matrix.os}} (${{matrix.compiler}}, ${{matrix.defines}}) name: ${{matrix.os}} (${{matrix.compiler}}, ${{matrix.defines}})
runs-on: ${{matrix.os}}-latest runs-on: ${{matrix.os}}-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: make test - name: make test
run: | run: |
export CXX=${{matrix.compiler}} export CXX=${{matrix.compiler}}
make test cxxstd=c++11 defines=${{matrix.defines}} config=release -j2 make test cxxstd=c++11 defines=${{matrix.defines}} config=release -j2
make test cxxstd=c++98 defines=${{matrix.defines}} config=debug -j2 make test cxxstd=c++98 defines=${{matrix.defines}} config=debug -j2
make test defines=${{matrix.defines}} config=sanitize -j2 make test defines=${{matrix.defines}} config=sanitize -j2
- name: make coverage - name: make coverage
if: ${{!(matrix.os == 'ubuntu' && matrix.compiler == 'clang++')}} # linux/clang produces coverage info gcov can't parse if: ${{!(matrix.os == 'ubuntu' && matrix.compiler == 'clang++')}} # linux/clang produces coverage info gcov can't parse
run: | run: |
export CXX=${{matrix.compiler}} export CXX=${{matrix.compiler}}
make test defines=${{matrix.defines}} config=coverage -j2 make test defines=${{matrix.defines}} config=coverage -j2
bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov -X search -t ${{secrets.CODECOV_TOKEN}} -B ${{github.ref}} bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov -X search -t ${{secrets.CODECOV_TOKEN}} -B ${{github.ref}}
windows: windows:
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
matrix: matrix:
arch: [Win32, x64] arch: [Win32, x64]
defines: [standard, PUGIXML_WCHAR_MODE, PUGIXML_COMPACT, PUGIXML_NO_EXCEPTIONS] defines: [standard, PUGIXML_WCHAR_MODE, PUGIXML_COMPACT, PUGIXML_NO_EXCEPTIONS]
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: cmake configure - name: cmake configure
run: cmake . -DPUGIXML_BUILD_TESTS=ON -D${{matrix.defines}}=ON -A ${{matrix.arch}} run: cmake . -DPUGIXML_BUILD_TESTS=ON -D${{matrix.defines}}=ON -A ${{matrix.arch}}
- name: cmake test - name: cmake test
shell: bash # necessary for fail-fast shell: bash # necessary for fail-fast
run: | run: |
cmake --build . -- -property:Configuration=Debug -verbosity:minimal cmake --build . -- -property:Configuration=Debug -verbosity:minimal
Debug/pugixml-check.exe Debug/pugixml-check.exe
cmake --build . -- -property:Configuration=Release -verbosity:minimal cmake --build . -- -property:Configuration=Release -verbosity:minimal
Release/pugixml-check.exe Release/pugixml-check.exe

View File

@ -1,24 +1,24 @@
name: CIFuzz name: CIFuzz
on: [pull_request] on: [pull_request]
jobs: jobs:
Fuzzing: Fuzzing:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Build Fuzzers - name: Build Fuzzers
id: build id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with: with:
oss-fuzz-project-name: 'pugixml' oss-fuzz-project-name: 'pugixml'
dry-run: false dry-run: false
- name: Run Fuzzers - name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with: with:
oss-fuzz-project-name: 'pugixml' oss-fuzz-project-name: 'pugixml'
fuzz-seconds: 30 fuzz-seconds: 30
dry-run: false dry-run: false
- name: Upload Crash - name: Upload Crash
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success' if: failure() && steps.build.outcome == 'success'
with: with:
name: artifacts name: artifacts
path: ./out/artifacts path: ./out/artifacts

View File

@ -1,2 +1,2 @@
/build/ /build/
/.vscode/ /.vscode/

View File

@ -1,264 +1,264 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
# Policy configuration; this *MUST* be specified before project is defined # Policy configuration; this *MUST* be specified before project is defined
if(POLICY CMP0091) if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW) # Enables use of MSVC_RUNTIME_LIBRARY cmake_policy(SET CMP0091 NEW) # Enables use of MSVC_RUNTIME_LIBRARY
endif() endif()
project(pugixml VERSION 1.13 LANGUAGES CXX) project(pugixml VERSION 1.13 LANGUAGES CXX)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
include(CMakeDependentOption) include(CMakeDependentOption)
include(GNUInstallDirs) include(GNUInstallDirs)
include(CTest) 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
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF) "CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
cmake_dependent_option(PUGIXML_USE_POSTFIX cmake_dependent_option(PUGIXML_USE_POSTFIX
"Use separate postfix for each configuration to make sure you can install multiple build outputs" OFF "Use separate postfix for each configuration to make sure you can install multiple build outputs" OFF
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF) "CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
cmake_dependent_option(PUGIXML_STATIC_CRT cmake_dependent_option(PUGIXML_STATIC_CRT
"Use static MSVC RT libraries" OFF "Use static MSVC RT libraries" OFF
"MSVC" OFF) "MSVC" OFF)
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) "BUILD_TESTING;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")
separate_arguments(PUGIXML_BUILD_DEFINES) separate_arguments(PUGIXML_BUILD_DEFINES)
# Technically not needed for this file. This is builtin CMAKE global variable. # Technically not needed for this file. This is builtin CMAKE global variable.
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
# Expose option to build PUGIXML as static as well when the global BUILD_SHARED_LIBS variable is set # Expose option to build PUGIXML as static as well when the global BUILD_SHARED_LIBS variable is set
cmake_dependent_option(PUGIXML_BUILD_SHARED_AND_STATIC_LIBS cmake_dependent_option(PUGIXML_BUILD_SHARED_AND_STATIC_LIBS
"Build both shared and static libraries" OFF "Build both shared and static libraries" OFF
"BUILD_SHARED_LIBS" OFF) "BUILD_SHARED_LIBS" OFF)
# 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)
# Advanced options from pugiconfig.hpp # Advanced options from pugiconfig.hpp
option(PUGIXML_NO_XPATH "Disable XPath" OFF) option(PUGIXML_NO_XPATH "Disable XPath" OFF)
option(PUGIXML_NO_STL "Disable STL" OFF) option(PUGIXML_NO_STL "Disable STL" OFF)
option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF) option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF)
mark_as_advanced(PUGIXML_NO_XPATH PUGIXML_NO_STL PUGIXML_NO_EXCEPTIONS) mark_as_advanced(PUGIXML_NO_XPATH PUGIXML_NO_STL PUGIXML_NO_EXCEPTIONS)
set(PUGIXML_PUBLIC_DEFINITIONS set(PUGIXML_PUBLIC_DEFINITIONS
$<$<BOOL:${PUGIXML_WCHAR_MODE}>:PUGIXML_WCHAR_MODE> $<$<BOOL:${PUGIXML_WCHAR_MODE}>:PUGIXML_WCHAR_MODE>
$<$<BOOL:${PUGIXML_COMPACT}>:PUGIXML_COMPACT> $<$<BOOL:${PUGIXML_COMPACT}>:PUGIXML_COMPACT>
$<$<BOOL:${PUGIXML_NO_XPATH}>:PUGIXML_NO_XPATH> $<$<BOOL:${PUGIXML_NO_XPATH}>:PUGIXML_NO_XPATH>
$<$<BOOL:${PUGIXML_NO_STL}>:PUGIXML_NO_STL> $<$<BOOL:${PUGIXML_NO_STL}>:PUGIXML_NO_STL>
$<$<BOOL:${PUGIXML_NO_EXCEPTIONS}>:PUGIXML_NO_EXCEPTIONS>) $<$<BOOL:${PUGIXML_NO_EXCEPTIONS}>:PUGIXML_NO_EXCEPTIONS>)
# This is used to backport a CMake 3.15 feature, but is also forwards compatible # This is used to backport a CMake 3.15 feature, but is also forwards compatible
if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
set(CMAKE_MSVC_RUNTIME_LIBRARY set(CMAKE_MSVC_RUNTIME_LIBRARY
MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<NOT:$<BOOL:${PUGIXML_STATIC_CRT}>>:DLL>) MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<NOT:$<BOOL:${PUGIXML_STATIC_CRT}>>:DLL>)
endif() endif()
if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED) if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif() endif()
if (NOT DEFINED CMAKE_CXX_STANDARD) if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
endif() endif()
if (PUGIXML_USE_POSTFIX) if (PUGIXML_USE_POSTFIX)
set(CMAKE_RELWITHDEBINFO_POSTFIX _r) set(CMAKE_RELWITHDEBINFO_POSTFIX _r)
set(CMAKE_MINSIZEREL_POSTFIX _m) set(CMAKE_MINSIZEREL_POSTFIX _m)
set(CMAKE_DEBUG_POSTFIX _d) set(CMAKE_DEBUG_POSTFIX _d)
endif() endif()
if (CMAKE_VERSION VERSION_LESS 3.15) if (CMAKE_VERSION VERSION_LESS 3.15)
set(msvc-rt $<TARGET_PROPERTY:MSVC_RUNTIME_LIBRARY>) set(msvc-rt $<TARGET_PROPERTY:MSVC_RUNTIME_LIBRARY>)
set(msvc-rt-mtd-shared $<STREQUAL:${msvc-rt},MultiThreadedDebugDLL>) set(msvc-rt-mtd-shared $<STREQUAL:${msvc-rt},MultiThreadedDebugDLL>)
set(msvc-rt-mtd-static $<STREQUAL:${msvc-rt},MultiThreadedDebug>) set(msvc-rt-mtd-static $<STREQUAL:${msvc-rt},MultiThreadedDebug>)
set(msvc-rt-mt-shared $<STREQUAL:${msvc-rt},MultiThreadedDLL>) set(msvc-rt-mt-shared $<STREQUAL:${msvc-rt},MultiThreadedDLL>)
set(msvc-rt-mt-static $<STREQUAL:${msvc-rt},MultiThreaded>) set(msvc-rt-mt-static $<STREQUAL:${msvc-rt},MultiThreaded>)
unset(msvc-rt) unset(msvc-rt)
set(msvc-rt-mtd-shared $<${msvc-rt-mtd-shared}:-MDd>) set(msvc-rt-mtd-shared $<${msvc-rt-mtd-shared}:-MDd>)
set(msvc-rt-mtd-static $<${msvc-rt-mtd-static}:-MTd>) set(msvc-rt-mtd-static $<${msvc-rt-mtd-static}:-MTd>)
set(msvc-rt-mt-shared $<${msvc-rt-mt-shared}:-MD>) set(msvc-rt-mt-shared $<${msvc-rt-mt-shared}:-MD>)
set(msvc-rt-mt-static $<${msvc-rt-mt-static}:-MT>) set(msvc-rt-mt-static $<${msvc-rt-mt-static}:-MT>)
endif() endif()
set(versioned-dir $<$<BOOL:${PUGIXML_USE_VERSIONED_LIBDIR}>:/pugixml-${PROJECT_VERSION}>) set(versioned-dir $<$<BOOL:${PUGIXML_USE_VERSIONED_LIBDIR}>:/pugixml-${PROJECT_VERSION}>)
set(libs) set(libs)
if (BUILD_SHARED_LIBS) if (BUILD_SHARED_LIBS)
add_library(pugixml-shared SHARED add_library(pugixml-shared SHARED
${PROJECT_SOURCE_DIR}/scripts/pugixml_dll.rc ${PROJECT_SOURCE_DIR}/scripts/pugixml_dll.rc
${PROJECT_SOURCE_DIR}/src/pugixml.cpp) ${PROJECT_SOURCE_DIR}/src/pugixml.cpp)
add_library(pugixml::shared ALIAS pugixml-shared) add_library(pugixml::shared ALIAS pugixml-shared)
list(APPEND libs pugixml-shared) list(APPEND libs pugixml-shared)
string(CONCAT pugixml.msvc $<OR: string(CONCAT pugixml.msvc $<OR:
$<STREQUAL:${CMAKE_CXX_COMPILER_FRONTEND_VARIANT},MSVC>, $<STREQUAL:${CMAKE_CXX_COMPILER_FRONTEND_VARIANT},MSVC>,
$<CXX_COMPILER_ID:MSVC> $<CXX_COMPILER_ID:MSVC>
>) >)
set_property(TARGET pugixml-shared PROPERTY EXPORT_NAME shared) set_property(TARGET pugixml-shared PROPERTY EXPORT_NAME shared)
target_include_directories(pugixml-shared target_include_directories(pugixml-shared
PUBLIC PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>) $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>)
target_compile_definitions(pugixml-shared target_compile_definitions(pugixml-shared
PUBLIC PUBLIC
${PUGIXML_BUILD_DEFINES} ${PUGIXML_BUILD_DEFINES}
${PUGIXML_PUBLIC_DEFINITIONS} ${PUGIXML_PUBLIC_DEFINITIONS}
PRIVATE PRIVATE
PUGIXML_API=$<IF:${pugixml.msvc},__declspec\(dllexport\),__attribute__\(\(visibility\("default"\)\)\)> PUGIXML_API=$<IF:${pugixml.msvc},__declspec\(dllexport\),__attribute__\(\(visibility\("default"\)\)\)>
) )
target_compile_options(pugixml-shared target_compile_options(pugixml-shared
PRIVATE PRIVATE
${msvc-rt-mtd-shared} ${msvc-rt-mtd-shared}
${msvc-rt-mtd-static} ${msvc-rt-mtd-static}
${msvc-rt-mt-shared} ${msvc-rt-mt-shared}
${msvc-rt-mt-static}) ${msvc-rt-mt-static})
endif() endif()
if (NOT BUILD_SHARED_LIBS OR PUGIXML_BUILD_SHARED_AND_STATIC_LIBS) if (NOT BUILD_SHARED_LIBS OR PUGIXML_BUILD_SHARED_AND_STATIC_LIBS)
add_library(pugixml-static STATIC add_library(pugixml-static STATIC
${PROJECT_SOURCE_DIR}/src/pugixml.cpp) ${PROJECT_SOURCE_DIR}/src/pugixml.cpp)
add_library(pugixml::static ALIAS pugixml-static) add_library(pugixml::static ALIAS pugixml-static)
list(APPEND libs pugixml-static) list(APPEND libs pugixml-static)
set_property(TARGET pugixml-static PROPERTY EXPORT_NAME static) set_property(TARGET pugixml-static PROPERTY EXPORT_NAME static)
target_include_directories(pugixml-static target_include_directories(pugixml-static
PUBLIC PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>) $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>)
target_compile_definitions(pugixml-static target_compile_definitions(pugixml-static
PUBLIC PUBLIC
${PUGIXML_BUILD_DEFINES} ${PUGIXML_BUILD_DEFINES}
${PUGIXML_PUBLIC_DEFINITIONS}) ${PUGIXML_PUBLIC_DEFINITIONS})
target_compile_options(pugixml-static target_compile_options(pugixml-static
PRIVATE PRIVATE
${msvc-rt-mtd-shared} ${msvc-rt-mtd-shared}
${msvc-rt-mtd-static} ${msvc-rt-mtd-static}
${msvc-rt-mt-shared} ${msvc-rt-mt-shared}
${msvc-rt-mt-static}) ${msvc-rt-mt-static})
endif() endif()
if (BUILD_SHARED_LIBS) if (BUILD_SHARED_LIBS)
set(pugixml-alias pugixml-shared) set(pugixml-alias pugixml-shared)
else() else()
set(pugixml-alias pugixml-static) set(pugixml-alias pugixml-static)
endif() endif()
add_library(pugixml INTERFACE) add_library(pugixml INTERFACE)
target_link_libraries(pugixml INTERFACE ${pugixml-alias}) target_link_libraries(pugixml INTERFACE ${pugixml-alias})
add_library(pugixml::pugixml ALIAS pugixml) add_library(pugixml::pugixml ALIAS pugixml)
set_target_properties(${libs} set_target_properties(${libs}
PROPERTIES PROPERTIES
MSVC_RUNTIME_LIBRARY ${CMAKE_MSVC_RUNTIME_LIBRARY} MSVC_RUNTIME_LIBRARY ${CMAKE_MSVC_RUNTIME_LIBRARY}
EXCLUDE_FROM_ALL ON EXCLUDE_FROM_ALL ON
POSITION_INDEPENDENT_CODE ON POSITION_INDEPENDENT_CODE ON
SOVERSION ${PROJECT_VERSION_MAJOR} SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
OUTPUT_NAME pugixml) OUTPUT_NAME pugixml)
set_target_properties(${libs} set_target_properties(${libs}
PROPERTIES PROPERTIES
EXCLUDE_FROM_ALL OFF) EXCLUDE_FROM_ALL OFF)
set(install-targets pugixml ${libs}) set(install-targets pugixml ${libs})
configure_package_config_file( configure_package_config_file(
"${PROJECT_SOURCE_DIR}/scripts/pugixml-config.cmake.in" "${PROJECT_SOURCE_DIR}/scripts/pugixml-config.cmake.in"
"${PROJECT_BINARY_DIR}/pugixml-config.cmake" "${PROJECT_BINARY_DIR}/pugixml-config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR} INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}
NO_CHECK_REQUIRED_COMPONENTS_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO
NO_SET_AND_CHECK_MACRO) NO_SET_AND_CHECK_MACRO)
write_basic_package_version_file( write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/pugixml-config-version.cmake" "${PROJECT_BINARY_DIR}/pugixml-config-version.cmake"
COMPATIBILITY SameMajorVersion) COMPATIBILITY SameMajorVersion)
if (PUGIXML_USE_POSTFIX) if (PUGIXML_USE_POSTFIX)
if(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) if(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
set(LIB_POSTFIX ${CMAKE_RELWITHDEBINFO_POSTFIX}) set(LIB_POSTFIX ${CMAKE_RELWITHDEBINFO_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel) elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel)
set(LIB_POSTFIX ${CMAKE_MINSIZEREL_POSTFIX}) set(LIB_POSTFIX ${CMAKE_MINSIZEREL_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES Debug) elseif(CMAKE_BUILD_TYPE MATCHES Debug)
set(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX}) set(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX})
endif() endif()
endif() 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) if (NOT DEFINED PUGIXML_RUNTIME_COMPONENT)
set(PUGIXML_RUNTIME_COMPONENT Runtime) set(PUGIXML_RUNTIME_COMPONENT Runtime)
endif() endif()
if (NOT DEFINED PUGIXML_LIBRARY_COMPONENT) if (NOT DEFINED PUGIXML_LIBRARY_COMPONENT)
set(PUGIXML_LIBRARY_COMPONENT Library) set(PUGIXML_LIBRARY_COMPONENT Library)
endif() endif()
if (NOT DEFINED PUGIXML_DEVELOPMENT_COMPONENT) if (NOT DEFINED PUGIXML_DEVELOPMENT_COMPONENT)
set(PUGIXML_DEVELOPMENT_COMPONENT Development) set(PUGIXML_DEVELOPMENT_COMPONENT Development)
endif() endif()
set(namelink-component) set(namelink-component)
if (NOT CMAKE_VERSION VERSION_LESS 3.12) if (NOT CMAKE_VERSION VERSION_LESS 3.12)
set(namelink-component NAMELINK_COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}) set(namelink-component NAMELINK_COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
endif() endif()
install(TARGETS ${install-targets} install(TARGETS ${install-targets}
EXPORT pugixml-targets EXPORT pugixml-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${PUGIXML_RUNTIME_COMPONENT} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${PUGIXML_RUNTIME_COMPONENT}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_LIBRARY_COMPONENT} ${namelink-component} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_LIBRARY_COMPONENT} ${namelink-component}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir}) INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir})
install(EXPORT pugixml-targets install(EXPORT pugixml-targets
NAMESPACE pugixml:: NAMESPACE pugixml::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}) DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
export(EXPORT pugixml-targets export(EXPORT pugixml-targets
NAMESPACE pugixml::) NAMESPACE pugixml::)
install(FILES install(FILES
"${PROJECT_BINARY_DIR}/pugixml-config-version.cmake" "${PROJECT_BINARY_DIR}/pugixml-config-version.cmake"
"${PROJECT_BINARY_DIR}/pugixml-config.cmake" "${PROJECT_BINARY_DIR}/pugixml-config.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}) DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}) DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
install( install(
FILES FILES
"${PROJECT_SOURCE_DIR}/src/pugiconfig.hpp" "${PROJECT_SOURCE_DIR}/src/pugiconfig.hpp"
"${PROJECT_SOURCE_DIR}/src/pugixml.hpp" "${PROJECT_SOURCE_DIR}/src/pugixml.hpp"
DESTINATION DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}) ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
if (PUGIXML_BUILD_TESTS) if (PUGIXML_BUILD_TESTS)
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)
list(INSERT fuzz-pattern 0 CONFIGURE_DEPENDS) list(INSERT fuzz-pattern 0 CONFIGURE_DEPENDS)
list(INSERT test-pattern 0 CONFIGURE_DEPENDS) list(INSERT test-pattern 0 CONFIGURE_DEPENDS)
endif() endif()
file(GLOB test-sources ${test-pattern}) file(GLOB test-sources ${test-pattern})
file(GLOB fuzz-sources ${fuzz-pattern}) file(GLOB fuzz-sources ${fuzz-pattern})
list(REMOVE_ITEM test-sources ${fuzz-sources}) list(REMOVE_ITEM test-sources ${fuzz-sources})
add_custom_target(check add_custom_target(check
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure) COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
add_executable(pugixml-check ${test-sources}) add_executable(pugixml-check ${test-sources})
add_test(NAME pugixml::test add_test(NAME pugixml::test
COMMAND pugixml-check COMMAND pugixml-check
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
add_dependencies(check pugixml-check) add_dependencies(check pugixml-check)
target_link_libraries(pugixml-check target_link_libraries(pugixml-check
PRIVATE PRIVATE
pugixml::pugixml) pugixml::pugixml)
endif() endif()

View File

@ -1,24 +1,24 @@
MIT License MIT License
Copyright (c) 2006-2022 Arseny Kapoulkine Copyright (c) 2006-2022 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
files (the "Software"), to deal in the Software without files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following Software is furnished to do so, subject to the following
conditions: conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE. OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,99 +1,99 @@
.SUFFIXES: .SUFFIXES:
MAKEFLAGS+=-r MAKEFLAGS+=-r
config=debug config=debug
defines=standard defines=standard
cxxstd=c++11 cxxstd=c++11
# set cxxstd=any to disable use of -std=... # set cxxstd=any to disable use of -std=...
BUILD=build/make-$(firstword $(CXX))-$(config)-$(defines)-$(cxxstd) BUILD=build/make-$(firstword $(CXX))-$(config)-$(defines)-$(cxxstd)
SOURCES=src/pugixml.cpp $(filter-out tests/fuzz_%,$(wildcard tests/*.cpp)) SOURCES=src/pugixml.cpp $(filter-out tests/fuzz_%,$(wildcard tests/*.cpp))
EXECUTABLE=$(BUILD)/test EXECUTABLE=$(BUILD)/test
VERSION=$(shell sed -n 's/.*version \(.*\).*/\1/p' src/pugiconfig.hpp) VERSION=$(shell sed -n 's/.*version \(.*\).*/\1/p' src/pugiconfig.hpp)
RELEASE=$(filter-out scripts/archive.py docs/%.adoc,$(shell git ls-files docs scripts src CMakeLists.txt LICENSE.md readme.txt)) RELEASE=$(filter-out scripts/archive.py docs/%.adoc,$(shell git ls-files docs scripts src CMakeLists.txt LICENSE.md readme.txt))
CXXFLAGS=-g -Wall -Wextra -Werror -pedantic -Wundef -Wshadow -Wcast-align -Wcast-qual -Wold-style-cast -Wdouble-promotion CXXFLAGS=-g -Wall -Wextra -Werror -pedantic -Wundef -Wshadow -Wcast-align -Wcast-qual -Wold-style-cast -Wdouble-promotion
LDFLAGS= LDFLAGS=
ifeq ($(config),release) ifeq ($(config),release)
CXXFLAGS+=-O3 -DNDEBUG CXXFLAGS+=-O3 -DNDEBUG
endif endif
ifeq ($(config),coverage) ifeq ($(config),coverage)
CXXFLAGS+=-coverage CXXFLAGS+=-coverage
LDFLAGS+=-coverage LDFLAGS+=-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=float-divide-by-zero,float-cast-overflow -fno-sanitize-recover=all
LDFLAGS+=-fsanitize=address,undefined LDFLAGS+=-fsanitize=address,undefined
endif endif
ifeq ($(config),analyze) ifeq ($(config),analyze)
CXXFLAGS+=--analyze CXXFLAGS+=--analyze
endif endif
ifneq ($(defines),standard) ifneq ($(defines),standard)
COMMA=, COMMA=,
CXXFLAGS+=-D $(subst $(COMMA), -D ,$(defines)) CXXFLAGS+=-D $(subst $(COMMA), -D ,$(defines))
endif endif
ifneq ($(findstring PUGIXML_NO_EXCEPTIONS,$(defines)),) ifneq ($(findstring PUGIXML_NO_EXCEPTIONS,$(defines)),)
CXXFLAGS+=-fno-exceptions CXXFLAGS+=-fno-exceptions
endif endif
ifneq ($(cxxstd),any) ifneq ($(cxxstd),any)
CXXFLAGS+=-std=$(cxxstd) CXXFLAGS+=-std=$(cxxstd)
endif endif
OBJECTS=$(SOURCES:%=$(BUILD)/%.o) OBJECTS=$(SOURCES:%=$(BUILD)/%.o)
all: $(EXECUTABLE) all: $(EXECUTABLE)
ifeq ($(config),coverage) ifeq ($(config),coverage)
test: $(EXECUTABLE) test: $(EXECUTABLE)
-@find $(BUILD) -name '*.gcda' -exec rm {} + -@find $(BUILD) -name '*.gcda' -exec rm {} +
./$(EXECUTABLE) ./$(EXECUTABLE)
@gcov -b -o $(BUILD)/src/ pugixml.cpp.gcda | sed -e '/./{H;$!d;}' -e 'x;/pugixml.cpp/!d;' @gcov -b -o $(BUILD)/src/ pugixml.cpp.gcda | sed -e '/./{H;$!d;}' -e 'x;/pugixml.cpp/!d;'
@find . -name '*.gcov' -and -not -name 'pugixml.cpp.gcov' -exec rm {} + @find . -name '*.gcov' -and -not -name 'pugixml.cpp.gcov' -exec rm {} +
@sed -i -e "s/#####\(.*\)\(\/\/ unreachable.*\)/ 1\1\2/" pugixml.cpp.gcov @sed -i -e "s/#####\(.*\)\(\/\/ unreachable.*\)/ 1\1\2/" pugixml.cpp.gcov
else else
test: $(EXECUTABLE) test: $(EXECUTABLE)
./$(EXECUTABLE) ./$(EXECUTABLE)
endif 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
clean: clean:
rm -rf $(BUILD) rm -rf $(BUILD)
release: build/pugixml-$(VERSION).tar.gz build/pugixml-$(VERSION).zip release: build/pugixml-$(VERSION).tar.gz build/pugixml-$(VERSION).zip
docs: docs/quickstart.html docs/manual.html docs: docs/quickstart.html docs/manual.html
build/pugixml-%: .FORCE | $(RELEASE) build/pugixml-%: .FORCE | $(RELEASE)
@mkdir -p $(BUILD) @mkdir -p $(BUILD)
TIMESTAMP=`git show v$(VERSION) -s --format=%ct` && python3 scripts/archive.py $@ pugixml-$(VERSION) $$TIMESTAMP $| TIMESTAMP=`git show v$(VERSION) -s --format=%ct` && python3 scripts/archive.py $@ pugixml-$(VERSION) $$TIMESTAMP $|
$(EXECUTABLE): $(OBJECTS) $(EXECUTABLE): $(OBJECTS)
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@ $(CXX) $(OBJECTS) $(LDFLAGS) -o $@
$(BUILD)/fuzz_%: tests/fuzz_%.cpp src/pugixml.cpp $(BUILD)/fuzz_%: tests/fuzz_%.cpp src/pugixml.cpp
@mkdir -p $(BUILD) @mkdir -p $(BUILD)
$(CXX) $(CXXFLAGS) -fsanitize=address,fuzzer $^ -o $@ $(CXX) $(CXXFLAGS) -fsanitize=address,fuzzer $^ -o $@
$(BUILD)/%.o: % $(BUILD)/%.o: %
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(CXX) $< $(CXXFLAGS) -c -MMD -MP -o $@ $(CXX) $< $(CXXFLAGS) -c -MMD -MP -o $@
-include $(OBJECTS:.o=.d) -include $(OBJECTS:.o=.d)
.SECONDEXPANSION: .SECONDEXPANSION:
docs/%.html: docs/%.adoc $$(shell sed -n 's/include\:\:\(.*\)\[.*/docs\/\1/p' docs/%.adoc) docs/%.html: docs/%.adoc $$(shell sed -n 's/include\:\:\(.*\)\[.*/docs\/\1/p' docs/%.adoc)
asciidoctor -b html5 -a version=$(VERSION) $< -o $@ asciidoctor -b html5 -a version=$(VERSION) $< -o $@
.PHONY: all test clean release .FORCE .PHONY: all test clean release .FORCE

View File

@ -1,72 +1,72 @@
pugixml [![Actions Status](https://github.com/zeux/pugixml/workflows/build/badge.svg)](https://github.com/zeux/pugixml/actions) [![Build status](https://ci.appveyor.com/api/projects/status/9hdks1doqvq8pwe7/branch/master?svg=true)](https://ci.appveyor.com/project/zeux/pugixml) [![codecov.io](https://codecov.io/github/zeux/pugixml/coverage.svg?branch=master)](https://codecov.io/github/zeux/pugixml?branch=master) ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) pugixml [![Actions Status](https://github.com/zeux/pugixml/workflows/build/badge.svg)](https://github.com/zeux/pugixml/actions) [![Build status](https://ci.appveyor.com/api/projects/status/9hdks1doqvq8pwe7/branch/master?svg=true)](https://ci.appveyor.com/project/zeux/pugixml) [![codecov.io](https://codecov.io/github/zeux/pugixml/coverage.svg?branch=master)](https://codecov.io/github/zeux/pugixml?branch=master) ![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
======= =======
pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification
capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface
variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). variants and conversions between different Unicode encodings (which happen automatically during parsing/saving).
pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface. pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface.
## Documentation ## Documentation
Documentation for the current release of pugixml is available on-line as two separate documents: Documentation for the current release of pugixml is available on-line as two separate documents:
* [Quick-start guide](https://pugixml.org/docs/quickstart.html), that aims to provide enough information to start using the library; * [Quick-start guide](https://pugixml.org/docs/quickstart.html), that aims to provide enough information to start using the library;
* [Complete reference manual](https://pugixml.org/docs/manual.html), that describes all features of the library in detail. * [Complete reference manual](https://pugixml.org/docs/manual.html), that describes all features of the library in detail.
Youre 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. Youre 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.
## Example ## Example
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: 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:
```c++ ```c++
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file("xgconsole.xml"); pugi::xml_parse_result result = doc.load_file("xgconsole.xml");
if (!result) if (!result)
return -1; return -1;
for (pugi::xml_node tool: doc.child("Profile").child("Tools").children("Tool")) for (pugi::xml_node tool: doc.child("Profile").child("Tools").children("Tool"))
{ {
int timeout = tool.attribute("Timeout").as_int(); int timeout = tool.attribute("Timeout").as_int();
if (timeout > 0) if (timeout > 0)
std::cout << "Tool " << tool.attribute("Filename").value() << " has timeout " << timeout << "\n"; std::cout << "Tool " << tool.attribute("Filename").value() << " has timeout " << timeout << "\n";
} }
} }
``` ```
And the same example using XPath: And the same example using XPath:
```c++ ```c++
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file("xgconsole.xml"); pugi::xml_parse_result result = doc.load_file("xgconsole.xml");
if (!result) if (!result)
return -1; return -1;
pugi::xpath_node_set tools_with_timeout = doc.select_nodes("/Profile/Tools/Tool[@Timeout > 0]"); pugi::xpath_node_set tools_with_timeout = doc.select_nodes("/Profile/Tools/Tool[@Timeout > 0]");
for (pugi::xpath_node node: tools_with_timeout) for (pugi::xpath_node node: tools_with_timeout)
{ {
pugi::xml_node tool = node.node(); pugi::xml_node tool = node.node();
std::cout << "Tool " << tool.attribute("Filename").value() << std::cout << "Tool " << tool.attribute("Filename").value() <<
" has timeout " << tool.attribute("Timeout").as_int() << "\n"; " has timeout " << tool.attribute("Timeout").as_int() << "\n";
} }
} }
``` ```
## License ## License
This library is available to anybody free of charge, under the terms of MIT License (see LICENSE.md). This library is available to anybody free of charge, under the terms of MIT License (see LICENSE.md).

View File

@ -1,9 +1,9 @@
# Security Policy # Security Policy
## Supported Versions ## Supported Versions
Please verify that the vulnerabilities reported can be reproduced on the [latest released version](https://github.com/zeux/pugixml/releases). Please verify that the vulnerabilities reported can be reproduced on the [latest released version](https://github.com/zeux/pugixml/releases).
## Reporting a Vulnerability ## Reporting a Vulnerability
Vulnerabilities can be reported via e-mail to the [project maintainer](https://github.com/zeux). Vulnerabilities can be reported via e-mail to the [project maintainer](https://github.com/zeux).

View File

@ -1,25 +1,25 @@
image: image:
- Visual Studio 2022 - Visual Studio 2022
- Visual Studio 2019 - Visual Studio 2019
- Visual Studio 2017 - Visual Studio 2017
- Visual Studio 2015 - Visual Studio 2015
version: "{branch}-{build}" version: "{branch}-{build}"
build_script: build_script:
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2013") { .\scripts\nuget_build.ps1 2013} - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2013") { .\scripts\nuget_build.ps1 2013}
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\scripts\nuget_build.ps1 2015} - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\scripts\nuget_build.ps1 2015}
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\scripts\nuget_build.ps1 2017} - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\scripts\nuget_build.ps1 2017}
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") { .\scripts\nuget_build.ps1 2019} - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") { .\scripts\nuget_build.ps1 2019}
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") { .\scripts\nuget_build.ps1 2022} - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") { .\scripts\nuget_build.ps1 2022}
test_script: test_script:
- ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\autotest-appveyor.ps1 9 10 11 12 14 } - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\autotest-appveyor.ps1 9 10 11 12 14 }
- 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 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 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

View File

@ -1,7 +1,7 @@
website <https://pugixml.org>; repository <https://github.com/zeux/pugixml> website <https://pugixml.org>; repository <https://github.com/zeux/pugixml>
:toc: right :toc: right
:source-highlighter: pygments :source-highlighter: pygments
:source-language: c++ :source-language: c++
:sectanchors: :sectanchors:
:sectlinks: :sectlinks:
:imagesdir: images :imagesdir: images

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,287 +1,287 @@
= pugixml {version} quick start guide = pugixml {version} quick start guide
include::config.adoc[] include::config.adoc[]
[[introduction]] [[introduction]]
== Introduction == Introduction
https://pugixml.org/[pugixml] is a light-weight C{plus}{plus} XML processing library. It consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with two Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). The library is extremely portable and easy to integrate and use. pugixml is developed and maintained since 2006 and has many users. All code is distributed under the <<license,MIT license>>, making it completely free to use in both open-source and proprietary applications. https://pugixml.org/[pugixml] is a light-weight C{plus}{plus} XML processing library. It consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with two Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). The library is extremely portable and easy to integrate and use. pugixml is developed and maintained since 2006 and has many users. All code is distributed under the <<license,MIT license>>, making it completely free to use in both open-source and proprietary applications.
pugixml enables very fast, convenient and memory-efficient XML document processing. However, since pugixml has a DOM parser, it can't process XML documents that do not fit in memory; also the parser is a non-validating one, so if you need DTD/Schema validation, the library is not for you. pugixml enables very fast, convenient and memory-efficient XML document processing. However, since pugixml has a DOM parser, it can't process XML documents that do not fit in memory; also the parser is a non-validating one, so if you need DTD/Schema validation, the library is not for you.
This is the quick start guide for pugixml, which purpose is to enable you to start using the library quickly. Many important library features are either not described at all or only mentioned briefly; for more complete information you link:manual.html[should read the complete manual]. This is the quick start guide for pugixml, which purpose is to enable you to start using the library quickly. Many important library features are either not described at all or only mentioned briefly; for more complete information you link:manual.html[should read the complete manual].
NOTE: No documentation is perfect; neither is this one. If you find errors or omissions, please dont hesitate to https://github.com/zeux/pugixml/issues/new[submit an issue or open a pull request] with a fix. NOTE: No documentation is perfect; neither is this one. If you find errors or omissions, please dont hesitate to https://github.com/zeux/pugixml/issues/new[submit an issue or open a pull request] with a fix.
[[install]] [[install]]
== Installation == Installation
You can download the latest source distribution as an archive: You can download the latest source distribution as an archive:
https://github.com/zeux/pugixml/releases/download/v{version}/pugixml-{version}.zip[pugixml-{version}.zip] (Windows line endings) https://github.com/zeux/pugixml/releases/download/v{version}/pugixml-{version}.zip[pugixml-{version}.zip] (Windows line endings)
/ /
https://github.com/zeux/pugixml/releases/download/v{version}/pugixml-{version}.tar.gz[pugixml-{version}.tar.gz] (Unix line endings) https://github.com/zeux/pugixml/releases/download/v{version}/pugixml-{version}.tar.gz[pugixml-{version}.tar.gz] (Unix line endings)
The distribution contains library source, documentation (the guide you're reading now and the manual) and some code examples. After downloading the distribution, install pugixml by extracting all files from the compressed archive. The distribution contains library source, documentation (the guide you're reading now and the manual) and some code examples. After downloading the distribution, install pugixml by extracting all files from the compressed archive.
The complete pugixml source consists of three files - one source file, `pugixml.cpp`, and two header files, `pugixml.hpp` and `pugiconfig.hpp`. `pugixml.hpp` is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that `pugixml.hpp` is either in the current directory or in one of include directories of your projects, so that `#include "pugixml.hpp"` can find the header; however you can also use relative path (i.e. `#include "../libs/pugixml/src/pugixml.hpp"`) or include directory-relative path (i.e. `#include <xml/thirdparty/pugixml/src/pugixml.hpp>`). The complete pugixml source consists of three files - one source file, `pugixml.cpp`, and two header files, `pugixml.hpp` and `pugiconfig.hpp`. `pugixml.hpp` is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that `pugixml.hpp` is either in the current directory or in one of include directories of your projects, so that `#include "pugixml.hpp"` can find the header; however you can also use relative path (i.e. `#include "../libs/pugixml/src/pugixml.hpp"`) or include directory-relative path (i.e. `#include <xml/thirdparty/pugixml/src/pugixml.hpp>`).
The easiest way to build pugixml is to compile the source file, `pugixml.cpp`, along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio footnote:[All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just *add `pugixml.cpp` to one of your projects*. There are other building methods available, including building pugixml as a standalone static/shared library; link:manual.html#install.building[read the manual] for further information. The easiest way to build pugixml is to compile the source file, `pugixml.cpp`, along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio footnote:[All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just *add `pugixml.cpp` to one of your projects*. There are other building methods available, including building pugixml as a standalone static/shared library; link:manual.html#install.building[read the manual] for further information.
[[dom]] [[dom]]
== Document object model == Document object model
pugixml stores XML data in DOM-like way: the entire XML document (both document structure and element data) is stored in memory as a tree. The tree can be loaded from character stream (file, string, C{plus}{plus} I/O stream), then traversed via special API or XPath expressions. The whole tree is mutable: both node structure and node/attribute data can be changed at any time. Finally, the result of document transformations can be saved to a character stream (file, C{plus}{plus} I/O stream or custom transport). pugixml stores XML data in DOM-like way: the entire XML document (both document structure and element data) is stored in memory as a tree. The tree can be loaded from character stream (file, string, C{plus}{plus} I/O stream), then traversed via special API or XPath expressions. The whole tree is mutable: both node structure and node/attribute data can be changed at any time. Finally, the result of document transformations can be saved to a character stream (file, C{plus}{plus} I/O stream or custom transport).
The root of the tree is the document itself, which corresponds to C{plus}{plus} type `xml_document`. Document has one or more child nodes, which correspond to C{plus}{plus} type `xml_node`. Nodes have different types; depending on a type, a node can have a collection of child nodes, a collection of attributes, which correspond to C{plus}{plus} type `xml_attribute`, and some additional data (i.e. name). The root of the tree is the document itself, which corresponds to C{plus}{plus} type `xml_document`. Document has one or more child nodes, which correspond to C{plus}{plus} type `xml_node`. Nodes have different types; depending on a type, a node can have a collection of child nodes, a collection of attributes, which correspond to C{plus}{plus} type `xml_attribute`, and some additional data (i.e. name).
The most common node types are: The most common node types are:
* Document node (`node_document`) - this is the root of the tree, which consists of several child nodes. This node corresponds to `xml_document` class; note that `xml_document` is a sub-class of `xml_node`, so the entire node interface is also available. * Document node (`node_document`) - this is the root of the tree, which consists of several child nodes. This node corresponds to `xml_document` class; note that `xml_document` is a sub-class of `xml_node`, so the entire node interface is also available.
* Element/tag node (`node_element`) - this is the most common type of node, which represents XML elements. Element nodes have a name, a collection of attributes and a collection of child nodes (both of which may be empty). The attribute is a simple name/value pair. * Element/tag node (`node_element`) - this is the most common type of node, which represents XML elements. Element nodes have a name, a collection of attributes and a collection of child nodes (both of which may be empty). The attribute is a simple name/value pair.
* Plain character data nodes (`node_pcdata`) represent plain text in XML. PCDATA nodes have a value, but do not have name or children/attributes. Note that *plain character data is not a part of the element node but instead has its own node*; for example, an element node can have several child PCDATA nodes. * Plain character data nodes (`node_pcdata`) represent plain text in XML. PCDATA nodes have a value, but do not have name or children/attributes. Note that *plain character data is not a part of the element node but instead has its own node*; for example, an element node can have several child PCDATA nodes.
Despite the fact that there are several node types, there are only three C{plus}{plus} types representing the tree (`xml_document`, `xml_node`, `xml_attribute`); some operations on `xml_node` are only valid for certain node types. They are described below. Despite the fact that there are several node types, there are only three C{plus}{plus} types representing the tree (`xml_document`, `xml_node`, `xml_attribute`); some operations on `xml_node` are only valid for certain node types. They are described below.
NOTE: All pugixml classes and functions are located in `pugi` namespace; you have to either use explicit name qualification (i.e. `pugi::xml_node`), or to gain access to relevant symbols via `using` directive (i.e. `using pugi::xml_node;` or `using namespace pugi;`). NOTE: All pugixml classes and functions are located in `pugi` namespace; you have to either use explicit name qualification (i.e. `pugi::xml_node`), or to gain access to relevant symbols via `using` directive (i.e. `using pugi::xml_node;` or `using namespace pugi;`).
`xml_document` is the owner of the entire document structure; destroying the document destroys the whole tree. The interface of `xml_document` consists of loading functions, saving functions and the entire interface of `xml_node`, which allows for document inspection and/or modification. Note that while `xml_document` is a sub-class of `xml_node`, `xml_node` is not a polymorphic type; the inheritance is present only to simplify usage. `xml_document` is the owner of the entire document structure; destroying the document destroys the whole tree. The interface of `xml_document` consists of loading functions, saving functions and the entire interface of `xml_node`, which allows for document inspection and/or modification. Note that while `xml_document` is a sub-class of `xml_node`, `xml_node` is not a polymorphic type; the inheritance is present only to simplify usage.
`xml_node` is the handle to document node; it can point to any node in the document, including document itself. There is a common interface for nodes of all types. Note that `xml_node` is only a handle to the actual node, not the node itself - you can have several `xml_node` handles pointing to the same underlying object. Destroying `xml_node` handle does not destroy the node and does not remove it from the tree. `xml_node` is the handle to document node; it can point to any node in the document, including document itself. There is a common interface for nodes of all types. Note that `xml_node` is only a handle to the actual node, not the node itself - you can have several `xml_node` handles pointing to the same underlying object. Destroying `xml_node` handle does not destroy the node and does not remove it from the tree.
There is a special value of `xml_node` type, known as null node or empty node. It does not correspond to any node in any document, and thus resembles null pointer. However, all operations are defined on empty nodes; generally the operations don't do anything and return empty nodes/attributes or empty strings as their result. This is useful for chaining calls; i.e. you can get the grandparent of a node like so: `node.parent().parent()`; if a node is a null node or it does not have a parent, the first `parent()` call returns null node; the second `parent()` call then also returns null node, so you don't have to check for errors twice. You can test if a handle is null via implicit boolean cast: `if (node) { ... }` or `if (!node) { ... }`. There is a special value of `xml_node` type, known as null node or empty node. It does not correspond to any node in any document, and thus resembles null pointer. However, all operations are defined on empty nodes; generally the operations don't do anything and return empty nodes/attributes or empty strings as their result. This is useful for chaining calls; i.e. you can get the grandparent of a node like so: `node.parent().parent()`; if a node is a null node or it does not have a parent, the first `parent()` call returns null node; the second `parent()` call then also returns null node, so you don't have to check for errors twice. You can test if a handle is null via implicit boolean cast: `if (node) { ... }` or `if (!node) { ... }`.
`xml_attribute` is the handle to an XML attribute; it has the same semantics as `xml_node`, i.e. there can be several `xml_attribute` handles pointing to the same underlying object and there is a special null attribute value, which propagates to function results. `xml_attribute` is the handle to an XML attribute; it has the same semantics as `xml_node`, i.e. there can be several `xml_attribute` handles pointing to the same underlying object and there is a special null attribute value, which propagates to function results.
There are two choices of interface and internal representation when configuring pugixml: you can either choose the UTF-8 (also called char) interface or UTF-16/32 (also called wchar_t) one. The choice is controlled via `PUGIXML_WCHAR_MODE` define; you can set it via `pugiconfig.hpp` or via preprocessor options. All tree functions that work with strings work with either C-style null terminated strings or STL strings of the selected character type. link:manual.html#dom.unicode[Read the manual] for additional information on Unicode interface. There are two choices of interface and internal representation when configuring pugixml: you can either choose the UTF-8 (also called char) interface or UTF-16/32 (also called wchar_t) one. The choice is controlled via `PUGIXML_WCHAR_MODE` define; you can set it via `pugiconfig.hpp` or via preprocessor options. All tree functions that work with strings work with either C-style null terminated strings or STL strings of the selected character type. link:manual.html#dom.unicode[Read the manual] for additional information on Unicode interface.
[[loading]] [[loading]]
== Loading document == Loading document
pugixml provides several functions for loading XML data from various places - files, C{plus}{plus} iostreams, memory buffers. All functions use an extremely fast non-validating parser. This parser is not fully W3C conformant - it can load any valid XML document, but does not perform some well-formedness checks. While considerable effort is made to reject invalid XML documents, some validation is not performed because of performance reasons. XML data is always converted to internal character format before parsing. pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally supported since it's a strict subset of UTF-16) and handles all encoding conversions automatically. pugixml provides several functions for loading XML data from various places - files, C{plus}{plus} iostreams, memory buffers. All functions use an extremely fast non-validating parser. This parser is not fully W3C conformant - it can load any valid XML document, but does not perform some well-formedness checks. While considerable effort is made to reject invalid XML documents, some validation is not performed because of performance reasons. XML data is always converted to internal character format before parsing. pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally supported since it's a strict subset of UTF-16) and handles all encoding conversions automatically.
The most common source of XML data is files; pugixml provides a separate function for loading XML document from file. This function accepts file path as its first argument, and also two optional arguments, which specify parsing options and input data encoding, which are described in the manual. The most common source of XML data is files; pugixml provides a separate function for loading XML document from file. This function accepts file path as its first argument, and also two optional arguments, which specify parsing options and input data encoding, which are described in the manual.
This is an example of loading XML document from file (link:samples/load_file.cpp[]): This is an example of loading XML document from file (link:samples/load_file.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/load_file.cpp[tags=code] include::samples/load_file.cpp[tags=code]
---- ----
`load_file`, as well as other loading functions, destroys the existing document tree and then tries to load the new tree from the specified file. The result of the operation is returned in an `xml_parse_result` object; this object contains the operation status, and the related information (i.e. last successfully parsed position in the input file, if parsing fails). `load_file`, as well as other loading functions, destroys the existing document tree and then tries to load the new tree from the specified file. The result of the operation is returned in an `xml_parse_result` object; this object contains the operation status, and the related information (i.e. last successfully parsed position in the input file, if parsing fails).
Parsing result object can be implicitly converted to `bool`; if you do not want to handle parsing errors thoroughly, you can just check the return value of load functions as if it was a `bool`: `if (doc.load_file("file.xml")) { ... } else { ... }`. Otherwise you can use the `status` member to get parsing status, or the `description()` member function to get the status in a string form. Parsing result object can be implicitly converted to `bool`; if you do not want to handle parsing errors thoroughly, you can just check the return value of load functions as if it was a `bool`: `if (doc.load_file("file.xml")) { ... } else { ... }`. Otherwise you can use the `status` member to get parsing status, or the `description()` member function to get the status in a string form.
This is an example of handling loading errors (link:samples/load_error_handling.cpp[]): This is an example of handling loading errors (link:samples/load_error_handling.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/load_error_handling.cpp[tags=code] include::samples/load_error_handling.cpp[tags=code]
---- ----
Sometimes XML data should be loaded from some other source than file, i.e. HTTP URL; also you may want to load XML data from file using non-standard functions, i.e. to use your virtual file system facilities or to load XML from gzip-compressed files. These scenarios either require loading document from memory, in which case you should prepare a contiguous memory block with all XML data and to pass it to one of buffer loading functions, or loading document from C{plus}{plus} IOstream, in which case you should provide an object which implements `std::istream` or `std::wistream` interface. Sometimes XML data should be loaded from some other source than file, i.e. HTTP URL; also you may want to load XML data from file using non-standard functions, i.e. to use your virtual file system facilities or to load XML from gzip-compressed files. These scenarios either require loading document from memory, in which case you should prepare a contiguous memory block with all XML data and to pass it to one of buffer loading functions, or loading document from C{plus}{plus} IOstream, in which case you should provide an object which implements `std::istream` or `std::wistream` interface.
There are different functions for loading document from memory; they treat the passed buffer as either an immutable one (`load_buffer`), a mutable buffer which is owned by the caller (`load_buffer_inplace`), or a mutable buffer which ownership belongs to pugixml (`load_buffer_inplace_own`). There is also a simple helper function, `xml_document::load`, for cases when you want to load the XML document from null-terminated character string. There are different functions for loading document from memory; they treat the passed buffer as either an immutable one (`load_buffer`), a mutable buffer which is owned by the caller (`load_buffer_inplace`), or a mutable buffer which ownership belongs to pugixml (`load_buffer_inplace_own`). There is also a simple helper function, `xml_document::load`, for cases when you want to load the XML document from null-terminated character string.
This is an example of loading XML document from memory using one of these functions (link:samples/load_memory.cpp[]); read the sample code for more examples: This is an example of loading XML document from memory using one of these functions (link:samples/load_memory.cpp[]); read the sample code for more examples:
[source,indent=0] [source,indent=0]
---- ----
include::samples/load_memory.cpp[tags=decl] include::samples/load_memory.cpp[tags=decl]
---- ----
[source,indent=0] [source,indent=0]
---- ----
include::samples/load_memory.cpp[tags=load_buffer_inplace_begin] include::samples/load_memory.cpp[tags=load_buffer_inplace_begin]
include::samples/load_memory.cpp[tags=load_buffer_inplace_end] include::samples/load_memory.cpp[tags=load_buffer_inplace_end]
---- ----
This is a simple example of loading XML document from file using streams (link:samples/load_stream.cpp[]); read the sample code for more complex examples involving wide streams and locales: This is a simple example of loading XML document from file using streams (link:samples/load_stream.cpp[]); read the sample code for more complex examples involving wide streams and locales:
[source,indent=0] [source,indent=0]
---- ----
include::samples/load_stream.cpp[tags=code] include::samples/load_stream.cpp[tags=code]
---- ----
[[access]] [[access]]
== Accessing document data == Accessing document data
pugixml features an extensive interface for getting various types of data from the document and for traversing the document. You can use various accessors to get node/attribute data, you can traverse the child node/attribute lists via accessors or iterators, you can do depth-first traversals with `xml_tree_walker` objects, and you can use XPath for complex data-driven queries. pugixml features an extensive interface for getting various types of data from the document and for traversing the document. You can use various accessors to get node/attribute data, you can traverse the child node/attribute lists via accessors or iterators, you can do depth-first traversals with `xml_tree_walker` objects, and you can use XPath for complex data-driven queries.
You can get node or attribute name via `name()` accessor, and value via `value()` accessor. Note that both functions never return null pointers - they either return a string with the relevant content, or an empty string if name/value is absent or if the handle is null. Also there are two notable things for reading values: You can get node or attribute name via `name()` accessor, and value via `value()` accessor. Note that both functions never return null pointers - they either return a string with the relevant content, or an empty string if name/value is absent or if the handle is null. Also there are two notable things for reading values:
* It is common to store data as text contents of some node - i.e. `<node><description>This is a node</description></node>`. In this case, `<description>` node does not have a value, but instead has a child of type `node_pcdata` with value `"This is a node"`. pugixml provides `child_value()` and `text()` helper functions to parse such data. * It is common to store data as text contents of some node - i.e. `<node><description>This is a node</description></node>`. In this case, `<description>` node does not have a value, but instead has a child of type `node_pcdata` with value `"This is a node"`. pugixml provides `child_value()` and `text()` helper functions to parse such data.
* In many cases attribute values have types that are not strings - i.e. an attribute may always contain values that should be treated as integers, despite the fact that they are represented as strings in XML. pugixml provides several accessors that convert attribute value to some other type. * In many cases attribute values have types that are not strings - i.e. an attribute may always contain values that should be treated as integers, despite the fact that they are represented as strings in XML. pugixml provides several accessors that convert attribute value to some other type.
This is an example of using these functions (link:samples/traverse_base.cpp[]): This is an example of using these functions (link:samples/traverse_base.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/traverse_base.cpp[tags=data] include::samples/traverse_base.cpp[tags=data]
---- ----
Since a lot of document traversal consists of finding the node/attribute with the correct name, there are special functions for that purpose. For example, `child("Tool")` returns the first node which has the name `"Tool"`, or null handle if there is no such node. This is an example of using such functions (link:samples/traverse_base.cpp[]): Since a lot of document traversal consists of finding the node/attribute with the correct name, there are special functions for that purpose. For example, `child("Tool")` returns the first node which has the name `"Tool"`, or null handle if there is no such node. This is an example of using such functions (link:samples/traverse_base.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/traverse_base.cpp[tags=contents] include::samples/traverse_base.cpp[tags=contents]
---- ----
Child node lists and attribute lists are simply double-linked lists; while you can use `previous_sibling`/`next_sibling` and other such functions for iteration, pugixml additionally provides node and attribute iterators, so that you can treat nodes as containers of other nodes or attributes. All iterators are bidirectional and support all usual iterator operations. The iterators are invalidated if the node/attribute objects they're pointing to are removed from the tree; adding nodes/attributes does not invalidate any iterators. Child node lists and attribute lists are simply double-linked lists; while you can use `previous_sibling`/`next_sibling` and other such functions for iteration, pugixml additionally provides node and attribute iterators, so that you can treat nodes as containers of other nodes or attributes. All iterators are bidirectional and support all usual iterator operations. The iterators are invalidated if the node/attribute objects they're pointing to are removed from the tree; adding nodes/attributes does not invalidate any iterators.
Here is an example of using iterators for document traversal (link:samples/traverse_iter.cpp[]): Here is an example of using iterators for document traversal (link:samples/traverse_iter.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/traverse_iter.cpp[tags=code] include::samples/traverse_iter.cpp[tags=code]
---- ----
If your C{plus}{plus} compiler supports range-based for-loop (this is a C{plus}{plus}11 feature, at the time of writing it's supported by Microsoft Visual Studio 11 Beta, GCC 4.6 and Clang 3.0), you can use it to enumerate nodes/attributes. Additional helpers are provided to support this; note that they are also compatible with http://www.boost.org/libs/foreach/[Boost Foreach], and possibly other pre-C{plus}{plus}11 foreach facilities. If your C{plus}{plus} compiler supports range-based for-loop (this is a C{plus}{plus}11 feature, at the time of writing it's supported by Microsoft Visual Studio 11 Beta, GCC 4.6 and Clang 3.0), you can use it to enumerate nodes/attributes. Additional helpers are provided to support this; note that they are also compatible with http://www.boost.org/libs/foreach/[Boost Foreach], and possibly other pre-C{plus}{plus}11 foreach facilities.
Here is an example of using C{plus}{plus}11 range-based for loop for document traversal (link:samples/traverse_rangefor.cpp[]): Here is an example of using C{plus}{plus}11 range-based for loop for document traversal (link:samples/traverse_rangefor.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/traverse_rangefor.cpp[tags=code] include::samples/traverse_rangefor.cpp[tags=code]
---- ----
The methods described above allow traversal of immediate children of some node; if you want to do a deep tree traversal, you'll have to do it via a recursive function or some equivalent method. However, pugixml provides a helper for depth-first traversal of a subtree. In order to use it, you have to implement `xml_tree_walker` interface and to call `traverse` function. The methods described above allow traversal of immediate children of some node; if you want to do a deep tree traversal, you'll have to do it via a recursive function or some equivalent method. However, pugixml provides a helper for depth-first traversal of a subtree. In order to use it, you have to implement `xml_tree_walker` interface and to call `traverse` function.
This is an example of traversing tree hierarchy with xml_tree_walker (link:samples/traverse_walker.cpp[]): This is an example of traversing tree hierarchy with xml_tree_walker (link:samples/traverse_walker.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/traverse_walker.cpp[tags=impl] include::samples/traverse_walker.cpp[tags=impl]
---- ----
[source,indent=0] [source,indent=0]
---- ----
include::samples/traverse_walker.cpp[tags=traverse] include::samples/traverse_walker.cpp[tags=traverse]
---- ----
Finally, for complex queries often a higher-level DSL is needed. pugixml provides an implementation of XPath 1.0 language for such queries. The complete description of XPath usage can be found in the manual, but here are some examples: Finally, for complex queries often a higher-level DSL is needed. pugixml provides an implementation of XPath 1.0 language for such queries. The complete description of XPath usage can be found in the manual, but here are some examples:
[source,indent=0] [source,indent=0]
---- ----
include::samples/xpath_select.cpp[tags=code] include::samples/xpath_select.cpp[tags=code]
---- ----
CAUTION: XPath functions throw `xpath_exception` objects on error; the sample above does not catch these exceptions. CAUTION: XPath functions throw `xpath_exception` objects on error; the sample above does not catch these exceptions.
[[modify]] [[modify]]
== Modifying document data == Modifying document data
The document in pugixml is fully mutable: you can completely change the document structure and modify the data of nodes/attributes. All functions take care of memory management and structural integrity themselves, so they always result in structurally valid tree - however, it is possible to create an invalid XML tree (for example, by adding two attributes with the same name or by setting attribute/node name to empty/invalid string). Tree modification is optimized for performance and for memory consumption, so if you have enough memory you can create documents from scratch with pugixml and later save them to file/stream instead of relying on error-prone manual text writing and without too much overhead. The document in pugixml is fully mutable: you can completely change the document structure and modify the data of nodes/attributes. All functions take care of memory management and structural integrity themselves, so they always result in structurally valid tree - however, it is possible to create an invalid XML tree (for example, by adding two attributes with the same name or by setting attribute/node name to empty/invalid string). Tree modification is optimized for performance and for memory consumption, so if you have enough memory you can create documents from scratch with pugixml and later save them to file/stream instead of relying on error-prone manual text writing and without too much overhead.
All member functions that change node/attribute data or structure are non-constant and thus can not be called on constant handles. However, you can easily convert constant handle to non-constant one by simple assignment: `void foo(const pugi::xml_node& n) { pugi::xml_node nc = n; }`, so const-correctness here mainly provides additional documentation. All member functions that change node/attribute data or structure are non-constant and thus can not be called on constant handles. However, you can easily convert constant handle to non-constant one by simple assignment: `void foo(const pugi::xml_node& n) { pugi::xml_node nc = n; }`, so const-correctness here mainly provides additional documentation.
As discussed before, nodes can have name and value, both of which are strings. Depending on node type, name or value may be absent. You can use `set_name` and `set_value` member functions to set them. Similar functions are available for attributes; however, the `set_value` function is overloaded for some other types except strings, like floating-point numbers. Also, attribute value can be set using an assignment operator. This is an example of setting node/attribute name and value (link:samples/modify_base.cpp[]): As discussed before, nodes can have name and value, both of which are strings. Depending on node type, name or value may be absent. You can use `set_name` and `set_value` member functions to set them. Similar functions are available for attributes; however, the `set_value` function is overloaded for some other types except strings, like floating-point numbers. Also, attribute value can be set using an assignment operator. This is an example of setting node/attribute name and value (link:samples/modify_base.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/modify_base.cpp[tags=node] include::samples/modify_base.cpp[tags=node]
---- ----
[source,indent=0] [source,indent=0]
---- ----
include::samples/modify_base.cpp[tags=attr] include::samples/modify_base.cpp[tags=attr]
---- ----
Nodes and attributes do not exist without a document tree, so you can't create them without adding them to some document. A node or attribute can be created at the end of node/attribute list or before/after some other node. All insertion functions return the handle to newly created object on success, and null handle on failure. Even if the operation fails (for example, if you're trying to add a child node to PCDATA node), the document remains in consistent state, but the requested node/attribute is not added. Nodes and attributes do not exist without a document tree, so you can't create them without adding them to some document. A node or attribute can be created at the end of node/attribute list or before/after some other node. All insertion functions return the handle to newly created object on success, and null handle on failure. Even if the operation fails (for example, if you're trying to add a child node to PCDATA node), the document remains in consistent state, but the requested node/attribute is not added.
CAUTION: `attribute()` and `child()` functions do not add attributes or nodes to the tree, so code like `node.attribute("id") = 123;` will not do anything if `node` does not have an attribute with name `"id"`. Make sure you're operating with existing attributes/nodes by adding them if necessary. CAUTION: `attribute()` and `child()` functions do not add attributes or nodes to the tree, so code like `node.attribute("id") = 123;` will not do anything if `node` does not have an attribute with name `"id"`. Make sure you're operating with existing attributes/nodes by adding them if necessary.
This is an example of adding new attributes/nodes to the document (link:samples/modify_add.cpp[]): This is an example of adding new attributes/nodes to the document (link:samples/modify_add.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/modify_add.cpp[tags=code] include::samples/modify_add.cpp[tags=code]
---- ----
If you do not want your document to contain some node or attribute, you can remove it with `remove_attribute` and `remove_child` functions. Removing the attribute or node invalidates all handles to the same underlying object, and also invalidates all iterators pointing to the same object. Removing node also invalidates all past-the-end iterators to its attribute or child node list. Be careful to ensure that all such handles and iterators either do not exist or are not used after the attribute/node is removed. If you do not want your document to contain some node or attribute, you can remove it with `remove_attribute` and `remove_child` functions. Removing the attribute or node invalidates all handles to the same underlying object, and also invalidates all iterators pointing to the same object. Removing node also invalidates all past-the-end iterators to its attribute or child node list. Be careful to ensure that all such handles and iterators either do not exist or are not used after the attribute/node is removed.
This is an example of removing attributes/nodes from the document (link:samples/modify_remove.cpp[]): This is an example of removing attributes/nodes from the document (link:samples/modify_remove.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/modify_remove.cpp[tags=code] include::samples/modify_remove.cpp[tags=code]
---- ----
[[saving]] [[saving]]
== Saving document == Saving document
Often after creating a new document or loading the existing one and processing it, it is necessary to save the result back to file. Also it is occasionally useful to output the whole document or a subtree to some stream; use cases include debug printing, serialization via network or other text-oriented medium, etc. pugixml provides several functions to output any subtree of the document to a file, stream or another generic transport interface; these functions allow to customize the output format, and also perform necessary encoding conversions. Often after creating a new document or loading the existing one and processing it, it is necessary to save the result back to file. Also it is occasionally useful to output the whole document or a subtree to some stream; use cases include debug printing, serialization via network or other text-oriented medium, etc. pugixml provides several functions to output any subtree of the document to a file, stream or another generic transport interface; these functions allow to customize the output format, and also perform necessary encoding conversions.
Before writing to the destination the node/attribute data is properly formatted according to the node type; all special XML symbols, such as < and &, are properly escaped. In order to guard against forgotten node/attribute names, empty node/attribute names are printed as `":anonymous"`. For well-formed output, make sure all node and attribute names are set to meaningful values. Before writing to the destination the node/attribute data is properly formatted according to the node type; all special XML symbols, such as < and &, are properly escaped. In order to guard against forgotten node/attribute names, empty node/attribute names are printed as `":anonymous"`. For well-formed output, make sure all node and attribute names are set to meaningful values.
If you want to save the whole document to a file, you can use the `save_file` function, which returns `true` on success. This is a simple example of saving XML document to file (link:samples/save_file.cpp[]): If you want to save the whole document to a file, you can use the `save_file` function, which returns `true` on success. This is a simple example of saving XML document to file (link:samples/save_file.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/save_file.cpp[tags=code] include::samples/save_file.cpp[tags=code]
---- ----
To enhance interoperability pugixml provides functions for saving document to any object which implements C{plus}{plus} `std::ostream` interface. This allows you to save documents to any standard C{plus}{plus} stream (i.e. file stream) or any third-party compliant implementation (i.e. Boost Iostreams). Most notably, this allows for easy debug output, since you can use `std::cout` stream as saving target. There are two functions, one works with narrow character streams, another handles wide character ones. To enhance interoperability pugixml provides functions for saving document to any object which implements C{plus}{plus} `std::ostream` interface. This allows you to save documents to any standard C{plus}{plus} stream (i.e. file stream) or any third-party compliant implementation (i.e. Boost Iostreams). Most notably, this allows for easy debug output, since you can use `std::cout` stream as saving target. There are two functions, one works with narrow character streams, another handles wide character ones.
This is a simple example of saving XML document to standard output (link:samples/save_stream.cpp[]): This is a simple example of saving XML document to standard output (link:samples/save_stream.cpp[]):
[source,indent=0] [source,indent=0]
---- ----
include::samples/save_stream.cpp[tags=code] include::samples/save_stream.cpp[tags=code]
---- ----
All of the above saving functions are implemented in terms of writer interface. This is a simple interface with a single function, which is called several times during output process with chunks of document data as input. In order to output the document via some custom transport, for example sockets, you should create an object which implements `xml_writer_file` interface and pass it to `xml_document::save` function. All of the above saving functions are implemented in terms of writer interface. This is a simple interface with a single function, which is called several times during output process with chunks of document data as input. In order to output the document via some custom transport, for example sockets, you should create an object which implements `xml_writer_file` interface and pass it to `xml_document::save` function.
This is a simple example of custom writer for saving document data to STL string (link:samples/save_custom_writer.cpp[]); read the sample code for more complex examples: This is a simple example of custom writer for saving document data to STL string (link:samples/save_custom_writer.cpp[]); read the sample code for more complex examples:
[source,indent=0] [source,indent=0]
---- ----
include::samples/save_custom_writer.cpp[tags=code] include::samples/save_custom_writer.cpp[tags=code]
---- ----
While the previously described functions save the whole document to the destination, it is easy to save a single subtree. Instead of calling `xml_document::save`, just call `xml_node::print` function on the target node. You can save node contents to C{plus}{plus} IOstream object or custom writer in this way. Saving a subtree slightly differs from saving the whole document; link:manual.html#saving.subtree[read the manual] for more information. While the previously described functions save the whole document to the destination, it is easy to save a single subtree. Instead of calling `xml_document::save`, just call `xml_node::print` function on the target node. You can save node contents to C{plus}{plus} IOstream object or custom writer in this way. Saving a subtree slightly differs from saving the whole document; link:manual.html#saving.subtree[read the manual] for more information.
[[feedback]] [[feedback]]
== Feedback == Feedback
If you believe you've found a bug in pugixml, please file an issue via https://github.com/zeux/pugixml/issues/new[issue submission form]. Be sure to include the relevant information so that the bug can be reproduced: the version of pugixml, compiler version and target architecture, the code that uses pugixml and exhibits the bug, etc. Feature requests and contributions can be filed as issues, too. If you believe you've found a bug in pugixml, please file an issue via https://github.com/zeux/pugixml/issues/new[issue submission form]. Be sure to include the relevant information so that the bug can be reproduced: the version of pugixml, compiler version and target architecture, the code that uses pugixml and exhibits the bug, etc. Feature requests and contributions can be filed as issues, too.
If filing an issue is not possible due to privacy or other concerns, you can contact pugixml author by e-mail directly: arseny.kapoulkine@gmail.com. If filing an issue is not possible due to privacy or other concerns, you can contact pugixml author by e-mail directly: arseny.kapoulkine@gmail.com.
[[license]] [[license]]
== License == License
The pugixml library is distributed under the MIT license: The pugixml library is distributed under the MIT license:
.... ....
Copyright (c) 2006-2022 Arseny Kapoulkine Copyright (c) 2006-2022 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
files (the "Software"), to deal in the Software without files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following Software is furnished to do so, subject to the following
conditions: conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE. OTHER DEALINGS IN THE SOFTWARE.
.... ....
This means that you can freely use pugixml in your applications, both open-source and proprietary. If you use pugixml in a product, it is sufficient to add an acknowledgment like this to the product distribution: This means that you can freely use pugixml in your applications, both open-source and proprietary. If you use pugixml in a product, it is sufficient to add an acknowledgment like this to the product distribution:
.... ....
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-2022 Arseny Kapoulkine. pugixml is Copyright (C) 2006-2022 Arseny Kapoulkine.
.... ....

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<network> <network>
<animation clip="idle" flags="loop" /> <animation clip="idle" flags="loop" />
<animation clip="run" flags="loop" /> <animation clip="run" flags="loop" />
<animation clip="attack" /> <animation clip="attack" />
<?include transitions.xml?> <?include transitions.xml?>
</network> </network>

View File

@ -1,27 +1,27 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <new> #include <new>
// tag::decl[] // tag::decl[]
void* custom_allocate(size_t size) void* custom_allocate(size_t size)
{ {
return new (std::nothrow) char[size]; return new (std::nothrow) char[size];
} }
void custom_deallocate(void* ptr) void custom_deallocate(void* ptr)
{ {
delete[] static_cast<char*>(ptr); delete[] static_cast<char*>(ptr);
} }
// end::decl[] // end::decl[]
int main() int main()
{ {
// tag::call[] // tag::call[]
pugi::set_memory_management_functions(custom_allocate, custom_deallocate); pugi::set_memory_management_functions(custom_allocate, custom_deallocate);
// end::call[] // end::call[]
pugi::xml_document doc; pugi::xml_document doc;
doc.load_string("<node/>"); doc.load_string("<node/>");
} }
// vim:et // vim:et

View File

@ -1,64 +1,64 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <string.h> #include <string.h>
#include <iostream> #include <iostream>
// tag::code[] // tag::code[]
bool load_preprocess(pugi::xml_document& doc, const char* path); bool load_preprocess(pugi::xml_document& doc, const char* path);
bool preprocess(pugi::xml_node node) bool preprocess(pugi::xml_node node)
{ {
for (pugi::xml_node child = node.first_child(); child; ) for (pugi::xml_node child = node.first_child(); child; )
{ {
if (child.type() == pugi::node_pi && strcmp(child.name(), "include") == 0) if (child.type() == pugi::node_pi && strcmp(child.name(), "include") == 0)
{ {
pugi::xml_node include = child; pugi::xml_node include = child;
// load new preprocessed document (note: ideally this should handle relative paths) // load new preprocessed document (note: ideally this should handle relative paths)
const char* path = include.value(); const char* path = include.value();
pugi::xml_document doc; pugi::xml_document doc;
if (!load_preprocess(doc, path)) return false; if (!load_preprocess(doc, path)) return false;
// insert the comment marker above include directive // insert the comment marker above include directive
node.insert_child_before(pugi::node_comment, include).set_value(path); node.insert_child_before(pugi::node_comment, include).set_value(path);
// copy the document above the include directive (this retains the original order!) // copy the document above the include directive (this retains the original order!)
for (pugi::xml_node ic = doc.first_child(); ic; ic = ic.next_sibling()) for (pugi::xml_node ic = doc.first_child(); ic; ic = ic.next_sibling())
{ {
node.insert_copy_before(ic, include); node.insert_copy_before(ic, include);
} }
// remove the include node and move to the next child // remove the include node and move to the next child
child = child.next_sibling(); child = child.next_sibling();
node.remove_child(include); node.remove_child(include);
} }
else else
{ {
if (!preprocess(child)) return false; if (!preprocess(child)) return false;
child = child.next_sibling(); child = child.next_sibling();
} }
} }
return true; return true;
} }
bool load_preprocess(pugi::xml_document& doc, const char* path) bool load_preprocess(pugi::xml_document& doc, const char* path)
{ {
pugi::xml_parse_result result = doc.load_file(path, pugi::parse_default | pugi::parse_pi); // for <?include?> pugi::xml_parse_result result = doc.load_file(path, pugi::parse_default | pugi::parse_pi); // for <?include?>
return result ? preprocess(doc) : false; return result ? preprocess(doc) : false;
} }
// end::code[] // end::code[]
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!load_preprocess(doc, "character.xml")) return -1; if (!load_preprocess(doc, "character.xml")) return -1;
doc.print(std::cout); doc.print(std::cout);
} }
// vim:et // vim:et

View File

@ -1,33 +1,33 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
void check_xml(const char* source) void check_xml(const char* source)
{ {
// tag::code[] // tag::code[]
pugi::xml_document doc; pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_string(source); pugi::xml_parse_result result = doc.load_string(source);
if (result) if (result)
{ {
std::cout << "XML [" << source << "] parsed without errors, attr value: [" << doc.child("node").attribute("attr").value() << "]\n\n"; std::cout << "XML [" << source << "] parsed without errors, attr value: [" << doc.child("node").attribute("attr").value() << "]\n\n";
} }
else else
{ {
std::cout << "XML [" << source << "] parsed with errors, attr value: [" << doc.child("node").attribute("attr").value() << "]\n"; std::cout << "XML [" << source << "] parsed with errors, attr value: [" << doc.child("node").attribute("attr").value() << "]\n";
std::cout << "Error description: " << result.description() << "\n"; std::cout << "Error description: " << result.description() << "\n";
std::cout << "Error offset: " << result.offset << " (error at [..." << (source + result.offset) << "]\n\n"; std::cout << "Error offset: " << result.offset << " (error at [..." << (source + result.offset) << "]\n\n";
} }
// end::code[] // end::code[]
} }
int main() int main()
{ {
check_xml("<node attr='value'><child>text</child></node>"); check_xml("<node attr='value'><child>text</child></node>");
check_xml("<node attr='value'><child>text</chil></node>"); check_xml("<node attr='value'><child>text</chil></node>");
check_xml("<node attr='value'><child>text</child>"); check_xml("<node attr='value'><child>text</child>");
check_xml("<node attr='value\"><child>text</child></node>"); check_xml("<node attr='value\"><child>text</child></node>");
check_xml("<node attr='value'><#tag /></node>"); check_xml("<node attr='value'><#tag /></node>");
} }
// vim:et // vim:et

View File

@ -1,16 +1,16 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
// tag::code[] // tag::code[]
pugi::xml_document doc; pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file("tree.xml"); pugi::xml_parse_result result = doc.load_file("tree.xml");
std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl; std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,66 +1,66 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
#include <cstring> #include <cstring>
int main() int main()
{ {
// tag::decl[] // tag::decl[]
const char source[] = "<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>"; const char source[] = "<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>";
size_t size = sizeof(source); size_t size = sizeof(source);
// end::decl[] // end::decl[]
pugi::xml_document doc; pugi::xml_document doc;
{ {
// tag::load_buffer[] // tag::load_buffer[]
// You can use load_buffer to load document from immutable memory block: // You can use load_buffer to load document from immutable memory block:
pugi::xml_parse_result result = doc.load_buffer(source, size); pugi::xml_parse_result result = doc.load_buffer(source, size);
// end::load_buffer[] // end::load_buffer[]
std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl; std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
} }
{ {
// tag::load_buffer_inplace_begin[] // tag::load_buffer_inplace_begin[]
// You can use load_buffer_inplace to load document from mutable memory block; the block's lifetime must exceed that of document // You can use load_buffer_inplace to load document from mutable memory block; the block's lifetime must exceed that of document
char* buffer = new char[size]; char* buffer = new char[size];
memcpy(buffer, source, size); memcpy(buffer, source, size);
// The block can be allocated by any method; the block is modified during parsing // The block can be allocated by any method; the block is modified during parsing
pugi::xml_parse_result result = doc.load_buffer_inplace(buffer, size); pugi::xml_parse_result result = doc.load_buffer_inplace(buffer, size);
// end::load_buffer_inplace_begin[] // end::load_buffer_inplace_begin[]
std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl; std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
// tag::load_buffer_inplace_end[] // tag::load_buffer_inplace_end[]
// You have to destroy the block yourself after the document is no longer used // You have to destroy the block yourself after the document is no longer used
delete[] buffer; delete[] buffer;
// end::load_buffer_inplace_end[] // end::load_buffer_inplace_end[]
} }
{ {
// tag::load_buffer_inplace_own[] // tag::load_buffer_inplace_own[]
// You can use load_buffer_inplace_own to load document from mutable memory block and to pass the ownership of this block // You can use load_buffer_inplace_own to load document from mutable memory block and to pass the ownership of this block
// The block has to be allocated via pugixml allocation function - using i.e. operator new here is incorrect // The block has to be allocated via pugixml allocation function - using i.e. operator new here is incorrect
char* buffer = static_cast<char*>(pugi::get_memory_allocation_function()(size)); char* buffer = static_cast<char*>(pugi::get_memory_allocation_function()(size));
memcpy(buffer, source, size); memcpy(buffer, source, size);
// The block will be deleted by the document // The block will be deleted by the document
pugi::xml_parse_result result = doc.load_buffer_inplace_own(buffer, size); pugi::xml_parse_result result = doc.load_buffer_inplace_own(buffer, size);
// end::load_buffer_inplace_own[] // end::load_buffer_inplace_own[]
std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl; std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
} }
{ {
// tag::load_string[] // tag::load_string[]
// You can use load to load document from null-terminated strings, for example literals: // You can use load to load document from null-terminated strings, for example literals:
pugi::xml_parse_result result = doc.load_string("<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>"); pugi::xml_parse_result result = doc.load_string("<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>");
// end::load_string[] // end::load_string[]
std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl; std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
} }
} }
// vim:et // vim:et

View File

@ -1,30 +1,30 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
// tag::code[] // tag::code[]
const char* source = "<!--comment--><node>&lt;</node>"; const char* source = "<!--comment--><node>&lt;</node>";
// Parsing with default options; note that comment node is not added to the tree, and entity reference &lt; is expanded // Parsing with default options; note that comment node is not added to the tree, and entity reference &lt; is expanded
doc.load_string(source); doc.load_string(source);
std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n"; std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
// Parsing with additional parse_comments option; comment node is now added to the tree // Parsing with additional parse_comments option; comment node is now added to the tree
doc.load_string(source, pugi::parse_default | pugi::parse_comments); doc.load_string(source, pugi::parse_default | pugi::parse_comments);
std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n"; std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
// Parsing with additional parse_comments option and without the (default) parse_escapes option; &lt; is not expanded // Parsing with additional parse_comments option and without the (default) parse_escapes option; &lt; is not expanded
doc.load_string(source, (pugi::parse_default | pugi::parse_comments) & ~pugi::parse_escapes); doc.load_string(source, (pugi::parse_default | pugi::parse_comments) & ~pugi::parse_escapes);
std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n"; std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
// Parsing with minimal option mask; comment node is not added to the tree, and &lt; is not expanded // Parsing with minimal option mask; comment node is not added to the tree, and &lt; is not expanded
doc.load_string(source, pugi::parse_minimal); doc.load_string(source, pugi::parse_minimal);
std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n"; std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,97 +1,97 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
void print_doc(const char* message, const pugi::xml_document& doc, const pugi::xml_parse_result& result) void print_doc(const char* message, const pugi::xml_document& doc, const pugi::xml_parse_result& result)
{ {
std::cout std::cout
<< message << message
<< "\t: load result '" << result.description() << "'" << "\t: load result '" << result.description() << "'"
<< ", first character of root name: U+" << std::hex << std::uppercase << std::setw(4) << std::setfill('0') << pugi::as_wide(doc.first_child().name())[0] << ", first character of root name: U+" << std::hex << std::uppercase << std::setw(4) << std::setfill('0') << pugi::as_wide(doc.first_child().name())[0]
<< ", year: " << doc.first_child().first_child().first_child().child_value() << ", year: " << doc.first_child().first_child().first_child().child_value()
<< std::endl; << std::endl;
} }
bool try_imbue(std::wistream& stream, const char* name) bool try_imbue(std::wistream& stream, const char* name)
{ {
try try
{ {
stream.imbue(std::locale(name)); stream.imbue(std::locale(name));
return true; return true;
} }
catch (const std::exception&) catch (const std::exception&)
{ {
return false; return false;
} }
} }
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
{ {
// tag::code[] // tag::code[]
std::ifstream stream("weekly-utf-8.xml"); std::ifstream stream("weekly-utf-8.xml");
pugi::xml_parse_result result = doc.load(stream); pugi::xml_parse_result result = doc.load(stream);
// end::code[] // end::code[]
// first character of root name: U+9031, year: 1997 // first character of root name: U+9031, year: 1997
print_doc("UTF8 file from narrow stream", doc, result); print_doc("UTF8 file from narrow stream", doc, result);
} }
{ {
std::ifstream stream("weekly-utf-16.xml"); std::ifstream stream("weekly-utf-16.xml");
pugi::xml_parse_result result = doc.load(stream); pugi::xml_parse_result result = doc.load(stream);
// first character of root name: U+9031, year: 1997 // first character of root name: U+9031, year: 1997
print_doc("UTF16 file from narrow stream", doc, result); print_doc("UTF16 file from narrow stream", doc, result);
} }
{ {
// Since wide streams are treated as UTF-16/32 ones, you can't load the UTF-8 file from a wide stream // Since wide streams are treated as UTF-16/32 ones, you can't load the UTF-8 file from a wide stream
// directly if you have localized characters; you'll have to provide a UTF8 locale (there is no // directly if you have localized characters; you'll have to provide a UTF8 locale (there is no
// standard one; you can use utf8_codecvt_facet from Boost or codecvt_utf8 from C++0x) // standard one; you can use utf8_codecvt_facet from Boost or codecvt_utf8 from C++0x)
std::wifstream stream("weekly-utf-8.xml"); std::wifstream stream("weekly-utf-8.xml");
if (try_imbue(stream, "en_US.UTF-8")) // try Linux encoding if (try_imbue(stream, "en_US.UTF-8")) // try Linux encoding
{ {
pugi::xml_parse_result result = doc.load(stream); pugi::xml_parse_result result = doc.load(stream);
// first character of root name: U+00E9, year: 1997 // first character of root name: U+00E9, year: 1997
print_doc("UTF8 file from wide stream", doc, result); print_doc("UTF8 file from wide stream", doc, result);
} }
else else
{ {
std::cout << "UTF-8 locale is not available\n"; std::cout << "UTF-8 locale is not available\n";
} }
} }
{ {
// Since wide streams are treated as UTF-16/32 ones, you can't load the UTF-16 file from a wide stream without // Since wide streams are treated as UTF-16/32 ones, you can't load the UTF-16 file from a wide stream without
// using custom codecvt; you can use codecvt_utf16 from C++0x // using custom codecvt; you can use codecvt_utf16 from C++0x
} }
{ {
// Since encoding names are non-standard, you can't load the Shift-JIS (or any other non-ASCII) file // Since encoding names are non-standard, you can't load the Shift-JIS (or any other non-ASCII) file
// from a wide stream portably // from a wide stream portably
std::wifstream stream("weekly-shift_jis.xml"); std::wifstream stream("weekly-shift_jis.xml");
if (try_imbue(stream, ".932") || // try Microsoft encoding if (try_imbue(stream, ".932") || // try Microsoft encoding
try_imbue(stream, "ja_JP.SJIS")) // try Linux encoding; run "localedef -i ja_JP -c -f SHIFT_JIS /usr/lib/locale/ja_JP.SJIS" to get it try_imbue(stream, "ja_JP.SJIS")) // try Linux encoding; run "localedef -i ja_JP -c -f SHIFT_JIS /usr/lib/locale/ja_JP.SJIS" to get it
{ {
pugi::xml_parse_result result = doc.load(stream); pugi::xml_parse_result result = doc.load(stream);
// first character of root name: U+9031, year: 1997 // first character of root name: U+9031, year: 1997
print_doc("Shift-JIS file from wide stream", doc, result); print_doc("Shift-JIS file from wide stream", doc, result);
} }
else else
{ {
std::cout << "Shift-JIS locale is not available\n"; std::cout << "Shift-JIS locale is not available\n";
} }
} }
} }
// vim:et // vim:et

View File

@ -1,29 +1,29 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
// tag::code[] // tag::code[]
// add node with some name // add node with some name
pugi::xml_node node = doc.append_child("node"); pugi::xml_node node = doc.append_child("node");
// add description node with text child // add description node with text child
pugi::xml_node descr = node.append_child("description"); pugi::xml_node descr = node.append_child("description");
descr.append_child(pugi::node_pcdata).set_value("Simple node"); descr.append_child(pugi::node_pcdata).set_value("Simple node");
// add param node before the description // add param node before the description
pugi::xml_node param = node.insert_child_before("param", descr); pugi::xml_node param = node.insert_child_before("param", descr);
// add attributes to param node // add attributes to param node
param.append_attribute("name") = "version"; param.append_attribute("name") = "version";
param.append_attribute("value") = 1.1; param.append_attribute("value") = 1.1;
param.insert_attribute_after("type", param.attribute("name")) = "float"; param.insert_attribute_after("type", param.attribute("name")) = "float";
// end::code[] // end::code[]
doc.print(std::cout); doc.print(std::cout);
} }
// vim:et // vim:et

View File

@ -1,43 +1,43 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <string.h> #include <string.h>
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_string("<node id='123'>text</node><!-- comment -->", pugi::parse_default | pugi::parse_comments)) return -1; if (!doc.load_string("<node id='123'>text</node><!-- comment -->", pugi::parse_default | pugi::parse_comments)) return -1;
// tag::node[] // tag::node[]
pugi::xml_node node = doc.child("node"); pugi::xml_node node = doc.child("node");
// change node name // change node name
std::cout << node.set_name("notnode"); std::cout << node.set_name("notnode");
std::cout << ", new node name: " << node.name() << std::endl; std::cout << ", new node name: " << node.name() << std::endl;
// change comment text // change comment text
std::cout << doc.last_child().set_value("useless comment"); std::cout << doc.last_child().set_value("useless comment");
std::cout << ", new comment text: " << doc.last_child().value() << std::endl; std::cout << ", new comment text: " << doc.last_child().value() << std::endl;
// we can't change value of the element or name of the comment // we can't change value of the element or name of the comment
std::cout << node.set_value("1") << ", " << doc.last_child().set_name("2") << std::endl; std::cout << node.set_value("1") << ", " << doc.last_child().set_name("2") << std::endl;
// end::node[] // end::node[]
// tag::attr[] // tag::attr[]
pugi::xml_attribute attr = node.attribute("id"); pugi::xml_attribute attr = node.attribute("id");
// change attribute name/value // change attribute name/value
std::cout << attr.set_name("key") << ", " << attr.set_value("345"); std::cout << attr.set_name("key") << ", " << attr.set_value("345");
std::cout << ", new attribute: " << attr.name() << "=" << attr.value() << std::endl; std::cout << ", new attribute: " << attr.name() << "=" << attr.value() << std::endl;
// we can use numbers or booleans // we can use numbers or booleans
attr.set_value(1.234); attr.set_value(1.234);
std::cout << "new attribute value: " << attr.value() << std::endl; std::cout << "new attribute value: " << attr.value() << std::endl;
// we can also use assignment operators for more concise code // we can also use assignment operators for more concise code
attr = true; attr = true;
std::cout << "final attribute value: " << attr.value() << std::endl; std::cout << "final attribute value: " << attr.value() << std::endl;
// end::attr[] // end::attr[]
} }
// vim:et // vim:et

View File

@ -1,27 +1,27 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_string("<node><description>Simple node</description><param name='id' value='123'/></node>")) return -1; if (!doc.load_string("<node><description>Simple node</description><param name='id' value='123'/></node>")) return -1;
// tag::code[] // tag::code[]
// remove description node with the whole subtree // remove description node with the whole subtree
pugi::xml_node node = doc.child("node"); pugi::xml_node node = doc.child("node");
node.remove_child("description"); node.remove_child("description");
// remove id attribute // remove id attribute
pugi::xml_node param = node.child("param"); pugi::xml_node param = node.child("param");
param.remove_attribute("value"); param.remove_attribute("value");
// we can also remove nodes/attributes by handles // we can also remove nodes/attributes by handles
pugi::xml_attribute id = param.attribute("name"); pugi::xml_attribute id = param.attribute("name");
param.remove_attribute(id); param.remove_attribute(id);
// end::code[] // end::code[]
doc.print(std::cout); doc.print(std::cout);
} }
// vim:et // vim:et

View File

@ -1,116 +1,116 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <cstring> #include <cstring>
// tag::code[] // tag::code[]
struct xml_string_writer: pugi::xml_writer struct xml_string_writer: pugi::xml_writer
{ {
std::string result; std::string result;
virtual void write(const void* data, size_t size) virtual void write(const void* data, size_t size)
{ {
result.append(static_cast<const char*>(data), size); result.append(static_cast<const char*>(data), size);
} }
}; };
// end::code[] // end::code[]
struct xml_memory_writer: pugi::xml_writer struct xml_memory_writer: pugi::xml_writer
{ {
char* buffer; char* buffer;
size_t capacity; size_t capacity;
size_t result; size_t result;
xml_memory_writer(): buffer(0), capacity(0), result(0) xml_memory_writer(): buffer(0), capacity(0), result(0)
{ {
} }
xml_memory_writer(char* buffer, size_t capacity): buffer(buffer), capacity(capacity), result(0) xml_memory_writer(char* buffer, size_t capacity): buffer(buffer), capacity(capacity), result(0)
{ {
} }
size_t written_size() const size_t written_size() const
{ {
return result < capacity ? result : capacity; return result < capacity ? result : capacity;
} }
virtual void write(const void* data, size_t size) virtual void write(const void* data, size_t size)
{ {
if (result < capacity) if (result < capacity)
{ {
size_t chunk = (capacity - result < size) ? capacity - result : size; size_t chunk = (capacity - result < size) ? capacity - result : size;
memcpy(buffer + result, data, chunk); memcpy(buffer + result, data, chunk);
} }
result += size; result += size;
} }
}; };
std::string node_to_string(pugi::xml_node node) std::string node_to_string(pugi::xml_node node)
{ {
xml_string_writer writer; xml_string_writer writer;
node.print(writer); node.print(writer);
return writer.result; return writer.result;
} }
char* node_to_buffer(pugi::xml_node node, char* buffer, size_t size) char* node_to_buffer(pugi::xml_node node, char* buffer, size_t size)
{ {
if (size == 0) return buffer; if (size == 0) return buffer;
// leave one character for null terminator // leave one character for null terminator
xml_memory_writer writer(buffer, size - 1); xml_memory_writer writer(buffer, size - 1);
node.print(writer); node.print(writer);
// null terminate // null terminate
buffer[writer.written_size()] = 0; buffer[writer.written_size()] = 0;
return buffer; return buffer;
} }
char* node_to_buffer_heap(pugi::xml_node node) char* node_to_buffer_heap(pugi::xml_node node)
{ {
// first pass: get required memory size // first pass: get required memory size
xml_memory_writer counter; xml_memory_writer counter;
node.print(counter); node.print(counter);
// allocate necessary size (+1 for null termination) // allocate necessary size (+1 for null termination)
char* buffer = new char[counter.result + 1]; char* buffer = new char[counter.result + 1];
// second pass: actual printing // second pass: actual printing
xml_memory_writer writer(buffer, counter.result); xml_memory_writer writer(buffer, counter.result);
node.print(writer); node.print(writer);
// null terminate // null terminate
buffer[writer.written_size()] = 0; buffer[writer.written_size()] = 0;
return buffer; return buffer;
} }
int main() int main()
{ {
// get a test document // get a test document
pugi::xml_document doc; pugi::xml_document doc;
doc.load_string("<foo bar='baz'>hey</foo>"); doc.load_string("<foo bar='baz'>hey</foo>");
// get contents as std::string (single pass) // get contents as std::string (single pass)
std::cout << "contents: [" << node_to_string(doc) << "]\n"; std::cout << "contents: [" << node_to_string(doc) << "]\n";
// get contents into fixed-size buffer (single pass) // get contents into fixed-size buffer (single pass)
char large_buf[128]; char large_buf[128];
std::cout << "contents: [" << node_to_buffer(doc, large_buf, sizeof(large_buf)) << "]\n"; std::cout << "contents: [" << node_to_buffer(doc, large_buf, sizeof(large_buf)) << "]\n";
// get contents into fixed-size buffer (single pass, shows truncating behavior) // get contents into fixed-size buffer (single pass, shows truncating behavior)
char small_buf[22]; char small_buf[22];
std::cout << "contents: [" << node_to_buffer(doc, small_buf, sizeof(small_buf)) << "]\n"; std::cout << "contents: [" << node_to_buffer(doc, small_buf, sizeof(small_buf)) << "]\n";
// get contents into heap-allocated buffer (two passes) // get contents into heap-allocated buffer (two passes)
char* heap_buf = node_to_buffer_heap(doc); char* heap_buf = node_to_buffer_heap(doc);
std::cout << "contents: [" << heap_buf << "]\n"; std::cout << "contents: [" << heap_buf << "]\n";
delete[] heap_buf; delete[] heap_buf;
} }
// vim:et // vim:et

View File

@ -1,27 +1,27 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
// tag::code[] // tag::code[]
// get a test document // get a test document
pugi::xml_document doc; pugi::xml_document doc;
doc.load_string("<foo bar='baz'><call>hey</call></foo>"); doc.load_string("<foo bar='baz'><call>hey</call></foo>");
// add a custom declaration node // add a custom declaration node
pugi::xml_node decl = doc.prepend_child(pugi::node_declaration); pugi::xml_node decl = doc.prepend_child(pugi::node_declaration);
decl.append_attribute("version") = "1.0"; decl.append_attribute("version") = "1.0";
decl.append_attribute("encoding") = "UTF-8"; decl.append_attribute("encoding") = "UTF-8";
decl.append_attribute("standalone") = "no"; decl.append_attribute("standalone") = "no";
// <?xml version="1.0" encoding="UTF-8" standalone="no"?> // <?xml version="1.0" encoding="UTF-8" standalone="no"?>
// <foo bar="baz"> // <foo bar="baz">
// <call>hey</call> // <call>hey</call>
// </foo> // </foo>
doc.save(std::cout); doc.save(std::cout);
std::cout << std::endl; std::cout << std::endl;
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,17 +1,17 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
// get a test document // get a test document
pugi::xml_document doc; pugi::xml_document doc;
doc.load_string("<foo bar='baz'>hey</foo>"); doc.load_string("<foo bar='baz'>hey</foo>");
// tag::code[] // tag::code[]
// save document to file // save document to file
std::cout << "Saving result: " << doc.save_file("save_file_output.xml") << std::endl; std::cout << "Saving result: " << doc.save_file("save_file_output.xml") << std::endl;
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,48 +1,48 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
// tag::code[] // tag::code[]
// get a test document // get a test document
pugi::xml_document doc; pugi::xml_document doc;
doc.load_string("<foo bar='baz'><call>hey</call></foo>"); doc.load_string("<foo bar='baz'><call>hey</call></foo>");
// default options; prints // default options; prints
// <?xml version="1.0"?> // <?xml version="1.0"?>
// <foo bar="baz"> // <foo bar="baz">
// <call>hey</call> // <call>hey</call>
// </foo> // </foo>
doc.save(std::cout); doc.save(std::cout);
std::cout << std::endl; std::cout << std::endl;
// default options with custom indentation string; prints // default options with custom indentation string; prints
// <?xml version="1.0"?> // <?xml version="1.0"?>
// <foo bar="baz"> // <foo bar="baz">
// --<call>hey</call> // --<call>hey</call>
// </foo> // </foo>
doc.save(std::cout, "--"); doc.save(std::cout, "--");
std::cout << std::endl; std::cout << std::endl;
// default options without indentation; prints // default options without indentation; prints
// <?xml version="1.0"?> // <?xml version="1.0"?>
// <foo bar="baz"> // <foo bar="baz">
// <call>hey</call> // <call>hey</call>
// </foo> // </foo>
doc.save(std::cout, "\t", pugi::format_default & ~pugi::format_indent); // can also pass "" instead of indentation string for the same effect doc.save(std::cout, "\t", pugi::format_default & ~pugi::format_indent); // can also pass "" instead of indentation string for the same effect
std::cout << std::endl; std::cout << std::endl;
// raw output; prints // raw output; prints
// <?xml version="1.0"?><foo bar="baz"><call>hey</call></foo> // <?xml version="1.0"?><foo bar="baz"><call>hey</call></foo>
doc.save(std::cout, "\t", pugi::format_raw); doc.save(std::cout, "\t", pugi::format_raw);
std::cout << std::endl << std::endl; std::cout << std::endl << std::endl;
// raw output without declaration; prints // raw output without declaration; prints
// <foo bar="baz"><call>hey</call></foo> // <foo bar="baz"><call>hey</call></foo>
doc.save(std::cout, "\t", pugi::format_raw | pugi::format_no_declaration); doc.save(std::cout, "\t", pugi::format_raw | pugi::format_no_declaration);
std::cout << std::endl; std::cout << std::endl;
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,18 +1,18 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
// get a test document // get a test document
pugi::xml_document doc; pugi::xml_document doc;
doc.load_string("<foo bar='baz'><call>hey</call></foo>"); doc.load_string("<foo bar='baz'><call>hey</call></foo>");
// tag::code[] // tag::code[]
// save document to standard output // save document to standard output
std::cout << "Document:\n"; std::cout << "Document:\n";
doc.save(std::cout); doc.save(std::cout);
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,26 +1,26 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
// tag::code[] // tag::code[]
// get a test document // get a test document
pugi::xml_document doc; pugi::xml_document doc;
doc.load_string("<foo bar='baz'><call>hey</call></foo>"); doc.load_string("<foo bar='baz'><call>hey</call></foo>");
// print document to standard output (prints <?xml version="1.0"?><foo bar="baz"><call>hey</call></foo>) // print document to standard output (prints <?xml version="1.0"?><foo bar="baz"><call>hey</call></foo>)
doc.save(std::cout, "", pugi::format_raw); doc.save(std::cout, "", pugi::format_raw);
std::cout << std::endl; std::cout << std::endl;
// print document to standard output as a regular node (prints <foo bar="baz"><call>hey</call></foo>) // print document to standard output as a regular node (prints <foo bar="baz"><call>hey</call></foo>)
doc.print(std::cout, "", pugi::format_raw); doc.print(std::cout, "", pugi::format_raw);
std::cout << std::endl; std::cout << std::endl;
// print a subtree to standard output (prints <call>hey</call>) // print a subtree to standard output (prints <call>hey</call>)
doc.child("foo").child("call").print(std::cout, "", pugi::format_raw); doc.child("foo").child("call").print(std::cout, "", pugi::format_raw);
std::cout << std::endl; std::cout << std::endl;
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,35 +1,35 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
// get a test document // get a test document
doc.load_string("<project><name>test</name><version>1.1</version><public>yes</public></project>"); doc.load_string("<project><name>test</name><version>1.1</version><public>yes</public></project>");
pugi::xml_node project = doc.child("project"); pugi::xml_node project = doc.child("project");
// tag::access[] // tag::access[]
std::cout << "Project name: " << project.child("name").text().get() << std::endl; std::cout << "Project name: " << project.child("name").text().get() << std::endl;
std::cout << "Project version: " << project.child("version").text().as_double() << std::endl; std::cout << "Project version: " << project.child("version").text().as_double() << std::endl;
std::cout << "Project visibility: " << (project.child("public").text().as_bool(/* def= */ true) ? "public" : "private") << std::endl; std::cout << "Project visibility: " << (project.child("public").text().as_bool(/* def= */ true) ? "public" : "private") << std::endl;
std::cout << "Project description: " << project.child("description").text().get() << std::endl; std::cout << "Project description: " << project.child("description").text().get() << std::endl;
// end::access[] // end::access[]
std::cout << std::endl; std::cout << std::endl;
// tag::modify[] // tag::modify[]
// change project version // change project version
project.child("version").text() = 1.2; project.child("version").text() = 1.2;
// add description element and set the contents // add description element and set the contents
// note that we do not have to explicitly add the node_pcdata child // note that we do not have to explicitly add the node_pcdata child
project.append_child("description").text().set("a test project"); project.append_child("description").text().set("a test project");
// end::modify[] // end::modify[]
doc.save(std::cout); doc.save(std::cout);
} }
// vim:et // vim:et

View File

@ -1,7 +1,7 @@
<transition source="idle" target="run"> <transition source="idle" target="run">
<event name="key_up|key_shift" /> <event name="key_up|key_shift" />
</transition> </transition>
<transition source="run" target="attack"> <transition source="run" target="attack">
<event name="key_ctrl" /> <event name="key_ctrl" />
<condition expr="weapon != null" /> <condition expr="weapon != null" />
</transition> </transition>

View File

@ -1,51 +1,51 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <string.h> #include <string.h>
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("xgconsole.xml")) return -1; if (!doc.load_file("xgconsole.xml")) return -1;
pugi::xml_node tools = doc.child("Profile").child("Tools"); pugi::xml_node tools = doc.child("Profile").child("Tools");
// tag::basic[] // tag::basic[]
for (pugi::xml_node tool = tools.first_child(); tool; tool = tool.next_sibling()) for (pugi::xml_node tool = tools.first_child(); tool; tool = tool.next_sibling())
{ {
std::cout << "Tool:"; std::cout << "Tool:";
for (pugi::xml_attribute attr = tool.first_attribute(); attr; attr = attr.next_attribute()) for (pugi::xml_attribute attr = tool.first_attribute(); attr; attr = attr.next_attribute())
{ {
std::cout << " " << attr.name() << "=" << attr.value(); std::cout << " " << attr.name() << "=" << attr.value();
} }
std::cout << std::endl; std::cout << std::endl;
} }
// end::basic[] // end::basic[]
std::cout << std::endl; std::cout << std::endl;
// tag::data[] // tag::data[]
for (pugi::xml_node tool = tools.child("Tool"); tool; tool = tool.next_sibling("Tool")) for (pugi::xml_node tool = tools.child("Tool"); tool; tool = tool.next_sibling("Tool"))
{ {
std::cout << "Tool " << tool.attribute("Filename").value(); std::cout << "Tool " << tool.attribute("Filename").value();
std::cout << ": AllowRemote " << tool.attribute("AllowRemote").as_bool(); std::cout << ": AllowRemote " << tool.attribute("AllowRemote").as_bool();
std::cout << ", Timeout " << tool.attribute("Timeout").as_int(); std::cout << ", Timeout " << tool.attribute("Timeout").as_int();
std::cout << ", Description '" << tool.child_value("Description") << "'\n"; std::cout << ", Description '" << tool.child_value("Description") << "'\n";
} }
// end::data[] // end::data[]
std::cout << std::endl; std::cout << std::endl;
// tag::contents[] // tag::contents[]
std::cout << "Tool for *.dae generation: " << tools.find_child_by_attribute("Tool", "OutputFileMasks", "*.dae").attribute("Filename").value() << "\n"; std::cout << "Tool for *.dae generation: " << tools.find_child_by_attribute("Tool", "OutputFileMasks", "*.dae").attribute("Filename").value() << "\n";
for (pugi::xml_node tool = tools.child("Tool"); tool; tool = tool.next_sibling("Tool")) for (pugi::xml_node tool = tools.child("Tool"); tool; tool = tool.next_sibling("Tool"))
{ {
std::cout << "Tool " << tool.attribute("Filename").value() << "\n"; std::cout << "Tool " << tool.attribute("Filename").value() << "\n";
} }
// end::contents[] // end::contents[]
} }
// vim:et // vim:et

View File

@ -1,27 +1,27 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("xgconsole.xml")) return -1; if (!doc.load_file("xgconsole.xml")) return -1;
pugi::xml_node tools = doc.child("Profile").child("Tools"); pugi::xml_node tools = doc.child("Profile").child("Tools");
// tag::code[] // tag::code[]
for (pugi::xml_node_iterator it = tools.begin(); it != tools.end(); ++it) for (pugi::xml_node_iterator it = tools.begin(); it != tools.end(); ++it)
{ {
std::cout << "Tool:"; std::cout << "Tool:";
for (pugi::xml_attribute_iterator ait = it->attributes_begin(); ait != it->attributes_end(); ++ait) for (pugi::xml_attribute_iterator ait = it->attributes_begin(); ait != it->attributes_end(); ++ait)
{ {
std::cout << " " << ait->name() << "=" << ait->value(); std::cout << " " << ait->name() << "=" << ait->value();
} }
std::cout << std::endl; std::cout << std::endl;
} }
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,48 +1,48 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <string.h> #include <string.h>
#include <iostream> #include <iostream>
// tag::decl[] // tag::decl[]
bool small_timeout(pugi::xml_node node) bool small_timeout(pugi::xml_node node)
{ {
return node.attribute("Timeout").as_int() < 20; return node.attribute("Timeout").as_int() < 20;
} }
struct allow_remote_predicate struct allow_remote_predicate
{ {
bool operator()(pugi::xml_attribute attr) const bool operator()(pugi::xml_attribute attr) const
{ {
return strcmp(attr.name(), "AllowRemote") == 0; return strcmp(attr.name(), "AllowRemote") == 0;
} }
bool operator()(pugi::xml_node node) const bool operator()(pugi::xml_node node) const
{ {
return node.attribute("AllowRemote").as_bool(); return node.attribute("AllowRemote").as_bool();
} }
}; };
// end::decl[] // end::decl[]
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("xgconsole.xml")) return -1; if (!doc.load_file("xgconsole.xml")) return -1;
pugi::xml_node tools = doc.child("Profile").child("Tools"); pugi::xml_node tools = doc.child("Profile").child("Tools");
// tag::find[] // tag::find[]
// Find child via predicate (looks for direct children only) // Find child via predicate (looks for direct children only)
std::cout << tools.find_child(allow_remote_predicate()).attribute("Filename").value() << std::endl; std::cout << tools.find_child(allow_remote_predicate()).attribute("Filename").value() << std::endl;
// Find node via predicate (looks for all descendants in depth-first order) // Find node via predicate (looks for all descendants in depth-first order)
std::cout << doc.find_node(allow_remote_predicate()).attribute("Filename").value() << std::endl; std::cout << doc.find_node(allow_remote_predicate()).attribute("Filename").value() << std::endl;
// Find attribute via predicate // Find attribute via predicate
std::cout << tools.last_child().find_attribute(allow_remote_predicate()).value() << std::endl; std::cout << tools.last_child().find_attribute(allow_remote_predicate()).value() << std::endl;
// We can use simple functions instead of function objects // We can use simple functions instead of function objects
std::cout << tools.find_child(small_timeout).attribute("Filename").value() << std::endl; std::cout << tools.find_child(small_timeout).attribute("Filename").value() << std::endl;
// end::find[] // end::find[]
} }
// vim:et // vim:et

View File

@ -1,32 +1,32 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("xgconsole.xml")) return -1; if (!doc.load_file("xgconsole.xml")) return -1;
pugi::xml_node tools = doc.child("Profile").child("Tools"); pugi::xml_node tools = doc.child("Profile").child("Tools");
// tag::code[] // tag::code[]
for (pugi::xml_node tool: tools.children("Tool")) for (pugi::xml_node tool: tools.children("Tool"))
{ {
std::cout << "Tool:"; std::cout << "Tool:";
for (pugi::xml_attribute attr: tool.attributes()) for (pugi::xml_attribute attr: tool.attributes())
{ {
std::cout << " " << attr.name() << "=" << attr.value(); std::cout << " " << attr.name() << "=" << attr.value();
} }
for (pugi::xml_node child: tool.children()) for (pugi::xml_node child: tool.children())
{ {
std::cout << ", child " << child.name(); std::cout << ", child " << child.name();
} }
std::cout << std::endl; std::cout << std::endl;
} }
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,35 +1,35 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
const char* node_types[] = const char* node_types[] =
{ {
"null", "document", "element", "pcdata", "cdata", "comment", "pi", "declaration" "null", "document", "element", "pcdata", "cdata", "comment", "pi", "declaration"
}; };
// tag::impl[] // tag::impl[]
struct simple_walker: pugi::xml_tree_walker struct simple_walker: pugi::xml_tree_walker
{ {
virtual bool for_each(pugi::xml_node& node) virtual bool for_each(pugi::xml_node& node)
{ {
for (int i = 0; i < depth(); ++i) std::cout << " "; // indentation for (int i = 0; i < depth(); ++i) std::cout << " "; // indentation
std::cout << node_types[node.type()] << ": name='" << node.name() << "', value='" << node.value() << "'\n"; std::cout << node_types[node.type()] << ": name='" << node.name() << "', value='" << node.value() << "'\n";
return true; // continue traversal return true; // continue traversal
} }
}; };
// end::impl[] // end::impl[]
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("tree.xml")) return -1; if (!doc.load_file("tree.xml")) return -1;
// tag::traverse[] // tag::traverse[]
simple_walker walker; simple_walker walker;
doc.traverse(walker); doc.traverse(walker);
// end::traverse[] // end::traverse[]
} }
// vim:et // vim:et

View File

@ -1,12 +1,12 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<mesh name="mesh_root"> <mesh name="mesh_root">
<!-- here is a mesh node --> <!-- here is a mesh node -->
some text some text
<![CDATA[someothertext]]> <![CDATA[someothertext]]>
some more text some more text
<node attr1="value1" attr2="value2" /> <node attr1="value1" attr2="value2" />
<node attr1="value2"> <node attr1="value2">
<innernode/> <innernode/>
</node> </node>
</mesh> </mesh>
<?include somedata?> <?include somedata?>

View File

@ -1,78 +1,78 @@
<?xml version="1.0" encoding="Shift_JIS"?> <?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE 週報 SYSTEM "weekly-shift_jis.dtd"> <!DOCTYPE 週報 SYSTEM "weekly-shift_jis.dtd">
<!-- 週報サンプル --> <!-- 週報サンプル -->
<週報> <週報>
<年月週> <年月週>
<年度>1997</年度> <年度>1997</年度>
<月度>1</月度> <月度>1</月度>
<週>1</週> <週>1</週>
</年月週> </年月週>
<氏名> <氏名>
<氏>山田</氏> <氏>山田</氏>
<名>太郎</名> <名>太郎</名>
</氏名> </氏名>
<業務報告リスト> <業務報告リスト>
<業務報告> <業務報告>
<業務名>XMLエディターの作成</業務名> <業務名>XMLエディターの作成</業務名>
<業務コード>X3355-23</業務コード> <業務コード>X3355-23</業務コード>
<工数管理> <工数管理>
<見積もり工数>1600</見積もり工数> <見積もり工数>1600</見積もり工数>
<実績工数>320</実績工数> <実績工数>320</実績工数>
<当月見積もり工数>160</当月見積もり工数> <当月見積もり工数>160</当月見積もり工数>
<当月実績工数>24</当月実績工数> <当月実績工数>24</当月実績工数>
</工数管理> </工数管理>
<予定項目リスト> <予定項目リスト>
<予定項目> <予定項目>
<P>XMLエディターの基本仕様の作成</P> <P>XMLエディターの基本仕様の作成</P>
</予定項目> </予定項目>
</予定項目リスト> </予定項目リスト>
<実施事項リスト> <実施事項リスト>
<実施事項> <実施事項>
<P>XMLエディターの基本仕様の作成</P> <P>XMLエディターの基本仕様の作成</P>
</実施事項> </実施事項>
<実施事項> <実施事項>
<P>競合他社製品の機能調査</P> <P>競合他社製品の機能調査</P>
</実施事項> </実施事項>
</実施事項リスト> </実施事項リスト>
<上長への要請事項リスト> <上長への要請事項リスト>
<上長への要請事項> <上長への要請事項>
<P>特になし</P> <P>特になし</P>
</上長への要請事項> </上長への要請事項>
</上長への要請事項リスト> </上長への要請事項リスト>
<問題点対策> <問題点対策>
<P>XMLとは何かわからない。</P> <P>XMLとは何かわからない。</P>
</問題点対策> </問題点対策>
</業務報告> </業務報告>
<業務報告> <業務報告>
<業務名>検索エンジンの開発</業務名> <業務名>検索エンジンの開発</業務名>
<業務コード>S8821-76</業務コード> <業務コード>S8821-76</業務コード>
<工数管理> <工数管理>
<見積もり工数>120</見積もり工数> <見積もり工数>120</見積もり工数>
<実績工数>6</実績工数> <実績工数>6</実績工数>
<当月見積もり工数>32</当月見積もり工数> <当月見積もり工数>32</当月見積もり工数>
<当月実績工数>2</当月実績工数> <当月実績工数>2</当月実績工数>
</工数管理> </工数管理>
<予定項目リスト> <予定項目リスト>
<予定項目> <予定項目>
<P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P> <P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P>
</予定項目> </予定項目>
</予定項目リスト> </予定項目リスト>
<実施事項リスト> <実施事項リスト>
<実施事項> <実施事項>
<P>更に、どういう検索エンジンがあるか調査する</P> <P>更に、どういう検索エンジンがあるか調査する</P>
</実施事項> </実施事項>
</実施事項リスト> </実施事項リスト>
<上長への要請事項リスト> <上長への要請事項リスト>
<上長への要請事項> <上長への要請事項>
<P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P> <P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P>
</上長への要請事項> </上長への要請事項>
</上長への要請事項リスト> </上長への要請事項リスト>
<問題点対策> <問題点対策>
<P>検索エンジンで車を走らせることができない。(要調査)</P> <P>検索エンジンで車を走らせることができない。(要調査)</P>
</問題点対策> </問題点対策>
</業務報告> </業務報告>
</業務報告リスト> </業務報告リスト>
</週報> </週報>

View File

@ -1,78 +1,78 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE 週報 SYSTEM "weekly-utf-8.dtd"> <!DOCTYPE 週報 SYSTEM "weekly-utf-8.dtd">
<!-- 週報サンプル --> <!-- 週報サンプル -->
<週報> <週報>
<年月週> <年月週>
<年度>1997</年度> <年度>1997</年度>
<月度>1</月度> <月度>1</月度>
<週>1</週> <週>1</週>
</年月週> </年月週>
<氏名> <氏名>
<氏>山田</氏> <氏>山田</氏>
<名>太郎</名> <名>太郎</名>
</氏名> </氏名>
<業務報告リスト> <業務報告リスト>
<業務報告> <業務報告>
<業務名>XMLエディターの作成</業務名> <業務名>XMLエディターの作成</業務名>
<業務コード>X3355-23</業務コード> <業務コード>X3355-23</業務コード>
<工数管理> <工数管理>
<見積もり工数>1600</見積もり工数> <見積もり工数>1600</見積もり工数>
<実績工数>320</実績工数> <実績工数>320</実績工数>
<当月見積もり工数>160</当月見積もり工数> <当月見積もり工数>160</当月見積もり工数>
<当月実績工数>24</当月実績工数> <当月実績工数>24</当月実績工数>
</工数管理> </工数管理>
<予定項目リスト> <予定項目リスト>
<予定項目> <予定項目>
<P>XMLエディターの基本仕様の作成</P> <P>XMLエディターの基本仕様の作成</P>
</予定項目> </予定項目>
</予定項目リスト> </予定項目リスト>
<実施事項リスト> <実施事項リスト>
<実施事項> <実施事項>
<P>XMLエディターの基本仕様の作成</P> <P>XMLエディターの基本仕様の作成</P>
</実施事項> </実施事項>
<実施事項> <実施事項>
<P>競合他社製品の機能調査</P> <P>競合他社製品の機能調査</P>
</実施事項> </実施事項>
</実施事項リスト> </実施事項リスト>
<上長への要請事項リスト> <上長への要請事項リスト>
<上長への要請事項> <上長への要請事項>
<P>特になし</P> <P>特になし</P>
</上長への要請事項> </上長への要請事項>
</上長への要請事項リスト> </上長への要請事項リスト>
<問題点対策> <問題点対策>
<P>XMLとは何かわからない。</P> <P>XMLとは何かわからない。</P>
</問題点対策> </問題点対策>
</業務報告> </業務報告>
<業務報告> <業務報告>
<業務名>検索エンジンの開発</業務名> <業務名>検索エンジンの開発</業務名>
<業務コード>S8821-76</業務コード> <業務コード>S8821-76</業務コード>
<工数管理> <工数管理>
<見積もり工数>120</見積もり工数> <見積もり工数>120</見積もり工数>
<実績工数>6</実績工数> <実績工数>6</実績工数>
<当月見積もり工数>32</当月見積もり工数> <当月見積もり工数>32</当月見積もり工数>
<当月実績工数>2</当月実績工数> <当月実績工数>2</当月実績工数>
</工数管理> </工数管理>
<予定項目リスト> <予定項目リスト>
<予定項目> <予定項目>
<P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P> <P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P>
</予定項目> </予定項目>
</予定項目リスト> </予定項目リスト>
<実施事項リスト> <実施事項リスト>
<実施事項> <実施事項>
<P>更に、どういう検索エンジンがあるか調査する</P> <P>更に、どういう検索エンジンがあるか調査する</P>
</実施事項> </実施事項>
</実施事項リスト> </実施事項リスト>
<上長への要請事項リスト> <上長への要請事項リスト>
<上長への要請事項> <上長への要請事項>
<P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P> <P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P>
</上長への要請事項> </上長への要請事項>
</上長への要請事項リスト> </上長への要請事項リスト>
<問題点対策> <問題点対策>
<P>検索エンジンで車を走らせることができない。(要調査)</P> <P>検索エンジンで車を走らせることができない。(要調査)</P>
</問題点対策> </問題点対策>
</業務報告> </業務報告>
</業務報告リスト> </業務報告リスト>
</週報> </週報>

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Profile FormatVersion="1"> <Profile FormatVersion="1">
<Tools> <Tools>
<Tool Filename="jam" AllowIntercept="true"> <Tool Filename="jam" AllowIntercept="true">
<Description>Jamplus build system</Description> <Description>Jamplus build system</Description>
</Tool> </Tool>
<Tool Filename="mayabatch.exe" AllowRemote="true" OutputFileMasks="*.dae" DeriveCaptionFrom="lastparam" Timeout="40" /> <Tool Filename="mayabatch.exe" AllowRemote="true" OutputFileMasks="*.dae" DeriveCaptionFrom="lastparam" Timeout="40" />
<Tool Filename="meshbuilder_*.exe" AllowRemote="false" OutputFileMasks="*.mesh" DeriveCaptionFrom="lastparam" Timeout="10" /> <Tool Filename="meshbuilder_*.exe" AllowRemote="false" OutputFileMasks="*.mesh" DeriveCaptionFrom="lastparam" Timeout="10" />
<Tool Filename="texbuilder_*.exe" AllowRemote="true" OutputFileMasks="*.tex" DeriveCaptionFrom="lastparam" /> <Tool Filename="texbuilder_*.exe" AllowRemote="true" OutputFileMasks="*.tex" DeriveCaptionFrom="lastparam" />
<Tool Filename="shaderbuilder_*.exe" AllowRemote="true" DeriveCaptionFrom="lastparam" /> <Tool Filename="shaderbuilder_*.exe" AllowRemote="true" DeriveCaptionFrom="lastparam" />
</Tools> </Tools>
</Profile> </Profile>

View File

@ -1,43 +1,43 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("xgconsole.xml")) return -1; if (!doc.load_file("xgconsole.xml")) return -1;
// tag::code[] // tag::code[]
// Exception is thrown for incorrect query syntax // Exception is thrown for incorrect query syntax
try try
{ {
doc.select_nodes("//nodes[#true()]"); doc.select_nodes("//nodes[#true()]");
} }
catch (const pugi::xpath_exception& e) catch (const pugi::xpath_exception& e)
{ {
std::cout << "Select failed: " << e.what() << std::endl; std::cout << "Select failed: " << e.what() << std::endl;
} }
// Exception is thrown for incorrect query semantics // Exception is thrown for incorrect query semantics
try try
{ {
doc.select_nodes("(123)/next"); doc.select_nodes("(123)/next");
} }
catch (const pugi::xpath_exception& e) catch (const pugi::xpath_exception& e)
{ {
std::cout << "Select failed: " << e.what() << std::endl; std::cout << "Select failed: " << e.what() << std::endl;
} }
// Exception is thrown for query with incorrect return type // Exception is thrown for query with incorrect return type
try try
{ {
doc.select_nodes("123"); doc.select_nodes("123");
} }
catch (const pugi::xpath_exception& e) catch (const pugi::xpath_exception& e)
{ {
std::cout << "Select failed: " << e.what() << std::endl; std::cout << "Select failed: " << e.what() << std::endl;
} }
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,36 +1,36 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
#include <string> #include <string>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("xgconsole.xml")) return -1; if (!doc.load_file("xgconsole.xml")) return -1;
// tag::code[] // tag::code[]
// Select nodes via compiled query // Select nodes via compiled query
pugi::xpath_query query_remote_tools("/Profile/Tools/Tool[@AllowRemote='true']"); pugi::xpath_query query_remote_tools("/Profile/Tools/Tool[@AllowRemote='true']");
pugi::xpath_node_set tools = query_remote_tools.evaluate_node_set(doc); pugi::xpath_node_set tools = query_remote_tools.evaluate_node_set(doc);
std::cout << "Remote tool: "; std::cout << "Remote tool: ";
tools[2].node().print(std::cout); tools[2].node().print(std::cout);
// Evaluate numbers via compiled query // Evaluate numbers via compiled query
pugi::xpath_query query_timeouts("sum(//Tool/@Timeout)"); pugi::xpath_query query_timeouts("sum(//Tool/@Timeout)");
std::cout << query_timeouts.evaluate_number(doc) << std::endl; std::cout << query_timeouts.evaluate_number(doc) << std::endl;
// Evaluate strings via compiled query for different context nodes // Evaluate strings via compiled query for different context nodes
pugi::xpath_query query_name_valid("string-length(substring-before(@Filename, '_')) > 0 and @OutputFileMasks"); pugi::xpath_query query_name_valid("string-length(substring-before(@Filename, '_')) > 0 and @OutputFileMasks");
pugi::xpath_query query_name("concat(substring-before(@Filename, '_'), ' produces ', @OutputFileMasks)"); pugi::xpath_query query_name("concat(substring-before(@Filename, '_'), ' produces ', @OutputFileMasks)");
for (pugi::xml_node tool = doc.first_element_by_path("Profile/Tools/Tool"); tool; tool = tool.next_sibling()) for (pugi::xml_node tool = doc.first_element_by_path("Profile/Tools/Tool"); tool; tool = tool.next_sibling())
{ {
std::string s = query_name.evaluate_string(tool); std::string s = query_name.evaluate_string(tool);
if (query_name_valid.evaluate_boolean(tool)) std::cout << s << std::endl; if (query_name_valid.evaluate_boolean(tool)) std::cout << s << std::endl;
} }
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,28 +1,28 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("xgconsole.xml")) return -1; if (!doc.load_file("xgconsole.xml")) return -1;
// tag::code[] // tag::code[]
pugi::xpath_node_set tools = doc.select_nodes("/Profile/Tools/Tool[@AllowRemote='true' and @DeriveCaptionFrom='lastparam']"); pugi::xpath_node_set tools = doc.select_nodes("/Profile/Tools/Tool[@AllowRemote='true' and @DeriveCaptionFrom='lastparam']");
std::cout << "Tools:\n"; std::cout << "Tools:\n";
for (pugi::xpath_node_set::const_iterator it = tools.begin(); it != tools.end(); ++it) for (pugi::xpath_node_set::const_iterator it = tools.begin(); it != tools.end(); ++it)
{ {
pugi::xpath_node node = *it; pugi::xpath_node node = *it;
std::cout << node.node().attribute("Filename").value() << "\n"; std::cout << node.node().attribute("Filename").value() << "\n";
} }
pugi::xpath_node build_tool = doc.select_node("//Tool[contains(Description, 'build system')]"); pugi::xpath_node build_tool = doc.select_node("//Tool[contains(Description, 'build system')]");
if (build_tool) if (build_tool)
std::cout << "Build tool: " << build_tool.node().attribute("Filename").value() << "\n"; std::cout << "Build tool: " << build_tool.node().attribute("Filename").value() << "\n";
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,38 +1,38 @@
#include "pugixml.hpp" #include "pugixml.hpp"
#include <iostream> #include <iostream>
#include <string> #include <string>
int main() int main()
{ {
pugi::xml_document doc; pugi::xml_document doc;
if (!doc.load_file("xgconsole.xml")) return -1; if (!doc.load_file("xgconsole.xml")) return -1;
// tag::code[] // tag::code[]
// Select nodes via compiled query // Select nodes via compiled query
pugi::xpath_variable_set vars; pugi::xpath_variable_set vars;
vars.add("remote", pugi::xpath_type_boolean); vars.add("remote", pugi::xpath_type_boolean);
pugi::xpath_query query_remote_tools("/Profile/Tools/Tool[@AllowRemote = string($remote)]", &vars); pugi::xpath_query query_remote_tools("/Profile/Tools/Tool[@AllowRemote = string($remote)]", &vars);
vars.set("remote", true); vars.set("remote", true);
pugi::xpath_node_set tools_remote = query_remote_tools.evaluate_node_set(doc); pugi::xpath_node_set tools_remote = query_remote_tools.evaluate_node_set(doc);
vars.set("remote", false); vars.set("remote", false);
pugi::xpath_node_set tools_local = query_remote_tools.evaluate_node_set(doc); pugi::xpath_node_set tools_local = query_remote_tools.evaluate_node_set(doc);
std::cout << "Remote tool: "; std::cout << "Remote tool: ";
tools_remote[2].node().print(std::cout); tools_remote[2].node().print(std::cout);
std::cout << "Local tool: "; std::cout << "Local tool: ";
tools_local[0].node().print(std::cout); tools_local[0].node().print(std::cout);
// You can pass the context directly to select_nodes/select_node // You can pass the context directly to select_nodes/select_node
pugi::xpath_node_set tools_local_imm = doc.select_nodes("/Profile/Tools/Tool[@AllowRemote = string($remote)]", &vars); pugi::xpath_node_set tools_local_imm = doc.select_nodes("/Profile/Tools/Tool[@AllowRemote = string($remote)]", &vars);
std::cout << "Local tool imm: "; std::cout << "Local tool imm: ";
tools_local_imm[0].node().print(std::cout); tools_local_imm[0].node().print(std::cout);
// end::code[] // end::code[]
} }
// vim:et // vim:et

View File

@ -1,50 +1,50 @@
pugixml 1.13 - an XML processing library pugixml 1.13 - an XML processing library
Copyright (C) 2006-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) Copyright (C) 2006-2022, 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,
which consists of a DOM-like interface with rich traversal/modification which consists of a DOM-like interface with rich traversal/modification
capabilities, an extremely fast XML parser which constructs the DOM tree from capabilities, an extremely fast XML parser which constructs the DOM tree from
an XML file/buffer, and an XPath 1.0 implementation for complex data-driven an XML file/buffer, and an XPath 1.0 implementation for complex data-driven
tree queries. Full Unicode support is also available, with Unicode interface tree queries. Full Unicode support is also available, with Unicode interface
variants and conversions between different Unicode encodings (which happen variants and conversions between different Unicode encodings (which happen
automatically during parsing/saving). automatically during parsing/saving).
The distribution contains the following folders: The distribution contains the following folders:
docs/ - documentation docs/ - documentation
docs/samples - pugixml usage examples docs/samples - pugixml usage examples
docs/quickstart.html - quick start guide docs/quickstart.html - quick start guide
docs/manual.html - complete manual docs/manual.html - complete manual
scripts/ - project files for IDE/build systems scripts/ - project files for IDE/build systems
src/ - header and source files src/ - header and source files
readme.txt - this file. readme.txt - this file.
This library is distributed under the MIT License: This library is distributed under the MIT License:
Copyright (c) 2006-2022 Arseny Kapoulkine Copyright (c) 2006-2022 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
files (the "Software"), to deal in the Software without files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following Software is furnished to do so, subject to the following
conditions: conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE. OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,54 +1,54 @@
import io import io
import os.path import os.path
import sys import sys
import tarfile import tarfile
import time import time
import zipfile import zipfile
def read_file(path, use_crlf): def read_file(path, use_crlf):
with open(path, 'rb') as file: with open(path, 'rb') as file:
data = file.read() data = file.read()
if b'\0' not in data: if b'\0' not in data:
data = data.replace(b'\r', b'') data = data.replace(b'\r', b'')
if use_crlf: if use_crlf:
data = data.replace(b'\n', b'\r\n') data = data.replace(b'\n', b'\r\n')
return data return data
def write_zip(target, arcprefix, timestamp, sources): def write_zip(target, arcprefix, timestamp, sources):
with zipfile.ZipFile(target, 'w') as archive: with zipfile.ZipFile(target, 'w') as archive:
for source in sorted(sources): for source in sorted(sources):
data = read_file(source, use_crlf = True) data = read_file(source, use_crlf = True)
path = os.path.join(arcprefix, source) path = os.path.join(arcprefix, source)
info = zipfile.ZipInfo(path) info = zipfile.ZipInfo(path)
info.date_time = time.localtime(timestamp) info.date_time = time.localtime(timestamp)
info.compress_type = zipfile.ZIP_DEFLATED info.compress_type = zipfile.ZIP_DEFLATED
info.external_attr = 0o644 << 16 info.external_attr = 0o644 << 16
archive.writestr(info, data) archive.writestr(info, data)
def write_tar(target, arcprefix, timestamp, sources, compression): def write_tar(target, arcprefix, timestamp, sources, compression):
with tarfile.open(target, 'w:' + compression) as archive: with tarfile.open(target, 'w:' + compression) as archive:
for source in sorted(sources): for source in sorted(sources):
data = read_file(source, use_crlf = False) data = read_file(source, use_crlf = False)
path = os.path.join(arcprefix, source) path = os.path.join(arcprefix, source)
info = tarfile.TarInfo(path) info = tarfile.TarInfo(path)
info.size = len(data) info.size = len(data)
info.mtime = timestamp info.mtime = timestamp
archive.addfile(info, io.BytesIO(data)) archive.addfile(info, io.BytesIO(data))
if len(sys.argv) < 5: if len(sys.argv) < 5:
raise RuntimeError('Usage: python archive.py <target> <archive prefix> <timestamp> <source files>') raise RuntimeError('Usage: python archive.py <target> <archive prefix> <timestamp> <source files>')
target, arcprefix, timestamp = sys.argv[1:4] target, arcprefix, timestamp = sys.argv[1:4]
sources = sys.argv[4:] sources = sys.argv[4:]
# tarfile._Stream._init_write_gz always writes current time to gzip header # tarfile._Stream._init_write_gz always writes current time to gzip header
time.time = lambda: timestamp time.time = lambda: timestamp
if target.endswith('.zip'): if target.endswith('.zip'):
write_zip(target, arcprefix, int(timestamp), sources) write_zip(target, arcprefix, int(timestamp), sources)
elif target.endswith('.tar.gz') or target.endswith('.tar.bz2'): elif target.endswith('.tar.gz') or target.endswith('.tar.bz2'):
write_tar(target, arcprefix, int(timestamp), sources, compression = os.path.splitext(target)[1][1:]) write_tar(target, arcprefix, int(timestamp), sources, compression = os.path.splitext(target)[1][1:])
else: else:
raise NotImplementedError('File type not supported: ' + target) raise NotImplementedError('File type not supported: ' + target)

8
3rd_party/pugixml/scripts/cocoapods_push.sh vendored Executable file → Normal file
View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
#Push to igagis repo for now #Push to igagis repo for now
pod repo push igagis pugixml.podspec --use-libraries --verbose pod repo push igagis pugixml.podspec --use-libraries --verbose

View File

@ -1,77 +1,77 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="pugi::xml_node"> <Type Name="pugi::xml_node">
<DisplayString Condition="_root">{_root}</DisplayString> <DisplayString Condition="_root">{_root}</DisplayString>
<DisplayString Condition="!_root">none</DisplayString> <DisplayString Condition="!_root">none</DisplayString>
<Expand> <Expand>
<ExpandedItem Condition="_root">_root</ExpandedItem> <ExpandedItem Condition="_root">_root</ExpandedItem>
</Expand> </Expand>
</Type> </Type>
<Type Name="pugi::xml_node_struct"> <Type Name="pugi::xml_node_struct">
<DisplayString Condition="name &amp;&amp; value">{(pugi::xml_node_type)(header &amp; 0xf),en} name={name,na} value={value,na}</DisplayString> <DisplayString Condition="name &amp;&amp; value">{(pugi::xml_node_type)(header &amp; 0xf),en} name={name,na} value={value,na}</DisplayString>
<DisplayString Condition="name">{(pugi::xml_node_type)(header &amp; 0xf),en} name={name,na}</DisplayString> <DisplayString Condition="name">{(pugi::xml_node_type)(header &amp; 0xf),en} name={name,na}</DisplayString>
<DisplayString Condition="value">{(pugi::xml_node_type)(header &amp; 0xf),en} value={value,na}</DisplayString> <DisplayString Condition="value">{(pugi::xml_node_type)(header &amp; 0xf),en} value={value,na}</DisplayString>
<DisplayString>{(pugi::xml_node_type)(header &amp; 0xf),en}</DisplayString> <DisplayString>{(pugi::xml_node_type)(header &amp; 0xf),en}</DisplayString>
<Expand> <Expand>
<Item Name="value" Condition="value">value,na</Item> <Item Name="value" Condition="value">value,na</Item>
<Synthetic Name="attributes" Condition="first_attribute"> <Synthetic Name="attributes" Condition="first_attribute">
<Expand> <Expand>
<CustomListItems> <CustomListItems>
<Variable Name="curr" InitialValue="first_attribute" /> <Variable Name="curr" InitialValue="first_attribute" />
<Loop Condition="curr"> <Loop Condition="curr">
<Item Name="{curr->name,na}">curr,view(child)na</Item> <Item Name="{curr->name,na}">curr,view(child)na</Item>
<Exec>curr = curr->next_attribute</Exec> <Exec>curr = curr->next_attribute</Exec>
</Loop> </Loop>
</CustomListItems> </CustomListItems>
</Expand> </Expand>
</Synthetic> </Synthetic>
<LinkedListItems> <LinkedListItems>
<HeadPointer>first_child</HeadPointer> <HeadPointer>first_child</HeadPointer>
<NextPointer>next_sibling</NextPointer> <NextPointer>next_sibling</NextPointer>
<ValueNode>this,na</ValueNode> <ValueNode>this,na</ValueNode>
</LinkedListItems> </LinkedListItems>
</Expand> </Expand>
</Type> </Type>
<Type Name="pugi::xml_attribute"> <Type Name="pugi::xml_attribute">
<DisplayString Condition="_attr">{_attr}</DisplayString> <DisplayString Condition="_attr">{_attr}</DisplayString>
<DisplayString Condition="!_attr">none</DisplayString> <DisplayString Condition="!_attr">none</DisplayString>
<Expand> <Expand>
<ExpandedItem Condition="_attr">_attr</ExpandedItem> <ExpandedItem Condition="_attr">_attr</ExpandedItem>
</Expand> </Expand>
</Type> </Type>
<Type Name="pugi::xml_attribute_struct"> <Type Name="pugi::xml_attribute_struct">
<DisplayString ExcludeView="child">{name,na} = {value,na}</DisplayString> <DisplayString ExcludeView="child">{name,na} = {value,na}</DisplayString>
<DisplayString>{value,na}</DisplayString> <DisplayString>{value,na}</DisplayString>
<Expand> <Expand>
<Item Name="name">name,na</Item> <Item Name="name">name,na</Item>
<Item Name="value">value,na</Item> <Item Name="value">value,na</Item>
</Expand> </Expand>
</Type> </Type>
<Type Name="pugi::xpath_node"> <Type Name="pugi::xpath_node">
<DisplayString Condition="_node._root &amp;&amp; _attribute._attr">{_node,na} "{_attribute._attr->name,na}"="{_attribute._attr->value,na}"</DisplayString> <DisplayString Condition="_node._root &amp;&amp; _attribute._attr">{_node,na} "{_attribute._attr->name,na}"="{_attribute._attr->value,na}"</DisplayString>
<DisplayString Condition="_node._root">{_node,na}</DisplayString> <DisplayString Condition="_node._root">{_node,na}</DisplayString>
<DisplayString Condition="_attribute._attr">{_attribute}</DisplayString> <DisplayString Condition="_attribute._attr">{_attribute}</DisplayString>
<DisplayString>empty</DisplayString> <DisplayString>empty</DisplayString>
<Expand HideRawView="1"> <Expand HideRawView="1">
<ExpandedItem Condition="_node._root &amp;&amp; !_attribute._attr">_node</ExpandedItem> <ExpandedItem Condition="_node._root &amp;&amp; !_attribute._attr">_node</ExpandedItem>
<ExpandedItem Condition="!_node._root &amp;&amp; _attribute._attr">_attribute</ExpandedItem> <ExpandedItem Condition="!_node._root &amp;&amp; _attribute._attr">_attribute</ExpandedItem>
<Item Name="node" Condition="_node._root &amp;&amp; _attribute._attr">_node,na</Item> <Item Name="node" Condition="_node._root &amp;&amp; _attribute._attr">_node,na</Item>
<Item Name="attribute" Condition="_node._root &amp;&amp; _attribute._attr">_attribute,na</Item> <Item Name="attribute" Condition="_node._root &amp;&amp; _attribute._attr">_attribute,na</Item>
</Expand> </Expand>
</Type> </Type>
<Type Name="pugi::xpath_node_set"> <Type Name="pugi::xpath_node_set">
<Expand> <Expand>
<Item Name="type">_type</Item> <Item Name="type">_type</Item>
<ArrayItems> <ArrayItems>
<Size>_end - _begin</Size> <Size>_end - _begin</Size>
<ValuePointer>_begin</ValuePointer> <ValuePointer>_begin</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>
</Type> </Type>
</AutoVisualizer> </AutoVisualizer>

File diff suppressed because it is too large Load Diff

View File

@ -1,70 +1,70 @@
function Run-Command([string]$cmd) function Run-Command([string]$cmd)
{ {
Invoke-Expression $cmd Invoke-Expression $cmd
if ($LastExitCode) { exit $LastExitCode } if ($LastExitCode) { exit $LastExitCode }
} }
function Force-Copy([string]$from, [string]$to) function Force-Copy([string]$from, [string]$to)
{ {
Write-Host $from "->" $to Write-Host $from "->" $to
New-Item -Force $to | Out-Null New-Item -Force $to | Out-Null
Copy-Item -Force $from $to Copy-Item -Force $from $to
if (! $?) { exit 1 } if (! $?) { exit 1 }
} }
function Build-Version([string]$vs, [string]$toolset, [string]$linkage) function Build-Version([string]$vs, [string]$toolset, [string]$linkage)
{ {
$prjsuffix = if ($linkage -eq "static") { "_static" } else { "" } $prjsuffix = if ($linkage -eq "static") { "_static" } else { "" }
$cfgsuffix = if ($linkage -eq "static") { "Static" } else { "" } $cfgsuffix = if ($linkage -eq "static") { "Static" } else { "" }
foreach ($configuration in "Debug","Release") foreach ($configuration in "Debug","Release")
{ {
Run-Command "msbuild pugixml_$vs$prjsuffix.vcxproj /t:Rebuild /p:Configuration=$configuration /p:Platform=x86 /v:minimal /nologo" Run-Command "msbuild pugixml_$vs$prjsuffix.vcxproj /t:Rebuild /p:Configuration=$configuration /p:Platform=x86 /v:minimal /nologo"
Run-Command "msbuild pugixml_$vs$prjsuffix.vcxproj /t:Rebuild /p:Configuration=$configuration /p:Platform=x64 /v:minimal /nologo" Run-Command "msbuild pugixml_$vs$prjsuffix.vcxproj /t:Rebuild /p:Configuration=$configuration /p:Platform=x64 /v:minimal /nologo"
Force-Copy "$vs/Win32_$configuration$cfgsuffix/pugixml.lib" "nuget/build/native/lib/Win32/$toolset/$linkage/$configuration/pugixml.lib" Force-Copy "$vs/Win32_$configuration$cfgsuffix/pugixml.lib" "nuget/build/native/lib/Win32/$toolset/$linkage/$configuration/pugixml.lib"
Force-Copy "$vs/x64_$configuration$cfgsuffix/pugixml.lib" "nuget/build/native/lib/x64/$toolset/$linkage/$configuration/pugixml.lib" Force-Copy "$vs/x64_$configuration$cfgsuffix/pugixml.lib" "nuget/build/native/lib/x64/$toolset/$linkage/$configuration/pugixml.lib"
} }
} }
Push-Location Push-Location
$scriptdir = Split-Path $MyInvocation.MyCommand.Path $scriptdir = Split-Path $MyInvocation.MyCommand.Path
cd $scriptdir cd $scriptdir
Force-Copy "../src/pugiconfig.hpp" "nuget/build/native/include/pugiconfig.hpp" Force-Copy "../src/pugiconfig.hpp" "nuget/build/native/include/pugiconfig.hpp"
Force-Copy "../src/pugixml.hpp" "nuget/build/native/include/pugixml.hpp" Force-Copy "../src/pugixml.hpp" "nuget/build/native/include/pugixml.hpp"
Force-Copy "../src/pugixml.cpp" "nuget/build/native/include/pugixml.cpp" Force-Copy "../src/pugixml.cpp" "nuget/build/native/include/pugixml.cpp"
if ($args[0] -eq 2022){ if ($args[0] -eq 2022){
Build-Version "vs2022" "v143" "dynamic" Build-Version "vs2022" "v143" "dynamic"
Build-Version "vs2022" "v143" "static" Build-Version "vs2022" "v143" "static"
} elseif ($args[0] -eq 2019){ } elseif ($args[0] -eq 2019){
Build-Version "vs2019" "v142" "dynamic" Build-Version "vs2019" "v142" "dynamic"
Build-Version "vs2019" "v142" "static" Build-Version "vs2019" "v142" "static"
} elseif ($args[0] -eq 2017){ } elseif ($args[0] -eq 2017){
Build-Version "vs2017" "v141" "dynamic" Build-Version "vs2017" "v141" "dynamic"
Build-Version "vs2017" "v141" "static" Build-Version "vs2017" "v141" "static"
Build-Version "vs2015" "v140" "dynamic" Build-Version "vs2015" "v140" "dynamic"
Build-Version "vs2015" "v140" "static" Build-Version "vs2015" "v140" "static"
Build-Version "vs2013" "v120" "dynamic" Build-Version "vs2013" "v120" "dynamic"
Build-Version "vs2013" "v120" "static" Build-Version "vs2013" "v120" "static"
} elseif($args[0] -eq 2015){ } elseif($args[0] -eq 2015){
Build-Version "vs2015" "v140" "dynamic" Build-Version "vs2015" "v140" "dynamic"
Build-Version "vs2015" "v140" "static" Build-Version "vs2015" "v140" "static"
Build-Version "vs2013" "v120" "dynamic" Build-Version "vs2013" "v120" "dynamic"
Build-Version "vs2013" "v120" "static" Build-Version "vs2013" "v120" "static"
} elseif($args[0] -eq 2013){ } elseif($args[0] -eq 2013){
Build-Version "vs2013" "v120" "dynamic" Build-Version "vs2013" "v120" "dynamic"
Build-Version "vs2013" "v120" "static" Build-Version "vs2013" "v120" "static"
} }
Run-Command "nuget pack nuget" Run-Command "nuget pack nuget"
Pop-Location Pop-Location

View File

@ -1,92 +1,92 @@
-- Reset RNG seed to get consistent results across runs (i.e. XCode) -- Reset RNG seed to get consistent results across runs (i.e. XCode)
math.randomseed(12345) math.randomseed(12345)
local static = _ARGS[1] == 'static' local static = _ARGS[1] == 'static'
local action = premake.action.current() local action = premake.action.current()
if string.startswith(_ACTION, "vs") then if string.startswith(_ACTION, "vs") then
if action then if action then
-- Disable solution generation -- Disable solution generation
function action.onsolution(sln) function action.onsolution(sln)
sln.vstudio_configs = premake.vstudio_buildconfigs(sln) sln.vstudio_configs = premake.vstudio_buildconfigs(sln)
end end
-- Rename output file -- Rename output file
function action.onproject(prj) function action.onproject(prj)
local name = "%%_" .. _ACTION .. (static and "_static" or "") local name = "%%_" .. _ACTION .. (static and "_static" or "")
if static then if static then
for k, v in pairs(prj.project.__configs) do for k, v in pairs(prj.project.__configs) do
v.objectsdir = v.objectsdir .. "Static" v.objectsdir = v.objectsdir .. "Static"
end end
end end
if _ACTION == "vs2010" then if _ACTION == "vs2010" then
premake.generate(prj, name .. ".vcxproj", premake.vs2010_vcxproj) premake.generate(prj, name .. ".vcxproj", premake.vs2010_vcxproj)
else else
premake.generate(prj, name .. ".vcproj", premake.vs200x_vcproj) premake.generate(prj, name .. ".vcproj", premake.vs200x_vcproj)
end end
end end
end end
elseif _ACTION == "codeblocks" then elseif _ACTION == "codeblocks" then
action.onsolution = nil action.onsolution = nil
function action.onproject(prj) function action.onproject(prj)
premake.generate(prj, "%%_" .. _ACTION .. ".cbp", premake.codeblocks_cbp) premake.generate(prj, "%%_" .. _ACTION .. ".cbp", premake.codeblocks_cbp)
end end
elseif _ACTION == "codelite" then elseif _ACTION == "codelite" then
action.onsolution = nil action.onsolution = nil
function action.onproject(prj) function action.onproject(prj)
premake.generate(prj, "%%_" .. _ACTION .. ".project", premake.codelite_project) premake.generate(prj, "%%_" .. _ACTION .. ".project", premake.codelite_project)
end end
end end
solution "pugixml" solution "pugixml"
objdir(_ACTION) objdir(_ACTION)
targetdir(_ACTION) targetdir(_ACTION)
if string.startswith(_ACTION, "vs") then if string.startswith(_ACTION, "vs") then
if _ACTION ~= "vs2002" and _ACTION ~= "vs2003" then if _ACTION ~= "vs2002" and _ACTION ~= "vs2003" then
platforms { "x32", "x64" } platforms { "x32", "x64" }
configuration "x32" targetdir(_ACTION .. "/x32") configuration "x32" targetdir(_ACTION .. "/x32")
configuration "x64" targetdir(_ACTION .. "/x64") configuration "x64" targetdir(_ACTION .. "/x64")
end end
configurations { "Debug", "Release" } configurations { "Debug", "Release" }
if static then if static then
configuration "Debug" targetsuffix "sd" configuration "Debug" targetsuffix "sd"
configuration "Release" targetsuffix "s" configuration "Release" targetsuffix "s"
else else
configuration "Debug" targetsuffix "d" configuration "Debug" targetsuffix "d"
end end
else else
if _ACTION == "xcode3" then if _ACTION == "xcode3" then
platforms "universal" platforms "universal"
end end
configurations { "Debug", "Release" } configurations { "Debug", "Release" }
configuration "Debug" targetsuffix "d" configuration "Debug" targetsuffix "d"
end end
project "pugixml" project "pugixml"
kind "StaticLib" kind "StaticLib"
language "C++" language "C++"
files { "../src/pugixml.hpp", "../src/pugiconfig.hpp", "../src/pugixml.cpp" } files { "../src/pugixml.hpp", "../src/pugiconfig.hpp", "../src/pugixml.cpp" }
flags { "NoPCH", "NoMinimalRebuild", "NoEditAndContinue", "Symbols" } flags { "NoPCH", "NoMinimalRebuild", "NoEditAndContinue", "Symbols" }
uuid "89A1E353-E2DC-495C-B403-742BE206ACED" uuid "89A1E353-E2DC-495C-B403-742BE206ACED"
configuration "Debug" configuration "Debug"
defines { "_DEBUG" } defines { "_DEBUG" }
configuration "Release" configuration "Release"
defines { "NDEBUG" } defines { "NDEBUG" }
flags { "Optimize" } flags { "Optimize" }
if static then if static then
configuration "*" configuration "*"
flags { "StaticRuntime" } flags { "StaticRuntime" }
end end

View File

@ -1,12 +1,12 @@
@PACKAGE_INIT@ @PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/pugixml-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/pugixml-targets.cmake")
# If the user is not requiring 1.11 (either by explicitly requesting an older # If the user is not requiring 1.11 (either by explicitly requesting an older
# version or not requesting one at all), provide the old imported target name # version or not requesting one at all), provide the old imported target name
# for compatibility. # for compatibility.
if (NOT TARGET pugixml AND (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11")) if (NOT TARGET pugixml AND (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11"))
add_library(pugixml INTERFACE IMPORTED) add_library(pugixml INTERFACE IMPORTED)
# Equivalent to target_link_libraries INTERFACE, but compatible with CMake 3.10 # Equivalent to target_link_libraries INTERFACE, but compatible with CMake 3.10
set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES pugixml::pugixml) set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES pugixml::pugixml)
endif () endif ()

View File

@ -1,11 +1,11 @@
prefix=@CMAKE_INSTALL_PREFIX@ prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix} exec_prefix=${prefix}
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@@INSTALL_SUFFIX@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@@INSTALL_SUFFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@@INSTALL_SUFFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@@INSTALL_SUFFIX@
Name: pugixml Name: pugixml
Description: Light-weight, simple and fast XML parser for C++ with XPath support. Description: Light-weight, simple and fast XML parser for C++ with XPath support.
URL: https://pugixml.org/ URL: https://pugixml.org/
Version: @pugixml_VERSION@ Version: @pugixml_VERSION@
Cflags: -I${includedir} Cflags: -I${includedir}
Libs: -L${libdir} -lpugixml@LIB_POSTFIX@ Libs: -L${libdir} -lpugixml@LIB_POSTFIX@

View File

@ -1,14 +1,14 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "pugixml" s.name = "pugixml"
s.version = "1.13" s.version = "1.13"
s.summary = "C++ XML parser library." s.summary = "C++ XML parser library."
s.homepage = "https://pugixml.org" s.homepage = "https://pugixml.org"
s.license = "MIT" s.license = "MIT"
s.author = { "Arseny Kapoulkine" => "arseny.kapoulkine@gmail.com" } s.author = { "Arseny Kapoulkine" => "arseny.kapoulkine@gmail.com" }
s.platform = :ios, "7.0" s.platform = :ios, "7.0"
s.source = { :git => "https://github.com/zeux/pugixml.git", :tag => "v" + s.version.to_s } s.source = { :git => "https://github.com/zeux/pugixml.git", :tag => "v" + s.version.to_s }
s.source_files = "src/**/*.{hpp,cpp}" s.source_files = "src/**/*.{hpp,cpp}"
s.header_mappings_dir = "src" s.header_mappings_dir = "src"
end end

View File

@ -1,212 +1,212 @@
// !$*UTF8*$! // !$*UTF8*$!
{ {
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 45; objectVersion = 45;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
0424128F67AB5C730232235E /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47481C4F0E03673E0E780637 /* pugixml.cpp */; }; 0424128F67AB5C730232235E /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47481C4F0E03673E0E780637 /* pugixml.cpp */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
0B66463C5F896E6449051D38 /* pugiconfig.hpp */ = {isa = PBXFileReference; lastKnownFileType = text; name = "pugiconfig.hpp"; path = "pugiconfig.hpp"; sourceTree = "<group>"; }; 0B66463C5F896E6449051D38 /* pugiconfig.hpp */ = {isa = PBXFileReference; lastKnownFileType = text; name = "pugiconfig.hpp"; path = "pugiconfig.hpp"; sourceTree = "<group>"; };
47481C4F0E03673E0E780637 /* pugixml.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "pugixml.cpp"; path = "pugixml.cpp"; sourceTree = "<group>"; }; 47481C4F0E03673E0E780637 /* pugixml.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "pugixml.cpp"; path = "pugixml.cpp"; sourceTree = "<group>"; };
6C911F0460FC44CD3B1B5624 /* pugixml.hpp */ = {isa = PBXFileReference; lastKnownFileType = text; name = "pugixml.hpp"; path = "pugixml.hpp"; sourceTree = "<group>"; }; 6C911F0460FC44CD3B1B5624 /* pugixml.hpp */ = {isa = PBXFileReference; lastKnownFileType = text; name = "pugixml.hpp"; path = "pugixml.hpp"; sourceTree = "<group>"; };
1DA04ADC64C3566D16C45B6D /* libpugixmld.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libpugixmld.a"; path = "libpugixmld.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1DA04ADC64C3566D16C45B6D /* libpugixmld.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libpugixmld.a"; path = "libpugixmld.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
2BA00212518037166623673F /* Frameworks */ = { 2BA00212518037166623673F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
19E0517F3CF26ED63AE23641 /* pugixml */ = { 19E0517F3CF26ED63AE23641 /* pugixml */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
578963B4309E714F05E01D71 /* src */, 578963B4309E714F05E01D71 /* src */,
219F66186DDF392149043810 /* Products */, 219F66186DDF392149043810 /* Products */,
); );
name = "pugixml"; name = "pugixml";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
578963B4309E714F05E01D71 /* src */ = { 578963B4309E714F05E01D71 /* src */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0B66463C5F896E6449051D38 /* pugiconfig.hpp */, 0B66463C5F896E6449051D38 /* pugiconfig.hpp */,
47481C4F0E03673E0E780637 /* pugixml.cpp */, 47481C4F0E03673E0E780637 /* pugixml.cpp */,
6C911F0460FC44CD3B1B5624 /* pugixml.hpp */, 6C911F0460FC44CD3B1B5624 /* pugixml.hpp */,
); );
name = "src"; name = "src";
path = ../src; path = ../src;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
219F66186DDF392149043810 /* Products */ = { 219F66186DDF392149043810 /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
1DA04ADC64C3566D16C45B6D /* libpugixmld.a */, 1DA04ADC64C3566D16C45B6D /* libpugixmld.a */,
); );
name = "Products"; name = "Products";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
6B55152571905B6C3A6F39D0 /* pugixml */ = { 6B55152571905B6C3A6F39D0 /* pugixml */ = {
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 73BF376C14AA1ECC0AC517ED /* Build configuration list for PBXNativeTarget "pugixml" */; buildConfigurationList = 73BF376C14AA1ECC0AC517ED /* Build configuration list for PBXNativeTarget "pugixml" */;
buildPhases = ( buildPhases = (
6CA66B9B6252229A36E8733C /* Resources */, 6CA66B9B6252229A36E8733C /* Resources */,
287808486FBF545206A47CC1 /* Sources */, 287808486FBF545206A47CC1 /* Sources */,
2BA00212518037166623673F /* Frameworks */, 2BA00212518037166623673F /* Frameworks */,
); );
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
); );
name = "pugixml"; name = "pugixml";
productName = "pugixml"; productName = "pugixml";
productReference = 1DA04ADC64C3566D16C45B6D /* libpugixmld.a */; productReference = 1DA04ADC64C3566D16C45B6D /* libpugixmld.a */;
productType = "com.apple.product-type.library.static"; productType = "com.apple.product-type.library.static";
}; };
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
/* Begin PBXProject section */ /* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = { 08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject; isa = PBXProject;
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "pugixml" */; buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "pugixml" */;
compatibilityVersion = "Xcode 3.1"; compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1; hasScannedForEncodings = 1;
mainGroup = 19E0517F3CF26ED63AE23641 /* pugixml */; mainGroup = 19E0517F3CF26ED63AE23641 /* pugixml */;
projectDirPath = ""; projectDirPath = "";
projectRoot = ""; projectRoot = "";
targets = ( targets = (
6B55152571905B6C3A6F39D0 /* libpugixmld.a */, 6B55152571905B6C3A6F39D0 /* libpugixmld.a */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */ /* Begin PBXResourcesBuildPhase section */
6CA66B9B6252229A36E8733C /* Resources */ = { 6CA66B9B6252229A36E8733C /* Resources */ = {
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
287808486FBF545206A47CC1 /* Sources */ = { 287808486FBF545206A47CC1 /* Sources */ = {
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
0424128F67AB5C730232235E /* pugixml.cpp in Sources */, 0424128F67AB5C730232235E /* pugixml.cpp in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXSourcesBuildPhase section */ /* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */ /* Begin PBXVariantGroup section */
/* End PBXVariantGroup section */ /* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
4FDB54E4253E36FC55CE27E8 /* Debug */ = { 4FDB54E4253E36FC55CE27E8 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = xcode3; CONFIGURATION_BUILD_DIR = xcode3;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5; GCC_MODEL_TUNING = G5;
INSTALL_PATH = /usr/local/lib; INSTALL_PATH = /usr/local/lib;
PRODUCT_NAME = "pugixmld"; PRODUCT_NAME = "pugixmld";
}; };
name = "Debug"; name = "Debug";
}; };
0A4C28F553990E0405306C15 /* Release */ = { 0A4C28F553990E0405306C15 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = xcode3; CONFIGURATION_BUILD_DIR = xcode3;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5; GCC_MODEL_TUNING = G5;
INSTALL_PATH = /usr/local/lib; INSTALL_PATH = /usr/local/lib;
PRODUCT_NAME = "pugixml"; PRODUCT_NAME = "pugixml";
}; };
name = "Release"; name = "Release";
}; };
65DB0F6D27EA20852B6E3BB4 /* Debug */ = { 65DB0F6D27EA20852B6E3BB4 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"_DEBUG", "_DEBUG",
); );
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "xcode3/Universal/Debug"; OBJROOT = "xcode3/Universal/Debug";
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO; PREBINDING = NO;
SYMROOT = "xcode3"; SYMROOT = "xcode3";
}; };
name = "Debug"; name = "Debug";
}; };
5314084032B57C1A11945858 /* Release */ = { 5314084032B57C1A11945858 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = s; GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"NDEBUG", "NDEBUG",
); );
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "xcode3/Universal/Release"; OBJROOT = "xcode3/Universal/Release";
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO; PREBINDING = NO;
SYMROOT = "xcode3"; SYMROOT = "xcode3";
}; };
name = "Release"; name = "Release";
}; };
/* End XCBuildConfiguration section */ /* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */ /* Begin XCConfigurationList section */
73BF376C14AA1ECC0AC517ED /* Build configuration list for PBXNativeTarget "libpugixmld.a" */ = { 73BF376C14AA1ECC0AC517ED /* Build configuration list for PBXNativeTarget "libpugixmld.a" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
4FDB54E4253E36FC55CE27E8 /* Debug */, 4FDB54E4253E36FC55CE27E8 /* Debug */,
0A4C28F553990E0405306C15 /* Release */, 0A4C28F553990E0405306C15 /* Release */,
); );
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = "Debug"; defaultConfigurationName = "Debug";
}; };
1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "pugixml" */ = { 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "pugixml" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
65DB0F6D27EA20852B6E3BB4 /* Debug */, 65DB0F6D27EA20852B6E3BB4 /* Debug */,
5314084032B57C1A11945858 /* Release */, 5314084032B57C1A11945858 /* Release */,
); );
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = "Debug"; defaultConfigurationName = "Debug";
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
}; };
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
} }

View File

@ -1,44 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file> <CodeBlocks_project_file>
<FileVersion major="1" minor="6" /> <FileVersion major="1" minor="6" />
<Project> <Project>
<Option title="pugixml" /> <Option title="pugixml" />
<Option pch_mode="2" /> <Option pch_mode="2" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Build> <Build>
<Target title="Debug"> <Target title="Debug">
<Option output="codeblocks/libpugixmld.a" prefix_auto="0" extension_auto="0" /> <Option output="codeblocks/libpugixmld.a" prefix_auto="0" extension_auto="0" />
<Option object_output="codeblocks/Debug" /> <Option object_output="codeblocks/Debug" />
<Option type="2" /> <Option type="2" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Compiler> <Compiler>
<Add option="-g" /> <Add option="-g" />
<Add option="-D_DEBUG" /> <Add option="-D_DEBUG" />
</Compiler> </Compiler>
<Linker> <Linker>
</Linker> </Linker>
</Target> </Target>
<Target title="Release"> <Target title="Release">
<Option output="codeblocks/libpugixml.a" prefix_auto="0" extension_auto="0" /> <Option output="codeblocks/libpugixml.a" prefix_auto="0" extension_auto="0" />
<Option object_output="codeblocks/Release" /> <Option object_output="codeblocks/Release" />
<Option type="2" /> <Option type="2" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Compiler> <Compiler>
<Add option="-g" /> <Add option="-g" />
<Add option="-O2" /> <Add option="-O2" />
<Add option="-DNDEBUG" /> <Add option="-DNDEBUG" />
</Compiler> </Compiler>
<Linker> <Linker>
</Linker> </Linker>
</Target> </Target>
</Build> </Build>
<Unit filename="../src/pugixml.hpp"> <Unit filename="../src/pugixml.hpp">
</Unit> </Unit>
<Unit filename="../src/pugiconfig.hpp"> <Unit filename="../src/pugiconfig.hpp">
</Unit> </Unit>
<Unit filename="../src/pugixml.cpp"> <Unit filename="../src/pugixml.cpp">
</Unit> </Unit>
<Extensions /> <Extensions />
</Project> </Project>
</CodeBlocks_project_file> </CodeBlocks_project_file>

View File

@ -1,56 +1,56 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<CodeLite_Project Name="pugixml"> <CodeLite_Project Name="pugixml">
<VirtualDirectory Name="src"> <VirtualDirectory Name="src">
<File Name="../src/pugixml.hpp"/> <File Name="../src/pugixml.hpp"/>
<File Name="../src/pugiconfig.hpp"/> <File Name="../src/pugiconfig.hpp"/>
<File Name="../src/pugixml.cpp"/> <File Name="../src/pugixml.cpp"/>
</VirtualDirectory> </VirtualDirectory>
<Settings Type="Static Library"> <Settings Type="Static Library">
<Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Static Library"> <Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Static Library">
<General OutputFile="codelite/libpugixmld.a" IntermediateDirectory="codelite/Debug" Command="./libpugixmld.a" CommandArguments="" WorkingDirectory="codelite" PauseExecWhenProcTerminates="yes"/> <General OutputFile="codelite/libpugixmld.a" IntermediateDirectory="codelite/Debug" Command="./libpugixmld.a" CommandArguments="" WorkingDirectory="codelite" PauseExecWhenProcTerminates="yes"/>
<Compiler Required="yes" Options="-g"> <Compiler Required="yes" Options="-g">
<Preprocessor Value="_DEBUG"/> <Preprocessor Value="_DEBUG"/>
</Compiler> </Compiler>
<Linker Required="yes" Options=""> <Linker Required="yes" Options="">
</Linker> </Linker>
<ResourceCompiler Required="no" Options=""/> <ResourceCompiler Required="no" Options=""/>
<CustomBuild Enabled="no"> <CustomBuild Enabled="no">
<CleanCommand></CleanCommand> <CleanCommand></CleanCommand>
<BuildCommand></BuildCommand> <BuildCommand></BuildCommand>
<SingleFileCommand></SingleFileCommand> <SingleFileCommand></SingleFileCommand>
<MakefileGenerationCommand></MakefileGenerationCommand> <MakefileGenerationCommand></MakefileGenerationCommand>
<ThirdPartyToolName>None</ThirdPartyToolName> <ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory></WorkingDirectory> <WorkingDirectory></WorkingDirectory>
</CustomBuild> </CustomBuild>
<AdditionalRules> <AdditionalRules>
<CustomPostBuild></CustomPostBuild> <CustomPostBuild></CustomPostBuild>
<CustomPreBuild></CustomPreBuild> <CustomPreBuild></CustomPreBuild>
</AdditionalRules> </AdditionalRules>
</Configuration> </Configuration>
<Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Static Library"> <Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Static Library">
<General OutputFile="codelite/libpugixml.a" IntermediateDirectory="codelite/Release" Command="./libpugixml.a" CommandArguments="" WorkingDirectory="codelite" PauseExecWhenProcTerminates="yes"/> <General OutputFile="codelite/libpugixml.a" IntermediateDirectory="codelite/Release" Command="./libpugixml.a" CommandArguments="" WorkingDirectory="codelite" PauseExecWhenProcTerminates="yes"/>
<Compiler Required="yes" Options="-g;-O2"> <Compiler Required="yes" Options="-g;-O2">
<Preprocessor Value="NDEBUG"/> <Preprocessor Value="NDEBUG"/>
</Compiler> </Compiler>
<Linker Required="yes" Options=""> <Linker Required="yes" Options="">
</Linker> </Linker>
<ResourceCompiler Required="no" Options=""/> <ResourceCompiler Required="no" Options=""/>
<CustomBuild Enabled="no"> <CustomBuild Enabled="no">
<CleanCommand></CleanCommand> <CleanCommand></CleanCommand>
<BuildCommand></BuildCommand> <BuildCommand></BuildCommand>
<SingleFileCommand></SingleFileCommand> <SingleFileCommand></SingleFileCommand>
<MakefileGenerationCommand></MakefileGenerationCommand> <MakefileGenerationCommand></MakefileGenerationCommand>
<ThirdPartyToolName>None</ThirdPartyToolName> <ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory></WorkingDirectory> <WorkingDirectory></WorkingDirectory>
</CustomBuild> </CustomBuild>
<AdditionalRules> <AdditionalRules>
<CustomPostBuild></CustomPostBuild> <CustomPostBuild></CustomPostBuild>
<CustomPreBuild></CustomPreBuild> <CustomPreBuild></CustomPreBuild>
</AdditionalRules> </AdditionalRules>
</Configuration> </Configuration>
</Settings> </Settings>
<Dependencies name="Debug"> <Dependencies name="Debug">
</Dependencies> </Dependencies>
<Dependencies name="Release"> <Dependencies name="Release">
</Dependencies> </Dependencies>
</CodeLite_Project> </CodeLite_Project>

View File

@ -1,45 +1,45 @@
#include <winver.h> #include <winver.h>
#define PUGIXML_VERSION_MAJOR 1 #define PUGIXML_VERSION_MAJOR 1
#define PUGIXML_VERSION_MINOR 13 #define PUGIXML_VERSION_MINOR 13
#define PUGIXML_VERSION_PATCH 0 #define PUGIXML_VERSION_PATCH 0
#define PUGIXML_VERSION_NUMBER "1.13.0\0" #define PUGIXML_VERSION_NUMBER "1.13.0\0"
#if defined(GCC_WINDRES) || defined(__MINGW32__) || defined(__CYGWIN__) #if defined(GCC_WINDRES) || defined(__MINGW32__) || defined(__CYGWIN__)
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
#else #else
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
#endif #endif
FILEVERSION PUGIXML_VERSION_MAJOR,PUGIXML_VERSION_MINOR,PUGIXML_VERSION_PATCH,0 FILEVERSION PUGIXML_VERSION_MAJOR,PUGIXML_VERSION_MINOR,PUGIXML_VERSION_PATCH,0
PRODUCTVERSION PUGIXML_VERSION_MAJOR,PUGIXML_VERSION_MINOR,PUGIXML_VERSION_PATCH,0 PRODUCTVERSION PUGIXML_VERSION_MAJOR,PUGIXML_VERSION_MINOR,PUGIXML_VERSION_PATCH,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 1 FILEFLAGS 1
#else #else
FILEFLAGS 0 FILEFLAGS 0
#endif #endif
FILEOS VOS__WINDOWS32 FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL FILETYPE VFT_DLL
FILESUBTYPE 0 // not used FILESUBTYPE 0 // not used
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
BLOCK "040904E4" BLOCK "040904E4"
//language ID = U.S. English, char set = Windows, Multilingual //language ID = U.S. English, char set = Windows, Multilingual
BEGIN BEGIN
VALUE "CompanyName", "zeux/pugixml\0" VALUE "CompanyName", "zeux/pugixml\0"
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-2022, by Arseny Kapoulkine\0" VALUE "LegalCopyright", "Copyright (C) 2006-2022, 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
VALUE "Comments", "For more information visit https://github.com/zeux/pugixml/\0" VALUE "Comments", "For more information visit https://github.com/zeux/pugixml/\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
BEGIN BEGIN
VALUE "Translation", 0x0409, 1252 VALUE "Translation", 0x0409, 1252
END END
END END

View File

@ -1,343 +1,343 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8.00" Version="8.00"
Name="pugixml" Name="pugixml"
ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}" ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}"
RootNamespace="pugixml" RootNamespace="pugixml"
Keyword="Win32Proj" Keyword="Win32Proj"
> >
<Platforms> <Platforms>
<Platform <Platform
Name="Win32" Name="Win32"
/> />
<Platform <Platform
Name="x64" Name="x64"
/> />
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="vs2005\x32" OutputDirectory="vs2005\x32"
IntermediateDirectory="vs2005\x32\Debug" IntermediateDirectory="vs2005\x32\Debug"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmld.lib" OutputFile="$(OutDir)\pugixmld.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="vs2005\x64" OutputDirectory="vs2005\x64"
IntermediateDirectory="vs2005\x64\Debug" IntermediateDirectory="vs2005\x64\Debug"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3" TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmld.lib" OutputFile="$(OutDir)\pugixmld.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="vs2005\x32" OutputDirectory="vs2005\x32"
IntermediateDirectory="vs2005\x32\Release" IntermediateDirectory="vs2005\x32\Release"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="3" Optimization="3"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
StringPooling="true" StringPooling="true"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
ProgramDataBaseFileName="$(OutDir)\pugixml.pdb" ProgramDataBaseFileName="$(OutDir)\pugixml.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixml.lib" OutputFile="$(OutDir)\pugixml.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="vs2005\x64" OutputDirectory="vs2005\x64"
IntermediateDirectory="vs2005\x64\Release" IntermediateDirectory="vs2005\x64\Release"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3" TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="3" Optimization="3"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
StringPooling="true" StringPooling="true"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
ProgramDataBaseFileName="$(OutDir)\pugixml.pdb" ProgramDataBaseFileName="$(OutDir)\pugixml.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixml.lib" OutputFile="$(OutDir)\pugixml.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
</References> </References>
<Files> <Files>
<Filter <Filter
Name="src" Name="src"
Filter="" Filter=""
> >
<File <File
RelativePath="..\src\pugixml.hpp" RelativePath="..\src\pugixml.hpp"
> >
</File> </File>
<File <File
RelativePath="..\src\pugiconfig.hpp" RelativePath="..\src\pugiconfig.hpp"
> >
</File> </File>
<File <File
RelativePath="..\src\pugixml.cpp" RelativePath="..\src\pugixml.cpp"
> >
</File> </File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
</VisualStudioProject> </VisualStudioProject>

View File

@ -1,343 +1,343 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8.00" Version="8.00"
Name="pugixml" Name="pugixml"
ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}" ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}"
RootNamespace="pugixml" RootNamespace="pugixml"
Keyword="Win32Proj" Keyword="Win32Proj"
> >
<Platforms> <Platforms>
<Platform <Platform
Name="Win32" Name="Win32"
/> />
<Platform <Platform
Name="x64" Name="x64"
/> />
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="vs2005\x32" OutputDirectory="vs2005\x32"
IntermediateDirectory="vs2005\x32\DebugStatic" IntermediateDirectory="vs2005\x32\DebugStatic"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmlsd.lib" OutputFile="$(OutDir)\pugixmlsd.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="vs2005\x64" OutputDirectory="vs2005\x64"
IntermediateDirectory="vs2005\x64\DebugStatic" IntermediateDirectory="vs2005\x64\DebugStatic"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3" TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmlsd.lib" OutputFile="$(OutDir)\pugixmlsd.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="vs2005\x32" OutputDirectory="vs2005\x32"
IntermediateDirectory="vs2005\x32\ReleaseStatic" IntermediateDirectory="vs2005\x32\ReleaseStatic"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="3" Optimization="3"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmls.lib" OutputFile="$(OutDir)\pugixmls.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="vs2005\x64" OutputDirectory="vs2005\x64"
IntermediateDirectory="vs2005\x64\ReleaseStatic" IntermediateDirectory="vs2005\x64\ReleaseStatic"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3" TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="3" Optimization="3"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmls.lib" OutputFile="$(OutDir)\pugixmls.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
</References> </References>
<Files> <Files>
<Filter <Filter
Name="src" Name="src"
Filter="" Filter=""
> >
<File <File
RelativePath="..\src\pugixml.hpp" RelativePath="..\src\pugixml.hpp"
> >
</File> </File>
<File <File
RelativePath="..\src\pugiconfig.hpp" RelativePath="..\src\pugiconfig.hpp"
> >
</File> </File>
<File <File
RelativePath="..\src\pugixml.cpp" RelativePath="..\src\pugixml.cpp"
> >
</File> </File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
</VisualStudioProject> </VisualStudioProject>

View File

@ -1,339 +1,339 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9.00"
Name="pugixml" Name="pugixml"
ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}" ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}"
RootNamespace="pugixml" RootNamespace="pugixml"
Keyword="Win32Proj" Keyword="Win32Proj"
> >
<Platforms> <Platforms>
<Platform <Platform
Name="Win32" Name="Win32"
/> />
<Platform <Platform
Name="x64" Name="x64"
/> />
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="vs2008\x32" OutputDirectory="vs2008\x32"
IntermediateDirectory="vs2008\x32\Debug" IntermediateDirectory="vs2008\x32\Debug"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmld.lib" OutputFile="$(OutDir)\pugixmld.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="vs2008\x64" OutputDirectory="vs2008\x64"
IntermediateDirectory="vs2008\x64\Debug" IntermediateDirectory="vs2008\x64\Debug"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3" TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmld.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmld.lib" OutputFile="$(OutDir)\pugixmld.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="vs2008\x32" OutputDirectory="vs2008\x32"
IntermediateDirectory="vs2008\x32\Release" IntermediateDirectory="vs2008\x32\Release"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="3" Optimization="3"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
StringPooling="true" StringPooling="true"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\pugixml.pdb" ProgramDataBaseFileName="$(OutDir)\pugixml.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixml.lib" OutputFile="$(OutDir)\pugixml.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="vs2008\x64" OutputDirectory="vs2008\x64"
IntermediateDirectory="vs2008\x64\Release" IntermediateDirectory="vs2008\x64\Release"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3" TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="3" Optimization="3"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
StringPooling="true" StringPooling="true"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\pugixml.pdb" ProgramDataBaseFileName="$(OutDir)\pugixml.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixml.lib" OutputFile="$(OutDir)\pugixml.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
</References> </References>
<Files> <Files>
<Filter <Filter
Name="src" Name="src"
Filter="" Filter=""
> >
<File <File
RelativePath="..\src\pugixml.hpp" RelativePath="..\src\pugixml.hpp"
> >
</File> </File>
<File <File
RelativePath="..\src\pugiconfig.hpp" RelativePath="..\src\pugiconfig.hpp"
> >
</File> </File>
<File <File
RelativePath="..\src\pugixml.cpp" RelativePath="..\src\pugixml.cpp"
> >
</File> </File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
</VisualStudioProject> </VisualStudioProject>

View File

@ -1,339 +1,339 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9.00"
Name="pugixml" Name="pugixml"
ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}" ProjectGUID="{89A1E353-E2DC-495C-B403-742BE206ACED}"
RootNamespace="pugixml" RootNamespace="pugixml"
Keyword="Win32Proj" Keyword="Win32Proj"
> >
<Platforms> <Platforms>
<Platform <Platform
Name="Win32" Name="Win32"
/> />
<Platform <Platform
Name="x64" Name="x64"
/> />
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="vs2008\x32" OutputDirectory="vs2008\x32"
IntermediateDirectory="vs2008\x32\DebugStatic" IntermediateDirectory="vs2008\x32\DebugStatic"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmlsd.lib" OutputFile="$(OutDir)\pugixmlsd.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="vs2008\x64" OutputDirectory="vs2008\x64"
IntermediateDirectory="vs2008\x64\DebugStatic" IntermediateDirectory="vs2008\x64\DebugStatic"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3" TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmlsd.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG" PreprocessorDefinitions="_DEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmlsd.lib" OutputFile="$(OutDir)\pugixmlsd.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="vs2008\x32" OutputDirectory="vs2008\x32"
IntermediateDirectory="vs2008\x32\ReleaseStatic" IntermediateDirectory="vs2008\x32\ReleaseStatic"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="3" Optimization="3"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmls.lib" OutputFile="$(OutDir)\pugixmls.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="vs2008\x64" OutputDirectory="vs2008\x64"
IntermediateDirectory="vs2008\x64\ReleaseStatic" IntermediateDirectory="vs2008\x64\ReleaseStatic"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3" TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="3" Optimization="3"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb" ProgramDataBaseFileName="$(OutDir)\pugixmls.pdb"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG" PreprocessorDefinitions="NDEBUG"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="$(OutDir)\pugixmls.lib" OutputFile="$(OutDir)\pugixmls.lib"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCWebDeploymentTool" Name="VCWebDeploymentTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
</References> </References>
<Files> <Files>
<Filter <Filter
Name="src" Name="src"
Filter="" Filter=""
> >
<File <File
RelativePath="..\src\pugixml.hpp" RelativePath="..\src\pugixml.hpp"
> >
</File> </File>
<File <File
RelativePath="..\src\pugiconfig.hpp" RelativePath="..\src\pugiconfig.hpp"
> >
</File> </File>
<File <File
RelativePath="..\src\pugixml.cpp" RelativePath="..\src\pugixml.cpp"
> >
</File> </File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
</VisualStudioProject> </VisualStudioProject>

View File

@ -1,191 +1,191 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid> <ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid>
<RootNamespace>pugixml</RootNamespace> <RootNamespace>pugixml</RootNamespace>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_Debug\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_Debug\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_Debug\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_Debug\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_Debug\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_Debug\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_Release\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_Release\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_Release\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_Release\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_Release\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_Release\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader></PrecompiledHeader> <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader></PrecompiledHeader> <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader></PrecompiledHeader> <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader></PrecompiledHeader> <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\src\pugixml.hpp" /> <ClInclude Include="..\src\pugixml.hpp" />
<ClInclude Include="..\src\pugiconfig.hpp" /> <ClInclude Include="..\src\pugiconfig.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\src\pugixml.cpp"> <ClCompile Include="..\src\pugixml.cpp">
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View File

@ -1,191 +1,191 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid> <ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid>
<RootNamespace>pugixml</RootNamespace> <RootNamespace>pugixml</RootNamespace>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_DebugStatic\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_DebugStatic\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_DebugStatic\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_DebugStatic\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_DebugStatic\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_DebugStatic\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_DebugStatic\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_DebugStatic\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_ReleaseStatic\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_ReleaseStatic\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_ReleaseStatic\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_ReleaseStatic\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_ReleaseStatic\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_ReleaseStatic\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_ReleaseStatic\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_ReleaseStatic\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader></PrecompiledHeader> <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader></PrecompiledHeader> <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader></PrecompiledHeader> <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader></PrecompiledHeader> <PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\src\pugixml.hpp" /> <ClInclude Include="..\src\pugixml.hpp" />
<ClInclude Include="..\src\pugiconfig.hpp" /> <ClInclude Include="..\src\pugiconfig.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\src\pugixml.cpp"> <ClCompile Include="..\src\pugixml.cpp">
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View File

@ -1,199 +1,199 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid> <ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid>
<RootNamespace>pugixml</RootNamespace> <RootNamespace>pugixml</RootNamespace>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_Debug\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_Debug\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_Debug\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_Debug\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_Debug\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_Debug\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_Release\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_Release\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_Release\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_Release\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_Release\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_Release\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\src\pugixml.hpp" /> <ClInclude Include="..\src\pugixml.hpp" />
<ClInclude Include="..\src\pugiconfig.hpp" /> <ClInclude Include="..\src\pugiconfig.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\src\pugixml.cpp"> <ClCompile Include="..\src\pugixml.cpp">
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View File

@ -1,199 +1,199 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid> <ProjectGuid>{89A1E353-E2DC-495C-B403-742BE206ACED}</ProjectGuid>
<RootNamespace>pugixml</RootNamespace> <RootNamespace>pugixml</RootNamespace>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_DebugStatic\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_DebugStatic\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_DebugStatic\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_DebugStatic\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_DebugStatic\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_DebugStatic\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_DebugStatic\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_DebugStatic\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_ReleaseStatic\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_ReleaseStatic\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_ReleaseStatic\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_ReleaseStatic\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_ReleaseStatic\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_ReleaseStatic\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_ReleaseStatic\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_ReleaseStatic\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
<Lib> <Lib>
<OutputFile>$(OutDir)pugixml.lib</OutputFile> <OutputFile>$(OutDir)pugixml.lib</OutputFile>
</Lib> </Lib>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\src\pugixml.hpp" /> <ClInclude Include="..\src\pugixml.hpp" />
<ClInclude Include="..\src\pugiconfig.hpp" /> <ClInclude Include="..\src\pugiconfig.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\src\pugixml.cpp"> <ClCompile Include="..\src\pugixml.cpp">
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View File

@ -1,172 +1,172 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid> <ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>pugixml</RootNamespace> <RootNamespace>pugixml</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>vs2015\$(Platform)_$(Configuration)\</OutDir> <OutDir>vs2015\$(Platform)_$(Configuration)\</OutDir>
<IntDir>vs2015\$(Platform)_$(Configuration)\</IntDir> <IntDir>vs2015\$(Platform)_$(Configuration)\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>vs2015\$(Platform)_$(Configuration)\</OutDir> <OutDir>vs2015\$(Platform)_$(Configuration)\</OutDir>
<IntDir>vs2015\$(Platform)_$(Configuration)\</IntDir> <IntDir>vs2015\$(Platform)_$(Configuration)\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>vs2015\$(Platform)_$(Configuration)\</OutDir> <OutDir>vs2015\$(Platform)_$(Configuration)\</OutDir>
<IntDir>vs2015\$(Platform)_$(Configuration)\</IntDir> <IntDir>vs2015\$(Platform)_$(Configuration)\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>vs2015\$(Platform)_$(Configuration)\</OutDir> <OutDir>vs2015\$(Platform)_$(Configuration)\</OutDir>
<IntDir>vs2015\$(Platform)_$(Configuration)\</IntDir> <IntDir>vs2015\$(Platform)_$(Configuration)\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\src\pugiconfig.hpp" /> <ClInclude Include="..\src\pugiconfig.hpp" />
<ClInclude Include="..\src\pugixml.hpp" /> <ClInclude Include="..\src\pugixml.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\src\pugixml.cpp" /> <ClCompile Include="..\src\pugixml.cpp" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View File

@ -1,172 +1,172 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid> <ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>pugixml</RootNamespace> <RootNamespace>pugixml</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>vs2022\$(Platform)_$(Configuration)\</OutDir> <OutDir>vs2022\$(Platform)_$(Configuration)\</OutDir>
<IntDir>vs2022\$(Platform)_$(Configuration)\</IntDir> <IntDir>vs2022\$(Platform)_$(Configuration)\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>vs2022\$(Platform)_$(Configuration)\</OutDir> <OutDir>vs2022\$(Platform)_$(Configuration)\</OutDir>
<IntDir>vs2022\$(Platform)_$(Configuration)\</IntDir> <IntDir>vs2022\$(Platform)_$(Configuration)\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>vs2022\$(Platform)_$(Configuration)\</OutDir> <OutDir>vs2022\$(Platform)_$(Configuration)\</OutDir>
<IntDir>vs2022\$(Platform)_$(Configuration)\</IntDir> <IntDir>vs2022\$(Platform)_$(Configuration)\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>vs2022\$(Platform)_$(Configuration)\</OutDir> <OutDir>vs2022\$(Platform)_$(Configuration)\</OutDir>
<IntDir>vs2022\$(Platform)_$(Configuration)\</IntDir> <IntDir>vs2022\$(Platform)_$(Configuration)\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\src\pugiconfig.hpp" /> <ClInclude Include="..\src\pugiconfig.hpp" />
<ClInclude Include="..\src\pugixml.hpp" /> <ClInclude Include="..\src\pugixml.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\src\pugixml.cpp" /> <ClCompile Include="..\src\pugixml.cpp" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View File

@ -1,176 +1,176 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid> <ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>pugixml</RootNamespace> <RootNamespace>pugixml</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>vs2022\$(Platform)_$(Configuration)Static\</OutDir> <OutDir>vs2022\$(Platform)_$(Configuration)Static\</OutDir>
<IntDir>vs2022\$(Platform)_$(Configuration)Static\</IntDir> <IntDir>vs2022\$(Platform)_$(Configuration)Static\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>vs2022\$(Platform)_$(Configuration)Static\</OutDir> <OutDir>vs2022\$(Platform)_$(Configuration)Static\</OutDir>
<IntDir>vs2022\$(Platform)_$(Configuration)Static\</IntDir> <IntDir>vs2022\$(Platform)_$(Configuration)Static\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>vs2022\$(Platform)_$(Configuration)Static\</OutDir> <OutDir>vs2022\$(Platform)_$(Configuration)Static\</OutDir>
<IntDir>vs2022\$(Platform)_$(Configuration)Static\</IntDir> <IntDir>vs2022\$(Platform)_$(Configuration)Static\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>vs2022\$(Platform)_$(Configuration)Static\</OutDir> <OutDir>vs2022\$(Platform)_$(Configuration)Static\</OutDir>
<IntDir>vs2022\$(Platform)_$(Configuration)Static\</IntDir> <IntDir>vs2022\$(Platform)_$(Configuration)Static\</IntDir>
<TargetName>pugixml</TargetName> <TargetName>pugixml</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\src\pugiconfig.hpp" /> <ClInclude Include="..\src\pugiconfig.hpp" />
<ClInclude Include="..\src\pugixml.hpp" /> <ClInclude Include="..\src\pugixml.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\src\pugixml.cpp" /> <ClCompile Include="..\src\pugixml.cpp" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View File

@ -1,77 +1,77 @@
/** /**
* pugixml parser - version 1.13 * pugixml parser - version 1.13
* -------------------------------------------------------- * --------------------------------------------------------
* Copyright (C) 2006-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) * Copyright (C) 2006-2022, 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
* of this file. * of this file.
* *
* This work is based on the pugxml parser, which is: * This work is based on the pugxml parser, which is:
* Copyright (C) 2003, by Kristen Wegner (kristen@tima.net) * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
*/ */
#ifndef HEADER_PUGICONFIG_HPP #ifndef HEADER_PUGICONFIG_HPP
#define HEADER_PUGICONFIG_HPP #define HEADER_PUGICONFIG_HPP
// Uncomment this to enable wchar_t mode // Uncomment this to enable wchar_t mode
// #define PUGIXML_WCHAR_MODE // #define PUGIXML_WCHAR_MODE
// Uncomment this to enable compact mode // Uncomment this to enable compact mode
// #define PUGIXML_COMPACT // #define PUGIXML_COMPACT
// Uncomment this to disable XPath // Uncomment this to disable XPath
// #define PUGIXML_NO_XPATH // #define PUGIXML_NO_XPATH
// Uncomment this to disable STL // Uncomment this to disable STL
// #define PUGIXML_NO_STL // #define PUGIXML_NO_STL
// Uncomment this to disable exceptions // Uncomment this to disable exceptions
// #define PUGIXML_NO_EXCEPTIONS // #define PUGIXML_NO_EXCEPTIONS
// Set this to control attributes for public classes/functions, i.e.: // Set this to control attributes for public classes/functions, i.e.:
// #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL // #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL
// #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL // #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL
// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall // #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall
// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead // In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead
// Tune these constants to adjust memory-related behavior // Tune these constants to adjust memory-related behavior
// #define PUGIXML_MEMORY_PAGE_SIZE 32768 // #define PUGIXML_MEMORY_PAGE_SIZE 32768
// #define PUGIXML_MEMORY_OUTPUT_STACK 10240 // #define PUGIXML_MEMORY_OUTPUT_STACK 10240
// #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096 // #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096
// Tune this constant to adjust max nesting for XPath queries // Tune this constant to adjust max nesting for XPath queries
// #define PUGIXML_XPATH_DEPTH_LIMIT 1024 // #define PUGIXML_XPATH_DEPTH_LIMIT 1024
// Uncomment this to switch to header-only version // Uncomment this to switch to header-only version
// #define PUGIXML_HEADER_ONLY // #define PUGIXML_HEADER_ONLY
// Uncomment this to enable long long support // Uncomment this to enable long long support
// #define PUGIXML_HAS_LONG_LONG // #define PUGIXML_HAS_LONG_LONG
#endif #endif
/** /**
* Copyright (c) 2006-2022 Arseny Kapoulkine * Copyright (c) 2006-2022 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
* files (the "Software"), to deal in the Software without * files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, * restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell * copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the * copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following * Software is furnished to do so, subject to the following
* conditions: * conditions:
* *
* The above copyright notice and this permission notice shall be * The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software. * included in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
*/ */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,175 +1,175 @@
#include "allocator.hpp" #include "allocator.hpp"
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
// Address sanitizer // Address sanitizer
#if defined(__has_feature) #if defined(__has_feature)
# define ADDRESS_SANITIZER __has_feature(address_sanitizer) # define ADDRESS_SANITIZER __has_feature(address_sanitizer)
#else #else
# if defined(__SANITIZE_ADDRESS__) # if defined(__SANITIZE_ADDRESS__)
# define ADDRESS_SANITIZER 1 # define ADDRESS_SANITIZER 1
# else # else
# define ADDRESS_SANITIZER 0 # define ADDRESS_SANITIZER 0
# endif # endif
#endif #endif
// Low-level allocation functions // Low-level allocation functions
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
# ifdef __MWERKS__ # ifdef __MWERKS__
# pragma ANSI_strict off // disable ANSI strictness to include windows.h # pragma ANSI_strict off // disable ANSI strictness to include windows.h
# pragma cpp_extensions on // enable some extensions to include windows.h # pragma cpp_extensions on // enable some extensions to include windows.h
# endif # endif
# if defined(_MSC_VER) # if defined(_MSC_VER)
# pragma warning(disable: 4201) // nonstandard extension used: nameless struct/union # pragma warning(disable: 4201) // nonstandard extension used: nameless struct/union
# endif # endif
# ifdef _XBOX_VER # ifdef _XBOX_VER
# define NOD3D # define NOD3D
# include <xtl.h> # include <xtl.h>
# else # else
# include <windows.h> # include <windows.h>
# endif # endif
namespace namespace
{ {
const size_t page_size = 4096; const size_t page_size = 4096;
size_t align_to_page(size_t value) size_t align_to_page(size_t value)
{ {
return (value + page_size - 1) & ~(page_size - 1); return (value + page_size - 1) & ~(page_size - 1);
} }
void* allocate_page_aligned(size_t size) void* allocate_page_aligned(size_t size)
{ {
// We can't use VirtualAlloc because it has 64Kb granularity so we run out of address space quickly // We can't use VirtualAlloc because it has 64Kb granularity so we run out of address space quickly
// We can't use malloc because of occasional problems with CW on CRT termination // We can't use malloc because of occasional problems with CW on CRT termination
static HANDLE heap = HeapCreate(0, 0, 0); static HANDLE heap = HeapCreate(0, 0, 0);
void* result = HeapAlloc(heap, 0, size + page_size); void* result = HeapAlloc(heap, 0, size + page_size);
return reinterpret_cast<void*>(align_to_page(reinterpret_cast<size_t>(result))); return reinterpret_cast<void*>(align_to_page(reinterpret_cast<size_t>(result)));
} }
void* allocate(size_t size) void* allocate(size_t size)
{ {
size_t aligned_size = align_to_page(size); size_t aligned_size = align_to_page(size);
void* ptr = allocate_page_aligned(aligned_size + page_size); void* ptr = allocate_page_aligned(aligned_size + page_size);
if (!ptr) return 0; if (!ptr) return 0;
char* end = static_cast<char*>(ptr) + aligned_size; char* end = static_cast<char*>(ptr) + aligned_size;
DWORD old_flags; DWORD old_flags;
VirtualProtect(end, page_size, PAGE_NOACCESS, &old_flags); VirtualProtect(end, page_size, PAGE_NOACCESS, &old_flags);
return end - size; return end - size;
} }
void deallocate(void* ptr, size_t size) void deallocate(void* ptr, size_t size)
{ {
size_t aligned_size = align_to_page(size); size_t aligned_size = align_to_page(size);
void* rptr = static_cast<char*>(ptr) + size - aligned_size; void* rptr = static_cast<char*>(ptr) + size - aligned_size;
DWORD old_flags; DWORD old_flags;
VirtualProtect(rptr, aligned_size + page_size, PAGE_NOACCESS, &old_flags); VirtualProtect(rptr, aligned_size + page_size, PAGE_NOACCESS, &old_flags);
} }
} }
#elif (defined(__APPLE__) || defined(__linux__)) && (defined(__i386) || defined(__x86_64)) && !ADDRESS_SANITIZER #elif (defined(__APPLE__) || defined(__linux__)) && (defined(__i386) || defined(__x86_64)) && !ADDRESS_SANITIZER
# include <sys/mman.h> # include <sys/mman.h>
namespace namespace
{ {
const size_t page_size = 4096; const size_t page_size = 4096;
size_t align_to_page(size_t value) size_t align_to_page(size_t value)
{ {
return (value + page_size - 1) & ~(page_size - 1); return (value + page_size - 1) & ~(page_size - 1);
} }
void* allocate_page_aligned(size_t size) void* allocate_page_aligned(size_t size)
{ {
void* result = malloc(size + page_size); void* result = malloc(size + page_size);
return reinterpret_cast<void*>(align_to_page(reinterpret_cast<size_t>(result))); return reinterpret_cast<void*>(align_to_page(reinterpret_cast<size_t>(result)));
} }
void* allocate(size_t size) void* allocate(size_t size)
{ {
size_t aligned_size = align_to_page(size); size_t aligned_size = align_to_page(size);
void* ptr = allocate_page_aligned(aligned_size + page_size); void* ptr = allocate_page_aligned(aligned_size + page_size);
if (!ptr) return 0; if (!ptr) return 0;
char* end = static_cast<char*>(ptr) + aligned_size; char* end = static_cast<char*>(ptr) + aligned_size;
int res = mprotect(end, page_size, PROT_NONE); int res = mprotect(end, page_size, PROT_NONE);
assert(res == 0); assert(res == 0);
(void)!res; (void)!res;
return end - size; return end - size;
} }
void deallocate(void* ptr, size_t size) void deallocate(void* ptr, size_t size)
{ {
size_t aligned_size = align_to_page(size); size_t aligned_size = align_to_page(size);
void* rptr = static_cast<char*>(ptr) + size - aligned_size; void* rptr = static_cast<char*>(ptr) + size - aligned_size;
int res = mprotect(rptr, aligned_size + page_size, PROT_NONE); int res = mprotect(rptr, aligned_size + page_size, PROT_NONE);
assert(res == 0); assert(res == 0);
(void)!res; (void)!res;
} }
} }
#else #else
namespace namespace
{ {
void* allocate(size_t size) void* allocate(size_t size)
{ {
return malloc(size); return malloc(size);
} }
void deallocate(void* ptr, size_t size) void deallocate(void* ptr, size_t size)
{ {
(void)size; (void)size;
free(ptr); free(ptr);
} }
} }
#endif #endif
// High-level allocation functions // High-level allocation functions
const size_t memory_alignment = sizeof(double) > sizeof(void*) ? sizeof(double) : sizeof(void*); const size_t memory_alignment = sizeof(double) > sizeof(void*) ? sizeof(double) : sizeof(void*);
void* memory_allocate(size_t size) void* memory_allocate(size_t size)
{ {
void* result = allocate(size + memory_alignment); void* result = allocate(size + memory_alignment);
if (!result) return 0; if (!result) return 0;
memcpy(result, &size, sizeof(size_t)); memcpy(result, &size, sizeof(size_t));
return static_cast<char*>(result) + memory_alignment; return static_cast<char*>(result) + memory_alignment;
} }
size_t memory_size(void* ptr) size_t memory_size(void* ptr)
{ {
assert(ptr); assert(ptr);
size_t result; size_t result;
memcpy(&result, static_cast<char*>(ptr) - memory_alignment, sizeof(size_t)); memcpy(&result, static_cast<char*>(ptr) - memory_alignment, sizeof(size_t));
return result; return result;
} }
void memory_deallocate(void* ptr) void memory_deallocate(void* ptr)
{ {
if (!ptr) return; if (!ptr) return;
size_t size = memory_size(ptr); size_t size = memory_size(ptr);
deallocate(static_cast<char*>(ptr) - memory_alignment, size + memory_alignment); deallocate(static_cast<char*>(ptr) - memory_alignment, size + memory_alignment);
} }

View File

@ -1,10 +1,10 @@
#ifndef HEADER_TEST_ALLOCATOR_HPP #ifndef HEADER_TEST_ALLOCATOR_HPP
#define HEADER_TEST_ALLOCATOR_HPP #define HEADER_TEST_ALLOCATOR_HPP
#include <stddef.h> #include <stddef.h>
void* memory_allocate(size_t size); void* memory_allocate(size_t size);
size_t memory_size(void* ptr); size_t memory_size(void* ptr);
void memory_deallocate(void* ptr); void memory_deallocate(void* ptr);
#endif #endif

View File

@ -1,87 +1,87 @@
function Invoke-CmdScript($scriptName) function Invoke-CmdScript($scriptName)
{ {
$cmdLine = """$scriptName"" $args & set" $cmdLine = """$scriptName"" $args & set"
& $Env:SystemRoot\system32\cmd.exe /c $cmdLine | & $Env:SystemRoot\system32\cmd.exe /c $cmdLine |
select-string '^([^=]*)=(.*)$' | foreach-object { select-string '^([^=]*)=(.*)$' | foreach-object {
$varName = $_.Matches[0].Groups[1].Value $varName = $_.Matches[0].Groups[1].Value
$varValue = $_.Matches[0].Groups[2].Value $varValue = $_.Matches[0].Groups[2].Value
set-item Env:$varName $varValue set-item Env:$varName $varValue
} }
} }
$sources = @("src/pugixml.cpp") + (Get-ChildItem -Path "tests/*.cpp" -Exclude "fuzz_*.cpp") $sources = @("src/pugixml.cpp") + (Get-ChildItem -Path "tests/*.cpp" -Exclude "fuzz_*.cpp")
$failed = $FALSE $failed = $FALSE
foreach ($vs in $args) foreach ($vs in $args)
{ {
foreach ($arch in "x86","x64") foreach ($arch in "x86","x64")
{ {
Write-Output "# Setting up VS$vs $arch" Write-Output "# Setting up VS$vs $arch"
if ($vs -eq 15) { if ($vs -eq 15) {
$vsdevcmdarch = if ($arch -eq "x64") { "amd64" } else { "x86" } $vsdevcmdarch = if ($arch -eq "x64") { "amd64" } else { "x86" }
Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" "-arch=$vsdevcmdarch" Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" "-arch=$vsdevcmdarch"
} }
elseif ($vs -eq 19) { elseif ($vs -eq 19) {
$vsdevcmdarch = if ($arch -eq "x64") { "amd64" } else { "x86" } $vsdevcmdarch = if ($arch -eq "x64") { "amd64" } else { "x86" }
Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" "-arch=$vsdevcmdarch" Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" "-arch=$vsdevcmdarch"
} }
elseif ($vs -eq 22) { elseif ($vs -eq 22) {
$vsdevcmdarch = if ($arch -eq "x64") { "amd64" } else { "x86" } $vsdevcmdarch = if ($arch -eq "x64") { "amd64" } else { "x86" }
Invoke-CmdScript "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" "-arch=$vsdevcmdarch" Invoke-CmdScript "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" "-arch=$vsdevcmdarch"
} }
else else
{ {
Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio $vs.0\VC\vcvarsall.bat" $arch Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio $vs.0\VC\vcvarsall.bat" $arch
} }
if (! $?) { throw "Error setting up VS$vs $arch" } if (! $?) { throw "Error setting up VS$vs $arch" }
foreach ($defines in "standard", "PUGIXML_WCHAR_MODE", "PUGIXML_COMPACT") foreach ($defines in "standard", "PUGIXML_WCHAR_MODE", "PUGIXML_COMPACT")
{ {
$target = "tests_vs${vs}_${arch}_${defines}" $target = "tests_vs${vs}_${arch}_${defines}"
$deflist = if ($defines -eq "standard") { "" } else { "/D$defines" } $deflist = if ($defines -eq "standard") { "" } else { "/D$defines" }
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 /Fe$target.exe /EHsc /W4 /WX $deflist $sources 2>&1" | Tee-Object -Variable buildOutput
if ($?) if ($?)
{ {
Write-Output "# Running $target.exe" Write-Output "# Running $target.exe"
$sw = [Diagnostics.Stopwatch]::StartNew() $sw = [Diagnostics.Stopwatch]::StartNew()
& .\$target | Tee-Object -Variable testOutput & .\$target | Tee-Object -Variable testOutput
if ($?) if ($?)
{ {
Write-Output "# Passed" Write-Output "# Passed"
Update-AppveyorTest $target -Outcome Passed -StdOut ($testOutput | out-string) -Duration $sw.ElapsedMilliseconds Update-AppveyorTest $target -Outcome Passed -StdOut ($testOutput | out-string) -Duration $sw.ElapsedMilliseconds
} }
else else
{ {
Write-Output "# Failed" Write-Output "# Failed"
Update-AppveyorTest $target -Outcome Failed -StdOut ($testOutput | out-string) -ErrorMessage "Running failed" Update-AppveyorTest $target -Outcome Failed -StdOut ($testOutput | out-string) -ErrorMessage "Running failed"
$failed = $TRUE $failed = $TRUE
} }
} }
else else
{ {
Write-Output "# Failed to build" Write-Output "# Failed to build"
Update-AppveyorTest $target -Outcome Failed -StdOut ($buildOutput | out-string) -ErrorMessage "Compilation failed" Update-AppveyorTest $target -Outcome Failed -StdOut ($buildOutput | out-string) -ErrorMessage "Compilation failed"
$failed = $TRUE $failed = $TRUE
} }
} }
} }
} }
if ($failed) { throw "One or more build steps failed" } if ($failed) { throw "One or more build steps failed" }
Write-Output "# End" Write-Output "# End"

View File

@ -1,14 +1,14 @@
#include "../src/pugixml.hpp" #include "../src/pugixml.hpp"
#include <stdint.h> #include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{ {
pugi::xml_document doc; pugi::xml_document doc;
doc.load_buffer(Data, Size); doc.load_buffer(Data, Size);
doc.load_buffer(Data, Size, pugi::parse_minimal); doc.load_buffer(Data, Size, pugi::parse_minimal);
doc.load_buffer(Data, Size, pugi::parse_full); doc.load_buffer(Data, Size, pugi::parse_full);
return 0; return 0;
} }

22
3rd_party/pugixml/tests/fuzz_setup.sh vendored Executable file → Normal file
View File

@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
sudo apt-get --yes install subversion screen gcc g++ cmake ninja-build golang autoconf libtool apache2 python-dev pkg-config zlib1g-dev libgcrypt11-dev sudo apt-get --yes install subversion screen gcc g++ cmake ninja-build golang autoconf libtool apache2 python-dev pkg-config zlib1g-dev libgcrypt11-dev
mkdir -p clang mkdir -p clang
cd clang cd clang
git clone https://chromium.googlesource.com/chromium/src/tools/clang git clone https://chromium.googlesource.com/chromium/src/tools/clang
cd .. cd ..
clang/clang/scripts/update.py clang/clang/scripts/update.py
sudo cp -rf third_party/llvm-build/Release+Asserts/lib/* /usr/local/lib/ sudo cp -rf third_party/llvm-build/Release+Asserts/lib/* /usr/local/lib/
sudo cp -rf third_party/llvm-build/Release+Asserts/bin/* /usr/local/bin sudo cp -rf third_party/llvm-build/Release+Asserts/bin/* /usr/local/bin

View File

@ -1,26 +1,26 @@
#include "../src/pugixml.hpp" #include "../src/pugixml.hpp"
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
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]; char* text = new char[Size + 1];
memcpy(text, Data, Size); memcpy(text, Data, Size);
text[Size] = 0; text[Size] = 0;
#ifdef PUGIXML_NO_EXCEPTIONS #ifdef PUGIXML_NO_EXCEPTIONS
pugi::xpath_query q(text); pugi::xpath_query q(text);
#else #else
try try
{ {
pugi::xpath_query q(text); pugi::xpath_query q(text);
} }
catch (pugi::xpath_exception&) catch (pugi::xpath_exception&)
{ {
} }
#endif #endif
delete[] text; delete[] text;
return 0; return 0;
} }

View File

@ -1,114 +1,114 @@
#ifndef HEADER_TEST_HELPERS_HPP #ifndef HEADER_TEST_HELPERS_HPP
#define HEADER_TEST_HELPERS_HPP #define HEADER_TEST_HELPERS_HPP
#include "test.hpp" #include "test.hpp"
#include <utility> #include <utility>
template <typename T> static void generic_bool_ops_test(const T& obj) template <typename T> static void generic_bool_ops_test(const T& obj)
{ {
T null; T null;
CHECK(!null); CHECK(!null);
CHECK(obj); CHECK(obj);
CHECK(!!obj); CHECK(!!obj);
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning(push) # pragma warning(push)
# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) - we really want to just cast to bool instead of !! # pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) - we really want to just cast to bool instead of !!
#endif #endif
bool b1 = null, b2 = obj; bool b1 = null, b2 = obj;
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning(pop) # pragma warning(pop)
#endif #endif
CHECK(!b1); CHECK(!b1);
CHECK(b2); CHECK(b2);
CHECK(obj && b2); CHECK(obj && b2);
CHECK(obj || b2); CHECK(obj || b2);
CHECK(obj && obj); CHECK(obj && obj);
CHECK(obj || obj); CHECK(obj || obj);
} }
template <typename T> static void generic_eq_ops_test(const T& obj1, const T& obj2) template <typename T> static void generic_eq_ops_test(const T& obj1, const T& obj2)
{ {
T null = T(); T null = T();
// operator== // operator==
CHECK(null == null); CHECK(null == null);
CHECK(obj1 == obj1); CHECK(obj1 == obj1);
CHECK(!(null == obj1)); CHECK(!(null == obj1));
CHECK(!(null == obj2)); CHECK(!(null == obj2));
CHECK(T(null) == null); CHECK(T(null) == null);
CHECK(T(obj1) == obj1); CHECK(T(obj1) == obj1);
// operator!= // operator!=
CHECK(!(null != null)); CHECK(!(null != null));
CHECK(!(obj1 != obj1)); CHECK(!(obj1 != obj1));
CHECK(null != obj1); CHECK(null != obj1);
CHECK(null != obj2); CHECK(null != obj2);
CHECK(!(T(null) != null)); CHECK(!(T(null) != null));
CHECK(!(T(obj1) != obj1)); CHECK(!(T(obj1) != obj1));
} }
template <typename T> static void generic_rel_ops_test(T obj1, T obj2) template <typename T> static void generic_rel_ops_test(T obj1, T obj2)
{ {
T null = T(); T null = T();
// obj1 < obj2 (we use operator<, but there is no other choice // obj1 < obj2 (we use operator<, but there is no other choice
if (obj1 > obj2) if (obj1 > obj2)
{ {
T temp = obj1; T temp = obj1;
obj1 = obj2; obj1 = obj2;
obj2 = temp; obj2 = temp;
} }
// operator< // operator<
CHECK(null < obj1); CHECK(null < obj1);
CHECK(null < obj2); CHECK(null < obj2);
CHECK(obj1 < obj2); CHECK(obj1 < obj2);
CHECK(!(null < null)); CHECK(!(null < null));
CHECK(!(obj1 < obj1)); CHECK(!(obj1 < obj1));
CHECK(!(obj1 < null)); CHECK(!(obj1 < null));
CHECK(!(obj2 < obj1)); CHECK(!(obj2 < obj1));
// operator<= // operator<=
CHECK(null <= obj1); CHECK(null <= obj1);
CHECK(null <= obj2); CHECK(null <= obj2);
CHECK(obj1 <= obj2); CHECK(obj1 <= obj2);
CHECK(null <= null); CHECK(null <= null);
CHECK(obj1 <= obj1); CHECK(obj1 <= obj1);
CHECK(!(obj1 <= null)); CHECK(!(obj1 <= null));
CHECK(!(obj2 <= obj1)); CHECK(!(obj2 <= obj1));
// operator> // operator>
CHECK(obj1 > null); CHECK(obj1 > null);
CHECK(obj2 > null); CHECK(obj2 > null);
CHECK(obj2 > obj1); CHECK(obj2 > obj1);
CHECK(!(null > null)); CHECK(!(null > null));
CHECK(!(obj1 > obj1)); CHECK(!(obj1 > obj1));
CHECK(!(null > obj1)); CHECK(!(null > obj1));
CHECK(!(obj1 > obj2)); CHECK(!(obj1 > obj2));
// operator>= // operator>=
CHECK(obj1 >= null); CHECK(obj1 >= null);
CHECK(obj2 >= null); CHECK(obj2 >= null);
CHECK(obj2 >= obj1); CHECK(obj2 >= obj1);
CHECK(null >= null); CHECK(null >= null);
CHECK(obj1 >= obj1); CHECK(obj1 >= obj1);
CHECK(!(null >= obj1)); CHECK(!(null >= obj1));
CHECK(!(obj1 >= obj2)); CHECK(!(obj1 >= obj2));
} }
template <typename T> static void generic_empty_test(const T& obj) template <typename T> static void generic_empty_test(const T& obj)
{ {
T null; T null;
CHECK(null.empty()); CHECK(null.empty());
CHECK(!obj.empty()); CHECK(!obj.empty());
} }
#endif #endif

View File

@ -1,218 +1,218 @@
#include "test.hpp" #include "test.hpp"
#include "allocator.hpp" #include "allocator.hpp"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <float.h> #include <float.h>
#include <assert.h> #include <assert.h>
#include <string> #include <string>
#ifndef PUGIXML_NO_EXCEPTIONS #ifndef PUGIXML_NO_EXCEPTIONS
# include <exception> # include <exception>
#endif #endif
#ifdef _WIN32_WCE #ifdef _WIN32_WCE
# undef DebugBreak # undef DebugBreak
# pragma warning(disable: 4201) // nonstandard extension used: nameless struct/union # pragma warning(disable: 4201) // nonstandard extension used: nameless struct/union
# include <windows.h> # include <windows.h>
#endif #endif
test_runner* test_runner::_tests = 0; test_runner* test_runner::_tests = 0;
size_t test_runner::_memory_fail_threshold = 0; size_t test_runner::_memory_fail_threshold = 0;
bool test_runner::_memory_fail_triggered = false; bool test_runner::_memory_fail_triggered = false;
jmp_buf test_runner::_failure_buffer; jmp_buf test_runner::_failure_buffer;
const char* test_runner::_failure_message; const char* test_runner::_failure_message;
const char* test_runner::_temp_path; const char* test_runner::_temp_path;
static size_t g_memory_total_size = 0; static size_t g_memory_total_size = 0;
static size_t g_memory_total_count = 0; static size_t g_memory_total_count = 0;
static size_t g_memory_fail_triggered = false; static size_t g_memory_fail_triggered = false;
static void* custom_allocate(size_t size) static void* custom_allocate(size_t size)
{ {
if (test_runner::_memory_fail_threshold > 0 && test_runner::_memory_fail_threshold < g_memory_total_size + size) if (test_runner::_memory_fail_threshold > 0 && test_runner::_memory_fail_threshold < g_memory_total_size + size)
{ {
g_memory_fail_triggered = true; g_memory_fail_triggered = true;
test_runner::_memory_fail_triggered = true; test_runner::_memory_fail_triggered = true;
return 0; return 0;
} }
else else
{ {
void* ptr = memory_allocate(size); void* ptr = memory_allocate(size);
if (!ptr) return 0; if (!ptr) return 0;
g_memory_total_size += memory_size(ptr); g_memory_total_size += memory_size(ptr);
g_memory_total_count++; g_memory_total_count++;
return ptr; return ptr;
} }
} }
#ifndef PUGIXML_NO_EXCEPTIONS #ifndef PUGIXML_NO_EXCEPTIONS
static void* custom_allocate_throw(size_t size) static void* custom_allocate_throw(size_t size)
{ {
void* result = custom_allocate(size); void* result = custom_allocate(size);
if (!result) if (!result)
throw std::bad_alloc(); throw std::bad_alloc();
return result; return result;
} }
#endif #endif
static void custom_deallocate(void* ptr) static void custom_deallocate(void* ptr)
{ {
assert(ptr); assert(ptr);
g_memory_total_size -= memory_size(ptr); g_memory_total_size -= memory_size(ptr);
g_memory_total_count--; g_memory_total_count--;
memory_deallocate(ptr); memory_deallocate(ptr);
} }
static void replace_memory_management() static void replace_memory_management()
{ {
// create some document to touch original functions // create some document to touch original functions
{ {
pugi::xml_document doc; pugi::xml_document doc;
doc.append_child().set_name(STR("node")); doc.append_child().set_name(STR("node"));
} }
// replace functions // replace functions
pugi::set_memory_management_functions(custom_allocate, custom_deallocate); pugi::set_memory_management_functions(custom_allocate, custom_deallocate);
} }
#if defined(_MSC_VER) && _MSC_VER > 1200 && _MSC_VER < 1400 && !defined(__INTEL_COMPILER) && !defined(__DMC__) #if defined(_MSC_VER) && _MSC_VER > 1200 && _MSC_VER < 1400 && !defined(__INTEL_COMPILER) && !defined(__DMC__)
#include <exception> #include <exception>
namespace std namespace std
{ {
_CRTIMP2 _Prhand _Raise_handler; _CRTIMP2 _Prhand _Raise_handler;
_CRTIMP2 void __cdecl _Throw(const exception&) {} _CRTIMP2 void __cdecl _Throw(const exception&) {}
} }
#endif #endif
static bool run_test(test_runner* test, const char* test_name, pugi::allocation_function allocate) static bool run_test(test_runner* test, const char* test_name, pugi::allocation_function allocate)
{ {
#ifndef PUGIXML_NO_EXCEPTIONS #ifndef PUGIXML_NO_EXCEPTIONS
try try
{ {
#endif #endif
g_memory_total_size = 0; g_memory_total_size = 0;
g_memory_total_count = 0; g_memory_total_count = 0;
g_memory_fail_triggered = false; g_memory_fail_triggered = false;
test_runner::_memory_fail_threshold = 0; test_runner::_memory_fail_threshold = 0;
test_runner::_memory_fail_triggered = false; test_runner::_memory_fail_triggered = false;
pugi::set_memory_management_functions(allocate, custom_deallocate); pugi::set_memory_management_functions(allocate, custom_deallocate);
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning(push) # pragma warning(push)
# pragma warning(disable: 4611) // interaction between _setjmp and C++ object destruction is non-portable # pragma warning(disable: 4611) // interaction between _setjmp and C++ object destruction is non-portable
# pragma warning(disable: 4793) // function compiled as native: presence of '_setjmp' makes a function unmanaged # pragma warning(disable: 4793) // function compiled as native: presence of '_setjmp' makes a function unmanaged
#endif #endif
volatile int result = setjmp(test_runner::_failure_buffer); volatile int result = setjmp(test_runner::_failure_buffer);
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning(pop) # pragma warning(pop)
#endif #endif
if (result) if (result)
{ {
printf("Test %s failed: %s\n", test_name, test_runner::_failure_message); printf("Test %s failed: %s\n", test_name, test_runner::_failure_message);
return false; return false;
} }
test->run(); test->run();
if (test_runner::_memory_fail_triggered) if (test_runner::_memory_fail_triggered)
{ {
printf("Test %s failed: unguarded memory fail triggered\n", test_name); printf("Test %s failed: unguarded memory fail triggered\n", test_name);
return false; return false;
} }
if (g_memory_total_size != 0 || g_memory_total_count != 0) if (g_memory_total_size != 0 || g_memory_total_count != 0)
{ {
printf("Test %s failed: memory leaks found (%u bytes in %u allocations)\n", test_name, static_cast<unsigned int>(g_memory_total_size), static_cast<unsigned int>(g_memory_total_count)); printf("Test %s failed: memory leaks found (%u bytes in %u allocations)\n", test_name, static_cast<unsigned int>(g_memory_total_size), static_cast<unsigned int>(g_memory_total_count));
return false; return false;
} }
return true; return true;
#ifndef PUGIXML_NO_EXCEPTIONS #ifndef PUGIXML_NO_EXCEPTIONS
} }
catch (const std::exception& e) catch (const std::exception& e)
{ {
printf("Test %s failed: exception %s\n", test_name, e.what()); printf("Test %s failed: exception %s\n", test_name, e.what());
return false; return false;
} }
catch (...) catch (...)
{ {
printf("Test %s failed for unknown reason\n", test_name); printf("Test %s failed for unknown reason\n", test_name);
return false; return false;
} }
#endif #endif
} }
#if defined(__CELLOS_LV2__) && defined(PUGIXML_NO_EXCEPTIONS) && !defined(__SNC__) #if defined(__CELLOS_LV2__) && defined(PUGIXML_NO_EXCEPTIONS) && !defined(__SNC__)
#include <exception> #include <exception>
void std::exception::_Raise() const void std::exception::_Raise() const
{ {
abort(); abort();
} }
#endif #endif
int main(int, char** argv) int main(int, char** argv)
{ {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
_control87(MCW_EM | PC_53, MCW_EM | MCW_PC); _control87(MCW_EM | PC_53, MCW_EM | MCW_PC);
#endif #endif
// setup temp path as the executable folder // setup temp path as the executable folder
std::string temp = argv[0]; std::string temp = argv[0];
std::string::size_type slash = temp.find_last_of("\\/"); std::string::size_type slash = temp.find_last_of("\\/");
temp.erase((slash != std::string::npos) ? slash + 1 : 0); temp.erase((slash != std::string::npos) ? slash + 1 : 0);
test_runner::_temp_path = temp.c_str(); test_runner::_temp_path = temp.c_str();
replace_memory_management(); replace_memory_management();
unsigned int total = 0; unsigned int total = 0;
unsigned int passed = 0; unsigned int passed = 0;
test_runner* test = 0; // gcc3 "variable might be used uninitialized in this function" bug workaround test_runner* test = 0; // gcc3 "variable might be used uninitialized in this function" bug workaround
for (test = test_runner::_tests; test; test = test->_next) for (test = test_runner::_tests; test; test = test->_next)
{ {
total++; total++;
passed += run_test(test, test->_name, custom_allocate); passed += run_test(test, test->_name, custom_allocate);
if (g_memory_fail_triggered) if (g_memory_fail_triggered)
{ {
// run tests that trigger memory failures twice - with an allocator that returns NULL and with an allocator that throws // run tests that trigger memory failures twice - with an allocator that returns NULL and with an allocator that throws
#ifndef PUGIXML_NO_EXCEPTIONS #ifndef PUGIXML_NO_EXCEPTIONS
total++; total++;
passed += run_test(test, (test->_name + std::string(" (throw)")).c_str(), custom_allocate_throw); passed += run_test(test, (test->_name + std::string(" (throw)")).c_str(), custom_allocate_throw);
#endif #endif
} }
} }
unsigned int failed = total - passed; unsigned int failed = total - passed;
if (failed != 0) if (failed != 0)
printf("FAILURE: %u out of %u tests failed.\n", failed, total); printf("FAILURE: %u out of %u tests failed.\n", failed, total);
else else
printf("Success: %u tests passed.\n", total); printf("Success: %u tests passed.\n", total);
return failed; return failed;
} }
#ifdef _WIN32_WCE #ifdef _WIN32_WCE
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{ {
return main(0, NULL); return main(0, NULL);
} }
#endif #endif

View File

@ -1,220 +1,220 @@
#define _SCL_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS
#define _SCL_SECURE_NO_DEPRECATE #define _SCL_SECURE_NO_DEPRECATE
#include "test.hpp" #include "test.hpp"
#include "writer_string.hpp" #include "writer_string.hpp"
#include <math.h> #include <math.h>
#include <float.h> #include <float.h>
#include <string.h> #include <string.h>
#include <wchar.h> #include <wchar.h>
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#ifndef PUGIXML_NO_XPATH #ifndef PUGIXML_NO_XPATH
static void build_document_order(std::vector<pugi::xpath_node>& result, pugi::xml_node root) static void build_document_order(std::vector<pugi::xpath_node>& result, pugi::xml_node root)
{ {
result.push_back(pugi::xpath_node()); result.push_back(pugi::xpath_node());
pugi::xml_node cur = root; pugi::xml_node cur = root;
for (;;) for (;;)
{ {
result.push_back(cur); result.push_back(cur);
for (pugi::xml_attribute a = cur.first_attribute(); a; a = a.next_attribute()) for (pugi::xml_attribute a = cur.first_attribute(); a; a = a.next_attribute())
result.push_back(pugi::xpath_node(a, cur)); result.push_back(pugi::xpath_node(a, cur));
if (cur.first_child()) if (cur.first_child())
cur = cur.first_child(); cur = cur.first_child();
else if (cur.next_sibling()) else if (cur.next_sibling())
cur = cur.next_sibling(); cur = cur.next_sibling();
else else
{ {
while (cur && !cur.next_sibling()) cur = cur.parent(); while (cur && !cur.next_sibling()) cur = cur.parent();
cur = cur.next_sibling(); cur = cur.next_sibling();
if (!cur) break; if (!cur) break;
} }
} }
} }
#endif #endif
bool test_string_equal(const pugi::char_t* lhs, const pugi::char_t* rhs) bool test_string_equal(const pugi::char_t* lhs, const pugi::char_t* rhs)
{ {
return (!lhs || !rhs) ? lhs == rhs : return (!lhs || !rhs) ? lhs == rhs :
#ifdef PUGIXML_WCHAR_MODE #ifdef PUGIXML_WCHAR_MODE
wcscmp(lhs, rhs) == 0; wcscmp(lhs, rhs) == 0;
#else #else
strcmp(lhs, rhs) == 0; strcmp(lhs, rhs) == 0;
#endif #endif
} }
bool test_node(const pugi::xml_node& node, const pugi::char_t* contents, const pugi::char_t* indent, unsigned int flags) bool test_node(const pugi::xml_node& node, const pugi::char_t* contents, const pugi::char_t* indent, unsigned int flags)
{ {
xml_writer_string writer; xml_writer_string writer;
node.print(writer, indent, flags, get_native_encoding()); node.print(writer, indent, flags, get_native_encoding());
return writer.as_string() == contents; return writer.as_string() == contents;
} }
bool test_double_nan(double value) bool test_double_nan(double value)
{ {
#if defined(_MSC_VER) || defined(__BORLANDC__) #if defined(_MSC_VER) || defined(__BORLANDC__)
return _isnan(value) != 0; return _isnan(value) != 0;
#else #else
return value != value; return value != value;
#endif #endif
} }
#ifndef PUGIXML_NO_XPATH #ifndef PUGIXML_NO_XPATH
static size_t strlength(const pugi::char_t* s) static size_t strlength(const pugi::char_t* s)
{ {
#ifdef PUGIXML_WCHAR_MODE #ifdef PUGIXML_WCHAR_MODE
return wcslen(s); return wcslen(s);
#else #else
return strlen(s); return strlen(s);
#endif #endif
} }
bool test_xpath_string(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, const pugi::char_t* expected) bool test_xpath_string(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, const pugi::char_t* expected)
{ {
pugi::xpath_query q(query, variables); pugi::xpath_query q(query, variables);
if (!q) return false; if (!q) return false;
const size_t capacity = 64; const size_t capacity = 64;
pugi::char_t result[capacity]; pugi::char_t result[capacity];
size_t size = q.evaluate_string(result, capacity, node); size_t size = q.evaluate_string(result, capacity, node);
if (size != strlength(expected) + 1) if (size != strlength(expected) + 1)
return false; return false;
if (size <= capacity) if (size <= capacity)
return test_string_equal(result, expected); return test_string_equal(result, expected);
std::basic_string<pugi::char_t> buffer(size, ' '); std::basic_string<pugi::char_t> buffer(size, ' ');
return q.evaluate_string(&buffer[0], size, node) == size && test_string_equal(buffer.c_str(), expected); return q.evaluate_string(&buffer[0], size, node) == size && test_string_equal(buffer.c_str(), expected);
} }
bool test_xpath_boolean(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, bool expected) bool test_xpath_boolean(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, bool expected)
{ {
pugi::xpath_query q(query, variables); pugi::xpath_query q(query, variables);
if (!q) return false; if (!q) return false;
return q.evaluate_boolean(node) == expected; return q.evaluate_boolean(node) == expected;
} }
bool test_xpath_number(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, double expected) bool test_xpath_number(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, double expected)
{ {
pugi::xpath_query q(query, variables); pugi::xpath_query q(query, variables);
if (!q) return false; if (!q) return false;
double value = q.evaluate_number(node); double value = q.evaluate_number(node);
double absolute_error = fabs(value - expected); double absolute_error = fabs(value - expected);
const double tolerance = 1e-15; const double tolerance = 1e-15;
return absolute_error < tolerance || absolute_error < fabs(expected) * tolerance; return absolute_error < tolerance || absolute_error < fabs(expected) * tolerance;
} }
bool test_xpath_number_nan(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables) bool test_xpath_number_nan(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables)
{ {
pugi::xpath_query q(query, variables); pugi::xpath_query q(query, variables);
if (!q) return false; if (!q) return false;
return test_double_nan(q.evaluate_number(node)); return test_double_nan(q.evaluate_number(node));
} }
bool test_xpath_fail_compile(const pugi::char_t* query, pugi::xpath_variable_set* variables) bool test_xpath_fail_compile(const pugi::char_t* query, pugi::xpath_variable_set* variables)
{ {
#ifdef PUGIXML_NO_EXCEPTIONS #ifdef PUGIXML_NO_EXCEPTIONS
return !pugi::xpath_query(query, variables); return !pugi::xpath_query(query, variables);
#else #else
try try
{ {
pugi::xpath_query q(query, variables); pugi::xpath_query q(query, variables);
return false; return false;
} }
catch (const pugi::xpath_exception&) catch (const pugi::xpath_exception&)
{ {
return true; return true;
} }
#endif #endif
} }
void xpath_node_set_tester::check(bool condition) void xpath_node_set_tester::check(bool condition)
{ {
if (!condition) if (!condition)
{ {
test_runner::_failure_message = message; test_runner::_failure_message = message;
longjmp(test_runner::_failure_buffer, 1); longjmp(test_runner::_failure_buffer, 1);
} }
} }
xpath_node_set_tester::xpath_node_set_tester(const pugi::xpath_node_set& set, const char* message_): last(0), message(message_) xpath_node_set_tester::xpath_node_set_tester(const pugi::xpath_node_set& set, const char* message_): last(0), message(message_)
{ {
result = set; result = set;
// only sort unsorted sets so that we're able to verify reverse order for some axes // only sort unsorted sets so that we're able to verify reverse order for some axes
if (result.type() == pugi::xpath_node_set::type_unsorted) result.sort(); if (result.type() == pugi::xpath_node_set::type_unsorted) result.sort();
if (result.empty()) if (result.empty())
{ {
document_order = 0; document_order = 0;
document_size = 0; document_size = 0;
} }
else else
{ {
std::vector<pugi::xpath_node> order; std::vector<pugi::xpath_node> order;
build_document_order(order, (result[0].attribute() ? result[0].parent() : result[0].node()).root()); build_document_order(order, (result[0].attribute() ? result[0].parent() : result[0].node()).root());
document_order = new pugi::xpath_node[order.size()]; document_order = new pugi::xpath_node[order.size()];
std::copy(order.begin(), order.end(), document_order); std::copy(order.begin(), order.end(), document_order);
document_size = order.size(); document_size = order.size();
} }
} }
xpath_node_set_tester::~xpath_node_set_tester() xpath_node_set_tester::~xpath_node_set_tester()
{ {
// check that we processed everything // check that we processed everything
check(last == result.size()); check(last == result.size());
delete[] document_order; delete[] document_order;
} }
xpath_node_set_tester& xpath_node_set_tester::operator%(unsigned int expected) xpath_node_set_tester& xpath_node_set_tester::operator%(unsigned int expected)
{ {
// check element count // check element count
check(last < result.size()); check(last < result.size());
// check document order // check document order
check(expected < document_size); check(expected < document_size);
check(result.begin()[last] == document_order[expected]); check(result.begin()[last] == document_order[expected]);
// continue to the next element // continue to the next element
last++; last++;
return *this; return *this;
} }
#endif #endif
bool is_little_endian() bool is_little_endian()
{ {
unsigned int ui = 1; unsigned int ui = 1;
return *reinterpret_cast<char*>(&ui) == 1; return *reinterpret_cast<char*>(&ui) == 1;
} }
pugi::xml_encoding get_native_encoding() pugi::xml_encoding get_native_encoding()
{ {
#ifdef PUGIXML_WCHAR_MODE #ifdef PUGIXML_WCHAR_MODE
return pugi::encoding_wchar; return pugi::encoding_wchar;
#else #else
return pugi::encoding_utf8; return pugi::encoding_utf8;
#endif #endif
} }

View File

@ -1,175 +1,175 @@
#ifndef HEADER_TEST_TEST_HPP #ifndef HEADER_TEST_TEST_HPP
#define HEADER_TEST_TEST_HPP #define HEADER_TEST_TEST_HPP
#include "../src/pugixml.hpp" #include "../src/pugixml.hpp"
#include <setjmp.h> #include <setjmp.h>
#ifndef PUGIXML_NO_EXCEPTIONS #ifndef PUGIXML_NO_EXCEPTIONS
#include <new> #include <new>
#endif #endif
struct test_runner struct test_runner
{ {
test_runner(const char* name) test_runner(const char* name)
{ {
_name = name; _name = name;
_next = _tests; _next = _tests;
_tests = this; _tests = this;
} }
virtual ~test_runner() {} virtual ~test_runner() {}
virtual void run() = 0; virtual void run() = 0;
const char* _name; const char* _name;
test_runner* _next; test_runner* _next;
static test_runner* _tests; static test_runner* _tests;
static size_t _memory_fail_threshold; static size_t _memory_fail_threshold;
static bool _memory_fail_triggered; static bool _memory_fail_triggered;
static jmp_buf _failure_buffer; static jmp_buf _failure_buffer;
static const char* _failure_message; static const char* _failure_message;
static const char* _temp_path; static const char* _temp_path;
}; };
bool test_string_equal(const pugi::char_t* lhs, const pugi::char_t* rhs); bool test_string_equal(const pugi::char_t* lhs, const pugi::char_t* rhs);
template <typename Node> inline bool test_node_name_value(const Node& node, const pugi::char_t* name, const pugi::char_t* value) template <typename Node> inline bool test_node_name_value(const Node& node, const pugi::char_t* name, const pugi::char_t* value)
{ {
return test_string_equal(node.name(), name) && test_string_equal(node.value(), value); return test_string_equal(node.name(), name) && test_string_equal(node.value(), value);
} }
bool test_node(const pugi::xml_node& node, const pugi::char_t* contents, const pugi::char_t* indent, unsigned int flags); bool test_node(const pugi::xml_node& node, const pugi::char_t* contents, const pugi::char_t* indent, unsigned int flags);
bool test_double_nan(double value); bool test_double_nan(double value);
#ifndef PUGIXML_NO_XPATH #ifndef PUGIXML_NO_XPATH
bool test_xpath_string(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, const pugi::char_t* expected); bool test_xpath_string(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, const pugi::char_t* expected);
bool test_xpath_boolean(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, bool expected); bool test_xpath_boolean(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, bool expected);
bool test_xpath_number(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, double expected); bool test_xpath_number(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, double expected);
bool test_xpath_number_nan(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables); bool test_xpath_number_nan(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables);
bool test_xpath_fail_compile(const pugi::char_t* query, pugi::xpath_variable_set* variables); bool test_xpath_fail_compile(const pugi::char_t* query, pugi::xpath_variable_set* variables);
struct xpath_node_set_tester struct xpath_node_set_tester
{ {
pugi::xpath_node* document_order; pugi::xpath_node* document_order;
size_t document_size; size_t document_size;
pugi::xpath_node_set result; pugi::xpath_node_set result;
unsigned int last; unsigned int last;
const char* message; const char* message;
void check(bool condition); void check(bool condition);
xpath_node_set_tester(const pugi::xpath_node_set& set, const char* message); xpath_node_set_tester(const pugi::xpath_node_set& set, const char* message);
~xpath_node_set_tester(); ~xpath_node_set_tester();
xpath_node_set_tester& operator%(unsigned int expected); xpath_node_set_tester& operator%(unsigned int expected);
}; };
#endif #endif
struct dummy_fixture {}; struct dummy_fixture {};
#define TEST_FIXTURE(name, fixture) \ #define TEST_FIXTURE(name, fixture) \
struct test_runner_helper_##name: fixture \ struct test_runner_helper_##name: fixture \
{ \ { \
void run(); \ void run(); \
}; \ }; \
static struct test_runner_##name: test_runner \ static struct test_runner_##name: test_runner \
{ \ { \
test_runner_##name(): test_runner(#name) {} \ test_runner_##name(): test_runner(#name) {} \
\ \
virtual void run() PUGIXML_OVERRIDE \ virtual void run() PUGIXML_OVERRIDE \
{ \ { \
test_runner_helper_##name helper; \ test_runner_helper_##name helper; \
helper.run(); \ helper.run(); \
} \ } \
} test_runner_instance_##name; \ } test_runner_instance_##name; \
void test_runner_helper_##name::run() void test_runner_helper_##name::run()
#define TEST(name) TEST_FIXTURE(name, dummy_fixture) #define TEST(name) TEST_FIXTURE(name, dummy_fixture)
#define TEST_XML_FLAGS(name, xml, flags) \ #define TEST_XML_FLAGS(name, xml, flags) \
struct test_fixture_##name \ struct test_fixture_##name \
{ \ { \
pugi::xml_document doc; \ pugi::xml_document doc; \
\ \
test_fixture_##name() \ test_fixture_##name() \
{ \ { \
CHECK(doc.load_string(PUGIXML_TEXT(xml), flags)); \ CHECK(doc.load_string(PUGIXML_TEXT(xml), flags)); \
} \ } \
\ \
private: \ private: \
test_fixture_##name(const test_fixture_##name&); \ test_fixture_##name(const test_fixture_##name&); \
test_fixture_##name& operator=(const test_fixture_##name&); \ test_fixture_##name& operator=(const test_fixture_##name&); \
}; \ }; \
\ \
TEST_FIXTURE(name, test_fixture_##name) TEST_FIXTURE(name, test_fixture_##name)
#define TEST_XML(name, xml) TEST_XML_FLAGS(name, xml, pugi::parse_default) #define TEST_XML(name, xml) TEST_XML_FLAGS(name, xml, pugi::parse_default)
#define CHECK_JOIN(text, file, line) text " at " file ":" #line #define CHECK_JOIN(text, file, line) text " at " file ":" #line
#define CHECK_JOIN2(text, file, line) CHECK_JOIN(text, file, line) #define CHECK_JOIN2(text, file, line) CHECK_JOIN(text, file, line)
#define CHECK_TEXT(condition, text) if (condition) ; else test_runner::_failure_message = CHECK_JOIN2(text, __FILE__, __LINE__), longjmp(test_runner::_failure_buffer, 1) #define CHECK_TEXT(condition, text) if (condition) ; else test_runner::_failure_message = CHECK_JOIN2(text, __FILE__, __LINE__), longjmp(test_runner::_failure_buffer, 1)
#define CHECK_FORCE_FAIL(text) test_runner::_failure_message = CHECK_JOIN2(text, __FILE__, __LINE__), longjmp(test_runner::_failure_buffer, 1) #define CHECK_FORCE_FAIL(text) test_runner::_failure_message = CHECK_JOIN2(text, __FILE__, __LINE__), longjmp(test_runner::_failure_buffer, 1)
#if (defined(_MSC_VER) && _MSC_VER == 1200) || defined(__MWERKS__) || (defined(__BORLANDC__) && __BORLANDC__ <= 0x540) #if (defined(_MSC_VER) && _MSC_VER == 1200) || defined(__MWERKS__) || (defined(__BORLANDC__) && __BORLANDC__ <= 0x540)
# define STRINGIZE(value) "??" // Some compilers have issues with stringizing expressions that contain strings w/escaping inside # define STRINGIZE(value) "??" // Some compilers have issues with stringizing expressions that contain strings w/escaping inside
#else #else
# define STRINGIZE(value) #value # define STRINGIZE(value) #value
#endif #endif
#define CHECK(condition) CHECK_TEXT(condition, STRINGIZE(condition) " is false") #define CHECK(condition) CHECK_TEXT(condition, STRINGIZE(condition) " is false")
#define CHECK_STRING(value, expected) CHECK_TEXT(test_string_equal(value, expected), STRINGIZE(value) " is not equal to " STRINGIZE(expected)) #define CHECK_STRING(value, expected) CHECK_TEXT(test_string_equal(value, expected), STRINGIZE(value) " is not equal to " STRINGIZE(expected))
#define CHECK_DOUBLE(value, expected) CHECK_TEXT((value > expected ? value - expected : expected - value) < 1e-6, STRINGIZE(value) " is not equal to " STRINGIZE(expected)) #define CHECK_DOUBLE(value, expected) CHECK_TEXT((value > expected ? value - expected : expected - value) < 1e-6, STRINGIZE(value) " is not equal to " STRINGIZE(expected))
#define CHECK_DOUBLE_NAN(value) CHECK_TEXT(test_double_nan(value), STRINGIZE(value) " is not equal to NaN") #define CHECK_DOUBLE_NAN(value) CHECK_TEXT(test_double_nan(value), STRINGIZE(value) " is not equal to NaN")
#define CHECK_NAME_VALUE(node, name, value) CHECK_TEXT(test_node_name_value(node, name, value), STRINGIZE(node) " name/value do not match " STRINGIZE(name) " and " STRINGIZE(value)) #define CHECK_NAME_VALUE(node, name, value) CHECK_TEXT(test_node_name_value(node, name, value), STRINGIZE(node) " name/value do not match " STRINGIZE(name) " and " STRINGIZE(value))
#define CHECK_NODE_EX(node, expected, indent, flags) CHECK_TEXT(test_node(node, expected, indent, flags), STRINGIZE(node) " contents does not match " STRINGIZE(expected)) #define CHECK_NODE_EX(node, expected, indent, flags) CHECK_TEXT(test_node(node, expected, indent, flags), STRINGIZE(node) " contents does not match " STRINGIZE(expected))
#define CHECK_NODE(node, expected) CHECK_NODE_EX(node, expected, PUGIXML_TEXT(""), pugi::format_raw) #define CHECK_NODE(node, expected) CHECK_NODE_EX(node, expected, PUGIXML_TEXT(""), pugi::format_raw)
#ifndef PUGIXML_NO_XPATH #ifndef PUGIXML_NO_XPATH
#define CHECK_XPATH_STRING_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_string(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node)) #define CHECK_XPATH_STRING_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_string(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node))
#define CHECK_XPATH_BOOLEAN_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_boolean(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node)) #define CHECK_XPATH_BOOLEAN_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_boolean(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node))
#define CHECK_XPATH_NUMBER_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_number(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node)) #define CHECK_XPATH_NUMBER_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_number(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node))
#define CHECK_XPATH_NUMBER_NAN_VAR(node, query, variables) CHECK_TEXT(test_xpath_number_nan(node, query, variables), STRINGIZE(query) " does not evaluate to NaN in context " STRINGIZE(node)) #define CHECK_XPATH_NUMBER_NAN_VAR(node, query, variables) CHECK_TEXT(test_xpath_number_nan(node, query, variables), STRINGIZE(query) " does not evaluate to NaN in context " STRINGIZE(node))
#define CHECK_XPATH_NODESET_VAR(node, query, variables) xpath_node_set_tester(pugi::xpath_query(query, variables).evaluate_node_set(node), CHECK_JOIN2(STRINGIZE(query) " does not evaluate to expected set in context " STRINGIZE(node), __FILE__, __LINE__)) #define CHECK_XPATH_NODESET_VAR(node, query, variables) xpath_node_set_tester(pugi::xpath_query(query, variables).evaluate_node_set(node), CHECK_JOIN2(STRINGIZE(query) " does not evaluate to expected set in context " STRINGIZE(node), __FILE__, __LINE__))
#define CHECK_XPATH_FAIL_VAR(query, variables) CHECK_TEXT(test_xpath_fail_compile(query, variables), STRINGIZE(query) " should not compile") #define CHECK_XPATH_FAIL_VAR(query, variables) CHECK_TEXT(test_xpath_fail_compile(query, variables), STRINGIZE(query) " should not compile")
#define CHECK_XPATH_STRING(node, query, expected) CHECK_XPATH_STRING_VAR(node, query, 0, expected) #define CHECK_XPATH_STRING(node, query, expected) CHECK_XPATH_STRING_VAR(node, query, 0, expected)
#define CHECK_XPATH_BOOLEAN(node, query, expected) CHECK_XPATH_BOOLEAN_VAR(node, query, 0, expected) #define CHECK_XPATH_BOOLEAN(node, query, expected) CHECK_XPATH_BOOLEAN_VAR(node, query, 0, expected)
#define CHECK_XPATH_NUMBER(node, query, expected) CHECK_XPATH_NUMBER_VAR(node, query, 0, expected) #define CHECK_XPATH_NUMBER(node, query, expected) CHECK_XPATH_NUMBER_VAR(node, query, 0, expected)
#define CHECK_XPATH_NUMBER_NAN(node, query) CHECK_XPATH_NUMBER_NAN_VAR(node, query, 0) #define CHECK_XPATH_NUMBER_NAN(node, query) CHECK_XPATH_NUMBER_NAN_VAR(node, query, 0)
#define CHECK_XPATH_NODESET(node, query) CHECK_XPATH_NODESET_VAR(node, query, 0) #define CHECK_XPATH_NODESET(node, query) CHECK_XPATH_NODESET_VAR(node, query, 0)
#define CHECK_XPATH_FAIL(query) CHECK_XPATH_FAIL_VAR(query, 0) #define CHECK_XPATH_FAIL(query) CHECK_XPATH_FAIL_VAR(query, 0)
#endif #endif
#ifdef PUGIXML_NO_EXCEPTIONS #ifdef PUGIXML_NO_EXCEPTIONS
#define CHECK_ALLOC_FAIL(code) do { CHECK(!test_runner::_memory_fail_triggered); code; CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false; } while (test_runner::_memory_fail_triggered) #define CHECK_ALLOC_FAIL(code) do { CHECK(!test_runner::_memory_fail_triggered); code; CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false; } while (test_runner::_memory_fail_triggered)
#else #else
#define CHECK_ALLOC_FAIL(code) do { CHECK(!test_runner::_memory_fail_triggered); try { code; } catch (std::bad_alloc&) {} CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false; } while (test_runner::_memory_fail_triggered) #define CHECK_ALLOC_FAIL(code) do { CHECK(!test_runner::_memory_fail_triggered); try { code; } catch (std::bad_alloc&) {} CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false; } while (test_runner::_memory_fail_triggered)
#endif #endif
#define STR(text) PUGIXML_TEXT(text) #define STR(text) PUGIXML_TEXT(text)
#if defined(__DMC__) || defined(__BORLANDC__) #if defined(__DMC__) || defined(__BORLANDC__)
#define U_LITERALS // DMC does not understand \x01234 (it parses first three digits), but understands \u01234 #define U_LITERALS // DMC does not understand \x01234 (it parses first three digits), but understands \u01234
#endif #endif
#if (defined(_MSC_VER) && _MSC_VER == 1200) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER == 800) || defined(__BORLANDC__) #if (defined(_MSC_VER) && _MSC_VER == 1200) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER == 800) || defined(__BORLANDC__)
// NaN comparison on MSVC6 is incorrect, see http://www.nabble.com/assertDoubleEquals,-NaN---Microsoft-Visual-Studio-6-td9137859.html // NaN comparison on MSVC6 is incorrect, see http://www.nabble.com/assertDoubleEquals,-NaN---Microsoft-Visual-Studio-6-td9137859.html
// IC8 and BCC are also affected by the same bug // IC8 and BCC are also affected by the same bug
# define MSVC6_NAN_BUG # define MSVC6_NAN_BUG
#endif #endif
inline wchar_t wchar_cast(unsigned int value) inline wchar_t wchar_cast(unsigned int value)
{ {
return static_cast<wchar_t>(value); // to avoid C4310 on MSVC return static_cast<wchar_t>(value); // to avoid C4310 on MSVC
} }
bool is_little_endian(); bool is_little_endian();
pugi::xml_encoding get_native_encoding(); pugi::xml_encoding get_native_encoding();
#endif #endif

View File

@ -1,150 +1,150 @@
#ifdef PUGIXML_COMPACT #ifdef PUGIXML_COMPACT
#include "test.hpp" #include "test.hpp"
using namespace pugi; using namespace pugi;
static void overflow_hash_table(xml_document& doc) static void overflow_hash_table(xml_document& doc)
{ {
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
// compact encoding assumes next_sibling is a forward-only pointer so we can allocate hash entries by reordering nodes // compact encoding assumes next_sibling is a forward-only pointer so we can allocate hash entries by reordering nodes
// we allocate enough hash entries to be exactly on the edge of rehash threshold // we allocate enough hash entries to be exactly on the edge of rehash threshold
for (int i = 0; i < 8; ++i) for (int i = 0; i < 8; ++i)
CHECK(n.prepend_child(node_element)); CHECK(n.prepend_child(node_element));
} }
TEST_XML_FLAGS(compact_out_of_memory_string, "<n a='v'/><?n v?>", parse_pi) TEST_XML_FLAGS(compact_out_of_memory_string, "<n a='v'/><?n v?>", parse_pi)
{ {
test_runner::_memory_fail_threshold = 1; test_runner::_memory_fail_threshold = 1;
overflow_hash_table(doc); overflow_hash_table(doc);
xml_attribute a = doc.child(STR("n")).attribute(STR("a")); xml_attribute a = doc.child(STR("n")).attribute(STR("a"));
xml_node pi = doc.last_child(); xml_node pi = doc.last_child();
CHECK_ALLOC_FAIL(CHECK(!pi.set_name(STR("name")))); CHECK_ALLOC_FAIL(CHECK(!pi.set_name(STR("name"))));
CHECK_ALLOC_FAIL(CHECK(!pi.set_value(STR("value")))); CHECK_ALLOC_FAIL(CHECK(!pi.set_value(STR("value"))));
CHECK_ALLOC_FAIL(CHECK(!a.set_name(STR("name")))); CHECK_ALLOC_FAIL(CHECK(!a.set_name(STR("name"))));
CHECK_ALLOC_FAIL(CHECK(!a.set_value(STR("value")))); CHECK_ALLOC_FAIL(CHECK(!a.set_value(STR("value"))));
} }
TEST_XML(compact_out_of_memory_attribute, "<n a='v'/>") TEST_XML(compact_out_of_memory_attribute, "<n a='v'/>")
{ {
test_runner::_memory_fail_threshold = 1; test_runner::_memory_fail_threshold = 1;
overflow_hash_table(doc); overflow_hash_table(doc);
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
xml_attribute a = n.attribute(STR("a")); xml_attribute a = n.attribute(STR("a"));
CHECK_ALLOC_FAIL(CHECK(!n.append_attribute(STR("")))); CHECK_ALLOC_FAIL(CHECK(!n.append_attribute(STR(""))));
CHECK_ALLOC_FAIL(CHECK(!n.prepend_attribute(STR("")))); CHECK_ALLOC_FAIL(CHECK(!n.prepend_attribute(STR(""))));
CHECK_ALLOC_FAIL(CHECK(!n.insert_attribute_after(STR(""), a))); CHECK_ALLOC_FAIL(CHECK(!n.insert_attribute_after(STR(""), a)));
CHECK_ALLOC_FAIL(CHECK(!n.insert_attribute_before(STR(""), a))); CHECK_ALLOC_FAIL(CHECK(!n.insert_attribute_before(STR(""), a)));
} }
TEST_XML(compact_out_of_memory_attribute_copy, "<n a='v'/>") TEST_XML(compact_out_of_memory_attribute_copy, "<n a='v'/>")
{ {
test_runner::_memory_fail_threshold = 1; test_runner::_memory_fail_threshold = 1;
overflow_hash_table(doc); overflow_hash_table(doc);
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
xml_attribute a = n.attribute(STR("a")); xml_attribute a = n.attribute(STR("a"));
CHECK_ALLOC_FAIL(CHECK(!n.append_copy(a))); CHECK_ALLOC_FAIL(CHECK(!n.append_copy(a)));
CHECK_ALLOC_FAIL(CHECK(!n.prepend_copy(a))); CHECK_ALLOC_FAIL(CHECK(!n.prepend_copy(a)));
CHECK_ALLOC_FAIL(CHECK(!n.insert_copy_after(a, a))); CHECK_ALLOC_FAIL(CHECK(!n.insert_copy_after(a, a)));
CHECK_ALLOC_FAIL(CHECK(!n.insert_copy_before(a, a))); CHECK_ALLOC_FAIL(CHECK(!n.insert_copy_before(a, a)));
} }
TEST_XML(compact_out_of_memory_node, "<n/>") TEST_XML(compact_out_of_memory_node, "<n/>")
{ {
test_runner::_memory_fail_threshold = 1; test_runner::_memory_fail_threshold = 1;
overflow_hash_table(doc); overflow_hash_table(doc);
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
CHECK_ALLOC_FAIL(CHECK(!doc.append_child(node_element))); CHECK_ALLOC_FAIL(CHECK(!doc.append_child(node_element)));
CHECK_ALLOC_FAIL(CHECK(!doc.prepend_child(node_element))); CHECK_ALLOC_FAIL(CHECK(!doc.prepend_child(node_element)));
CHECK_ALLOC_FAIL(CHECK(!doc.insert_child_after(node_element, n))); CHECK_ALLOC_FAIL(CHECK(!doc.insert_child_after(node_element, n)));
CHECK_ALLOC_FAIL(CHECK(!doc.insert_child_before(node_element, n))); CHECK_ALLOC_FAIL(CHECK(!doc.insert_child_before(node_element, n)));
} }
TEST_XML(compact_out_of_memory_node_copy, "<n/>") TEST_XML(compact_out_of_memory_node_copy, "<n/>")
{ {
test_runner::_memory_fail_threshold = 1; test_runner::_memory_fail_threshold = 1;
overflow_hash_table(doc); overflow_hash_table(doc);
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
CHECK_ALLOC_FAIL(CHECK(!doc.append_copy(n))); CHECK_ALLOC_FAIL(CHECK(!doc.append_copy(n)));
CHECK_ALLOC_FAIL(CHECK(!doc.prepend_copy(n))); CHECK_ALLOC_FAIL(CHECK(!doc.prepend_copy(n)));
CHECK_ALLOC_FAIL(CHECK(!doc.insert_copy_after(n, n))); CHECK_ALLOC_FAIL(CHECK(!doc.insert_copy_after(n, n)));
CHECK_ALLOC_FAIL(CHECK(!doc.insert_copy_before(n, n))); CHECK_ALLOC_FAIL(CHECK(!doc.insert_copy_before(n, n)));
} }
TEST_XML(compact_out_of_memory_node_move, "<n/><ne/>") TEST_XML(compact_out_of_memory_node_move, "<n/><ne/>")
{ {
test_runner::_memory_fail_threshold = 1; test_runner::_memory_fail_threshold = 1;
overflow_hash_table(doc); overflow_hash_table(doc);
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
xml_node ne = doc.child(STR("ne")); xml_node ne = doc.child(STR("ne"));
CHECK_ALLOC_FAIL(CHECK(!doc.append_move(n))); CHECK_ALLOC_FAIL(CHECK(!doc.append_move(n)));
CHECK_ALLOC_FAIL(CHECK(!doc.prepend_move(n))); CHECK_ALLOC_FAIL(CHECK(!doc.prepend_move(n)));
CHECK_ALLOC_FAIL(CHECK(!doc.insert_move_after(n, ne))); CHECK_ALLOC_FAIL(CHECK(!doc.insert_move_after(n, ne)));
CHECK_ALLOC_FAIL(CHECK(!doc.insert_move_before(n, ne))); CHECK_ALLOC_FAIL(CHECK(!doc.insert_move_before(n, ne)));
} }
TEST_XML(compact_out_of_memory_remove, "<n a='v'/>") TEST_XML(compact_out_of_memory_remove, "<n a='v'/>")
{ {
test_runner::_memory_fail_threshold = 1; test_runner::_memory_fail_threshold = 1;
overflow_hash_table(doc); overflow_hash_table(doc);
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
xml_attribute a = n.attribute(STR("a")); xml_attribute a = n.attribute(STR("a"));
CHECK_ALLOC_FAIL(CHECK(!n.remove_attribute(a))); CHECK_ALLOC_FAIL(CHECK(!n.remove_attribute(a)));
CHECK_ALLOC_FAIL(CHECK(!doc.remove_child(n))); CHECK_ALLOC_FAIL(CHECK(!doc.remove_child(n)));
} }
TEST_XML(compact_pointer_attribute_list, "<n a='v'/>") TEST_XML(compact_pointer_attribute_list, "<n a='v'/>")
{ {
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
xml_attribute a = n.attribute(STR("a")); xml_attribute a = n.attribute(STR("a"));
// make sure we fill the page with node x // make sure we fill the page with node x
for (int i = 0; i < 1000; ++i) for (int i = 0; i < 1000; ++i)
doc.append_child(STR("x")); doc.append_child(STR("x"));
// this requires extended encoding for prev_attribute_c/next_attribute // this requires extended encoding for prev_attribute_c/next_attribute
n.append_attribute(STR("b")); n.append_attribute(STR("b"));
// this requires extended encoding for first_attribute // this requires extended encoding for first_attribute
n.remove_attribute(a); n.remove_attribute(a);
CHECK(!n.attribute(STR("a"))); CHECK(!n.attribute(STR("a")));
CHECK(n.attribute(STR("b"))); CHECK(n.attribute(STR("b")));
} }
TEST_XML(compact_pointer_node_list, "<n/>") TEST_XML(compact_pointer_node_list, "<n/>")
{ {
xml_node n = doc.child(STR("n")); xml_node n = doc.child(STR("n"));
// make sure we fill the page with node x // make sure we fill the page with node x
// this requires extended encoding for prev_sibling_c/next_sibling // this requires extended encoding for prev_sibling_c/next_sibling
for (int i = 0; i < 1000; ++i) for (int i = 0; i < 1000; ++i)
doc.append_child(STR("x")); doc.append_child(STR("x"));
// this requires extended encoding for first_child // this requires extended encoding for first_child
n.append_child(STR("child")); n.append_child(STR("child"));
CHECK(n.child(STR("child"))); CHECK(n.child(STR("child")));
} }
#endif #endif

View File

@ -1,25 +1,25 @@
#define PUGIXML_DEPRECATED // Suppress deprecated declarations to avoid warnings #define PUGIXML_DEPRECATED // Suppress deprecated declarations to avoid warnings
#include "test.hpp" #include "test.hpp"
using namespace pugi; using namespace pugi;
TEST(document_deprecated_load) TEST(document_deprecated_load)
{ {
xml_document doc; xml_document doc;
CHECK(doc.load(STR("<node/>"))); CHECK(doc.load(STR("<node/>")));
CHECK_NODE(doc, STR("<node/>")); CHECK_NODE(doc, STR("<node/>"));
} }
#ifndef PUGIXML_NO_XPATH #ifndef PUGIXML_NO_XPATH
TEST_XML(xpath_api_deprecated_select_single_node, "<node><head/><foo id='1'/><foo/><tail/></node>") TEST_XML(xpath_api_deprecated_select_single_node, "<node><head/><foo id='1'/><foo/><tail/></node>")
{ {
xpath_node n1 = doc.select_single_node(STR("node/foo")); xpath_node n1 = doc.select_single_node(STR("node/foo"));
xpath_query q(STR("node/foo")); xpath_query q(STR("node/foo"));
xpath_node n2 = doc.select_single_node(q); xpath_node n2 = doc.select_single_node(q);
CHECK(n1.node().attribute(STR("id")).as_int() == 1); CHECK(n1.node().attribute(STR("id")).as_int() == 1);
CHECK(n2.node().attribute(STR("id")).as_int() == 1); CHECK(n2.node().attribute(STR("id")).as_int() == 1);
} }
#endif #endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,487 +1,487 @@
#include "test.hpp" #include "test.hpp"
#include "helpers.hpp" #include "helpers.hpp"
#include <limits.h> #include <limits.h>
using namespace pugi; using namespace pugi;
TEST_XML_FLAGS(dom_text_empty, "<node><a>foo</a><b><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi) TEST_XML_FLAGS(dom_text_empty, "<node><a>foo</a><b><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.child(STR("a")).text()); CHECK(node.child(STR("a")).text());
CHECK(node.child(STR("b")).text()); CHECK(node.child(STR("b")).text());
CHECK(!node.child(STR("c")).text()); CHECK(!node.child(STR("c")).text());
CHECK(!node.child(STR("d")).text()); CHECK(!node.child(STR("d")).text());
CHECK(!xml_node().text()); CHECK(!xml_node().text());
CHECK(!xml_text()); CHECK(!xml_text());
generic_empty_test(node.child(STR("a")).text()); generic_empty_test(node.child(STR("a")).text());
} }
TEST_XML(dom_text_bool_ops, "<node>foo</node>") TEST_XML(dom_text_bool_ops, "<node>foo</node>")
{ {
generic_bool_ops_test(doc.child(STR("node")).text()); generic_bool_ops_test(doc.child(STR("node")).text());
} }
TEST_XML_FLAGS(dom_text_get, "<node><a>foo</a><b><node/><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi) TEST_XML_FLAGS(dom_text_get, "<node><a>foo</a><b><node/><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK_STRING(node.child(STR("a")).text().get(), STR("foo")); CHECK_STRING(node.child(STR("a")).text().get(), STR("foo"));
CHECK_STRING(node.child(STR("a")).first_child().text().get(), STR("foo")); CHECK_STRING(node.child(STR("a")).first_child().text().get(), STR("foo"));
CHECK_STRING(node.child(STR("b")).text().get(), STR("bar")); CHECK_STRING(node.child(STR("b")).text().get(), STR("bar"));
CHECK_STRING(node.child(STR("b")).last_child().text().get(), STR("bar")); CHECK_STRING(node.child(STR("b")).last_child().text().get(), STR("bar"));
CHECK_STRING(node.child(STR("c")).text().get(), STR("")); CHECK_STRING(node.child(STR("c")).text().get(), STR(""));
CHECK_STRING(node.child(STR("c")).first_child().text().get(), STR("")); CHECK_STRING(node.child(STR("c")).first_child().text().get(), STR(""));
CHECK_STRING(node.child(STR("d")).text().get(), STR("")); CHECK_STRING(node.child(STR("d")).text().get(), STR(""));
CHECK_STRING(xml_node().text().get(), STR("")); CHECK_STRING(xml_node().text().get(), STR(""));
} }
TEST_XML_FLAGS(dom_text_as_string, "<node><a>foo</a><b><node/><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi) TEST_XML_FLAGS(dom_text_as_string, "<node><a>foo</a><b><node/><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK_STRING(node.child(STR("a")).text().as_string(), STR("foo")); CHECK_STRING(node.child(STR("a")).text().as_string(), STR("foo"));
CHECK_STRING(node.child(STR("a")).first_child().text().as_string(), STR("foo")); CHECK_STRING(node.child(STR("a")).first_child().text().as_string(), STR("foo"));
CHECK_STRING(node.child(STR("b")).text().as_string(), STR("bar")); CHECK_STRING(node.child(STR("b")).text().as_string(), STR("bar"));
CHECK_STRING(node.child(STR("b")).last_child().text().as_string(), STR("bar")); CHECK_STRING(node.child(STR("b")).last_child().text().as_string(), STR("bar"));
CHECK_STRING(node.child(STR("c")).text().as_string(), STR("")); CHECK_STRING(node.child(STR("c")).text().as_string(), STR(""));
CHECK_STRING(node.child(STR("c")).first_child().text().as_string(), STR("")); CHECK_STRING(node.child(STR("c")).first_child().text().as_string(), STR(""));
CHECK_STRING(node.child(STR("d")).text().as_string(), STR("")); CHECK_STRING(node.child(STR("d")).text().as_string(), STR(""));
CHECK_STRING(xml_node().text().as_string(), STR("")); CHECK_STRING(xml_node().text().as_string(), STR(""));
} }
TEST_XML(dom_text_as_int, "<node><text1>1</text1><text2>-1</text2><text3>-2147483648</text3><text4>2147483647</text4><text5>0</text5></node>") TEST_XML(dom_text_as_int, "<node><text1>1</text1><text2>-1</text2><text3>-2147483648</text3><text4>2147483647</text4><text5>0</text5></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(xml_text().as_int() == 0); CHECK(xml_text().as_int() == 0);
CHECK(node.child(STR("text1")).text().as_int() == 1); CHECK(node.child(STR("text1")).text().as_int() == 1);
CHECK(node.child(STR("text2")).text().as_int() == -1); CHECK(node.child(STR("text2")).text().as_int() == -1);
CHECK(node.child(STR("text3")).text().as_int() == -2147483647 - 1); CHECK(node.child(STR("text3")).text().as_int() == -2147483647 - 1);
CHECK(node.child(STR("text4")).text().as_int() == 2147483647); CHECK(node.child(STR("text4")).text().as_int() == 2147483647);
CHECK(node.child(STR("text5")).text().as_int() == 0); CHECK(node.child(STR("text5")).text().as_int() == 0);
} }
TEST_XML(dom_text_as_int_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>-0x20</text4><text5>-0x80000000</text5><text6>0x</text6></node>") TEST_XML(dom_text_as_int_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>-0x20</text4><text5>-0x80000000</text5><text6>0x</text6></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.child(STR("text1")).text().as_int() == 777); // no octal support! intentional CHECK(node.child(STR("text1")).text().as_int() == 777); // no octal support! intentional
CHECK(node.child(STR("text2")).text().as_int() == 1451); CHECK(node.child(STR("text2")).text().as_int() == 1451);
CHECK(node.child(STR("text3")).text().as_int() == 255); CHECK(node.child(STR("text3")).text().as_int() == 255);
CHECK(node.child(STR("text4")).text().as_int() == -32); CHECK(node.child(STR("text4")).text().as_int() == -32);
CHECK(node.child(STR("text5")).text().as_int() == -2147483647 - 1); CHECK(node.child(STR("text5")).text().as_int() == -2147483647 - 1);
CHECK(node.child(STR("text6")).text().as_int() == 0); CHECK(node.child(STR("text6")).text().as_int() == 0);
} }
TEST_XML(dom_text_as_uint, "<node><text1>0</text1><text2>1</text2><text3>2147483647</text3><text4>4294967295</text4><text5>0</text5></node>") TEST_XML(dom_text_as_uint, "<node><text1>0</text1><text2>1</text2><text3>2147483647</text3><text4>4294967295</text4><text5>0</text5></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(xml_text().as_uint() == 0); CHECK(xml_text().as_uint() == 0);
CHECK(node.child(STR("text1")).text().as_uint() == 0); CHECK(node.child(STR("text1")).text().as_uint() == 0);
CHECK(node.child(STR("text2")).text().as_uint() == 1); CHECK(node.child(STR("text2")).text().as_uint() == 1);
CHECK(node.child(STR("text3")).text().as_uint() == 2147483647); CHECK(node.child(STR("text3")).text().as_uint() == 2147483647);
CHECK(node.child(STR("text4")).text().as_uint() == 4294967295u); CHECK(node.child(STR("text4")).text().as_uint() == 4294967295u);
CHECK(node.child(STR("text5")).text().as_uint() == 0); CHECK(node.child(STR("text5")).text().as_uint() == 0);
} }
TEST_XML(dom_text_as_uint_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>0x20</text4><text5>0xFFFFFFFF</text5><text6>0x</text6></node>") TEST_XML(dom_text_as_uint_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>0x20</text4><text5>0xFFFFFFFF</text5><text6>0x</text6></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.child(STR("text1")).text().as_uint() == 777); // no octal support! intentional CHECK(node.child(STR("text1")).text().as_uint() == 777); // no octal support! intentional
CHECK(node.child(STR("text2")).text().as_uint() == 1451); CHECK(node.child(STR("text2")).text().as_uint() == 1451);
CHECK(node.child(STR("text3")).text().as_uint() == 255); CHECK(node.child(STR("text3")).text().as_uint() == 255);
CHECK(node.child(STR("text4")).text().as_uint() == 32); CHECK(node.child(STR("text4")).text().as_uint() == 32);
CHECK(node.child(STR("text5")).text().as_uint() == 4294967295u); CHECK(node.child(STR("text5")).text().as_uint() == 4294967295u);
CHECK(node.child(STR("text6")).text().as_uint() == 0); CHECK(node.child(STR("text6")).text().as_uint() == 0);
} }
TEST_XML(dom_text_as_integer_space, "<node><text1> \t\n1234</text1><text2>\n\t 0x123</text2><text3>- 16</text3><text4>- 0x10</text4></node>") TEST_XML(dom_text_as_integer_space, "<node><text1> \t\n1234</text1><text2>\n\t 0x123</text2><text3>- 16</text3><text4>- 0x10</text4></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.child(STR("text1")).text().as_int() == 1234); CHECK(node.child(STR("text1")).text().as_int() == 1234);
CHECK(node.child(STR("text2")).text().as_int() == 291); CHECK(node.child(STR("text2")).text().as_int() == 291);
CHECK(node.child(STR("text3")).text().as_int() == 0); CHECK(node.child(STR("text3")).text().as_int() == 0);
CHECK(node.child(STR("text4")).text().as_int() == 0); CHECK(node.child(STR("text4")).text().as_int() == 0);
} }
TEST_XML(dom_text_as_float, "<node><text1>0</text1><text2>1</text2><text3>0.12</text3><text4>-5.1</text4><text5>3e-4</text5><text6>3.14159265358979323846</text6></node>") TEST_XML(dom_text_as_float, "<node><text1>0</text1><text2>1</text2><text3>0.12</text3><text4>-5.1</text4><text5>3e-4</text5><text6>3.14159265358979323846</text6></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(xml_text().as_float() == 0); CHECK(xml_text().as_float() == 0);
CHECK_DOUBLE(double(node.child(STR("text1")).text().as_float()), 0); CHECK_DOUBLE(double(node.child(STR("text1")).text().as_float()), 0);
CHECK_DOUBLE(double(node.child(STR("text2")).text().as_float()), 1); CHECK_DOUBLE(double(node.child(STR("text2")).text().as_float()), 1);
CHECK_DOUBLE(double(node.child(STR("text3")).text().as_float()), 0.12); CHECK_DOUBLE(double(node.child(STR("text3")).text().as_float()), 0.12);
CHECK_DOUBLE(double(node.child(STR("text4")).text().as_float()), -5.1); CHECK_DOUBLE(double(node.child(STR("text4")).text().as_float()), -5.1);
CHECK_DOUBLE(double(node.child(STR("text5")).text().as_float()), 3e-4); CHECK_DOUBLE(double(node.child(STR("text5")).text().as_float()), 3e-4);
CHECK_DOUBLE(double(node.child(STR("text6")).text().as_float()), 3.14159265358979323846); CHECK_DOUBLE(double(node.child(STR("text6")).text().as_float()), 3.14159265358979323846);
} }
TEST_XML(dom_text_as_double, "<node><text1>0</text1><text2>1</text2><text3>0.12</text3><text4>-5.1</text4><text5>3e-4</text5><text6>3.14159265358979323846</text6></node>") TEST_XML(dom_text_as_double, "<node><text1>0</text1><text2>1</text2><text3>0.12</text3><text4>-5.1</text4><text5>3e-4</text5><text6>3.14159265358979323846</text6></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(xml_text().as_double() == 0); CHECK(xml_text().as_double() == 0);
CHECK_DOUBLE(node.child(STR("text1")).text().as_double(), 0); CHECK_DOUBLE(node.child(STR("text1")).text().as_double(), 0);
CHECK_DOUBLE(node.child(STR("text2")).text().as_double(), 1); CHECK_DOUBLE(node.child(STR("text2")).text().as_double(), 1);
CHECK_DOUBLE(node.child(STR("text3")).text().as_double(), 0.12); CHECK_DOUBLE(node.child(STR("text3")).text().as_double(), 0.12);
CHECK_DOUBLE(node.child(STR("text4")).text().as_double(), -5.1); CHECK_DOUBLE(node.child(STR("text4")).text().as_double(), -5.1);
CHECK_DOUBLE(node.child(STR("text5")).text().as_double(), 3e-4); CHECK_DOUBLE(node.child(STR("text5")).text().as_double(), 3e-4);
CHECK_DOUBLE(node.child(STR("text6")).text().as_double(), 3.14159265358979323846); CHECK_DOUBLE(node.child(STR("text6")).text().as_double(), 3.14159265358979323846);
} }
TEST_XML(dom_text_as_bool, "<node><text1>0</text1><text2>1</text2><text3>true</text3><text4>True</text4><text5>Yes</text5><text6>yes</text6><text7>false</text7></node>") TEST_XML(dom_text_as_bool, "<node><text1>0</text1><text2>1</text2><text3>true</text3><text4>True</text4><text5>Yes</text5><text6>yes</text6><text7>false</text7></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(!xml_text().as_bool()); CHECK(!xml_text().as_bool());
CHECK(!node.child(STR("text1")).text().as_bool()); CHECK(!node.child(STR("text1")).text().as_bool());
CHECK(node.child(STR("text2")).text().as_bool()); CHECK(node.child(STR("text2")).text().as_bool());
CHECK(node.child(STR("text3")).text().as_bool()); CHECK(node.child(STR("text3")).text().as_bool());
CHECK(node.child(STR("text4")).text().as_bool()); CHECK(node.child(STR("text4")).text().as_bool());
CHECK(node.child(STR("text5")).text().as_bool()); CHECK(node.child(STR("text5")).text().as_bool());
CHECK(node.child(STR("text6")).text().as_bool()); CHECK(node.child(STR("text6")).text().as_bool());
CHECK(!node.child(STR("text7")).text().as_bool()); CHECK(!node.child(STR("text7")).text().as_bool());
} }
#ifdef PUGIXML_HAS_LONG_LONG #ifdef PUGIXML_HAS_LONG_LONG
TEST_XML(dom_text_as_llong, "<node><text1>1</text1><text2>-1</text2><text3>-9223372036854775808</text3><text4>9223372036854775807</text4><text5>0</text5></node>") TEST_XML(dom_text_as_llong, "<node><text1>1</text1><text2>-1</text2><text3>-9223372036854775808</text3><text4>9223372036854775807</text4><text5>0</text5></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(xml_text().as_llong() == 0); CHECK(xml_text().as_llong() == 0);
CHECK(node.child(STR("text1")).text().as_llong() == 1); CHECK(node.child(STR("text1")).text().as_llong() == 1);
CHECK(node.child(STR("text2")).text().as_llong() == -1); CHECK(node.child(STR("text2")).text().as_llong() == -1);
CHECK(node.child(STR("text3")).text().as_llong() == -9223372036854775807ll - 1); CHECK(node.child(STR("text3")).text().as_llong() == -9223372036854775807ll - 1);
CHECK(node.child(STR("text4")).text().as_llong() == 9223372036854775807ll); CHECK(node.child(STR("text4")).text().as_llong() == 9223372036854775807ll);
CHECK(node.child(STR("text5")).text().as_llong() == 0); CHECK(node.child(STR("text5")).text().as_llong() == 0);
} }
TEST_XML(dom_text_as_llong_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>-0x20</text4><text5>-0x8000000000000000</text5><text6>0x</text6></node>") TEST_XML(dom_text_as_llong_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>-0x20</text4><text5>-0x8000000000000000</text5><text6>0x</text6></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.child(STR("text1")).text().as_llong() == 777); // no octal support! intentional CHECK(node.child(STR("text1")).text().as_llong() == 777); // no octal support! intentional
CHECK(node.child(STR("text2")).text().as_llong() == 1451); CHECK(node.child(STR("text2")).text().as_llong() == 1451);
CHECK(node.child(STR("text3")).text().as_llong() == 255); CHECK(node.child(STR("text3")).text().as_llong() == 255);
CHECK(node.child(STR("text4")).text().as_llong() == -32); CHECK(node.child(STR("text4")).text().as_llong() == -32);
CHECK(node.child(STR("text5")).text().as_llong() == -9223372036854775807ll - 1); CHECK(node.child(STR("text5")).text().as_llong() == -9223372036854775807ll - 1);
CHECK(node.child(STR("text6")).text().as_llong() == 0); CHECK(node.child(STR("text6")).text().as_llong() == 0);
} }
TEST_XML(dom_text_as_ullong, "<node><text1>0</text1><text2>1</text2><text3>9223372036854775807</text3><text4>18446744073709551615</text4><text5>0</text5></node>") TEST_XML(dom_text_as_ullong, "<node><text1>0</text1><text2>1</text2><text3>9223372036854775807</text3><text4>18446744073709551615</text4><text5>0</text5></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(xml_text().as_ullong() == 0); CHECK(xml_text().as_ullong() == 0);
CHECK(node.child(STR("text1")).text().as_ullong() == 0); CHECK(node.child(STR("text1")).text().as_ullong() == 0);
CHECK(node.child(STR("text2")).text().as_ullong() == 1); CHECK(node.child(STR("text2")).text().as_ullong() == 1);
CHECK(node.child(STR("text3")).text().as_ullong() == 9223372036854775807ll); CHECK(node.child(STR("text3")).text().as_ullong() == 9223372036854775807ll);
CHECK(node.child(STR("text4")).text().as_ullong() == 18446744073709551615ull); CHECK(node.child(STR("text4")).text().as_ullong() == 18446744073709551615ull);
CHECK(node.child(STR("text5")).text().as_ullong() == 0); CHECK(node.child(STR("text5")).text().as_ullong() == 0);
} }
TEST_XML(dom_text_as_ullong_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>0x20</text4><text5>0xFFFFFFFFFFFFFFFF</text5><text6>0x</text6></node>") TEST_XML(dom_text_as_ullong_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>0x20</text4><text5>0xFFFFFFFFFFFFFFFF</text5><text6>0x</text6></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.child(STR("text1")).text().as_ullong() == 777); // no octal support! intentional CHECK(node.child(STR("text1")).text().as_ullong() == 777); // no octal support! intentional
CHECK(node.child(STR("text2")).text().as_ullong() == 1451); CHECK(node.child(STR("text2")).text().as_ullong() == 1451);
CHECK(node.child(STR("text3")).text().as_ullong() == 255); CHECK(node.child(STR("text3")).text().as_ullong() == 255);
CHECK(node.child(STR("text4")).text().as_ullong() == 32); CHECK(node.child(STR("text4")).text().as_ullong() == 32);
CHECK(node.child(STR("text5")).text().as_ullong() == 18446744073709551615ull); CHECK(node.child(STR("text5")).text().as_ullong() == 18446744073709551615ull);
CHECK(node.child(STR("text6")).text().as_ullong() == 0); CHECK(node.child(STR("text6")).text().as_ullong() == 0);
} }
#endif #endif
TEST_XML(dom_text_get_no_state, "<node/>") TEST_XML(dom_text_get_no_state, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
xml_text t = node.text(); xml_text t = node.text();
CHECK(!t); CHECK(!t);
CHECK(t.get() && *t.get() == 0); CHECK(t.get() && *t.get() == 0);
CHECK(!node.first_child()); CHECK(!node.first_child());
node.append_child(node_pcdata); node.append_child(node_pcdata);
CHECK(t); CHECK(t);
CHECK_STRING(t.get(), STR("")); CHECK_STRING(t.get(), STR(""));
node.first_child().set_value(STR("test")); node.first_child().set_value(STR("test"));
CHECK(t); CHECK(t);
CHECK_STRING(t.get(), STR("test")); CHECK_STRING(t.get(), STR("test"));
} }
TEST_XML(dom_text_set, "<node/>") TEST_XML(dom_text_set, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
xml_text t = node.text(); xml_text t = node.text();
t.set(STR("")); t.set(STR(""));
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK_NODE(node, STR("<node></node>")); CHECK_NODE(node, STR("<node></node>"));
t.set(STR("boo")); t.set(STR("boo"));
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK(node.first_child() == node.last_child()); CHECK(node.first_child() == node.last_child());
CHECK_NODE(node, STR("<node>boo</node>")); CHECK_NODE(node, STR("<node>boo</node>"));
t.set(STR("foobarfoobar")); t.set(STR("foobarfoobar"));
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK(node.first_child() == node.last_child()); CHECK(node.first_child() == node.last_child());
CHECK_NODE(node, STR("<node>foobarfoobar</node>")); CHECK_NODE(node, STR("<node>foobarfoobar</node>"));
} }
TEST_XML(dom_text_set_with_size, "<node/>") TEST_XML(dom_text_set_with_size, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
xml_text t = node.text(); xml_text t = node.text();
t.set(STR(""), 0); t.set(STR(""), 0);
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK_NODE(node, STR("<node></node>")); CHECK_NODE(node, STR("<node></node>"));
t.set(STR("boo"), 3); t.set(STR("boo"), 3);
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK(node.first_child() == node.last_child()); CHECK(node.first_child() == node.last_child());
CHECK_NODE(node, STR("<node>boo</node>")); CHECK_NODE(node, STR("<node>boo</node>"));
t.set(STR("foobarfoobar"), 12); t.set(STR("foobarfoobar"), 12);
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK(node.first_child() == node.last_child()); CHECK(node.first_child() == node.last_child());
CHECK_NODE(node, STR("<node>foobarfoobar</node>")); CHECK_NODE(node, STR("<node>foobarfoobar</node>"));
} }
TEST_XML(dom_text_set_partially_with_size, "<node/>") TEST_XML(dom_text_set_partially_with_size, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
xml_text t = node.text(); xml_text t = node.text();
t.set(STR("foo"), 0); t.set(STR("foo"), 0);
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK_NODE(node, STR("<node></node>")); CHECK_NODE(node, STR("<node></node>"));
t.set(STR("boofoo"), 3); t.set(STR("boofoo"), 3);
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK(node.first_child() == node.last_child()); CHECK(node.first_child() == node.last_child());
CHECK_NODE(node, STR("<node>boo</node>")); CHECK_NODE(node, STR("<node>boo</node>"));
t.set(STR("foobarfoobar"), 3); t.set(STR("foobarfoobar"), 3);
CHECK(node.first_child().type() == node_pcdata); CHECK(node.first_child().type() == node_pcdata);
CHECK(node.first_child() == node.last_child()); CHECK(node.first_child() == node.last_child());
CHECK_NODE(node, STR("<node>foo</node>")); CHECK_NODE(node, STR("<node>foo</node>"));
} }
TEST_XML(dom_text_assign, "<node/>") TEST_XML(dom_text_assign, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
node.append_child(STR("text1")).text() = STR("v1"); node.append_child(STR("text1")).text() = STR("v1");
xml_text() = STR("v1"); xml_text() = STR("v1");
node.append_child(STR("text2")).text() = -2147483647; node.append_child(STR("text2")).text() = -2147483647;
node.append_child(STR("text3")).text() = -2147483647 - 1; node.append_child(STR("text3")).text() = -2147483647 - 1;
xml_text() = -2147483647 - 1; xml_text() = -2147483647 - 1;
node.append_child(STR("text4")).text() = 4294967295u; node.append_child(STR("text4")).text() = 4294967295u;
node.append_child(STR("text5")).text() = 4294967294u; node.append_child(STR("text5")).text() = 4294967294u;
xml_text() = 4294967295u; xml_text() = 4294967295u;
node.append_child(STR("text6")).text() = 0.5; node.append_child(STR("text6")).text() = 0.5;
xml_text() = 0.5; xml_text() = 0.5;
node.append_child(STR("text7")).text() = 0.25f; node.append_child(STR("text7")).text() = 0.25f;
xml_text() = 0.25f; xml_text() = 0.25f;
node.append_child(STR("text8")).text() = true; node.append_child(STR("text8")).text() = true;
xml_text() = true; xml_text() = true;
CHECK_NODE(node, STR("<node><text1>v1</text1><text2>-2147483647</text2><text3>-2147483648</text3><text4>4294967295</text4><text5>4294967294</text5><text6>0.5</text6><text7>0.25</text7><text8>true</text8></node>")); CHECK_NODE(node, STR("<node><text1>v1</text1><text2>-2147483647</text2><text3>-2147483648</text3><text4>4294967295</text4><text5>4294967294</text5><text6>0.5</text6><text7>0.25</text7><text8>true</text8></node>"));
} }
TEST_XML(dom_text_set_value, "<node/>") TEST_XML(dom_text_set_value, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.append_child(STR("text1")).text().set(STR("v1"))); CHECK(node.append_child(STR("text1")).text().set(STR("v1")));
CHECK(!xml_text().set(STR("v1"))); CHECK(!xml_text().set(STR("v1")));
CHECK(node.append_child(STR("text2")).text().set(-2147483647)); CHECK(node.append_child(STR("text2")).text().set(-2147483647));
CHECK(node.append_child(STR("text3")).text().set(-2147483647 - 1)); CHECK(node.append_child(STR("text3")).text().set(-2147483647 - 1));
CHECK(!xml_text().set(-2147483647 - 1)); CHECK(!xml_text().set(-2147483647 - 1));
CHECK(node.append_child(STR("text4")).text().set(4294967295u)); CHECK(node.append_child(STR("text4")).text().set(4294967295u));
CHECK(node.append_child(STR("text5")).text().set(4294967294u)); CHECK(node.append_child(STR("text5")).text().set(4294967294u));
CHECK(!xml_text().set(4294967295u)); CHECK(!xml_text().set(4294967295u));
CHECK(node.append_child(STR("text6")).text().set(0.5)); CHECK(node.append_child(STR("text6")).text().set(0.5));
CHECK(!xml_text().set(0.5)); CHECK(!xml_text().set(0.5));
CHECK(node.append_child(STR("text7")).text().set(0.25f)); CHECK(node.append_child(STR("text7")).text().set(0.25f));
CHECK(!xml_text().set(0.25f)); CHECK(!xml_text().set(0.25f));
CHECK(node.append_child(STR("text8")).text().set(true)); CHECK(node.append_child(STR("text8")).text().set(true));
CHECK(!xml_text().set(true)); CHECK(!xml_text().set(true));
CHECK_NODE(node, STR("<node><text1>v1</text1><text2>-2147483647</text2><text3>-2147483648</text3><text4>4294967295</text4><text5>4294967294</text5><text6>0.5</text6><text7>0.25</text7><text8>true</text8></node>")); CHECK_NODE(node, STR("<node><text1>v1</text1><text2>-2147483647</text2><text3>-2147483648</text3><text4>4294967295</text4><text5>4294967294</text5><text6>0.5</text6><text7>0.25</text7><text8>true</text8></node>"));
} }
#if LONG_MAX > 2147483647 #if LONG_MAX > 2147483647
TEST_XML(dom_text_assign_long, "<node/>") TEST_XML(dom_text_assign_long, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
node.append_child(STR("text1")).text() = -9223372036854775807l; node.append_child(STR("text1")).text() = -9223372036854775807l;
node.append_child(STR("text2")).text() = -9223372036854775807l - 1; node.append_child(STR("text2")).text() = -9223372036854775807l - 1;
xml_text() = -9223372036854775807l - 1; xml_text() = -9223372036854775807l - 1;
node.append_child(STR("text3")).text() = 18446744073709551615ul; node.append_child(STR("text3")).text() = 18446744073709551615ul;
node.append_child(STR("text4")).text() = 18446744073709551614ul; node.append_child(STR("text4")).text() = 18446744073709551614ul;
xml_text() = 18446744073709551615ul; xml_text() = 18446744073709551615ul;
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>")); CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
} }
TEST_XML(dom_text_set_value_long, "<node/>") TEST_XML(dom_text_set_value_long, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.append_child(STR("text1")).text().set(-9223372036854775807l)); CHECK(node.append_child(STR("text1")).text().set(-9223372036854775807l));
CHECK(node.append_child(STR("text2")).text().set(-9223372036854775807l - 1)); CHECK(node.append_child(STR("text2")).text().set(-9223372036854775807l - 1));
CHECK(!xml_text().set(-9223372036854775807l - 1)); CHECK(!xml_text().set(-9223372036854775807l - 1));
CHECK(node.append_child(STR("text3")).text().set(18446744073709551615ul)); CHECK(node.append_child(STR("text3")).text().set(18446744073709551615ul));
CHECK(node.append_child(STR("text4")).text().set(18446744073709551614ul)); CHECK(node.append_child(STR("text4")).text().set(18446744073709551614ul));
CHECK(!xml_text().set(18446744073709551615ul)); CHECK(!xml_text().set(18446744073709551615ul));
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>")); CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
} }
#else #else
TEST_XML(dom_text_assign_long, "<node/>") TEST_XML(dom_text_assign_long, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
node.append_child(STR("text1")).text() = -2147483647l; node.append_child(STR("text1")).text() = -2147483647l;
node.append_child(STR("text2")).text() = -2147483647l - 1; node.append_child(STR("text2")).text() = -2147483647l - 1;
xml_text() = -2147483647l - 1; xml_text() = -2147483647l - 1;
node.append_child(STR("text3")).text() = 4294967295ul; node.append_child(STR("text3")).text() = 4294967295ul;
node.append_child(STR("text4")).text() = 4294967294ul; node.append_child(STR("text4")).text() = 4294967294ul;
xml_text() = 4294967295ul; xml_text() = 4294967295ul;
CHECK_NODE(node, STR("<node><text1>-2147483647</text1><text2>-2147483648</text2><text3>4294967295</text3><text4>4294967294</text4></node>")); CHECK_NODE(node, STR("<node><text1>-2147483647</text1><text2>-2147483648</text2><text3>4294967295</text3><text4>4294967294</text4></node>"));
} }
TEST_XML(dom_text_set_value_long, "<node/>") TEST_XML(dom_text_set_value_long, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.append_child(STR("text1")).text().set(-2147483647l)); CHECK(node.append_child(STR("text1")).text().set(-2147483647l));
CHECK(node.append_child(STR("text2")).text().set(-2147483647l - 1)); CHECK(node.append_child(STR("text2")).text().set(-2147483647l - 1));
CHECK(!xml_text().set(-2147483647l - 1)); CHECK(!xml_text().set(-2147483647l - 1));
CHECK(node.append_child(STR("text3")).text().set(4294967295ul)); CHECK(node.append_child(STR("text3")).text().set(4294967295ul));
CHECK(node.append_child(STR("text4")).text().set(4294967294ul)); CHECK(node.append_child(STR("text4")).text().set(4294967294ul));
CHECK(!xml_text().set(4294967295ul)); CHECK(!xml_text().set(4294967295ul));
CHECK_NODE(node, STR("<node><text1>-2147483647</text1><text2>-2147483648</text2><text3>4294967295</text3><text4>4294967294</text4></node>")); CHECK_NODE(node, STR("<node><text1>-2147483647</text1><text2>-2147483648</text2><text3>4294967295</text3><text4>4294967294</text4></node>"));
} }
#endif #endif
#ifdef PUGIXML_HAS_LONG_LONG #ifdef PUGIXML_HAS_LONG_LONG
TEST_XML(dom_text_assign_llong, "<node/>") TEST_XML(dom_text_assign_llong, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
node.append_child(STR("text1")).text() = -9223372036854775807ll; node.append_child(STR("text1")).text() = -9223372036854775807ll;
node.append_child(STR("text2")).text() = -9223372036854775807ll - 1; node.append_child(STR("text2")).text() = -9223372036854775807ll - 1;
xml_text() = -9223372036854775807ll - 1; xml_text() = -9223372036854775807ll - 1;
node.append_child(STR("text3")).text() = 18446744073709551615ull; node.append_child(STR("text3")).text() = 18446744073709551615ull;
node.append_child(STR("text4")).text() = 18446744073709551614ull; node.append_child(STR("text4")).text() = 18446744073709551614ull;
xml_text() = 18446744073709551615ull; xml_text() = 18446744073709551615ull;
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>")); CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
} }
TEST_XML(dom_text_set_value_llong, "<node/>") TEST_XML(dom_text_set_value_llong, "<node/>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.append_child(STR("text1")).text().set(-9223372036854775807ll)); CHECK(node.append_child(STR("text1")).text().set(-9223372036854775807ll));
CHECK(node.append_child(STR("text2")).text().set(-9223372036854775807ll - 1)); CHECK(node.append_child(STR("text2")).text().set(-9223372036854775807ll - 1));
CHECK(!xml_text().set(-9223372036854775807ll - 1)); CHECK(!xml_text().set(-9223372036854775807ll - 1));
CHECK(node.append_child(STR("text3")).text().set(18446744073709551615ull)); CHECK(node.append_child(STR("text3")).text().set(18446744073709551615ull));
CHECK(node.append_child(STR("text4")).text().set(18446744073709551614ull)); CHECK(node.append_child(STR("text4")).text().set(18446744073709551614ull));
CHECK(!xml_text().set(18446744073709551615ull)); CHECK(!xml_text().set(18446744073709551615ull));
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>")); CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
} }
#endif #endif
TEST_XML(dom_text_middle, "<node><c1>notthisone</c1>text<c2/></node>") TEST_XML(dom_text_middle, "<node><c1>notthisone</c1>text<c2/></node>")
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
xml_text t = node.text(); xml_text t = node.text();
CHECK_STRING(t.get(), STR("text")); CHECK_STRING(t.get(), STR("text"));
t.set(STR("notext")); t.set(STR("notext"));
CHECK_NODE(node, STR("<node><c1>notthisone</c1>notext<c2/></node>")); CHECK_NODE(node, STR("<node><c1>notthisone</c1>notext<c2/></node>"));
CHECK(node.remove_child(t.data())); CHECK(node.remove_child(t.data()));
CHECK(!t); CHECK(!t);
CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/></node>")); CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/></node>"));
t.set(STR("yestext")); t.set(STR("yestext"));
CHECK(t); CHECK(t);
CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/>yestext</node>")); CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/>yestext</node>"));
CHECK(t.data() == node.last_child()); CHECK(t.data() == node.last_child());
} }
TEST_XML_FLAGS(dom_text_data, "<node><a>foo</a><b><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi) TEST_XML_FLAGS(dom_text_data, "<node><a>foo</a><b><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
{ {
xml_node node = doc.child(STR("node")); xml_node node = doc.child(STR("node"));
CHECK(node.child(STR("a")).text().data() == node.child(STR("a")).first_child()); CHECK(node.child(STR("a")).text().data() == node.child(STR("a")).first_child());
CHECK(node.child(STR("b")).text().data() == node.child(STR("b")).first_child()); CHECK(node.child(STR("b")).text().data() == node.child(STR("b")).first_child());
CHECK(!node.child(STR("c")).text().data()); CHECK(!node.child(STR("c")).text().data());
CHECK(!node.child(STR("d")).text().data()); CHECK(!node.child(STR("d")).text().data());
CHECK(!xml_text().data()); CHECK(!xml_text().data());
} }
TEST(dom_text_defaults) TEST(dom_text_defaults)
{ {
xml_text text; xml_text text;
CHECK_STRING(text.as_string(STR("foo")), STR("foo")); CHECK_STRING(text.as_string(STR("foo")), STR("foo"));
CHECK(text.as_int(42) == 42); CHECK(text.as_int(42) == 42);
CHECK(text.as_uint(42) == 42); CHECK(text.as_uint(42) == 42);
CHECK(text.as_double(42) == 42); CHECK(text.as_double(42) == 42);
CHECK(text.as_float(42) == 42); CHECK(text.as_float(42) == 42);
CHECK(text.as_bool(true) == true); CHECK(text.as_bool(true) == true);
#ifdef PUGIXML_HAS_LONG_LONG #ifdef PUGIXML_HAS_LONG_LONG
CHECK(text.as_llong(42) == 42); CHECK(text.as_llong(42) == 42);
CHECK(text.as_ullong(42) == 42); CHECK(text.as_ullong(42) == 42);
#endif #endif
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
// Tests header guards // Tests header guards
#include "../src/pugixml.hpp" #include "../src/pugixml.hpp"
#include "../src/pugixml.hpp" #include "../src/pugixml.hpp"

View File

@ -1,3 +1,3 @@
// Tests compatibility with iosfwd // Tests compatibility with iosfwd
#include "../src/pugixml.hpp" #include "../src/pugixml.hpp"
#include <iosfwd> #include <iosfwd>

Some files were not shown because too many files have changed in this diff Show More