From e839aedc0ce5767bb8d05dcd25d0c440de8585b6 Mon Sep 17 00:00:00 2001 From: JinWang An Date: Fri, 23 Oct 2020 20:11:40 +0900 Subject: [PATCH] Imported Upstream version 2.91.2 --- ChangeLog | 95 ++++++++++++++++++ MSVC_Net2010/libxml++/libxml++.rc | 8 +- MSVC_Net2010/libxml++/libxml++config.h | 6 +- Makefile.am | 4 +- Makefile.in | 32 +++---- NEWS | 15 +++ aclocal.m4 | 11 ++- {macros => build}/compile | 0 {macros => build}/config.guess | 0 {macros => build}/config.sub | 0 build/cxx_std.m4 | 52 ++++++++++ {macros => build}/depcomp | 0 {macros => build}/dist-changelog.am | 0 {macros => build}/doc-reference.am | 0 {macros => build}/install-sh | 0 {macros => build}/libtool.m4 | 0 {macros => build}/ltmain.sh | 0 {macros => build}/ltoptions.m4 | 0 {macros => build}/ltsugar.m4 | 0 {macros => build}/ltversion.m4 | 0 {macros => build}/lt~obsolete.m4 | 0 {macros => build}/missing | 0 {macros => build}/test-driver | 0 config.h.in | 6 +- configure | 83 ++++++++++++---- configure.ac | 10 +- docs/Makefile.am | 2 +- docs/Makefile.in | 20 ++-- docs/manual/html/ch01s02.html | 2 +- docs/manual/html/ch01s03.html | 2 +- docs/manual/html/ch02s02.html | 4 +- docs/manual/html/ch02s03.html | 4 +- docs/manual/html/chapter-introduction.html | 4 +- docs/manual/html/chapter-parsers.html | 12 +-- docs/manual/html/index.html | 4 +- docs/manual/libxml++.xml | 6 +- docs/reference/html/annotated.html | 4 +- docs/reference/html/classes.html | 4 +- ...__load__check__resize__trigger__size__base.html | 4 +- .../html/classlu__counter__policy__base.html | 4 +- .../html/classxmlpp_1_1Attribute-members.html | 4 +- docs/reference/html/classxmlpp_1_1Attribute.html | 4 +- ...classxmlpp_1_1AttributeDeclaration-members.html | 4 +- .../html/classxmlpp_1_1AttributeDeclaration.html | 4 +- .../html/classxmlpp_1_1AttributeNode-members.html | 4 +- .../html/classxmlpp_1_1AttributeNode.html | 4 +- .../html/classxmlpp_1_1CdataNode-members.html | 4 +- docs/reference/html/classxmlpp_1_1CdataNode.html | 4 +- .../html/classxmlpp_1_1CommentNode-members.html | 4 +- docs/reference/html/classxmlpp_1_1CommentNode.html | 4 +- .../html/classxmlpp_1_1ContentNode-members.html | 4 +- docs/reference/html/classxmlpp_1_1ContentNode.html | 4 +- .../html/classxmlpp_1_1Document-members.html | 4 +- docs/reference/html/classxmlpp_1_1Document.html | 14 +-- .../html/classxmlpp_1_1DomParser-members.html | 6 +- docs/reference/html/classxmlpp_1_1DomParser.html | 12 +-- docs/reference/html/classxmlpp_1_1Dtd-members.html | 4 +- docs/reference/html/classxmlpp_1_1Dtd.html | 4 +- .../html/classxmlpp_1_1DtdValidator-members.html | 6 +- .../reference/html/classxmlpp_1_1DtdValidator.html | 14 +-- .../html/classxmlpp_1_1Element-members.html | 4 +- docs/reference/html/classxmlpp_1_1Element.html | 28 +++--- .../classxmlpp_1_1EntityDeclaration-members.html | 4 +- .../html/classxmlpp_1_1EntityDeclaration.html | 4 +- .../classxmlpp_1_1EntityReference-members.html | 4 +- .../html/classxmlpp_1_1EntityReference.html | 4 +- ...sxmlpp_1_1IStreamParserInputBuffer-members.html | 4 +- .../classxmlpp_1_1IStreamParserInputBuffer.html | 4 +- .../html/classxmlpp_1_1KeepBlanks-members.html | 4 +- docs/reference/html/classxmlpp_1_1KeepBlanks.html | 4 +- .../reference/html/classxmlpp_1_1Node-members.html | 4 +- docs/reference/html/classxmlpp_1_1Node.html | 36 +++---- .../html/classxmlpp_1_1NonCopyable-members.html | 4 +- docs/reference/html/classxmlpp_1_1NonCopyable.html | 4 +- .../classxmlpp_1_1OStreamOutputBuffer-members.html | 4 +- .../html/classxmlpp_1_1OStreamOutputBuffer.html | 4 +- .../html/classxmlpp_1_1OutputBuffer-members.html | 4 +- .../reference/html/classxmlpp_1_1OutputBuffer.html | 4 +- .../html/classxmlpp_1_1Parser-members.html | 6 +- docs/reference/html/classxmlpp_1_1Parser.html | 12 +-- .../classxmlpp_1_1ParserInputBuffer-members.html | 4 +- .../html/classxmlpp_1_1ParserInputBuffer.html | 4 +- ...xmlpp_1_1ProcessingInstructionNode-members.html | 4 +- .../classxmlpp_1_1ProcessingInstructionNode.html | 4 +- .../html/classxmlpp_1_1RelaxNGSchema-members.html | 4 +- .../html/classxmlpp_1_1RelaxNGSchema.html | 4 +- .../classxmlpp_1_1RelaxNGValidator-members.html | 6 +- .../html/classxmlpp_1_1RelaxNGValidator.html | 12 +-- .../html/classxmlpp_1_1SaxParser-members.html | 6 +- docs/reference/html/classxmlpp_1_1SaxParser.html | 13 +-- .../html/classxmlpp_1_1SchemaBase-members.html | 4 +- docs/reference/html/classxmlpp_1_1SchemaBase.html | 4 +- .../classxmlpp_1_1SchemaValidatorBase-members.html | 6 +- .../html/classxmlpp_1_1SchemaValidatorBase.html | 8 +- .../html/classxmlpp_1_1TextNode-members.html | 4 +- docs/reference/html/classxmlpp_1_1TextNode.html | 4 +- .../html/classxmlpp_1_1TextReader-members.html | 6 +- docs/reference/html/classxmlpp_1_1TextReader.html | 24 +++-- .../html/classxmlpp_1_1Validator-members.html | 6 +- docs/reference/html/classxmlpp_1_1Validator.html | 12 +-- .../html/classxmlpp_1_1XIncludeEnd-members.html | 4 +- docs/reference/html/classxmlpp_1_1XIncludeEnd.html | 4 +- .../html/classxmlpp_1_1XIncludeStart-members.html | 4 +- .../html/classxmlpp_1_1XIncludeStart.html | 4 +- .../html/classxmlpp_1_1XsdSchema-members.html | 4 +- docs/reference/html/classxmlpp_1_1XsdSchema.html | 4 +- .../html/classxmlpp_1_1XsdValidator-members.html | 6 +- .../reference/html/classxmlpp_1_1XsdValidator.html | 12 +-- .../html/classxmlpp_1_1exception-members.html | 8 +- docs/reference/html/classxmlpp_1_1exception.html | 58 ++++++++++- .../classxmlpp_1_1internal__error-members.html | 10 +- .../html/classxmlpp_1_1internal__error.html | 59 +++++++++++- .../html/classxmlpp_1_1parse__error-members.html | 10 +- .../reference/html/classxmlpp_1_1parse__error.html | 63 +++++++++++- .../classxmlpp_1_1validity__error-members.html | 10 +- .../html/classxmlpp_1_1validity__error.html | 59 +++++++++++- .../html/dir_8637afc38b758fdb535647a385c49b5e.html | 4 +- .../html/dir_a5a40681709ed751decc24cd7289c9c5.html | 4 +- .../html/dir_bc161955dc3a3d2485839eba21420d01.html | 4 +- .../html/dir_e3818dbe052c35541aa8102ff72444f2.html | 4 +- .../html/dir_fceced95d8215eeebebd9df6aa39e1a5.html | 6 +- docs/reference/html/functions.html | 4 +- docs/reference/html/functions_c.html | 18 ++-- docs/reference/html/functions_d.html | 4 +- docs/reference/html/functions_e.html | 10 +- docs/reference/html/functions_enum.html | 4 +- docs/reference/html/functions_eval.html | 4 +- docs/reference/html/functions_f.html | 4 +- docs/reference/html/functions_func.html | 4 +- docs/reference/html/functions_func_c.html | 12 ++- docs/reference/html/functions_func_d.html | 4 +- docs/reference/html/functions_func_e.html | 4 +- docs/reference/html/functions_func_f.html | 4 +- docs/reference/html/functions_func_g.html | 4 +- docs/reference/html/functions_func_h.html | 4 +- docs/reference/html/functions_func_i.html | 4 +- docs/reference/html/functions_func_k.html | 4 +- docs/reference/html/functions_func_l.html | 4 +- docs/reference/html/functions_func_m.html | 4 +- docs/reference/html/functions_func_n.html | 4 +- docs/reference/html/functions_func_o.html | 4 +- docs/reference/html/functions_func_p.html | 4 +- docs/reference/html/functions_func_r.html | 14 ++- docs/reference/html/functions_func_s.html | 4 +- docs/reference/html/functions_func_t.html | 4 +- docs/reference/html/functions_func_v.html | 4 +- docs/reference/html/functions_func_w.html | 4 +- docs/reference/html/functions_func_x.html | 4 +- docs/reference/html/functions_func_~.html | 6 +- docs/reference/html/functions_g.html | 4 +- docs/reference/html/functions_h.html | 4 +- docs/reference/html/functions_i.html | 4 +- docs/reference/html/functions_k.html | 4 +- docs/reference/html/functions_l.html | 4 +- docs/reference/html/functions_m.html | 4 +- docs/reference/html/functions_n.html | 4 +- docs/reference/html/functions_o.html | 4 +- docs/reference/html/functions_p.html | 4 +- docs/reference/html/functions_r.html | 14 ++- docs/reference/html/functions_s.html | 4 +- docs/reference/html/functions_t.html | 4 +- docs/reference/html/functions_type.html | 4 +- docs/reference/html/functions_v.html | 4 +- docs/reference/html/functions_vars.html | 10 +- docs/reference/html/functions_w.html | 4 +- docs/reference/html/functions_x.html | 4 +- docs/reference/html/functions_~.html | 6 +- docs/reference/html/graph_legend.html | 4 +- docs/reference/html/hierarchy.html | 4 +- docs/reference/html/index.html | 4 +- docs/reference/html/inherits.html | 4 +- docs/reference/html/namespacemembers.html | 7 +- docs/reference/html/namespacemembers_enum.html | 4 +- docs/reference/html/namespacemembers_eval.html | 4 +- docs/reference/html/namespacemembers_func.html | 7 +- docs/reference/html/namespaces.html | 4 +- docs/reference/html/namespacexmlpp.html | 48 +++++++++- docs/reference/html/pages.html | 4 +- docs/reference/html/since_2_20.html | 4 +- docs/reference/html/since_2_24.html | 4 +- docs/reference/html/since_2_36.html | 4 +- docs/reference/html/since_2_38.html | 4 +- docs/reference/html/since_3_0.html | 28 +++--- ...uctxmlpp_1_1SaxParser_1_1Attribute-members.html | 4 +- .../structxmlpp_1_1SaxParser_1_1Attribute.html | 4 +- ...p_1_1SaxParser_1_1AttributeHasName-members.html | 4 +- ...ructxmlpp_1_1SaxParser_1_1AttributeHasName.html | 4 +- docs/reference/libxml++-3.0.devhelp2 | 11 ++- docs/reference/libxml++-3.0.tag | 92 ++++++++++++++++-- examples/Makefile.in | 21 ++-- examples/sax_exception/myparser.cc | 10 ++ examples/sax_exception/myparser.h | 2 + libxml++/Makefile.in | 24 +++-- libxml++/document.cc | 18 ++-- libxml++/document.h | 10 +- libxml++/dtd.cc | 2 +- libxml++/exceptions/exception.cc | 30 ++++++ libxml++/exceptions/exception.h | 29 +++++- libxml++/exceptions/internal_error.cc | 10 ++ libxml++/exceptions/internal_error.h | 3 + libxml++/exceptions/parse_error.cc | 10 ++ libxml++/exceptions/parse_error.h | 3 + libxml++/exceptions/validity_error.cc | 10 ++ libxml++/exceptions/validity_error.h | 3 + libxml++/exceptions/wrapped_exception.cc | 46 +++++++++ libxml++/exceptions/wrapped_exception.h | 56 +++++++++++ libxml++/filelist.am | 3 +- libxml++/io/parserinputbuffer.cc | 6 +- libxml++/nodes/element.cc | 40 ++++---- libxml++/nodes/element.h | 6 +- libxml++/nodes/node.cc | 28 +++--- libxml++/nodes/node.h | 30 +++--- libxml++/parsers/domparser.cc | 31 +++--- libxml++/parsers/domparser.h | 4 +- libxml++/parsers/parser.cc | 70 +++++++------- libxml++/parsers/parser.h | 3 +- libxml++/parsers/saxparser.cc | 106 ++++++++++----------- libxml++/parsers/saxparser.h | 7 +- libxml++/parsers/textreader.cc | 10 +- libxml++/parsers/textreader.h | 8 +- libxml++/relaxngschema.cc | 2 +- libxml++/validators/dtdvalidator.cc | 2 +- libxml++/validators/dtdvalidator.h | 6 +- libxml++/validators/relaxngvalidator.cc | 2 +- libxml++/validators/relaxngvalidator.h | 4 +- libxml++/validators/validator.cc | 75 +++++++-------- libxml++/validators/validator.h | 4 +- libxml++/validators/xsdvalidator.cc | 2 +- libxml++/validators/xsdvalidator.h | 4 +- libxml++/xsdschema.cc | 2 +- libxml++config.h.in | 4 +- tests/Makefile.in | 19 ++-- .../main.cc | 13 ++- tests/saxparser_parse_double_free/main.cc | 46 ++++++++- .../main.cc | 13 ++- 235 files changed, 1675 insertions(+), 797 deletions(-) rename {macros => build}/compile (100%) rename {macros => build}/config.guess (100%) rename {macros => build}/config.sub (100%) create mode 100644 build/cxx_std.m4 rename {macros => build}/depcomp (100%) rename {macros => build}/dist-changelog.am (100%) rename {macros => build}/doc-reference.am (100%) rename {macros => build}/install-sh (100%) rename {macros => build}/libtool.m4 (100%) rename {macros => build}/ltmain.sh (100%) rename {macros => build}/ltoptions.m4 (100%) rename {macros => build}/ltsugar.m4 (100%) rename {macros => build}/ltversion.m4 (100%) rename {macros => build}/lt~obsolete.m4 (100%) rename {macros => build}/missing (100%) rename {macros => build}/test-driver (100%) create mode 100644 libxml++/exceptions/wrapped_exception.cc create mode 100644 libxml++/exceptions/wrapped_exception.h diff --git a/ChangeLog b/ChangeLog index ad7e586..69bf6df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,98 @@ +2015-10-30 Kjell Ahlstedt + + 2.91.2 + +2015-10-29 Kjell Ahlstedt + + Work around some platforms' lack of support for std::exception_ptr + + * libxml++/exceptions/exception.[cc|h]: + * libxml++/exceptions/internal_error.[cc|h]: + * libxml++/exceptions/parse_error.[cc|h]: + * libxml++/exceptions/validity_error.[cc|h]: Reintroduce Raise() and Clone(), + now renamed to raise() and clone(). + * libxml++/exceptions/wrapped_exception.[cc|h]: Reintroduced files, now + with the wrapped_exception class declared only if LIBXMLXX_HAVE_EXCEPTION_PTR + is defined. + * libxml++/filelist.am: Add wrapped_exception.h. + * libxml++/parsers/parser.[cc|h]: Replace std::exception_ptr exception_ptr_ + by std::unique_ptr exception_. + * libxml++/parsers/saxparser.cc: exception_ptr_ -> exception_ + * libxml++/parsers/saxparser.h: Note in the class description that some + exceptions are replaced by xmlpp::exception if std::exception_ptr is not + supported. + * libxml++/validators/validator.[cc|h]: Replace std::exception_ptr + exception_ptr_ by std::unique_ptr exception_. + * examples/sax_exception/myparser.[cc|h]: Reintroduce Raise() and Clone(), + now renamed to raise() and clone(). + * tests/saxparser_chunk_parsing_inconsistent_state/main.cc: + * tests/saxparser_parse_double_free/main.cc: + * tests/saxparser_parse_stream_inconsistent_state/main.cc: Catch + xmlpp::exception, if LIBXMLXX_HAVE_EXCEPTION_PTR is not defined. + Bug #757042. + + The substitution of exception_ for exception_ptr_ in Parser and Validator + breaks ABI. The ABI of libxml++ 3.x has not yet been frozen. + + Thanks to Daniel Trebbien , who supplied a patch for + libxml++ 2.40. + +2015-10-27 Kjell Ahlstedt + + Add LIBXMLXX_HAVE_EXCEPTION_PTR + + * build/.gitignore: New file. + * build/cxx_std.m4: New file with LIBXMLXX_CXX_HAS_EXCEPTION_PTR + autoconf macro. Defines LIBXMLXX_HAVE_EXCEPTION_PTR if std::exception_ptr + exists. + * .gitignore: Move some lines to build/.gitignore. + * configure.ac: Store some build files in the build directory, like most mm + packages. Don't use the macros directory. + * libxml++config.h.in: Add LIBXMLXX_HAVE_EXCEPTION_PTR. + * Makefile.am: + * docs/Makefile.am: macros -> build. Bug #757042. + + Thanks to Daniel Trebbien , who supplied a patch with + the test code in LIBXMLXX_HAVE_EXCEPTION_PTR. + +2015-10-12 Kjell Ahlstedt + + Remove LIBXMLCPP_EXCEPTIONS_ENABLED + + * configure.ac: + * libxml++config.h.in: Remove LIBXMLCPP_EXCEPTIONS_ENABLED. Bug #754673. + +2015-10-09 Kjell Ahlstedt + + Still more use of nullptr instead of 0 + +2015-10-09 Kjell Ahlstedt + + Still more use of nullptr instead of 0 + +2015-10-08 Kjell Ahlstedt + + More use of nullptr instead of 0 + + Bug #756166 (also the previous commit) + +2015-10-08 Gaurav Gupta + + Use nullptr instead of 0 at missing places - C++-11 + +2015-10-08 Kjell Ahlstedt + + Remove some TODO comments + +2015-10-08 Kjell Ahlstedt + + Add xmlpp::format_printf_message() + + * libxml++/exceptions/exception.[h|cc]: Add format_printf_message(). + * libxml++/parsers/parser.cc: + * libxml++/parsers/saxparser.cc: + * libxml++/validators/validator.cc: Call format_printf_message(). + 2015-10-05 Kjell Ahlstedt 2.91.1 diff --git a/MSVC_Net2010/libxml++/libxml++.rc b/MSVC_Net2010/libxml++/libxml++.rc index 017fcb1..819f8e0 100644 --- a/MSVC_Net2010/libxml++/libxml++.rc +++ b/MSVC_Net2010/libxml++/libxml++.rc @@ -33,8 +33,8 @@ END #endif // APSTUDIO_INVOKED VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,91,1,1 - PRODUCTVERSION 2,91,1,1 + FILEVERSION 2,91,2,1 + PRODUCTVERSION 2,91,2,1 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,11 +51,11 @@ BEGIN BEGIN VALUE "CompanyName", "The libxml++ development team (see AUTHORS)" VALUE "FileDescription", "The official C++ wrapper for libxml2" - VALUE "FileVersion", "2.91.1" + VALUE "FileVersion", "2.91.2" VALUE "LegalCopyright", "Distribution is under the LGPL (see COPYING)" VALUE "OriginalFilename", "libxml++-2.6" VALUE "ProductName", "libxml++" - VALUE "ProductVersion", "2.91.1" + VALUE "ProductVersion", "2.91.2" END END BLOCK "VarFileInfo" diff --git a/MSVC_Net2010/libxml++/libxml++config.h b/MSVC_Net2010/libxml++/libxml++config.h index d838a9e..fe7aa85 100644 --- a/MSVC_Net2010/libxml++/libxml++config.h +++ b/MSVC_Net2010/libxml++/libxml++config.h @@ -7,8 +7,8 @@ /* Define to omit deprecated API from the library. */ /* #undef LIBXMLXX_DISABLE_DEPRECATED */ -/* This is always set. This is only for backwards compatibility. */ -#define LIBXMLCPP_EXCEPTIONS_ENABLED 1 +/* Defined if the C++ library supports std::exception_ptr. */ +#define LIBXMLXX_HAVE_EXCEPTION_PTR 1 /* Major version number of libxml++. */ #define LIBXMLXX_MAJOR_VERSION 2 @@ -17,7 +17,7 @@ #define LIBXMLXX_MINOR_VERSION 91 /* Micro version number of libxml++. */ -#define LIBXMLXX_MICRO_VERSION 1 +#define LIBXMLXX_MICRO_VERSION 2 #ifdef GLIBMM_DLL #if defined(LIBXMLPP_BUILD) && defined(_WINDLL) diff --git a/Makefile.am b/Makefile.am index 2779bb7..9f02ec4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## This file is part of libxml++. -ACLOCAL_AMFLAGS = -I macros ${ACLOCAL_FLAGS} +ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS} DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal if ENABLE_DOCUMENTATION @@ -25,4 +25,4 @@ dist_noinst_SCRIPTS = autogen.sh DISTCLEANFILES = MSVC_Net2010/libxml++/libxml++config.h # Optional: auto-generate the ChangeLog file from the git log on make dist -include $(top_srcdir)/macros/dist-changelog.am +include $(top_srcdir)/build/dist-changelog.am diff --git a/Makefile.in b/Makefile.in index ccfd164..eb565d0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -81,27 +81,27 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/MSVC_Net2010/filelist.am \ - $(top_srcdir)/macros/dist-changelog.am INSTALL NEWS README \ + $(top_srcdir)/build/dist-changelog.am INSTALL NEWS README \ AUTHORS ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(srcdir)/libxml++config.h.in \ $(top_srcdir)/docs/reference/Doxyfile.in \ $(top_srcdir)/MSVC_Net2010/libxml++/libxml++.rc.in \ $(srcdir)/libxml++.pc.in $(dist_noinst_SCRIPTS) \ - $(dist_noinst_DATA) COPYING macros/compile macros/config.guess \ - macros/config.sub macros/depcomp macros/install-sh \ - macros/missing macros/ltmain.sh $(top_srcdir)/macros/compile \ - $(top_srcdir)/macros/config.guess \ - $(top_srcdir)/macros/config.sub \ - $(top_srcdir)/macros/install-sh $(top_srcdir)/macros/ltmain.sh \ - $(top_srcdir)/macros/missing + $(dist_noinst_DATA) COPYING build/compile build/config.guess \ + build/config.sub build/depcomp build/install-sh build/missing \ + build/ltmain.sh $(top_srcdir)/build/compile \ + $(top_srcdir)/build/config.guess \ + $(top_srcdir)/build/config.sub $(top_srcdir)/build/install-sh \ + $(top_srcdir)/build/ltmain.sh $(top_srcdir)/build/missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/macros/libtool.m4 \ - $(top_srcdir)/macros/ltoptions.m4 \ - $(top_srcdir)/macros/ltsugar.m4 \ - $(top_srcdir)/macros/ltversion.m4 \ - $(top_srcdir)/macros/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/build/cxx_std.m4 \ + $(top_srcdir)/build/libtool.m4 \ + $(top_srcdir)/build/ltoptions.m4 \ + $(top_srcdir)/build/ltsugar.m4 \ + $(top_srcdir)/build/ltversion.m4 \ + $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -388,7 +388,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -ACLOCAL_AMFLAGS = -I macros ${ACLOCAL_FLAGS} +ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS} DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal @ENABLE_DOCUMENTATION_FALSE@doc_subdirs = @ENABLE_DOCUMENTATION_TRUE@doc_subdirs = docs @@ -445,7 +445,7 @@ all: config.h libxml++config.h .SUFFIXES: am--refresh: Makefile @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/MSVC_Net2010/filelist.am $(top_srcdir)/macros/dist-changelog.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/MSVC_Net2010/filelist.am $(top_srcdir)/build/dist-changelog.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -468,7 +468,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; -$(srcdir)/MSVC_Net2010/filelist.am $(top_srcdir)/macros/dist-changelog.am: +$(srcdir)/MSVC_Net2010/filelist.am $(top_srcdir)/build/dist-changelog.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck diff --git a/NEWS b/NEWS index 55a0f3d..fc6d7b1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,18 @@ +2.91.2 (unstable): + +* Remove the preprocessor constant LIBXMLCPP_EXCEPTIONS_ENABLED. + It was always 1. + +* Add a config-time test for support of std::exception_ptr. Don't try to + use std::exception_ptr on a system where it does not exist. + This includes re-implementing the wrapped_exception class and the + raise() and clone() methods in xmlpp::exception and its subclasses. + (Daniel Trebbien, Kjell Ahlstedt) Bug #757042 (Michael Biebl) + +* The ABI is not identical to that of libxml++ 2.91.1. + There may be more changes in ABI and/or API before the first stable + libxml++-3.0 release. + 2.91.1 (unstable): * Renamed ABI from libxml++-2.6 to libxml++-3.0. diff --git a/aclocal.m4 b/aclocal.m4 index 64c34c0..ee35ff3 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -2000,8 +2000,9 @@ test "x$mm_all_flags" != x || mm_all_flags=none AC_MSG_RESULT([$mm_all_flags])[]dnl ]) -m4_include([macros/libtool.m4]) -m4_include([macros/ltoptions.m4]) -m4_include([macros/ltsugar.m4]) -m4_include([macros/ltversion.m4]) -m4_include([macros/lt~obsolete.m4]) +m4_include([build/cxx_std.m4]) +m4_include([build/libtool.m4]) +m4_include([build/ltoptions.m4]) +m4_include([build/ltsugar.m4]) +m4_include([build/ltversion.m4]) +m4_include([build/lt~obsolete.m4]) diff --git a/macros/compile b/build/compile similarity index 100% rename from macros/compile rename to build/compile diff --git a/macros/config.guess b/build/config.guess similarity index 100% rename from macros/config.guess rename to build/config.guess diff --git a/macros/config.sub b/build/config.sub similarity index 100% rename from macros/config.sub rename to build/config.sub diff --git a/build/cxx_std.m4 b/build/cxx_std.m4 new file mode 100644 index 0000000..7977f9b --- /dev/null +++ b/build/cxx_std.m4 @@ -0,0 +1,52 @@ +## Copyright (C) 2015 The libxml++ development team +## +## This file is part of libxml++. +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library. If not, see . + +## LIBXMLXX_CXX_HAS_EXCEPTION_PTR() +## +## Test whether std::exception_ptr, std::current_exception() and +## std::rethrow_exception() are defined. +## +## On success, #define LIBXMLXX_HAVE_EXCEPTION_PTR to 1. +## +AC_DEFUN([LIBXMLXX_CXX_HAS_EXCEPTION_PTR], +[ + AC_CACHE_CHECK( + [whether C++ library supports std::exception_ptr], + [libxmlxx_cv_cxx_has_exception_ptr], + [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ + #include + ]],[[ + try + { + throw "custom error"; + } + catch(...) + { + std::exception_ptr ep = std::current_exception(); + std::rethrow_exception(ep); + } + ]])], + [libxmlxx_cv_cxx_has_exception_ptr='yes'], + [libxmlxx_cv_cxx_has_exception_ptr='no'] + ) + ]) + + AS_IF([test "x${libxmlxx_cv_cxx_has_exception_ptr}" = 'xyes'], + [AC_DEFINE([LIBXMLXX_HAVE_EXCEPTION_PTR], [1], [Defined if the C++ library supports std::exception_ptr.])]) +]) diff --git a/macros/depcomp b/build/depcomp similarity index 100% rename from macros/depcomp rename to build/depcomp diff --git a/macros/dist-changelog.am b/build/dist-changelog.am similarity index 100% rename from macros/dist-changelog.am rename to build/dist-changelog.am diff --git a/macros/doc-reference.am b/build/doc-reference.am similarity index 100% rename from macros/doc-reference.am rename to build/doc-reference.am diff --git a/macros/install-sh b/build/install-sh similarity index 100% rename from macros/install-sh rename to build/install-sh diff --git a/macros/libtool.m4 b/build/libtool.m4 similarity index 100% rename from macros/libtool.m4 rename to build/libtool.m4 diff --git a/macros/ltmain.sh b/build/ltmain.sh similarity index 100% rename from macros/ltmain.sh rename to build/ltmain.sh diff --git a/macros/ltoptions.m4 b/build/ltoptions.m4 similarity index 100% rename from macros/ltoptions.m4 rename to build/ltoptions.m4 diff --git a/macros/ltsugar.m4 b/build/ltsugar.m4 similarity index 100% rename from macros/ltsugar.m4 rename to build/ltsugar.m4 diff --git a/macros/ltversion.m4 b/build/ltversion.m4 similarity index 100% rename from macros/ltversion.m4 rename to build/ltversion.m4 diff --git a/macros/lt~obsolete.m4 b/build/lt~obsolete.m4 similarity index 100% rename from macros/lt~obsolete.m4 rename to build/lt~obsolete.m4 diff --git a/macros/missing b/build/missing similarity index 100% rename from macros/missing rename to build/missing diff --git a/macros/test-driver b/build/test-driver similarity index 100% rename from macros/test-driver rename to build/test-driver diff --git a/config.h.in b/config.h.in index 0586717..1dac8c8 100644 --- a/config.h.in +++ b/config.h.in @@ -42,12 +42,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* This is always set. This is only for backwards compatibility. */ -#undef LIBXMLCPP_EXCEPTIONS_ENABLED - /* Define to omit deprecated API from the library. */ #undef LIBXMLXX_DISABLE_DEPRECATED +/* Defined if the C++ library supports std::exception_ptr. */ +#undef LIBXMLXX_HAVE_EXCEPTION_PTR + /* Major version number of libxml++. */ #undef LIBXMLXX_MAJOR_VERSION diff --git a/configure b/configure index 8dba72f..6d6a11d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libxml++ 2.91.1. +# Generated by GNU Autoconf 2.69 for libxml++ 2.91.2. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libxml++' PACKAGE_TARNAME='libxml++' -PACKAGE_VERSION='2.91.1' -PACKAGE_STRING='libxml++ 2.91.1' +PACKAGE_VERSION='2.91.2' +PACKAGE_STRING='libxml++ 2.91.2' PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=libxml%2B%2B' PACKAGE_URL='http://libxmlplusplus.sourceforge.net/' @@ -1376,7 +1376,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libxml++ 2.91.1 to adapt to many kinds of systems. +\`configure' configures libxml++ 2.91.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1446,7 +1446,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libxml++ 2.91.1:";; + short | recursive ) echo "Configuration of libxml++ 2.91.2:";; esac cat <<\_ACEOF @@ -1586,7 +1586,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libxml++ configure 2.91.1 +libxml++ configure 2.91.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2076,7 +2076,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libxml++ $as_me 2.91.1, which was +It was created by libxml++ $as_me 2.91.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2428,7 +2428,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= -for ac_dir in macros "$srcdir"/macros; do +for ac_dir in build "$srcdir"/build; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -2444,7 +2444,7 @@ for ac_dir in macros "$srcdir"/macros; do fi done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in macros \"$srcdir\"/macros" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2946,7 +2946,7 @@ fi # Define the identity of the package. PACKAGE='libxml++' - VERSION='2.91.1' + VERSION='2.91.2' # Some tools Automake needs. @@ -3121,7 +3121,7 @@ fi LIBXMLXX_MODULE_NAME='libxml++-3.0' -LIBXMLXX_VERSION='2.91.1' +LIBXMLXX_VERSION='2.91.2' LIBXMLXX_API_VERSION='3.0' @@ -3135,10 +3135,10 @@ LIBXMLXX_MINOR_VERSION=91 $as_echo "#define LIBXMLXX_MINOR_VERSION 91" >>confdefs.h -LIBXMLXX_MICRO_VERSION=1 +LIBXMLXX_MICRO_VERSION=2 -$as_echo "#define LIBXMLXX_MICRO_VERSION 1" >>confdefs.h +$as_echo "#define LIBXMLXX_MICRO_VERSION 2" >>confdefs.h @@ -16096,6 +16096,54 @@ fi done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ library supports std::exception_ptr" >&5 +$as_echo_n "checking whether C++ library supports std::exception_ptr... " >&6; } +if ${libxmlxx_cv_cxx_has_exception_ptr+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main () +{ + + try + { + throw "custom error"; + } + catch(...) + { + std::exception_ptr ep = std::current_exception(); + std::rethrow_exception(ep); + } + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + libxmlxx_cv_cxx_has_exception_ptr='yes' +else + libxmlxx_cv_cxx_has_exception_ptr='no' + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libxmlxx_cv_cxx_has_exception_ptr" >&5 +$as_echo "$libxmlxx_cv_cxx_has_exception_ptr" >&6; } + + if test "x${libxmlxx_cv_cxx_has_exception_ptr}" = 'xyes'; then : + +$as_echo "#define LIBXMLXX_HAVE_EXCEPTION_PTR 1" >>confdefs.h + +fi + + # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -16775,11 +16823,6 @@ as_fn_error $? "At least Perl 5.6.0 is required to build $PACKAGE_NAME. See \`config.log' for more details" "$LINENO" 5; } fi -# This is just defined to avoid breaking old code: - -$as_echo "#define LIBXMLCPP_EXCEPTIONS_ENABLED 1" >>confdefs.h - - ac_config_files="$ac_config_files Makefile libxml++/Makefile examples/Makefile tests/Makefile docs/Makefile docs/reference/Doxyfile MSVC_Net2010/libxml++/libxml++.rc ${LIBXMLXX_MODULE_NAME}.pc:libxml++.pc.in" @@ -17337,7 +17380,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libxml++ $as_me 2.91.1, which was +This file was extended by libxml++ $as_me 2.91.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17404,7 +17447,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libxml++ config.status 2.91.1 +libxml++ config.status 2.91.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d771313..561949a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,13 +1,13 @@ ## This file is part of libxml++. -AC_INIT([libxml++], [2.91.1], +AC_INIT([libxml++], [2.91.2], [https://bugzilla.gnome.org/enter_bug.cgi?product=libxml%2B%2B], [libxml++], [http://libxmlplusplus.sourceforge.net/]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([libxml++/libxml++.h]) -AC_CONFIG_AUX_DIR([macros]) -AC_CONFIG_MACRO_DIR([macros]) +AC_CONFIG_AUX_DIR([build]) +AC_CONFIG_MACRO_DIR([build]) AC_CONFIG_HEADERS([config.h libxml++config.h]) AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 no-define nostdinc subdir-objects]) @@ -39,6 +39,7 @@ PKG_CHECK_MODULES([LIBXMLXX], [$LIBXMLXX_MODULES]) AC_LANG([C++]) AC_CHECK_HEADERS([string list map], [], [AC_MSG_ERROR([required headers not found])]) +LIBXMLXX_CXX_HAS_EXCEPTION_PTR MM_ARG_ENABLE_DOCUMENTATION MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++]) @@ -60,9 +61,6 @@ AC_PATH_PROGS([DB2LATEX], [db2latex docbook2latex], [db2latex]) AC_ARG_VAR([DB2LATEX], [path to db2latex utility]) MM_CHECK_PERL() -# This is just defined to avoid breaking old code: -AC_DEFINE([LIBXMLCPP_EXCEPTIONS_ENABLED],[1], [This is always set. This is only for backwards compatibility.]) - AC_CONFIG_FILES([Makefile libxml++/Makefile examples/Makefile diff --git a/docs/Makefile.am b/docs/Makefile.am index 9458f00..edd69f4 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -19,7 +19,7 @@ book_name = $(LIBXMLXX_MODULE_NAME) doc_input = $(addprefix $(top_srcdir)/libxml++/,$(h_sources_public)) # Sets dist_noinst_DATA, DISTCLEANFILES and MAINTAINERCLEANFILES -include $(top_srcdir)/macros/doc-reference.am +include $(top_srcdir)/build/doc-reference.am manual/libxml++.xml: manual/libxml++_without_code.xml manual/insert_example_code.pl $(AM_V_GEN)$(PERL) -- manual/insert_example_code.pl ../examples $< >$@ diff --git a/docs/Makefile.in b/docs/Makefile.in index 658ea7d..535f198 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -80,16 +80,17 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/libxml++/filelist.am \ - $(top_srcdir)/macros/doc-reference.am $(srcdir)/Makefile.in \ + $(top_srcdir)/build/doc-reference.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(dist_noinst_SCRIPTS) \ $(am__dist_noinst_DATA_DIST) $(dist_reference_DATA) subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/macros/libtool.m4 \ - $(top_srcdir)/macros/ltoptions.m4 \ - $(top_srcdir)/macros/ltsugar.m4 \ - $(top_srcdir)/macros/ltversion.m4 \ - $(top_srcdir)/macros/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/build/cxx_std.m4 \ + $(top_srcdir)/build/libtool.m4 \ + $(top_srcdir)/build/ltoptions.m4 \ + $(top_srcdir)/build/ltsugar.m4 \ + $(top_srcdir)/build/ltversion.m4 \ + $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -316,7 +317,8 @@ h_exceptions_sources_public = \ exceptions/exception.h \ exceptions/parse_error.h \ exceptions/validity_error.h \ - exceptions/internal_error.h + exceptions/internal_error.h \ + exceptions/wrapped_exception.h h_io_sources_public = \ io/istreamparserinputbuffer.h \ @@ -460,7 +462,7 @@ rsync_args = -vz --rsh ssh --recursive --cvs-exclude --exclude="**1.0**" --exclu all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/libxml++/filelist.am $(top_srcdir)/macros/doc-reference.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/libxml++/filelist.am $(top_srcdir)/build/doc-reference.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -481,7 +483,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/libxml++/filelist.am $(top_srcdir)/macros/doc-reference.am: +$(top_srcdir)/libxml++/filelist.am $(top_srcdir)/build/doc-reference.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/docs/manual/html/ch01s02.html b/docs/manual/html/ch01s02.html index c03311b..a8f126c 100644 --- a/docs/manual/html/ch01s02.html +++ b/docs/manual/html/ch01s02.html @@ -24,7 +24,7 @@

-UTF-8 and Glib::ustring

+UTF-8 and Glib::ustring

The libxml++ API takes, and gives, strings in the UTF-8 Unicode encoding, which can support all known languages and locales. This choice was made because, of the encodings that have this capability, UTF-8 is the most commonly accepted choice. UTF-8 is a multi-byte encoding, meaning that some characters use more than 1 byte. But for compatibility, old-fashioned 7-bit ASCII strings are unchanged when encoded as UTF-8, and UTF-8 strings do not contain null bytes which would cause old code to misjudge the number of bytes. For these reasons, you can store a UTF-8 string in a std::string object. However, the std::string API will operate on that string in terms of bytes, instead of characters.

Because Standard C++ has no string class that can fully handle UTF-8, libxml++ uses the Glib::ustring class from the glibmm library. Glib::ustring has almost exactly the same API as std::string, but methods such as length() and operator[] deal with whole UTF-8 characters rather than raw bytes.

There are implicit conversions between std::string and Glib::ustring, so you can use std::string wherever you see a Glib::ustring in the API, if you really don't care about any locale other than English. However, that is unlikely in today's connected world.

diff --git a/docs/manual/html/ch01s03.html b/docs/manual/html/ch01s03.html index 01b2884..d3bf1e9 100644 --- a/docs/manual/html/ch01s03.html +++ b/docs/manual/html/ch01s03.html @@ -24,7 +24,7 @@

-Compilation and Linking

+Compilation and Linking

To use libxml++ in your application, you must tell the compiler where to find the include headers and where to find the libxml++ library. libxml++ provides a pkg-config .pc file to make this easy. For instance, the following command will provide the necessary compiler options: pkg-config libxml++-3.0 --cflags --libs

diff --git a/docs/manual/html/ch02s02.html b/docs/manual/html/ch02s02.html index d2a7eac..05bad88 100644 --- a/docs/manual/html/ch02s02.html +++ b/docs/manual/html/ch02s02.html @@ -24,13 +24,13 @@

-SAX Parser

+SAX Parser

The SAX (Simple API for XML) parser presents each node of the XML document in sequence. So when you process one node, you must have already stored information about any relevant previous nodes, and you have no information at that time about subsequent nodes. The SAX parser uses less memory than the DOM parser and it is a suitable abstraction for documents that can be processed sequentially rather than as a whole.

By using the parse_chunk() method instead of parse(), you can even parse parts of the XML document before you have received the whole document.

As shown in the example, you should derive your own class from SaxParser and override some of the virtual methods. These "handler" methods will be called while the document is parsed.

-Example

+Example

This example shows how the handler methods are called during parsing.

Source Code

File: myparser.h diff --git a/docs/manual/html/ch02s03.html b/docs/manual/html/ch02s03.html index a0bda77..4ae82df 100644 --- a/docs/manual/html/ch02s03.html +++ b/docs/manual/html/ch02s03.html @@ -22,12 +22,12 @@

-TextReader Parser

+TextReader Parser

Like the SAX parser, the TextReader parser is suitable for sequential parsing, but instead of implementing handlers for specific parts of the document, it allows you to detect the current node type, process the node accordingly, and skip forward in the document as much as necessary. Unlike the DOM parser, you may not move backwards in the XML document. And unlike the SAX parser, you must not waste time processing nodes that do not interest you.

All methods are on the single parser instance, but their result depends on the current context. For instance, use read() to move to the next node, and move_to_element() to navigate to child nodes. These methods will return false when no more nodes are available. Then use methods such as get_name() and get_value() to examine the elements and their attributes.

-Example

+Example

This example examines each node in turn, then moves to the next node.

Source Code

File: main.cc diff --git a/docs/manual/html/chapter-introduction.html b/docs/manual/html/chapter-introduction.html index 98cff24..dbfbffd 100644 --- a/docs/manual/html/chapter-introduction.html +++ b/docs/manual/html/chapter-introduction.html @@ -28,7 +28,7 @@

Table of Contents

@@ -48,7 +48,7 @@

But libxml++ was created mainly to fill the need for an API-stable and ABI-stable C++ XML parser which could be used as a shared library dependency by C++ applications that are distributed widely in binary form. That means that installed applications will not break when new versions of libxml++ are installed on a user's computer. Gradual improvement of the libxml++ API is still possible via non-breaking API additions, and new independent versions of the ABI that can be installed in parallel with older versions. These are the general techniques and principles followed by the GNOME project, of which libxml++ is a part.

-Installation

+Installation

libxml++ is packaged by major Linux and *BSD distributions and can be installed from source on Linux and Windows, using any modern compiler, such as g++, SUN Forte, or MSVC++.

For instance, to install libxml++ and its documentation on debian, use apt-get or synaptic like so:

diff --git a/docs/manual/html/chapter-parsers.html b/docs/manual/html/chapter-parsers.html index bb3936b..372a982 100644 --- a/docs/manual/html/chapter-parsers.html +++ b/docs/manual/html/chapter-parsers.html @@ -28,7 +28,7 @@

Table of Contents

@@ -38,7 +38,7 @@

Remember that white space is usually significant in XML documents, so the parsers might provide unexpected text nodes that contain only spaces and new lines. The parser does not know whether you care about these text nodes, but your application may choose to ignore them.

-DOM Parser

+DOM Parser

The DOM (Document Object Model) parser parses the whole document at once and stores the structure in memory, available via DomParser::get_document(). With methods such as Document::get_root_node() and Node::get_children(), you may then navigate into the hierarchy of XML nodes without restriction, jumping forwards or backwards in the document based on the information that you encounter. Therefore the DOM parser uses a relatively large amount of memory.

You should use C++ RTTI (via dynamic_cast<>) to identify the specific node type and to perform actions which are not possible with all node types. For instance, only Elements have attributes. Here is the inheritance hierarchy of node types:

@@ -90,7 +90,7 @@

There are also several methods which can create new child Nodes. By using these, and one of the Document::write_*() methods, you can use libxml++ to build a new XML document.

-Example

+Example

This example looks in the document for expected elements and then examines them. All these examples are included in the libxml++ source distribution.

Source Code

File: main.cc @@ -154,10 +154,8 @@ void print_node(const xmlpp::Node* node, unsigned int indentation = 0) std::cout << indent << " line = " << node->get_line() << std::endl; //Print attributes: - const auto attributes = nodeElement->get_attributes(); - for(xmlpp::Element::AttributeList::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter) + for (const auto& attribute : nodeElement->get_attributes()) { - const auto attribute = *iter; const auto namespace_prefix = attribute->get_namespace_prefix(); std::cout << indent << " Attribute "; @@ -182,7 +180,6 @@ void print_node(const xmlpp::Node* node, unsigned int indentation = 0) if(!nodeContent) { //Recurse through child nodes: - auto list = node->get_children(); for(const auto& child : node->get_children()) { print_node(child, indentation + 2); //recursive @@ -267,7 +264,6 @@ int main(int argc, char* argv[]) return EXIT_SUCCESS; } -

diff --git a/docs/manual/html/index.html b/docs/manual/html/index.html index 879193e..9e40068 100644 --- a/docs/manual/html/index.html +++ b/docs/manual/html/index.html @@ -43,14 +43,14 @@
  • 1. libxml++
  • 2. Parsers diff --git a/docs/manual/libxml++.xml b/docs/manual/libxml++.xml index 45816dc..fc8915b 100644 --- a/docs/manual/libxml++.xml +++ b/docs/manual/libxml++.xml @@ -191,10 +191,8 @@ void print_node(const xmlpp::Node* node, unsigned int indentation = 0) std::cout << indent << " line = " << node->get_line() << std::endl; //Print attributes: - const auto attributes = nodeElement->get_attributes(); - for(xmlpp::Element::AttributeList::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter) + for (const auto& attribute : nodeElement->get_attributes()) { - const auto attribute = *iter; const auto namespace_prefix = attribute->get_namespace_prefix(); std::cout << indent << " Attribute "; @@ -219,7 +217,6 @@ void print_node(const xmlpp::Node* node, unsigned int indentation = 0) if(!nodeContent) { //Recurse through child nodes: - auto list = node->get_children(); for(const auto& child : node->get_children()) { print_node(child, indentation + 2); //recursive @@ -304,7 +301,6 @@ int main(int argc, char* argv[]) return EXIT_SUCCESS; } - diff --git a/docs/reference/html/annotated.html b/docs/reference/html/annotated.html index 00e89df..378bb68 100644 --- a/docs/reference/html/annotated.html +++ b/docs/reference/html/annotated.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -100,7 +100,7 @@ diff --git a/docs/reference/html/classes.html b/docs/reference/html/classes.html index 2fef1d7..e402669 100644 --- a/docs/reference/html/classes.html +++ b/docs/reference/html/classes.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -94,7 +94,7 @@ diff --git a/docs/reference/html/classhash__load__check__resize__trigger__size__base.html b/docs/reference/html/classhash__load__check__resize__trigger__size__base.html index 3eab743..57b66f6 100644 --- a/docs/reference/html/classhash__load__check__resize__trigger__size__base.html +++ b/docs/reference/html/classhash__load__check__resize__trigger__size__base.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -60,7 +60,7 @@ Inheritance diagram for hash_load_check_resize_trigger_size_base: diff --git a/docs/reference/html/classlu__counter__policy__base.html b/docs/reference/html/classlu__counter__policy__base.html index 2d0603c..d7a5575 100644 --- a/docs/reference/html/classlu__counter__policy__base.html +++ b/docs/reference/html/classlu__counter__policy__base.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -60,7 +60,7 @@ Inheritance diagram for lu_counter_policy_base: diff --git a/docs/reference/html/classxmlpp_1_1Attribute-members.html b/docs/reference/html/classxmlpp_1_1Attribute-members.html index ce6f998..1c8752f 100644 --- a/docs/reference/html/classxmlpp_1_1Attribute-members.html +++ b/docs/reference/html/classxmlpp_1_1Attribute-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -107,7 +107,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1Attribute.html b/docs/reference/html/classxmlpp_1_1Attribute.html index 3397ed4..9fac345 100644 --- a/docs/reference/html/classxmlpp_1_1Attribute.html +++ b/docs/reference/html/classxmlpp_1_1Attribute.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -293,7 +293,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1AttributeDeclaration-members.html b/docs/reference/html/classxmlpp_1_1AttributeDeclaration-members.html index 4fd2b21..d7d4e8e 100644 --- a/docs/reference/html/classxmlpp_1_1AttributeDeclaration-members.html +++ b/docs/reference/html/classxmlpp_1_1AttributeDeclaration-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -109,7 +109,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1AttributeDeclaration.html b/docs/reference/html/classxmlpp_1_1AttributeDeclaration.html index 229af1e..b9fc76c 100644 --- a/docs/reference/html/classxmlpp_1_1AttributeDeclaration.html +++ b/docs/reference/html/classxmlpp_1_1AttributeDeclaration.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -339,7 +339,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1AttributeNode-members.html b/docs/reference/html/classxmlpp_1_1AttributeNode-members.html index 3f51c7a..ffd0999 100644 --- a/docs/reference/html/classxmlpp_1_1AttributeNode-members.html +++ b/docs/reference/html/classxmlpp_1_1AttributeNode-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -110,7 +110,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1AttributeNode.html b/docs/reference/html/classxmlpp_1_1AttributeNode.html index 9c24b55..4b74ee6 100644 --- a/docs/reference/html/classxmlpp_1_1AttributeNode.html +++ b/docs/reference/html/classxmlpp_1_1AttributeNode.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -363,7 +363,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1CdataNode-members.html b/docs/reference/html/classxmlpp_1_1CdataNode-members.html index 47b3e66..88b1580 100644 --- a/docs/reference/html/classxmlpp_1_1CdataNode-members.html +++ b/docs/reference/html/classxmlpp_1_1CdataNode-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -111,7 +111,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1CdataNode.html b/docs/reference/html/classxmlpp_1_1CdataNode.html index cbc205f..35cd2dd 100644 --- a/docs/reference/html/classxmlpp_1_1CdataNode.html +++ b/docs/reference/html/classxmlpp_1_1CdataNode.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -274,7 +274,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1CommentNode-members.html b/docs/reference/html/classxmlpp_1_1CommentNode-members.html index 30a25c0..94aa749 100644 --- a/docs/reference/html/classxmlpp_1_1CommentNode-members.html +++ b/docs/reference/html/classxmlpp_1_1CommentNode-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -111,7 +111,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1CommentNode.html b/docs/reference/html/classxmlpp_1_1CommentNode.html index f4735f6..3c0ca86 100644 --- a/docs/reference/html/classxmlpp_1_1CommentNode.html +++ b/docs/reference/html/classxmlpp_1_1CommentNode.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -274,7 +274,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1ContentNode-members.html b/docs/reference/html/classxmlpp_1_1ContentNode-members.html index 4a13727..7b7bc81 100644 --- a/docs/reference/html/classxmlpp_1_1ContentNode-members.html +++ b/docs/reference/html/classxmlpp_1_1ContentNode-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -109,7 +109,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1ContentNode.html b/docs/reference/html/classxmlpp_1_1ContentNode.html index adf1652..9e46e1b 100644 --- a/docs/reference/html/classxmlpp_1_1ContentNode.html +++ b/docs/reference/html/classxmlpp_1_1ContentNode.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -328,7 +328,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1Document-members.html b/docs/reference/html/classxmlpp_1_1Document-members.html index 7b88bde..c789a22 100644 --- a/docs/reference/html/classxmlpp_1_1Document-members.html +++ b/docs/reference/html/classxmlpp_1_1Document-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -87,7 +87,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1Document.html b/docs/reference/html/classxmlpp_1_1Document.html index 15fed1e..8910e75 100644 --- a/docs/reference/html/classxmlpp_1_1Document.html +++ b/docs/reference/html/classxmlpp_1_1Document.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -220,7 +220,7 @@ Protected Member Functions

    Create a new C++ wrapper for an xmlDoc struct.

    The created xmlpp::Document takes ownership of the xmlDoc. When the Document is deleted, so is the xmlDoc and all its nodes.

    Parameters
    - +
    docA pointer to an xmlDoc struct. Must not be 0.
    docA pointer to an xmlDoc struct. Must not be nullptr.
    @@ -496,7 +496,7 @@ Protected Member Functions -
    Returns
    A pointer to the libxml2 entity structure, or 0 if not found.
    +
    Returns
    A pointer to the libxml2 entity structure, or nullptr if not found.
    @@ -514,7 +514,7 @@ Protected Member Functions

    Get the internal subset of this document.

    -
    Returns
    A pointer to the DTD, or 0 if not found.
    +
    Returns
    A pointer to the DTD, or nullptr if not found.
    @@ -532,7 +532,7 @@ Protected Member Functions

    Return the root node.

    -

    This function does not create a default root node if it doesn't exist.

    Returns
    A pointer to the root node if it exists, 0 otherwise.
    +

    This function does not create a default root node if it doesn't exist.

    Returns
    A pointer to the root node if it exists, nullptr otherwise.
    @@ -550,7 +550,7 @@ Protected Member Functions

    Return the root node.

    -

    This function does not create a default root node if it doesn't exist.

    Returns
    A pointer to the root node if it exists, 0 otherwise.
    +

    This function does not create a default root node if it doesn't exist.

    Returns
    A pointer to the root node if it exists, nullptr otherwise.
    @@ -932,7 +932,7 @@ Protected Member Functions diff --git a/docs/reference/html/classxmlpp_1_1DomParser-members.html b/docs/reference/html/classxmlpp_1_1DomParser-members.html index bfd83e6..5359abd 100644 --- a/docs/reference/html/classxmlpp_1_1DomParser-members.html +++ b/docs/reference/html/classxmlpp_1_1DomParser-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -68,7 +68,7 @@ doc_xmlpp::DomParserprotected DomParser()xmlpp::DomParser DomParser(const std::string& filename, bool validate=false)xmlpp::DomParserexplicit - exception_ptr_xmlpp::Parserprotected + exception_xmlpp::Parserprotected get_document()xmlpp::DomParser get_document() const xmlpp::DomParser get_include_default_attributes()xmlpp::Parser @@ -110,7 +110,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1DomParser.html b/docs/reference/html/classxmlpp_1_1DomParser.html index afeb4a3..db1bb67 100644 --- a/docs/reference/html/classxmlpp_1_1DomParser.html +++ b/docs/reference/html/classxmlpp_1_1DomParser.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -180,8 +180,8 @@ Protected Attributes - Protected Attributes inherited from xmlpp::Parser _xmlParserCtxt* context_   -std::exception_ptr exception_ptr_ -  +std::unique_ptr< exceptionexception_ +  @@ -328,7 +328,7 @@ Additional Inherited Members

    Get the parsed document.

    -
    Returns
    A pointer to the parsed document, or 0.
    +
    Returns
    A pointer to the parsed document, or nullptr.
    @@ -346,7 +346,7 @@ Additional Inherited Members

    Get the parsed document.

    -
    Returns
    A pointer to the parsed document, or 0.
    +
    Returns
    A pointer to the parsed document, or nullptr.
    @@ -618,7 +618,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1Dtd-members.html b/docs/reference/html/classxmlpp_1_1Dtd-members.html index c3c556e..3842215 100644 --- a/docs/reference/html/classxmlpp_1_1Dtd-members.html +++ b/docs/reference/html/classxmlpp_1_1Dtd-members.html @@ -19,7 +19,7 @@ @@ -79,7 +79,7 @@

    Additional Inherited Members

    libxml++ -  2.91.1 +  2.91.2
    diff --git a/docs/reference/html/classxmlpp_1_1Dtd.html b/docs/reference/html/classxmlpp_1_1Dtd.html index 7459b4b..d03289b 100644 --- a/docs/reference/html/classxmlpp_1_1Dtd.html +++ b/docs/reference/html/classxmlpp_1_1Dtd.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -537,7 +537,7 @@ Protected Member Functions diff --git a/docs/reference/html/classxmlpp_1_1DtdValidator-members.html b/docs/reference/html/classxmlpp_1_1DtdValidator-members.html index 53f8ab4..d6e8cb9 100644 --- a/docs/reference/html/classxmlpp_1_1DtdValidator-members.html +++ b/docs/reference/html/classxmlpp_1_1DtdValidator-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -65,7 +65,7 @@ DtdValidator(const std::string& filename)xmlpp::DtdValidatorexplicit DtdValidator(const Glib::ustring& external, const Glib::ustring& system)xmlpp::DtdValidatorexplicit DtdValidator(Dtd* dtd, bool take_ownership)xmlpp::DtdValidatorexplicit - exception_ptr_xmlpp::Validatorprotected + exception_xmlpp::Validatorprotected get_dtd()xmlpp::DtdValidator get_dtd() const xmlpp::DtdValidator handle_exception()xmlpp::Validatorprotectedvirtual @@ -92,7 +92,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1DtdValidator.html b/docs/reference/html/classxmlpp_1_1DtdValidator.html index d451af6..72b3363 100644 --- a/docs/reference/html/classxmlpp_1_1DtdValidator.html +++ b/docs/reference/html/classxmlpp_1_1DtdValidator.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -155,8 +155,8 @@ Additional Inherited Members static void callback_validity_warning (void* ctx, const char* msg,...)   - Protected Attributes inherited from xmlpp::Validator -std::exception_ptr exception_ptr_ -  +std::unique_ptr< exceptionexception_Glib::ustring validate_error_   Glib::ustring validate_warning_ @@ -301,7 +301,7 @@ Additional Inherited Members

    Create a validator.

    -
    Since libxml++ 3.0:
    +
    Since libxml++ 3.0:
    Parameters
    @@ -351,7 +351,7 @@ Additional Inherited Members

    Get the parsed DTD.

    -
    Returns
    A pointer to the parsed DTD, or 0.
    +
    Returns
    A pointer to the parsed DTD, or nullptr.
    @@ -369,7 +369,7 @@ Additional Inherited Members

    Get the parsed DTD.

    -
    Returns
    A pointer to the parsed DTD, or 0.
    +
    Returns
    A pointer to the parsed DTD, or nullptr.
    @@ -683,7 +683,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1Element-members.html b/docs/reference/html/classxmlpp_1_1Element-members.html index beee791..5c83a3c 100644 --- a/docs/reference/html/classxmlpp_1_1Element-members.html +++ b/docs/reference/html/classxmlpp_1_1Element-members.html @@ -19,7 +19,7 @@ @@ -133,7 +133,7 @@
    dtdA pointer to the DTD to use when validating XML documents.
    libxml++ -  2.91.1 +  2.91.2
    diff --git a/docs/reference/html/classxmlpp_1_1Element.html b/docs/reference/html/classxmlpp_1_1Element.html index d9c71a0..667f975 100644 --- a/docs/reference/html/classxmlpp_1_1Element.html +++ b/docs/reference/html/classxmlpp_1_1Element.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -454,7 +454,7 @@ Additional Inherited Members

    Add a child element to this node.

    -
    Since libxml++ 3.0:
    Replaces Node::add_child()
    +
    Since libxml++ 3.0:
    Replaces Node::add_child()
    Parameters
    @@ -504,7 +504,7 @@ Additional Inherited Members

    Add a child element to this node after the specified existing child node.

    -
    Since libxml++ 3.0:
    Replaces Node::add_child()
    +
    Since libxml++ 3.0:
    Replaces Node::add_child()
    Parameters
    nameThe new node name
    @@ -555,7 +555,7 @@ Additional Inherited Members

    Add a child element to this node before the specified existing child node.

    -
    Since libxml++ 3.0:
    Replaces Node::add_child_before()
    +
    Since libxml++ 3.0:
    Replaces Node::add_child_before()
    Parameters
    previous_siblingAn existing child node.
    @@ -612,7 +612,7 @@ Additional Inherited Members

    Add a child element to this node before the specified existing child node.

    -
    Since libxml++ 3.0:
    Replaces Node::add_child_before_with_new_ns()
    +
    Since libxml++ 3.0:
    Replaces Node::add_child_before_with_new_ns()
    Parameters
    next_siblingAn existing child node.
    @@ -663,7 +663,7 @@ Additional Inherited Members

    Add a child element to this node.

    -
    Since libxml++ 3.0:
    Replaces Node::add_child_with_new_ns()
    +
    Since libxml++ 3.0:
    Replaces Node::add_child_with_new_ns()
    Parameters
    next_siblingAn existing child node.
    @@ -719,7 +719,7 @@ Additional Inherited Members

    Add a child element to this node after the specified existing child node.

    -
    Since libxml++ 3.0:
    Replaces Node::add_child_with_new_ns()
    +
    Since libxml++ 3.0:
    Replaces Node::add_child_with_new_ns()
    Parameters
    nameThe new node name.
    @@ -965,7 +965,7 @@ Additional Inherited Members
    previous_siblingAn existing child node.
    -
    Returns
    The attribute, or 0 if no suitable Attribute was found. Is either an AttributeNode*, pointing to an explicitly set attribute, or an AttributeDeclaration*, pointing to the declaration of an attribute with a default value.
    +
    Returns
    The attribute, or nullptr if no suitable Attribute was found. Is either an AttributeNode*, pointing to an explicitly set attribute, or an AttributeDeclaration*, pointing to the declaration of an attribute with a default value.
    @@ -1001,7 +1001,7 @@ Additional Inherited Members -
    Returns
    The attribute, or 0 if no suitable Attribute was found. Is either an AttributeNode*, pointing to an explicitly set attribute, or an AttributeDeclaration*, pointing to the declaration of an attribute with a default value.
    +
    Returns
    The attribute, or nullptr if no suitable Attribute was found. Is either an AttributeNode*, pointing to an explicitly set attribute, or an AttributeDeclaration*, pointing to the declaration of an attribute with a default value.
    @@ -1093,7 +1093,7 @@ Additional Inherited Members

    Get the first child text content node.

    This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node and then getting the text directly.

    Returns
    The first text node, if any.
    -
    Since libxml++ 3.0:
    Replaces get_child_text().
    +
    Since libxml++ 3.0:
    Replaces get_child_text().
    @@ -1112,7 +1112,7 @@ Additional Inherited Members

    Get the first child text content node.

    This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node and then getting the text directly.

    Returns
    The first text node, if any.
    -
    Since libxml++ 3.0:
    Replaces get_child_text().
    +
    Since libxml++ 3.0:
    Replaces get_child_text().
    @@ -1208,7 +1208,7 @@ Additional Inherited Members -
    Returns
    The attribute that was changed, or 0 is no suitable Attribute was found.
    +
    Returns
    The attribute that was changed, or nullptr is no suitable Attribute was found.
    Exceptions
    @@ -1245,7 +1245,7 @@ Additional Inherited Members
    xmlpp::exception
    -
    Since libxml++ 3.0:
    Replaces set_child_text().
    +
    Since libxml++ 3.0:
    Replaces set_child_text().
    @@ -1294,7 +1294,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1EntityDeclaration-members.html b/docs/reference/html/classxmlpp_1_1EntityDeclaration-members.html index 4a60131..c951352 100644 --- a/docs/reference/html/classxmlpp_1_1EntityDeclaration-members.html +++ b/docs/reference/html/classxmlpp_1_1EntityDeclaration-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -113,7 +113,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1EntityDeclaration.html b/docs/reference/html/classxmlpp_1_1EntityDeclaration.html index 9c8f099..49f1d72 100644 --- a/docs/reference/html/classxmlpp_1_1EntityDeclaration.html +++ b/docs/reference/html/classxmlpp_1_1EntityDeclaration.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -358,7 +358,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1EntityReference-members.html b/docs/reference/html/classxmlpp_1_1EntityReference-members.html index 5b37459..18e07ca 100644 --- a/docs/reference/html/classxmlpp_1_1EntityReference-members.html +++ b/docs/reference/html/classxmlpp_1_1EntityReference-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -108,7 +108,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1EntityReference.html b/docs/reference/html/classxmlpp_1_1EntityReference.html index b82ec59..12eb186 100644 --- a/docs/reference/html/classxmlpp_1_1EntityReference.html +++ b/docs/reference/html/classxmlpp_1_1EntityReference.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -304,7 +304,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1IStreamParserInputBuffer-members.html b/docs/reference/html/classxmlpp_1_1IStreamParserInputBuffer-members.html index e8aa357..efb83d5 100644 --- a/docs/reference/html/classxmlpp_1_1IStreamParserInputBuffer-members.html +++ b/docs/reference/html/classxmlpp_1_1IStreamParserInputBuffer-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -70,7 +70,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1IStreamParserInputBuffer.html b/docs/reference/html/classxmlpp_1_1IStreamParserInputBuffer.html index 460ef97..f3d2ca2 100644 --- a/docs/reference/html/classxmlpp_1_1IStreamParserInputBuffer.html +++ b/docs/reference/html/classxmlpp_1_1IStreamParserInputBuffer.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -146,7 +146,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1KeepBlanks-members.html b/docs/reference/html/classxmlpp_1_1KeepBlanks-members.html index 075c8d5..25a4200 100644 --- a/docs/reference/html/classxmlpp_1_1KeepBlanks-members.html +++ b/docs/reference/html/classxmlpp_1_1KeepBlanks-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -63,7 +63,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1KeepBlanks.html b/docs/reference/html/classxmlpp_1_1KeepBlanks.html index 949f955..ec882d0 100644 --- a/docs/reference/html/classxmlpp_1_1KeepBlanks.html +++ b/docs/reference/html/classxmlpp_1_1KeepBlanks.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -135,7 +135,7 @@ Static Public Attributes diff --git a/docs/reference/html/classxmlpp_1_1Node-members.html b/docs/reference/html/classxmlpp_1_1Node-members.html index fb15ccc..eb2eb35 100644 --- a/docs/reference/html/classxmlpp_1_1Node-members.html +++ b/docs/reference/html/classxmlpp_1_1Node-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -104,7 +104,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1Node.html b/docs/reference/html/classxmlpp_1_1Node.html index 8491028..7db8fdb 100644 --- a/docs/reference/html/classxmlpp_1_1Node.html +++ b/docs/reference/html/classxmlpp_1_1Node.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -298,7 +298,7 @@ Additional Inherited Members
    Exceptions
    - +
    xmlpp::internal_errorIf node is 0.
    xmlpp::internal_errorIf node is nullptr.
    @@ -427,7 +427,7 @@ Additional Inherited Members
    Parameters
    - +
    xpathThe XPath expression.
    [out]result_typeResult type of the XPath expression before conversion to boolean. If 0, the result type is not returned.
    [out]result_typeResult type of the XPath expression before conversion to boolean. If nullptr, the result type is not returned.
    @@ -478,7 +478,7 @@ Additional Inherited Members - +
    xpathThe XPath expression.
    namespacesA map of namespace prefixes to namespace URIs to be used while evaluating.
    [out]result_typeResult type of the XPath expression before conversion to boolean. If 0, the result type is not returned.
    [out]result_typeResult type of the XPath expression before conversion to boolean. If nullptr, the result type is not returned.
    @@ -522,7 +522,7 @@ Additional Inherited Members
    Parameters
    - +
    xpathThe XPath expression.
    [out]result_typeResult type of the XPath expression before conversion to number. If 0, the result type is not returned.
    [out]result_typeResult type of the XPath expression before conversion to number. If nullptr, the result type is not returned.
    @@ -573,7 +573,7 @@ Additional Inherited Members - +
    xpathThe XPath expression.
    namespacesA map of namespace prefixes to namespace URIs to be used while evaluating.
    [out]result_typeResult type of the XPath expression before conversion to number. If 0, the result type is not returned.
    [out]result_typeResult type of the XPath expression before conversion to number. If nullptr, the result type is not returned.
    @@ -617,7 +617,7 @@ Additional Inherited Members
    Parameters
    - +
    xpathThe XPath expression.
    [out]result_typeResult type of the XPath expression before conversion to string. If 0, the result type is not returned.
    [out]result_typeResult type of the XPath expression before conversion to string. If nullptr, the result type is not returned.
    @@ -668,7 +668,7 @@ Additional Inherited Members - +
    xpathThe XPath expression.
    namespacesA map of namespace prefixes to namespace URIs to be used while evaluating.
    [out]result_typeResult type of the XPath expression before conversion to string. If 0, the result type is not returned.
    [out]result_typeResult type of the XPath expression before conversion to string. If nullptr, the result type is not returned.
    @@ -937,7 +937,7 @@ Additional Inherited Members -
    Returns
    The first child, or 0 if no child node (with the specified name) exists.
    +
    Returns
    The first child, or nullptr if no child node (with the specified name) exists.
    Since libxml++ 2.36:
    @@ -963,7 +963,7 @@ Additional Inherited Members -
    Returns
    The first child, or 0 if no child node (with the specified name) exists.
    +
    Returns
    The first child, or nullptr if no child node (with the specified name) exists.
    Since libxml++ 2.36:
    @@ -1054,7 +1054,7 @@ Additional Inherited Members

    Get the next sibling for this node.

    -
    Returns
    The next sibling, or 0 if the node has no next sibling.
    +
    Returns
    The next sibling, or nullptr if the node has no next sibling.
    @@ -1072,7 +1072,7 @@ Additional Inherited Members

    Get the next sibling for this node.

    -
    Returns
    The next sibling, or 0 if the node has no next sibling.
    +
    Returns
    The next sibling, or nullptr if the node has no next sibling.
    @@ -1090,7 +1090,7 @@ Additional Inherited Members

    Get the parent element for this node.

    -
    Returns
    The parent node, or 0 if the node has no parent element.
    +
    Returns
    The parent node, or nullptr if the node has no parent element.
    @@ -1108,7 +1108,7 @@ Additional Inherited Members

    Get the parent element for this node.

    -
    Returns
    The parent node, or 0 if the node has no parent element.
    +
    Returns
    The parent node, or nullptr if the node has no parent element.
    @@ -1144,7 +1144,7 @@ Additional Inherited Members

    Get the previous sibling for this node .

    -
    Returns
    The previous sibling, or 0 if the node has no previous sibling.
    +
    Returns
    The previous sibling, or nullptr if the node has no previous sibling.
    @@ -1162,7 +1162,7 @@ Additional Inherited Members

    Get the previous sibling for this node.

    -
    Returns
    The previous sibling, or 0 if the node has no previous sibling.
    +
    Returns
    The previous sibling, or nullptr if the node has no previous sibling.
    @@ -1233,7 +1233,7 @@ Additional Inherited Members

    Remove a node and its children.

    The node is disconnected from its parent. The underlying libxml xmlNode instances are also removed.

    -
    Since libxml++ 3.0:
    Replaces remove_child()
    +
    Since libxml++ 3.0:
    Replaces remove_child()
    Parameters
    @@ -1300,7 +1300,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1NonCopyable-members.html b/docs/reference/html/classxmlpp_1_1NonCopyable-members.html index 1591b1d..26502ae 100644 --- a/docs/reference/html/classxmlpp_1_1NonCopyable-members.html +++ b/docs/reference/html/classxmlpp_1_1NonCopyable-members.html @@ -19,7 +19,7 @@ @@ -64,7 +64,7 @@
    nodeThe node to remove. This Node and all its descendants will be deleted and therefore unusable after calling this method.
    libxml++ -  2.91.1 +  2.91.2
    diff --git a/docs/reference/html/classxmlpp_1_1NonCopyable.html b/docs/reference/html/classxmlpp_1_1NonCopyable.html index ca6ecd0..9e4bbfa 100644 --- a/docs/reference/html/classxmlpp_1_1NonCopyable.html +++ b/docs/reference/html/classxmlpp_1_1NonCopyable.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -182,7 +182,7 @@ Protected Member Functions diff --git a/docs/reference/html/classxmlpp_1_1OStreamOutputBuffer-members.html b/docs/reference/html/classxmlpp_1_1OStreamOutputBuffer-members.html index 83bea7e..768bdc8 100644 --- a/docs/reference/html/classxmlpp_1_1OStreamOutputBuffer-members.html +++ b/docs/reference/html/classxmlpp_1_1OStreamOutputBuffer-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -70,7 +70,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1OStreamOutputBuffer.html b/docs/reference/html/classxmlpp_1_1OStreamOutputBuffer.html index edd156b..b73f6da 100644 --- a/docs/reference/html/classxmlpp_1_1OStreamOutputBuffer.html +++ b/docs/reference/html/classxmlpp_1_1OStreamOutputBuffer.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -162,7 +162,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1OutputBuffer-members.html b/docs/reference/html/classxmlpp_1_1OutputBuffer-members.html index ee9d1d4..733b18c 100644 --- a/docs/reference/html/classxmlpp_1_1OutputBuffer-members.html +++ b/docs/reference/html/classxmlpp_1_1OutputBuffer-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -68,7 +68,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1OutputBuffer.html b/docs/reference/html/classxmlpp_1_1OutputBuffer.html index c826400..8887248 100644 --- a/docs/reference/html/classxmlpp_1_1OutputBuffer.html +++ b/docs/reference/html/classxmlpp_1_1OutputBuffer.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -183,7 +183,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1Parser-members.html b/docs/reference/html/classxmlpp_1_1Parser-members.html index 3096af8..a891a47 100644 --- a/docs/reference/html/classxmlpp_1_1Parser-members.html +++ b/docs/reference/html/classxmlpp_1_1Parser-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -65,7 +65,7 @@ check_for_error_and_warning_messages()xmlpp::Parserprotectedvirtual check_for_exception()xmlpp::Parserprotectedvirtual context_xmlpp::Parserprotected - exception_ptr_xmlpp::Parserprotected + exception_xmlpp::Parserprotected get_include_default_attributes()xmlpp::Parser get_parser_options(int& set_options, int& clear_options)xmlpp::Parser get_substitute_entities() const xmlpp::Parser @@ -102,7 +102,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1Parser.html b/docs/reference/html/classxmlpp_1_1Parser.html index ed2846a..c450f6d 100644 --- a/docs/reference/html/classxmlpp_1_1Parser.html +++ b/docs/reference/html/classxmlpp_1_1Parser.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -191,8 +191,8 @@ Static Protected Member Functions Protected Attributes _xmlParserCtxt* context_   -std::exception_ptr exception_ptr_ -  +std::unique_ptr< exceptionexception_

    Detailed Description

    XML parser.

    @@ -1151,7 +1151,7 @@ Protected Attributes
    - +
    @@ -1159,7 +1159,7 @@ Protected Attributes @@ -1174,7 +1174,7 @@ Protected Attributes diff --git a/docs/reference/html/classxmlpp_1_1ParserInputBuffer-members.html b/docs/reference/html/classxmlpp_1_1ParserInputBuffer-members.html index c87a566..47190fd 100644 --- a/docs/reference/html/classxmlpp_1_1ParserInputBuffer-members.html +++ b/docs/reference/html/classxmlpp_1_1ParserInputBuffer-members.html @@ -19,7 +19,7 @@ @@ -68,7 +68,7 @@
    - +
    std::exception_ptr xmlpp::Parser::exception_ptr_std::unique_ptr<exception> xmlpp::Parser::exception_
    libxml++ -  2.91.1 +  2.91.2
    diff --git a/docs/reference/html/classxmlpp_1_1ParserInputBuffer.html b/docs/reference/html/classxmlpp_1_1ParserInputBuffer.html index 72eafcc..fafa5f7 100644 --- a/docs/reference/html/classxmlpp_1_1ParserInputBuffer.html +++ b/docs/reference/html/classxmlpp_1_1ParserInputBuffer.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -175,7 +175,7 @@ Additional Inherited Members
    diff --git a/docs/reference/html/classxmlpp_1_1ProcessingInstructionNode-members.html b/docs/reference/html/classxmlpp_1_1ProcessingInstructionNode-members.html index fefaf4f..1b87aa2 100644 --- a/docs/reference/html/classxmlpp_1_1ProcessingInstructionNode-members.html +++ b/docs/reference/html/classxmlpp_1_1ProcessingInstructionNode-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -111,7 +111,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1ProcessingInstructionNode.html b/docs/reference/html/classxmlpp_1_1ProcessingInstructionNode.html index e2b9f42..8c86366 100644 --- a/docs/reference/html/classxmlpp_1_1ProcessingInstructionNode.html +++ b/docs/reference/html/classxmlpp_1_1ProcessingInstructionNode.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -268,7 +268,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1RelaxNGSchema-members.html b/docs/reference/html/classxmlpp_1_1RelaxNGSchema-members.html index 7415734..655395f 100644 --- a/docs/reference/html/classxmlpp_1_1RelaxNGSchema-members.html +++ b/docs/reference/html/classxmlpp_1_1RelaxNGSchema-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -78,7 +78,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1RelaxNGSchema.html b/docs/reference/html/classxmlpp_1_1RelaxNGSchema.html index d73ae26..2caeee1 100644 --- a/docs/reference/html/classxmlpp_1_1RelaxNGSchema.html +++ b/docs/reference/html/classxmlpp_1_1RelaxNGSchema.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -481,7 +481,7 @@ Protected Member Functions diff --git a/docs/reference/html/classxmlpp_1_1RelaxNGValidator-members.html b/docs/reference/html/classxmlpp_1_1RelaxNGValidator-members.html index b9d4ab7..ebae634 100644 --- a/docs/reference/html/classxmlpp_1_1RelaxNGValidator-members.html +++ b/docs/reference/html/classxmlpp_1_1RelaxNGValidator-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -61,7 +61,7 @@ callback_validity_warning(void* ctx, const char* msg,...)xmlpp::Validatorprotectedstatic check_for_exception()xmlpp::Validatorprotectedvirtual check_for_validity_messages()xmlpp::Validatorprotectedvirtual - exception_ptr_xmlpp::Validatorprotected + exception_xmlpp::Validatorprotected get_schema()xmlpp::RelaxNGValidator get_schema() const xmlpp::RelaxNGValidator handle_exception()xmlpp::Validatorprotectedvirtual @@ -94,7 +94,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1RelaxNGValidator.html b/docs/reference/html/classxmlpp_1_1RelaxNGValidator.html index 3355b1f..b8a8f0d 100644 --- a/docs/reference/html/classxmlpp_1_1RelaxNGValidator.html +++ b/docs/reference/html/classxmlpp_1_1RelaxNGValidator.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -165,8 +165,8 @@ Additional Inherited Members static void callback_validity_warning (void* ctx, const char* msg,...)   - Protected Attributes inherited from xmlpp::Validator -std::exception_ptr exception_ptr_ -  +std::unique_ptr< exceptionexception_Glib::ustring validate_error_   Glib::ustring validate_warning_ @@ -350,7 +350,7 @@ Additional Inherited Members

    Get the schema.

    -
    Returns
    A pointer to the schema, or 0.
    +
    Returns
    A pointer to the schema, or nullptr.
    @@ -368,7 +368,7 @@ Additional Inherited Members

    Get the schema.

    -
    Returns
    A pointer to the schema, or 0.
    +
    Returns
    A pointer to the schema, or nullptr.
    @@ -695,7 +695,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1SaxParser-members.html b/docs/reference/html/classxmlpp_1_1SaxParser-members.html index 60551cb..f312057 100644 --- a/docs/reference/html/classxmlpp_1_1SaxParser-members.html +++ b/docs/reference/html/classxmlpp_1_1SaxParser-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -66,7 +66,7 @@ check_for_error_and_warning_messages()xmlpp::Parserprotectedvirtual check_for_exception()xmlpp::Parserprotectedvirtual context_xmlpp::Parserprotected - exception_ptr_xmlpp::Parserprotected + exception_xmlpp::Parserprotected finish_chunk_parsing()xmlpp::SaxParser get_include_default_attributes()xmlpp::Parser get_parser_options(int& set_options, int& clear_options)xmlpp::Parser @@ -121,7 +121,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1SaxParser.html b/docs/reference/html/classxmlpp_1_1SaxParser.html index 1acc65f..c30bacb 100644 --- a/docs/reference/html/classxmlpp_1_1SaxParser.html +++ b/docs/reference/html/classxmlpp_1_1SaxParser.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -242,12 +242,13 @@ Additional Inherited Members - Protected Attributes inherited from xmlpp::Parser _xmlParserCtxt* context_   -std::exception_ptr exception_ptr_ -  +std::unique_ptr< exceptionexception_

    Detailed Description

    SAX XML parser.

    -

    Derive your own class and override the on_*() methods. SAX = Simple API for XML

    +

    Derive your own class and override the on_*() methods. SAX = Simple API for XML

    +

    In a system that does not support std::exception_ptr: If an overridden on_*() method throws an exception which is not derived from xmlpp::exception, that exception is replaced by a xmlpp::exception before it is propagated out of the parse method, such as parse_file().

    Member Typedef Documentation

    @@ -625,7 +626,7 @@ Additional Inherited Members
    -
    Returns
    The resolved xmlEntity for the entity reference, or 0 if not found. You must include libxml/parser.h in order to use this C struct. This instance will not be freed by the caller.
    +
    Returns
    The resolved xmlEntity for the entity reference, or nullptr if not found. You must include libxml/parser.h in order to use this C struct. This instance will not be freed by the caller.
    @@ -1039,7 +1040,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1SchemaBase-members.html b/docs/reference/html/classxmlpp_1_1SchemaBase-members.html index 6ffd2a1..085ca17 100644 --- a/docs/reference/html/classxmlpp_1_1SchemaBase-members.html +++ b/docs/reference/html/classxmlpp_1_1SchemaBase-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -69,7 +69,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1SchemaBase.html b/docs/reference/html/classxmlpp_1_1SchemaBase.html index 3051a1d..2facd00 100644 --- a/docs/reference/html/classxmlpp_1_1SchemaBase.html +++ b/docs/reference/html/classxmlpp_1_1SchemaBase.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -264,7 +264,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1SchemaValidatorBase-members.html b/docs/reference/html/classxmlpp_1_1SchemaValidatorBase-members.html index 9aa7eaa..f3630f1 100644 --- a/docs/reference/html/classxmlpp_1_1SchemaValidatorBase-members.html +++ b/docs/reference/html/classxmlpp_1_1SchemaValidatorBase-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -61,7 +61,7 @@ callback_validity_warning(void* ctx, const char* msg,...)xmlpp::Validatorprotectedstatic check_for_exception()xmlpp::Validatorprotectedvirtual check_for_validity_messages()xmlpp::Validatorprotectedvirtual - exception_ptr_xmlpp::Validatorprotected + exception_xmlpp::Validatorprotected handle_exception()xmlpp::Validatorprotectedvirtual initialize_context() overridexmlpp::SchemaValidatorBaseprotectedvirtual NonCopyable()xmlpp::NonCopyableprotected @@ -86,7 +86,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1SchemaValidatorBase.html b/docs/reference/html/classxmlpp_1_1SchemaValidatorBase.html index 6677f7e..21c2b33 100644 --- a/docs/reference/html/classxmlpp_1_1SchemaValidatorBase.html +++ b/docs/reference/html/classxmlpp_1_1SchemaValidatorBase.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -137,8 +137,8 @@ Additional Inherited Members static void callback_validity_warning (void* ctx, const char* msg,...)   - Protected Attributes inherited from xmlpp::Validator -std::exception_ptr exception_ptr_ -  +std::unique_ptr< exceptionexception_Glib::ustring validate_error_   Glib::ustring validate_warning_ @@ -484,7 +484,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1TextNode-members.html b/docs/reference/html/classxmlpp_1_1TextNode-members.html index c0d165b..e226a3b 100644 --- a/docs/reference/html/classxmlpp_1_1TextNode-members.html +++ b/docs/reference/html/classxmlpp_1_1TextNode-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -111,7 +111,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1TextNode.html b/docs/reference/html/classxmlpp_1_1TextNode.html index 2a921e7..80e6c6a 100644 --- a/docs/reference/html/classxmlpp_1_1TextNode.html +++ b/docs/reference/html/classxmlpp_1_1TextNode.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -274,7 +274,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1TextReader-members.html b/docs/reference/html/classxmlpp_1_1TextReader-members.html index a955906..8855ed6 100644 --- a/docs/reference/html/classxmlpp_1_1TextReader-members.html +++ b/docs/reference/html/classxmlpp_1_1TextReader-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -137,11 +137,11 @@ xmlNodeType enum namexmlpp::TextReader xmlReadState enum namexmlpp::TextReader ~NonCopyable()xmlpp::NonCopyableprotectedvirtual - ~TextReader()xmlpp::TextReader + ~TextReader() overridexmlpp::TextReader diff --git a/docs/reference/html/classxmlpp_1_1TextReader.html b/docs/reference/html/classxmlpp_1_1TextReader.html index 47cf1a4..eaccb74 100644 --- a/docs/reference/html/classxmlpp_1_1TextReader.html +++ b/docs/reference/html/classxmlpp_1_1TextReader.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -152,8 +152,8 @@ Public Member Functions  TextReader (const unsigned char* data, size_type size, const Glib::ustring& uri=Glib::ustring())  Creates a new TextReader object which parses in memory data. More...
      - ~TextReader () -  + ~TextReader () override +  void close ()   Nodeexpand () @@ -485,9 +485,12 @@ Additional Inherited Members - +
    + + + + + +
    @@ -496,6 +499,11 @@ Additional Inherited Members
    xmlpp::TextReader::~TextReader
    +
    +override
    @@ -531,7 +539,7 @@ Additional Inherited Members

    Expand the current node.

    Reads the contents of the current node and the full subtree. It then makes the subtree available until the next call to read() or next().

    Warning
    The C++ wrappers are not deleted. Using this method causes memory leaks, unless you call xmlpp::Node::free_wrappers(), which is not intended to be called by the application.
    -
    Returns
    A pointer to the current node, or 0 in case of error.
    +
    Returns
    A pointer to the current node, or nullptr in case of error.
    Exceptions
    @@ -658,7 +666,7 @@ Additional Inherited Members

    Get a pointer to the current node.

    Warning
    This is dangerous because the underlying node may be destroyed on the next read. The C++ wrapper is not deleted. Using this method causes memory leaks, unless you call xmlpp::Node::free_wrappers(), which is not intended to be called by the application.
    -
    Returns
    A pointer to the current node, or 0 in case of error.
    +
    Returns
    A pointer to the current node, or nullptr in case of error.
    @@ -677,7 +685,7 @@ Additional Inherited Members

    Get a pointer to the current node.

    Warning
    See the non-const get_current_node().
    -
    Returns
    A pointer to the current node, or 0 in case of error.
    +
    Returns
    A pointer to the current node, or nullptr in case of error.
    @@ -1265,7 +1273,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1Validator-members.html b/docs/reference/html/classxmlpp_1_1Validator-members.html index 4a60c7d..a10afb0 100644 --- a/docs/reference/html/classxmlpp_1_1Validator-members.html +++ b/docs/reference/html/classxmlpp_1_1Validator-members.html @@ -19,7 +19,7 @@ @@ -61,7 +61,7 @@ - + @@ -82,7 +82,7 @@
    xmlpp::parse_error
    libxml++ -  2.91.1 +  2.91.2
    callback_validity_warning(void* ctx, const char* msg,...)xmlpp::Validatorprotectedstatic
    check_for_exception()xmlpp::Validatorprotectedvirtual
    check_for_validity_messages()xmlpp::Validatorprotectedvirtual
    exception_ptr_xmlpp::Validatorprotected
    exception_xmlpp::Validatorprotected
    handle_exception()xmlpp::Validatorprotectedvirtual
    initialize_context()xmlpp::Validatorprotectedvirtual
    NonCopyable()xmlpp::NonCopyableprotected
    diff --git a/docs/reference/html/classxmlpp_1_1Validator.html b/docs/reference/html/classxmlpp_1_1Validator.html index 60ab6fc..c8184d1 100644 --- a/docs/reference/html/classxmlpp_1_1Validator.html +++ b/docs/reference/html/classxmlpp_1_1Validator.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -128,8 +128,8 @@ Static Protected Member Functions - - + + @@ -577,7 +577,7 @@ Protected Attributes

    Member Data Documentation

    - +

    Protected Attributes

    std::exception_ptr exception_ptr_
     
    std::unique_ptr< exceptionexception_
     
    Glib::ustring validate_error_
     
    Glib::ustring validate_warning_
    @@ -585,7 +585,7 @@ Protected Attributes @@ -640,7 +640,7 @@ Protected Attributes diff --git a/docs/reference/html/classxmlpp_1_1XIncludeEnd-members.html b/docs/reference/html/classxmlpp_1_1XIncludeEnd-members.html index be550a0..f578e04 100644 --- a/docs/reference/html/classxmlpp_1_1XIncludeEnd-members.html +++ b/docs/reference/html/classxmlpp_1_1XIncludeEnd-members.html @@ -19,7 +19,7 @@ @@ -106,7 +106,7 @@
    - +
    std::exception_ptr xmlpp::Validator::exception_ptr_std::unique_ptr<exception> xmlpp::Validator::exception_
    libxml++ -  2.91.1 +  2.91.2
    diff --git a/docs/reference/html/classxmlpp_1_1XIncludeEnd.html b/docs/reference/html/classxmlpp_1_1XIncludeEnd.html index 8657bb1..d300156 100644 --- a/docs/reference/html/classxmlpp_1_1XIncludeEnd.html +++ b/docs/reference/html/classxmlpp_1_1XIncludeEnd.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -262,7 +262,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1XIncludeStart-members.html b/docs/reference/html/classxmlpp_1_1XIncludeStart-members.html index c902525..45d0e69 100644 --- a/docs/reference/html/classxmlpp_1_1XIncludeStart-members.html +++ b/docs/reference/html/classxmlpp_1_1XIncludeStart-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -106,7 +106,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1XIncludeStart.html b/docs/reference/html/classxmlpp_1_1XIncludeStart.html index c4ebee9..dedc817 100644 --- a/docs/reference/html/classxmlpp_1_1XIncludeStart.html +++ b/docs/reference/html/classxmlpp_1_1XIncludeStart.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -262,7 +262,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1XsdSchema-members.html b/docs/reference/html/classxmlpp_1_1XsdSchema-members.html index 980b237..b271f06 100644 --- a/docs/reference/html/classxmlpp_1_1XsdSchema-members.html +++ b/docs/reference/html/classxmlpp_1_1XsdSchema-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -78,7 +78,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1XsdSchema.html b/docs/reference/html/classxmlpp_1_1XsdSchema.html index 133e7c0..ae20b7f 100644 --- a/docs/reference/html/classxmlpp_1_1XsdSchema.html +++ b/docs/reference/html/classxmlpp_1_1XsdSchema.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -479,7 +479,7 @@ Protected Member Functions diff --git a/docs/reference/html/classxmlpp_1_1XsdValidator-members.html b/docs/reference/html/classxmlpp_1_1XsdValidator-members.html index a7929f6..93a63bd 100644 --- a/docs/reference/html/classxmlpp_1_1XsdValidator-members.html +++ b/docs/reference/html/classxmlpp_1_1XsdValidator-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -61,7 +61,7 @@ callback_validity_warning(void* ctx, const char* msg,...)xmlpp::Validatorprotectedstatic check_for_exception()xmlpp::Validatorprotectedvirtual check_for_validity_messages()xmlpp::Validatorprotectedvirtual - exception_ptr_xmlpp::Validatorprotected + exception_xmlpp::Validatorprotected get_schema()xmlpp::XsdValidator get_schema() const xmlpp::XsdValidator handle_exception()xmlpp::Validatorprotectedvirtual @@ -94,7 +94,7 @@ diff --git a/docs/reference/html/classxmlpp_1_1XsdValidator.html b/docs/reference/html/classxmlpp_1_1XsdValidator.html index ca51375..46e4cc8 100644 --- a/docs/reference/html/classxmlpp_1_1XsdValidator.html +++ b/docs/reference/html/classxmlpp_1_1XsdValidator.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -160,8 +160,8 @@ Additional Inherited Members static void callback_validity_warning (void* ctx, const char* msg,...)   - Protected Attributes inherited from xmlpp::Validator -std::exception_ptr exception_ptr_ -  +std::unique_ptr< exceptionexception_Glib::ustring validate_error_   Glib::ustring validate_warning_ @@ -345,7 +345,7 @@ Additional Inherited Members

    Get the schema.

    -
    Returns
    A pointer to the schema, or 0.
    +
    Returns
    A pointer to the schema, or nullptr.
    @@ -363,7 +363,7 @@ Additional Inherited Members

    Get the schema.

    -
    Returns
    A pointer to the schema, or 0.
    +
    Returns
    A pointer to the schema, or nullptr.
    @@ -687,7 +687,7 @@ Additional Inherited Members diff --git a/docs/reference/html/classxmlpp_1_1exception-members.html b/docs/reference/html/classxmlpp_1_1exception-members.html index ae373ca..ee51528 100644 --- a/docs/reference/html/classxmlpp_1_1exception-members.html +++ b/docs/reference/html/classxmlpp_1_1exception-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -57,13 +57,15 @@

    This is the complete list of members for xmlpp::exception, including all inherited members.

    - + + +
    exception(const Glib::ustring& message)xmlpp::exceptionexplicit
    clone() const xmlpp::exceptionvirtual
    exception(const Glib::ustring& message)xmlpp::exceptionexplicit
    raise() const xmlpp::exceptionvirtual
    what() const noexceptoverridexmlpp::exception
    ~exception() noexceptoverridexmlpp::exception
    diff --git a/docs/reference/html/classxmlpp_1_1exception.html b/docs/reference/html/classxmlpp_1_1exception.html index 3cbdc97..4dfb48e 100644 --- a/docs/reference/html/classxmlpp_1_1exception.html +++ b/docs/reference/html/classxmlpp_1_1exception.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -76,6 +76,10 @@ Public Member Functions    ~exception () noexceptoverride   +virtual exceptionclone () const +  +virtual void raise () const +  const char* what () const noexceptoverride   @@ -130,6 +134,56 @@ Public Member Functions

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    virtual exception* xmlpp::exception::clone () const
    +
    +virtual
    +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    virtual void xmlpp::exception::raise () const
    +
    +virtual
    +
    +
    @@ -156,7 +210,7 @@ Public Member Functions
    diff --git a/docs/reference/html/classxmlpp_1_1internal__error-members.html b/docs/reference/html/classxmlpp_1_1internal__error-members.html index 936673c..4aaa69e 100644 --- a/docs/reference/html/classxmlpp_1_1internal__error-members.html +++ b/docs/reference/html/classxmlpp_1_1internal__error-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -57,15 +57,17 @@

    This is the complete list of members for xmlpp::internal_error, including all inherited members.

    - - + + + +
    exception(const Glib::ustring& message)xmlpp::exceptionexplicit
    internal_error(const Glib::ustring& message)xmlpp::internal_errorexplicit
    clone() const overridexmlpp::internal_errorvirtual
    exception(const Glib::ustring& message)xmlpp::exceptionexplicit
    internal_error(const Glib::ustring& message)xmlpp::internal_errorexplicit
    raise() const overridexmlpp::internal_errorvirtual
    what() const noexceptoverridexmlpp::exception
    ~exception() noexceptoverridexmlpp::exception
    ~internal_error() noexceptoverridexmlpp::internal_error
    diff --git a/docs/reference/html/classxmlpp_1_1internal__error.html b/docs/reference/html/classxmlpp_1_1internal__error.html index 13eb50f..18cb90b 100644 --- a/docs/reference/html/classxmlpp_1_1internal__error.html +++ b/docs/reference/html/classxmlpp_1_1internal__error.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -73,6 +73,10 @@ Public Member Functions    ~internal_error () noexceptoverride   +exceptionclone () const override +  +void raise () const override +  - Public Member Functions inherited from xmlpp::exception  exception (const Glib::ustring& message)   @@ -129,10 +133,61 @@ Public Member Functions +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    exception* xmlpp::internal_error::clone () const
    +
    +overridevirtual
    +
    + +

    Reimplemented from xmlpp::exception.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void xmlpp::internal_error::raise () const
    +
    +overridevirtual
    +
    + +

    Reimplemented from xmlpp::exception.

    + +
    +
    diff --git a/docs/reference/html/classxmlpp_1_1parse__error-members.html b/docs/reference/html/classxmlpp_1_1parse__error-members.html index 4c85104..70977e5 100644 --- a/docs/reference/html/classxmlpp_1_1parse__error-members.html +++ b/docs/reference/html/classxmlpp_1_1parse__error-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -57,15 +57,17 @@

    This is the complete list of members for xmlpp::parse_error, including all inherited members.

    - - + + + +
    exception(const Glib::ustring& message)xmlpp::exceptionexplicit
    parse_error(const Glib::ustring& message)xmlpp::parse_errorexplicit
    clone() const overridexmlpp::parse_errorvirtual
    exception(const Glib::ustring& message)xmlpp::exceptionexplicit
    parse_error(const Glib::ustring& message)xmlpp::parse_errorexplicit
    raise() const overridexmlpp::parse_errorvirtual
    what() const noexceptoverridexmlpp::exception
    ~exception() noexceptoverridexmlpp::exception
    ~parse_error() noexceptoverridexmlpp::parse_error
    diff --git a/docs/reference/html/classxmlpp_1_1parse__error.html b/docs/reference/html/classxmlpp_1_1parse__error.html index e1fb9d7..6e75479 100644 --- a/docs/reference/html/classxmlpp_1_1parse__error.html +++ b/docs/reference/html/classxmlpp_1_1parse__error.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -76,6 +76,10 @@ Public Member Functions    ~parse_error () noexceptoverride   +exceptionclone () const override +  +void raise () const override +  - Public Member Functions inherited from xmlpp::exception  exception (const Glib::ustring& message)   @@ -134,10 +138,65 @@ Public Member Functions +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    exception* xmlpp::parse_error::clone () const
    +
    +overridevirtual
    +
    + +

    Reimplemented from xmlpp::exception.

    + +

    Reimplemented in xmlpp::validity_error.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void xmlpp::parse_error::raise () const
    +
    +overridevirtual
    +
    + +

    Reimplemented from xmlpp::exception.

    + +

    Reimplemented in xmlpp::validity_error.

    + +
    +
    diff --git a/docs/reference/html/classxmlpp_1_1validity__error-members.html b/docs/reference/html/classxmlpp_1_1validity__error-members.html index 1bbef9b..4176bcc 100644 --- a/docs/reference/html/classxmlpp_1_1validity__error-members.html +++ b/docs/reference/html/classxmlpp_1_1validity__error-members.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -57,8 +57,10 @@

    This is the complete list of members for xmlpp::validity_error, including all inherited members.

    - - + + + + @@ -67,7 +69,7 @@
    exception(const Glib::ustring& message)xmlpp::exceptionexplicit
    parse_error(const Glib::ustring& message)xmlpp::parse_errorexplicit
    clone() const overridexmlpp::validity_errorvirtual
    exception(const Glib::ustring& message)xmlpp::exceptionexplicit
    parse_error(const Glib::ustring& message)xmlpp::parse_errorexplicit
    raise() const overridexmlpp::validity_errorvirtual
    validity_error(const Glib::ustring& message)xmlpp::validity_errorexplicit
    what() const noexceptoverridexmlpp::exception
    ~exception() noexceptoverridexmlpp::exception
    diff --git a/docs/reference/html/classxmlpp_1_1validity__error.html b/docs/reference/html/classxmlpp_1_1validity__error.html index 8cedde0..1cdb736 100644 --- a/docs/reference/html/classxmlpp_1_1validity__error.html +++ b/docs/reference/html/classxmlpp_1_1validity__error.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -76,6 +76,10 @@ Public Member Functions    ~validity_error () noexceptoverride   +exceptionclone () const override +  +void raise () const override +  - Public Member Functions inherited from xmlpp::parse_error  parse_error (const Glib::ustring& message)   @@ -139,10 +143,61 @@ Public Member Functions +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    exception* xmlpp::validity_error::clone () const
    +
    +overridevirtual
    +
    + +

    Reimplemented from xmlpp::parse_error.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void xmlpp::validity_error::raise () const
    +
    +overridevirtual
    +
    + +

    Reimplemented from xmlpp::parse_error.

    + +
    +
    diff --git a/docs/reference/html/dir_8637afc38b758fdb535647a385c49b5e.html b/docs/reference/html/dir_8637afc38b758fdb535647a385c49b5e.html index d5f1ace..e2c4fee 100644 --- a/docs/reference/html/dir_8637afc38b758fdb535647a385c49b5e.html +++ b/docs/reference/html/dir_8637afc38b758fdb535647a385c49b5e.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -75,7 +75,7 @@ Files diff --git a/docs/reference/html/dir_a5a40681709ed751decc24cd7289c9c5.html b/docs/reference/html/dir_a5a40681709ed751decc24cd7289c9c5.html index 87e55ea..c2e784d 100644 --- a/docs/reference/html/dir_a5a40681709ed751decc24cd7289c9c5.html +++ b/docs/reference/html/dir_a5a40681709ed751decc24cd7289c9c5.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -61,7 +61,7 @@ Files diff --git a/docs/reference/html/dir_bc161955dc3a3d2485839eba21420d01.html b/docs/reference/html/dir_bc161955dc3a3d2485839eba21420d01.html index 1995ecd..2078142 100644 --- a/docs/reference/html/dir_bc161955dc3a3d2485839eba21420d01.html +++ b/docs/reference/html/dir_bc161955dc3a3d2485839eba21420d01.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -61,7 +61,7 @@ Files diff --git a/docs/reference/html/dir_e3818dbe052c35541aa8102ff72444f2.html b/docs/reference/html/dir_e3818dbe052c35541aa8102ff72444f2.html index 714edf0..633bc46 100644 --- a/docs/reference/html/dir_e3818dbe052c35541aa8102ff72444f2.html +++ b/docs/reference/html/dir_e3818dbe052c35541aa8102ff72444f2.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -63,7 +63,7 @@ Files diff --git a/docs/reference/html/dir_fceced95d8215eeebebd9df6aa39e1a5.html b/docs/reference/html/dir_fceced95d8215eeebebd9df6aa39e1a5.html index 112b976..f880137 100644 --- a/docs/reference/html/dir_fceced95d8215eeebebd9df6aa39e1a5.html +++ b/docs/reference/html/dir_fceced95d8215eeebebd9df6aa39e1a5.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -57,11 +57,13 @@ Files   file  validity_error.h   +file  wrapped_exception.h diff --git a/docs/reference/html/functions.html b/docs/reference/html/functions.html index df928d9..1f8dba7 100644 --- a/docs/reference/html/functions.html +++ b/docs/reference/html/functions.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -142,7 +142,7 @@ diff --git a/docs/reference/html/functions_c.html b/docs/reference/html/functions_c.html index 592a1ec..8b28ef5 100644 --- a/docs/reference/html/functions_c.html +++ b/docs/reference/html/functions_c.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -117,6 +117,12 @@
  • check_for_validity_messages() : xmlpp::Validator
  • +
  • clone() +: xmlpp::exception +, xmlpp::internal_error +, xmlpp::parse_error +, xmlpp::validity_error +
  • close() : xmlpp::TextReader
  • @@ -127,12 +133,12 @@ : xmlpp::AttributeDeclaration , xmlpp::AttributeNode , xmlpp::Document -, xmlpp::Dtd +, xmlpp::Dtd , xmlpp::EntityDeclaration -, xmlpp::Node +, xmlpp::Node , xmlpp::OutputBuffer -, xmlpp::ParserInputBuffer -, xmlpp::RelaxNGSchema +, xmlpp::ParserInputBuffer +, xmlpp::RelaxNGSchema , xmlpp::XsdSchema
  • Comment @@ -169,7 +175,7 @@ diff --git a/docs/reference/html/functions_d.html b/docs/reference/html/functions_d.html index 08689ed..aee7482 100644 --- a/docs/reference/html/functions_d.html +++ b/docs/reference/html/functions_d.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -116,7 +116,7 @@ diff --git a/docs/reference/html/functions_e.html b/docs/reference/html/functions_e.html index 97f2021..827187f 100644 --- a/docs/reference/html/functions_e.html +++ b/docs/reference/html/functions_e.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -122,9 +122,9 @@
  • exception() : xmlpp::exception
  • -
  • exception_ptr_ -: xmlpp::Parser -, xmlpp::Validator +
  • exception_ +: xmlpp::Parser +, xmlpp::Validator
  • expand() : xmlpp::TextReader @@ -133,7 +133,7 @@ diff --git a/docs/reference/html/functions_enum.html b/docs/reference/html/functions_enum.html index ec24e37..60b4aa5 100644 --- a/docs/reference/html/functions_enum.html +++ b/docs/reference/html/functions_enum.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -73,7 +73,7 @@ diff --git a/docs/reference/html/functions_eval.html b/docs/reference/html/functions_eval.html index 7f3ff99..d617116 100644 --- a/docs/reference/html/functions_eval.html +++ b/docs/reference/html/functions_eval.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -234,7 +234,7 @@ diff --git a/docs/reference/html/functions_f.html b/docs/reference/html/functions_f.html index 315194c..a8b2076 100644 --- a/docs/reference/html/functions_f.html +++ b/docs/reference/html/functions_f.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -97,7 +97,7 @@ diff --git a/docs/reference/html/functions_func.html b/docs/reference/html/functions_func.html index b660efb..1c3a897 100644 --- a/docs/reference/html/functions_func.html +++ b/docs/reference/html/functions_func.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -137,7 +137,7 @@ diff --git a/docs/reference/html/functions_func_c.html b/docs/reference/html/functions_func_c.html index 4033f4b..3f3eb50 100644 --- a/docs/reference/html/functions_func_c.html +++ b/docs/reference/html/functions_func_c.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -114,6 +114,12 @@
  • check_for_validity_messages() : xmlpp::Validator
  • +
  • clone() +: xmlpp::exception +, xmlpp::internal_error +, xmlpp::parse_error +, xmlpp::validity_error +
  • close() : xmlpp::TextReader
  • @@ -125,7 +131,7 @@ , xmlpp::EntityDeclaration , xmlpp::Node , xmlpp::OutputBuffer -, xmlpp::ParserInputBuffer +, xmlpp::ParserInputBuffer , xmlpp::RelaxNGSchema , xmlpp::XsdSchema @@ -148,7 +154,7 @@ diff --git a/docs/reference/html/functions_func_d.html b/docs/reference/html/functions_func_d.html index 8caa903..09f2909 100644 --- a/docs/reference/html/functions_func_d.html +++ b/docs/reference/html/functions_func_d.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -100,7 +100,7 @@ diff --git a/docs/reference/html/functions_func_e.html b/docs/reference/html/functions_func_e.html index 6c2d76a..90faeec 100644 --- a/docs/reference/html/functions_func_e.html +++ b/docs/reference/html/functions_func_e.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -112,7 +112,7 @@ diff --git a/docs/reference/html/functions_func_f.html b/docs/reference/html/functions_func_f.html index 6fe5191..b9e312c 100644 --- a/docs/reference/html/functions_func_f.html +++ b/docs/reference/html/functions_func_f.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -97,7 +97,7 @@ diff --git a/docs/reference/html/functions_func_g.html b/docs/reference/html/functions_func_g.html index 5e1c907..8ed21dc 100644 --- a/docs/reference/html/functions_func_g.html +++ b/docs/reference/html/functions_func_g.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -230,7 +230,7 @@ diff --git a/docs/reference/html/functions_func_h.html b/docs/reference/html/functions_func_h.html index de4925e..60a1c0b 100644 --- a/docs/reference/html/functions_func_h.html +++ b/docs/reference/html/functions_func_h.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -101,7 +101,7 @@ diff --git a/docs/reference/html/functions_func_i.html b/docs/reference/html/functions_func_i.html index 15caf14..2bcdb8e 100644 --- a/docs/reference/html/functions_func_i.html +++ b/docs/reference/html/functions_func_i.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -118,7 +118,7 @@ diff --git a/docs/reference/html/functions_func_k.html b/docs/reference/html/functions_func_k.html index 470d19b..fa75467 100644 --- a/docs/reference/html/functions_func_k.html +++ b/docs/reference/html/functions_func_k.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -91,7 +91,7 @@ diff --git a/docs/reference/html/functions_func_l.html b/docs/reference/html/functions_func_l.html index 071f76f..f4b5488 100644 --- a/docs/reference/html/functions_func_l.html +++ b/docs/reference/html/functions_func_l.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -91,7 +91,7 @@ diff --git a/docs/reference/html/functions_func_m.html b/docs/reference/html/functions_func_m.html index a5b655f..79ae977 100644 --- a/docs/reference/html/functions_func_m.html +++ b/docs/reference/html/functions_func_m.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -100,7 +100,7 @@ diff --git a/docs/reference/html/functions_func_n.html b/docs/reference/html/functions_func_n.html index 55bbb99..b86cf4c 100644 --- a/docs/reference/html/functions_func_n.html +++ b/docs/reference/html/functions_func_n.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -97,7 +97,7 @@ diff --git a/docs/reference/html/functions_func_o.html b/docs/reference/html/functions_func_o.html index d446148..031f1d3 100644 --- a/docs/reference/html/functions_func_o.html +++ b/docs/reference/html/functions_func_o.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -161,7 +161,7 @@ diff --git a/docs/reference/html/functions_func_p.html b/docs/reference/html/functions_func_p.html index 960af77..70e09d3 100644 --- a/docs/reference/html/functions_func_p.html +++ b/docs/reference/html/functions_func_p.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -166,7 +166,7 @@ diff --git a/docs/reference/html/functions_func_r.html b/docs/reference/html/functions_func_r.html index ebc6bd2..4bdcd77 100644 --- a/docs/reference/html/functions_func_r.html +++ b/docs/reference/html/functions_func_r.html @@ -19,7 +19,7 @@
    libxml++ -  2.91.1 +  2.91.2
    @@ -84,6 +84,12 @@  

    - r -

      +
    • raise() +: xmlpp::exception +, xmlpp::internal_error +, xmlpp::parse_error +, xmlpp::validity_error +
    • read() : xmlpp::TextReader
    • @@ -100,10 +106,10 @@ : xmlpp::TextReader
    • RelaxNGSchema() -: xmlpp::RelaxNGSchema +: xmlpp::RelaxNGSchema
    • RelaxNGValidator() -: xmlpp::RelaxNGValidator +: xmlpp::RelaxNGValidator
    • release_underlying() : xmlpp::DomParser @@ -128,7 +134,7 @@ diff --git a/docs/reference/html/functions_func_s.html b/docs/reference/html/functions_func_s.html index a159111..61a00ac 100644 --- a/docs/reference/html/functions_func_s.html +++ b/docs/reference/html/functions_func_s.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -152,7 +152,7 @@ diff --git a/docs/reference/html/functions_func_t.html b/docs/reference/html/functions_func_t.html index 61598d5..449c5a2 100644 --- a/docs/reference/html/functions_func_t.html +++ b/docs/reference/html/functions_func_t.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -94,7 +94,7 @@ diff --git a/docs/reference/html/functions_func_v.html b/docs/reference/html/functions_func_v.html index dd61437..884d3b1 100644 --- a/docs/reference/html/functions_func_v.html +++ b/docs/reference/html/functions_func_v.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -101,7 +101,7 @@ diff --git a/docs/reference/html/functions_func_w.html b/docs/reference/html/functions_func_w.html index e194af1..422c18a 100644 --- a/docs/reference/html/functions_func_w.html +++ b/docs/reference/html/functions_func_w.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -109,7 +109,7 @@ diff --git a/docs/reference/html/functions_func_x.html b/docs/reference/html/functions_func_x.html index 6070175..ce803b3 100644 --- a/docs/reference/html/functions_func_x.html +++ b/docs/reference/html/functions_func_x.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -100,7 +100,7 @@ diff --git a/docs/reference/html/functions_func_~.html b/docs/reference/html/functions_func_~.html index 88b390a..9e5fd65 100644 --- a/docs/reference/html/functions_func_~.html +++ b/docs/reference/html/functions_func_~.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -178,7 +178,7 @@ : xmlpp::TextNode
    • ~TextReader() -: xmlpp::TextReader +: xmlpp::TextReader
    • ~Validator() : xmlpp::Validator @@ -202,7 +202,7 @@ diff --git a/docs/reference/html/functions_g.html b/docs/reference/html/functions_g.html index 9d3e048..60ad25d 100644 --- a/docs/reference/html/functions_g.html +++ b/docs/reference/html/functions_g.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -230,7 +230,7 @@ diff --git a/docs/reference/html/functions_h.html b/docs/reference/html/functions_h.html index bd25287..c524de8 100644 --- a/docs/reference/html/functions_h.html +++ b/docs/reference/html/functions_h.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -101,7 +101,7 @@ diff --git a/docs/reference/html/functions_i.html b/docs/reference/html/functions_i.html index 494d323..e9f9b3c 100644 --- a/docs/reference/html/functions_i.html +++ b/docs/reference/html/functions_i.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -124,7 +124,7 @@ diff --git a/docs/reference/html/functions_k.html b/docs/reference/html/functions_k.html index 154bdb6..d721eed 100644 --- a/docs/reference/html/functions_k.html +++ b/docs/reference/html/functions_k.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -91,7 +91,7 @@ diff --git a/docs/reference/html/functions_l.html b/docs/reference/html/functions_l.html index e8e7cbc..4a217c5 100644 --- a/docs/reference/html/functions_l.html +++ b/docs/reference/html/functions_l.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -94,7 +94,7 @@ diff --git a/docs/reference/html/functions_m.html b/docs/reference/html/functions_m.html index a95a91a..fd98446 100644 --- a/docs/reference/html/functions_m.html +++ b/docs/reference/html/functions_m.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -115,7 +115,7 @@ diff --git a/docs/reference/html/functions_n.html b/docs/reference/html/functions_n.html index 6509860..c323c85 100644 --- a/docs/reference/html/functions_n.html +++ b/docs/reference/html/functions_n.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -113,7 +113,7 @@ diff --git a/docs/reference/html/functions_o.html b/docs/reference/html/functions_o.html index b787620..257e276 100644 --- a/docs/reference/html/functions_o.html +++ b/docs/reference/html/functions_o.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -161,7 +161,7 @@ diff --git a/docs/reference/html/functions_p.html b/docs/reference/html/functions_p.html index 71f55b6..fe3a902 100644 --- a/docs/reference/html/functions_p.html +++ b/docs/reference/html/functions_p.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -175,7 +175,7 @@ diff --git a/docs/reference/html/functions_r.html b/docs/reference/html/functions_r.html index 9ca35be..b18054c 100644 --- a/docs/reference/html/functions_r.html +++ b/docs/reference/html/functions_r.html @@ -19,7 +19,7 @@
      libxml++ -  2.91.1 +  2.91.2
      @@ -84,6 +84,12 @@
      Here is a list of all class members with links to the classes they belong to:

      - r -

        +
      • raise() +: xmlpp::exception +, xmlpp::internal_error +, xmlpp::parse_error +, xmlpp::validity_error +
      • read() : xmlpp::TextReader
      • @@ -103,10 +109,10 @@ : xmlpp::TextReader
      • RelaxNGSchema() -: xmlpp::RelaxNGSchema +: xmlpp::RelaxNGSchema
      • RelaxNGValidator() -: xmlpp::RelaxNGValidator +: xmlpp::RelaxNGValidator
      • release_underlying() : xmlpp::DomParser @@ -131,7 +137,7 @@ diff --git a/docs/reference/html/functions_s.html b/docs/reference/html/functions_s.html index 39be434..5ef8bad 100644 --- a/docs/reference/html/functions_s.html +++ b/docs/reference/html/functions_s.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -162,7 +162,7 @@ diff --git a/docs/reference/html/functions_t.html b/docs/reference/html/functions_t.html index de883f3..d8c4a16 100644 --- a/docs/reference/html/functions_t.html +++ b/docs/reference/html/functions_t.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -97,7 +97,7 @@ diff --git a/docs/reference/html/functions_type.html b/docs/reference/html/functions_type.html index 7be3f34..41f53e6 100644 --- a/docs/reference/html/functions_type.html +++ b/docs/reference/html/functions_type.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -87,7 +87,7 @@ diff --git a/docs/reference/html/functions_v.html b/docs/reference/html/functions_v.html index 395734b..97ee6b7 100644 --- a/docs/reference/html/functions_v.html +++ b/docs/reference/html/functions_v.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -115,7 +115,7 @@ diff --git a/docs/reference/html/functions_vars.html b/docs/reference/html/functions_vars.html index 4b1a7e6..8f260b0 100644 --- a/docs/reference/html/functions_vars.html +++ b/docs/reference/html/functions_vars.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -66,9 +66,9 @@
      • doc_ : xmlpp::DomParser
      • -
      • exception_ptr_ -: xmlpp::Parser -, xmlpp::Validator +
      • exception_ +: xmlpp::Parser +, xmlpp::Validator
      • name : xmlpp::SaxParser::Attribute @@ -87,7 +87,7 @@ diff --git a/docs/reference/html/functions_w.html b/docs/reference/html/functions_w.html index 34506e9..3b5c587 100644 --- a/docs/reference/html/functions_w.html +++ b/docs/reference/html/functions_w.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -112,7 +112,7 @@ diff --git a/docs/reference/html/functions_x.html b/docs/reference/html/functions_x.html index cb11703..1f7c9bd 100644 --- a/docs/reference/html/functions_x.html +++ b/docs/reference/html/functions_x.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -109,7 +109,7 @@ diff --git a/docs/reference/html/functions_~.html b/docs/reference/html/functions_~.html index e3df8ca..05ae622 100644 --- a/docs/reference/html/functions_~.html +++ b/docs/reference/html/functions_~.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -178,7 +178,7 @@ : xmlpp::TextNode
      • ~TextReader() -: xmlpp::TextReader +: xmlpp::TextReader
      • ~Validator() : xmlpp::Validator @@ -202,7 +202,7 @@ diff --git a/docs/reference/html/graph_legend.html b/docs/reference/html/graph_legend.html index 98d9b13..000ae0b 100644 --- a/docs/reference/html/graph_legend.html +++ b/docs/reference/html/graph_legend.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -108,7 +108,7 @@ A yellow dashed arrow denotes a relation between a template instance and the tem diff --git a/docs/reference/html/hierarchy.html b/docs/reference/html/hierarchy.html index 19dc7c3..35fe41c 100644 --- a/docs/reference/html/hierarchy.html +++ b/docs/reference/html/hierarchy.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -102,7 +102,7 @@ This inheritance list is sorted roughly, but not completely, alphabetically: diff --git a/docs/reference/html/index.html b/docs/reference/html/index.html index e467907..e6188a4 100644 --- a/docs/reference/html/index.html +++ b/docs/reference/html/index.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -66,7 +66,7 @@ Basic Usage diff --git a/docs/reference/html/inherits.html b/docs/reference/html/inherits.html index 4374e79..4413842 100644 --- a/docs/reference/html/inherits.html +++ b/docs/reference/html/inherits.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -85,7 +85,7 @@ diff --git a/docs/reference/html/namespacemembers.html b/docs/reference/html/namespacemembers.html index ba166b9..13a82f6 100644 --- a/docs/reference/html/namespacemembers.html +++ b/docs/reference/html/namespacemembers.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -53,6 +53,9 @@
        Here is a list of all namespace members with links to the namespace documentation for each member:
          +
        • format_printf_message() +: xmlpp +
        • format_xml_error() : xmlpp
        • @@ -105,7 +108,7 @@
        diff --git a/docs/reference/html/namespacemembers_enum.html b/docs/reference/html/namespacemembers_enum.html index 74dfe75..2a3f439 100644 --- a/docs/reference/html/namespacemembers_enum.html +++ b/docs/reference/html/namespacemembers_enum.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -63,7 +63,7 @@ diff --git a/docs/reference/html/namespacemembers_eval.html b/docs/reference/html/namespacemembers_eval.html index a570cae..6a64b58 100644 --- a/docs/reference/html/namespacemembers_eval.html +++ b/docs/reference/html/namespacemembers_eval.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -90,7 +90,7 @@ diff --git a/docs/reference/html/namespacemembers_func.html b/docs/reference/html/namespacemembers_func.html index ad25db7..57b55f8 100644 --- a/docs/reference/html/namespacemembers_func.html +++ b/docs/reference/html/namespacemembers_func.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -53,6 +53,9 @@
         
          +
        • format_printf_message() +: xmlpp +
        • format_xml_error() : xmlpp
        • @@ -66,7 +69,7 @@
        diff --git a/docs/reference/html/namespaces.html b/docs/reference/html/namespaces.html index 984f8c0..ae5ef09 100644 --- a/docs/reference/html/namespaces.html +++ b/docs/reference/html/namespaces.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -56,7 +56,7 @@ diff --git a/docs/reference/html/namespacexmlpp.html b/docs/reference/html/namespacexmlpp.html index a4e48f2..efb5d67 100644 --- a/docs/reference/html/namespacexmlpp.html +++ b/docs/reference/html/namespacexmlpp.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -201,6 +201,9 @@ Enumerations + + + @@ -271,6 +274,45 @@ Functions

        Function Documentation

        + +
        +
        +

        Functions

        Glib::ustring format_printf_message (const char* fmt, va_list args)
         Format a message from a function with C-style variadic parameters. More...
         
        Glib::ustring format_xml_error (const _xmlError* error=nullptr)
         Format an _xmlError struct into a text string, suitable for printing. More...
         
        + + + + + + + + + + + + + + + + + +
        Glib::ustring xmlpp::format_printf_message (const char * fmt,
        va_list args 
        )
        +
        + +

        Format a message from a function with C-style variadic parameters.

        +

        Helper function that formats a message supplied in the form of a printf-style format specification and zero or more ... parameters.

        +
        // Typical call:
        +
        void f(const char* fmt, ...)
        +
        {
        +
        va_list args;
        +
        va_start(args, fmt);
        + +
        va_end(args);
        +
        // ...
        +
        }
        +
        Since libxml++ 3.0:
        + +
        +
        @@ -289,7 +331,7 @@ Functions
        Since libxml++ 2.36:
        Parameters
        - +
        errorPointer to an _xmlError struct or 0. If 0, the error returned by xmlGetLastError() is used.
        errorPointer to an _xmlError struct or nullptr. If nullptr, the error returned by xmlGetLastError() is used.
        @@ -363,7 +405,7 @@ Functions
        diff --git a/docs/reference/html/pages.html b/docs/reference/html/pages.html index 3e9143e..8b9c0a9 100644 --- a/docs/reference/html/pages.html +++ b/docs/reference/html/pages.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -54,7 +54,7 @@
        diff --git a/docs/reference/html/since_2_20.html b/docs/reference/html/since_2_20.html index dbb7644..a75a94c 100644 --- a/docs/reference/html/since_2_20.html +++ b/docs/reference/html/since_2_20.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -49,7 +49,7 @@ diff --git a/docs/reference/html/since_2_24.html b/docs/reference/html/since_2_24.html index 6e89fa5..9755b19 100644 --- a/docs/reference/html/since_2_24.html +++ b/docs/reference/html/since_2_24.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -53,7 +53,7 @@ diff --git a/docs/reference/html/since_2_36.html b/docs/reference/html/since_2_36.html index 5041bfc..ae8d028 100644 --- a/docs/reference/html/since_2_36.html +++ b/docs/reference/html/since_2_36.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -89,7 +89,7 @@ diff --git a/docs/reference/html/since_2_38.html b/docs/reference/html/since_2_38.html index 606b9f3..c61baa9 100644 --- a/docs/reference/html/since_2_38.html +++ b/docs/reference/html/since_2_38.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -69,7 +69,7 @@ diff --git a/docs/reference/html/since_3_0.html b/docs/reference/html/since_3_0.html index 60a2fc1..96bd612 100644 --- a/docs/reference/html/since_3_0.html +++ b/docs/reference/html/since_3_0.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -61,33 +61,35 @@
        Member xmlpp::Dtd::parse_subset (const Glib::ustring& external, const Glib::ustring& system)
        -
        Member xmlpp::DtdValidator::DtdValidator (Dtd* dtd, bool take_ownership)
        +
        Member xmlpp::DtdValidator::DtdValidator (Dtd* dtd, bool take_ownership)
        -
        Member xmlpp::Element::add_child_element (const Glib::ustring& name, const Glib::ustring& ns_prefix=Glib::ustring())
        +
        Member xmlpp::Element::add_child_element (const Glib::ustring& name, const Glib::ustring& ns_prefix=Glib::ustring())
        Replaces Node::add_child()
        -
        Member xmlpp::Element::add_child_element (xmlpp::Node* previous_sibling, const Glib::ustring& name, const Glib::ustring& ns_prefix=Glib::ustring())
        +
        Member xmlpp::Element::add_child_element (xmlpp::Node* previous_sibling, const Glib::ustring& name, const Glib::ustring& ns_prefix=Glib::ustring())
        Replaces Node::add_child()
        -
        Member xmlpp::Element::add_child_element_before (xmlpp::Node* next_sibling, const Glib::ustring& name, const Glib::ustring& ns_prefix=Glib::ustring())
        +
        Member xmlpp::Element::add_child_element_before (xmlpp::Node* next_sibling, const Glib::ustring& name, const Glib::ustring& ns_prefix=Glib::ustring())
        Replaces Node::add_child_before()
        -
        Member xmlpp::Element::add_child_element_before_with_new_ns (xmlpp::Node* next_sibling, const Glib::ustring& name, const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix=Glib::ustring())
        +
        Member xmlpp::Element::add_child_element_before_with_new_ns (xmlpp::Node* next_sibling, const Glib::ustring& name, const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix=Glib::ustring())
        Replaces Node::add_child_before_with_new_ns()
        -
        Member xmlpp::Element::add_child_element_with_new_ns (xmlpp::Node* previous_sibling, const Glib::ustring& name, const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix=Glib::ustring())
        +
        Member xmlpp::Element::add_child_element_with_new_ns (xmlpp::Node* previous_sibling, const Glib::ustring& name, const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix=Glib::ustring())
        Replaces Node::add_child_with_new_ns()
        -
        Member xmlpp::Element::add_child_element_with_new_ns (const Glib::ustring& name, const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix=Glib::ustring())
        +
        Member xmlpp::Element::add_child_element_with_new_ns (const Glib::ustring& name, const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix=Glib::ustring())
        Replaces Node::add_child_with_new_ns()
        -
        Member xmlpp::Element::get_first_child_text () const
        +
        Member xmlpp::Element::get_first_child_text () const
        Replaces get_child_text().
        -
        Member xmlpp::Element::get_first_child_text ()
        +
        Member xmlpp::Element::get_first_child_text ()
        Replaces get_child_text().
        -
        Member xmlpp::Element::set_first_child_text (const Glib::ustring& content)
        +
        Member xmlpp::Element::set_first_child_text (const Glib::ustring& content)
        Replaces set_child_text().
        -
        Member xmlpp::Node::remove_node (Node* node)
        +
        Member xmlpp::format_printf_message (const char* fmt, va_list args)
        +
        +
        Member xmlpp::Node::remove_node (Node* node)
        Replaces remove_child()
        diff --git a/docs/reference/html/structxmlpp_1_1SaxParser_1_1Attribute-members.html b/docs/reference/html/structxmlpp_1_1SaxParser_1_1Attribute-members.html index 4433d9c..d9f5963 100644 --- a/docs/reference/html/structxmlpp_1_1SaxParser_1_1Attribute-members.html +++ b/docs/reference/html/structxmlpp_1_1SaxParser_1_1Attribute-members.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -63,7 +63,7 @@ diff --git a/docs/reference/html/structxmlpp_1_1SaxParser_1_1Attribute.html b/docs/reference/html/structxmlpp_1_1SaxParser_1_1Attribute.html index 29b1627..16b7ce5 100644 --- a/docs/reference/html/structxmlpp_1_1SaxParser_1_1Attribute.html +++ b/docs/reference/html/structxmlpp_1_1SaxParser_1_1Attribute.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -141,7 +141,7 @@ Public Attributes diff --git a/docs/reference/html/structxmlpp_1_1SaxParser_1_1AttributeHasName-members.html b/docs/reference/html/structxmlpp_1_1SaxParser_1_1AttributeHasName-members.html index ada93e1..a445acb 100644 --- a/docs/reference/html/structxmlpp_1_1SaxParser_1_1AttributeHasName-members.html +++ b/docs/reference/html/structxmlpp_1_1SaxParser_1_1AttributeHasName-members.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -63,7 +63,7 @@ diff --git a/docs/reference/html/structxmlpp_1_1SaxParser_1_1AttributeHasName.html b/docs/reference/html/structxmlpp_1_1SaxParser_1_1AttributeHasName.html index 20fcd82..4e12ad6 100644 --- a/docs/reference/html/structxmlpp_1_1SaxParser_1_1AttributeHasName.html +++ b/docs/reference/html/structxmlpp_1_1SaxParser_1_1AttributeHasName.html @@ -19,7 +19,7 @@
        libxml++ -  2.91.1 +  2.91.2
        @@ -147,7 +147,7 @@ Public Attributes diff --git a/docs/reference/libxml++-3.0.devhelp2 b/docs/reference/libxml++-3.0.devhelp2 index 52377b0..d57688c 100644 --- a/docs/reference/libxml++-3.0.devhelp2 +++ b/docs/reference/libxml++-3.0.devhelp2 @@ -398,10 +398,14 @@ + + + + @@ -466,6 +470,8 @@ + + @@ -630,7 +636,7 @@ - + @@ -692,6 +698,8 @@ + + @@ -730,6 +738,7 @@ + diff --git a/docs/reference/libxml++-3.0.tag b/docs/reference/libxml++-3.0.tag index f84e4f0..ed649da 100644 --- a/docs/reference/libxml++-3.0.tag +++ b/docs/reference/libxml++-3.0.tag @@ -50,6 +50,13 @@ xmlpp Glib::ustring + format_printf_message + namespacexmlpp.html + a1809fc2b27ae5a120f40d7121e8f2a71 + (const char *fmt, va_list args) + + + Glib::ustring format_xml_error namespacexmlpp.html a4599f55c1821aeb0caa0b7be18cb5cfb @@ -90,6 +97,12 @@ xmlpp + wrapped_exception.h + /home/kjell/checkout/gnome/libxml++/libxml++/exceptions/ + wrapped__exception_8h + xmlpp + + istreamparserinputbuffer.h /home/kjell/checkout/gnome/libxml++/libxml++/io/ istreamparserinputbuffer_8h @@ -15129,6 +15142,20 @@ aa0ff3bba207e893e43f501ba8d99100d () noexceptoverride + + virtual exception * + clone + classxmlpp_1_1exception.html + a0a0d7568b11c226632343c1994700034 + () const + + + virtual void + raise + classxmlpp_1_1exception.html + a7f8545275e296c5a04b21aa92bcdb3f8 + () const + const char * what @@ -15155,6 +15182,20 @@ a67dc0de807b8ab4093ca43e5a3d71619 () noexceptoverride + + exception * + clone + classxmlpp_1_1internal__error.html + ab301a79cec0e6fedb76ed5fc8a40566c + () const override + + + void + raise + classxmlpp_1_1internal__error.html + a9742adca987fdb6c2774fc02e520b7f8 + () const override + xmlpp::IStreamParserInputBuffer @@ -15594,6 +15635,20 @@ a3a24ca1eabc8202046da1b3bcef58b34 () noexceptoverride + + exception * + clone + classxmlpp_1_1parse__error.html + a8f700a7df65a51cc4011a87e92387351 + () const override + + + void + raise + classxmlpp_1_1parse__error.html + ac95afd92936f9f3483280fa6ba0a862d + () const override + xmlpp::Parser @@ -15855,10 +15910,10 @@ - std::exception_ptr - exception_ptr_ + std::unique_ptr< exception > + exception_ classxmlpp_1_1Parser.html - acc102e249ee49903099364c35090cc12 + a55d7b3a8c07d23e86a9adb81630dc60c @@ -16725,8 +16780,8 @@ ~TextReader classxmlpp_1_1TextReader.html - a35043a6525290428f3724e1a31918bb8 - () + a87d58d4ae7c3b3252bee49cdd78447e8 + () override void @@ -17133,10 +17188,10 @@ (void *ctx, const char *msg,...) - std::exception_ptr - exception_ptr_ + std::unique_ptr< exception > + exception_ classxmlpp_1_1Validator.html - a1d44b17db2341247a0b6f2fb26b7fec3 + aaddf470c3f05f7c5da525917b0090984 @@ -17172,6 +17227,20 @@ a90ab32b327ced5b0d077fad372b311e2 () noexceptoverride + + exception * + clone + classxmlpp_1_1validity__error.html + abaf941b5118c87afa10bf366376ac012 + () const override + + + void + raise + classxmlpp_1_1validity__error.html + aef3fc5567fcaca8a7525cb53ef87e5eb + () const override + xmlpp::XIncludeEnd @@ -17646,6 +17715,13 @@ Glib::ustring + format_printf_message + namespacexmlpp.html + a1809fc2b27ae5a120f40d7121e8f2a71 + (const char *fmt, va_list args) + + + Glib::ustring format_xml_error namespacexmlpp.html a4599f55c1821aeb0caa0b7be18cb5cfb diff --git a/examples/Makefile.in b/examples/Makefile.in index 3eb49b4..80d96bf 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -96,14 +96,15 @@ check_PROGRAMS = dom_build/dom_build$(EXEEXT) \ textreader/textreader$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/macros/depcomp $(dist_noinst_DATA) \ - $(top_srcdir)/macros/test-driver README + $(top_srcdir)/build/depcomp $(dist_noinst_DATA) \ + $(top_srcdir)/build/test-driver README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/macros/libtool.m4 \ - $(top_srcdir)/macros/ltoptions.m4 \ - $(top_srcdir)/macros/ltsugar.m4 \ - $(top_srcdir)/macros/ltversion.m4 \ - $(top_srcdir)/macros/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/build/cxx_std.m4 \ + $(top_srcdir)/build/libtool.m4 \ + $(top_srcdir)/build/ltoptions.m4 \ + $(top_srcdir)/build/ltsugar.m4 \ + $(top_srcdir)/build/ltversion.m4 \ + $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -252,7 +253,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -depcomp = $(SHELL) $(top_srcdir)/macros/depcomp +depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @@ -534,7 +535,7 @@ RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/macros/test-driver +LOG_DRIVER = $(SHELL) $(top_srcdir)/build/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ @@ -549,7 +550,7 @@ am__set_b = \ am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/macros/test-driver +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) diff --git a/examples/sax_exception/myparser.cc b/examples/sax_exception/myparser.cc index 9c9013d..70f8bda 100644 --- a/examples/sax_exception/myparser.cc +++ b/examples/sax_exception/myparser.cc @@ -34,6 +34,16 @@ MyException::~MyException() throw () { } +void MyException::raise() const +{ + throw *this; +} + +xmlpp::exception* MyException::clone() const +{ + return new MyException(*this); +} + /* * MySaxParser implementation */ diff --git a/examples/sax_exception/myparser.h b/examples/sax_exception/myparser.h index 3e1c2ee..6c2376d 100644 --- a/examples/sax_exception/myparser.h +++ b/examples/sax_exception/myparser.h @@ -27,6 +27,8 @@ class MyException: public xmlpp::exception public: MyException(); ~MyException() noexcept override; + void raise() const override; + xmlpp::exception* clone() const override; }; class MySaxParser : public xmlpp::SaxParser diff --git a/libxml++/Makefile.in b/libxml++/Makefile.in index 5bce073..c92635f 100644 --- a/libxml++/Makefile.in +++ b/libxml++/Makefile.in @@ -80,15 +80,16 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/filelist.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/macros/depcomp \ + $(srcdir)/Makefile.am $(top_srcdir)/build/depcomp \ $(nobase_library_include_HEADERS) subdir = libxml++ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/macros/libtool.m4 \ - $(top_srcdir)/macros/ltoptions.m4 \ - $(top_srcdir)/macros/ltsugar.m4 \ - $(top_srcdir)/macros/ltversion.m4 \ - $(top_srcdir)/macros/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/build/cxx_std.m4 \ + $(top_srcdir)/build/libtool.m4 \ + $(top_srcdir)/build/ltoptions.m4 \ + $(top_srcdir)/build/ltsugar.m4 \ + $(top_srcdir)/build/ltversion.m4 \ + $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -134,7 +135,8 @@ am__objects_1 = attribute.lo attributedeclaration.lo attributenode.lo \ relaxngschema.lo schemabase.lo xsdschema.lo am__dirstamp = $(am__leading_dot)dirstamp am__objects_2 = exceptions/exception.lo exceptions/parse_error.lo \ - exceptions/validity_error.lo exceptions/internal_error.lo + exceptions/validity_error.lo exceptions/internal_error.lo \ + exceptions/wrapped_exception.lo am__objects_3 = io/istreamparserinputbuffer.lo io/outputbuffer.lo \ io/ostreamoutputbuffer.lo io/parserinputbuffer.lo am__objects_4 = nodes/cdatanode.lo nodes/commentnode.lo \ @@ -178,7 +180,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -depcomp = $(SHELL) $(top_srcdir)/macros/depcomp +depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @@ -408,7 +410,8 @@ h_exceptions_sources_public = \ exceptions/exception.h \ exceptions/parse_error.h \ exceptions/validity_error.h \ - exceptions/internal_error.h + exceptions/internal_error.h \ + exceptions/wrapped_exception.h h_io_sources_public = \ io/istreamparserinputbuffer.h \ @@ -551,6 +554,8 @@ exceptions/validity_error.lo: exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) exceptions/internal_error.lo: exceptions/$(am__dirstamp) \ exceptions/$(DEPDIR)/$(am__dirstamp) +exceptions/wrapped_exception.lo: exceptions/$(am__dirstamp) \ + exceptions/$(DEPDIR)/$(am__dirstamp) io/$(am__dirstamp): @$(MKDIR_P) io @: > io/$(am__dirstamp) @@ -655,6 +660,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/internal_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/parse_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/validity_error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@exceptions/$(DEPDIR)/wrapped_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/istreamparserinputbuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/ostreamoutputbuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/outputbuffer.Plo@am__quote@ diff --git a/libxml++/document.cc b/libxml++/document.cc index fed1718..c6e4339 100644 --- a/libxml++/document.cc +++ b/libxml++/document.cc @@ -138,7 +138,7 @@ static const char* get_encoding_or_utf8(const Glib::ustring& encoding) { if(encoding.empty()) { - //If we don't specify this to the xmlDocDump* functions (using 0 instead), + //If we don't specify this to the xmlDocDump* functions (using nullptr instead), //then some other encoding is used, causing them to fail on non-ASCII characters. return "UTF-8"; } @@ -201,7 +201,7 @@ Dtd* Document::get_internal_subset() const { auto dtd = xmlGetIntSubset(impl_); if(!dtd) - return 0; + return nullptr; if(!dtd->_private) dtd->_private = new Dtd(dtd); @@ -215,8 +215,8 @@ void Document::set_internal_subset(const Glib::ustring& name, { auto dtd = xmlCreateIntSubset(impl_, (const xmlChar*)name.c_str(), - external_id.empty() ? (const xmlChar*)0 : (const xmlChar*)external_id.c_str(), - system_id.empty() ? (const xmlChar*)0 : (const xmlChar*)system_id.c_str()); + external_id.empty() ? nullptr : (const xmlChar*)external_id.c_str(), + system_id.empty() ? nullptr : (const xmlChar*)system_id.c_str()); if (dtd && !dtd->_private) dtd->_private = new Dtd(dtd); @@ -226,7 +226,7 @@ Element* Document::get_root_node() { auto root = xmlDocGetRootElement(impl_); if(root == nullptr) - return 0; + return nullptr; else { Node::create_wrapper(root); @@ -243,7 +243,7 @@ Element* Document::create_root_node(const Glib::ustring& name, const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix) { - auto node = xmlNewDocNode(impl_, 0, (const xmlChar*)name.c_str(), 0); + auto node = xmlNewDocNode(impl_, nullptr, (const xmlChar*)name.c_str(), nullptr); if (!node) throw internal_error("Could not create root element node " + name); @@ -270,7 +270,7 @@ Element* Document::create_root_node_by_import(const Node* node, bool recursive) { if (!node) - return 0; + return nullptr; //Create the node, by copying: auto imported_node = xmlDocCopyNode(const_cast(node->cobj()), impl_, recursive); @@ -416,8 +416,8 @@ void Document::set_entity_declaration(const Glib::ustring& name, XmlEntityType t const Glib::ustring& content) { auto entity = xmlAddDocEntity( impl_, (const xmlChar*) name.c_str(), type, - publicId.empty() ? (const xmlChar*)0 : (const xmlChar*)publicId.c_str(), - systemId.empty() ? (const xmlChar*)0 : (const xmlChar*)systemId.c_str(), + publicId.empty() ? nullptr : (const xmlChar*)publicId.c_str(), + systemId.empty() ? nullptr : (const xmlChar*)systemId.c_str(), (const xmlChar*) content.c_str() ); if (!entity) throw internal_error("Could not add entity declaration " + name); diff --git a/libxml++/document.h b/libxml++/document.h index 73ca18f..ea81b3f 100644 --- a/libxml++/document.h +++ b/libxml++/document.h @@ -80,7 +80,7 @@ public: /** Create a new C++ wrapper for an xmlDoc struct. * The created xmlpp::Document takes ownership of the xmlDoc. * When the Document is deleted, so is the xmlDoc and all its nodes. - * @param doc A pointer to an xmlDoc struct. Must not be 0. + * @param doc A pointer to an xmlDoc struct. Must not be nullptr. */ explicit Document(_xmlDoc* doc); @@ -91,7 +91,7 @@ public: Glib::ustring get_encoding() const; /** Get the internal subset of this document. - * @returns A pointer to the DTD, or 0 if not found. + * @returns A pointer to the DTD, or nullptr if not found. */ Dtd* get_internal_subset() const; @@ -107,13 +107,13 @@ public: /** Return the root node. * This function does @b not create a default root node if it doesn't exist. - * @return A pointer to the root node if it exists, 0 otherwise. + * @return A pointer to the root node if it exists, nullptr otherwise. */ Element* get_root_node(); /** Return the root node. * This function does @b not create a default root node if it doesn't exist. - * @return A pointer to the root node if it exists, 0 otherwise. + * @return A pointer to the root node if it exists, nullptr otherwise. */ const Element* get_root_node() const; @@ -257,7 +257,7 @@ protected: /** Retrieve an Entity. * The entity can be from an external subset or internally declared. * @param name The name of the entity to get. - * @returns A pointer to the libxml2 entity structure, or 0 if not found. + * @returns A pointer to the libxml2 entity structure, or nullptr if not found. */ _xmlEntity* get_entity(const Glib::ustring& name); diff --git a/libxml++/dtd.cc b/libxml++/dtd.cc index 2ec0c15..ff2663e 100644 --- a/libxml++/dtd.cc +++ b/libxml++/dtd.cc @@ -93,7 +93,7 @@ void Dtd::parse_stream(std::istream& in) IStreamParserInputBuffer ibuff(in); - auto dtd = xmlIOParseDTD(0, ibuff.cobj(), XML_CHAR_ENCODING_UTF8); + auto dtd = xmlIOParseDTD(nullptr, ibuff.cobj(), XML_CHAR_ENCODING_UTF8); if (!dtd) { diff --git a/libxml++/exceptions/exception.cc b/libxml++/exceptions/exception.cc index 3805779..e7fbf51 100644 --- a/libxml++/exceptions/exception.cc +++ b/libxml++/exceptions/exception.cc @@ -1,6 +1,8 @@ #include "exception.h" #include #include +#include +#include namespace xmlpp { @@ -17,6 +19,16 @@ const char* exception::what() const noexcept return message_.c_str(); } +void exception::raise() const +{ + throw *this; +} + +exception* exception::clone() const +{ + return new exception(*this); +} + Glib::ustring format_xml_error(const _xmlError* error) { if (!error) @@ -92,4 +104,22 @@ Glib::ustring format_xml_parser_error(const _xmlParserCtxt* parser_context) return str + format_xml_error(error); } +Glib::ustring format_printf_message(const char* fmt, va_list args) +{ + // This code was inspired by the example at + // http://en.cppreference.com/w/cpp/io/c/vfprintf + va_list args2; + va_copy(args2, args); + // Number of characters (bytes) in the resulting string; + // error, if < 0. + const int nchar = std::vsnprintf(nullptr, 0, fmt, args2); + va_end(args2); + if (nchar < 0) + return Glib::ustring::format("Error code from std::vsnprintf = ", nchar); + + std::vector buf(nchar+1); + std::vsnprintf(buf.data(), buf.size(), fmt, args); + return Glib::ustring(buf.data()); +} + } //namespace xmlpp diff --git a/libxml++/exceptions/exception.h b/libxml++/exceptions/exception.h index 4510075..7fbaf1e 100644 --- a/libxml++/exceptions/exception.h +++ b/libxml++/exceptions/exception.h @@ -21,6 +21,7 @@ #define __LIBXMLPP_EXCEPTION_H #include +#include // va_list #include #include @@ -43,6 +44,9 @@ public: const char* what() const noexcept override; + virtual void raise() const; + virtual exception* clone() const; + private: Glib::ustring message_; }; @@ -51,8 +55,8 @@ private: * * @newin{2,36} * - * @param error Pointer to an _xmlError struct or 0. If 0, - * the error returned by xmlGetLastError() is used. + * @param error Pointer to an _xmlError struct or nullptr. + * If nullptr, the error returned by xmlGetLastError() is used. * @returns A formatted text string. If the error struct does not contain an * error (error->code == XML_ERR_OK), an empty string is returned. */ @@ -69,6 +73,27 @@ Glib::ustring format_xml_error(const _xmlError* error = nullptr); */ Glib::ustring format_xml_parser_error(const _xmlParserCtxt* parser_context); +/** Format a message from a function with C-style variadic parameters. + * + * Helper function that formats a message supplied in the form of a printf-style + * format specification and zero or more ... parameters. + * + * @code + * // Typical call: + * void f(const char* fmt, ...) + * { + * va_list args; + * va_start(args, fmt); + * Glib::ustring msg = xmlpp::format_printf_message(fmt, args); + * va_end(args); + * // ... + * } + * @endcode + * + * @newin{3,0} + */ +Glib::ustring format_printf_message(const char* fmt, va_list args); + } // namespace xmlpp #endif // __LIBXMLPP_EXCEPTION_H diff --git a/libxml++/exceptions/internal_error.cc b/libxml++/exceptions/internal_error.cc index 9f48cac..2bdbe1c 100644 --- a/libxml++/exceptions/internal_error.cc +++ b/libxml++/exceptions/internal_error.cc @@ -10,4 +10,14 @@ internal_error::internal_error(const Glib::ustring& message) internal_error::~internal_error() noexcept {} +void internal_error::raise() const +{ + throw *this; +} + +exception* internal_error::clone() const +{ + return new internal_error(*this); +} + } //namespace xmlpp diff --git a/libxml++/exceptions/internal_error.h b/libxml++/exceptions/internal_error.h index e43d452..07912cb 100644 --- a/libxml++/exceptions/internal_error.h +++ b/libxml++/exceptions/internal_error.h @@ -29,6 +29,9 @@ class internal_error : public exception public: explicit internal_error(const Glib::ustring& message); ~internal_error() noexcept override; + + void raise() const override; + exception* clone() const override; }; } // namespace xmlpp diff --git a/libxml++/exceptions/parse_error.cc b/libxml++/exceptions/parse_error.cc index 96bd53e..a83a3fc 100644 --- a/libxml++/exceptions/parse_error.cc +++ b/libxml++/exceptions/parse_error.cc @@ -10,4 +10,14 @@ parse_error::parse_error(const Glib::ustring& message) parse_error::~parse_error() noexcept {} +void parse_error::raise() const +{ + throw *this; +} + +exception* parse_error::clone() const +{ + return new parse_error(*this); +} + } //namespace xmlpp diff --git a/libxml++/exceptions/parse_error.h b/libxml++/exceptions/parse_error.h index 3b386d8..724f931 100644 --- a/libxml++/exceptions/parse_error.h +++ b/libxml++/exceptions/parse_error.h @@ -32,6 +32,9 @@ class parse_error : public exception public: explicit parse_error(const Glib::ustring& message); ~parse_error() noexcept override; + + void raise() const override; + exception* clone() const override; }; } // namespace xmlpp diff --git a/libxml++/exceptions/validity_error.cc b/libxml++/exceptions/validity_error.cc index b0fdc24..81006b6 100644 --- a/libxml++/exceptions/validity_error.cc +++ b/libxml++/exceptions/validity_error.cc @@ -10,4 +10,14 @@ validity_error::validity_error(const Glib::ustring& message) validity_error::~validity_error() noexcept {} +void validity_error::raise() const +{ + throw *this; +} + +exception* validity_error::clone() const +{ + return new validity_error(*this); +} + } //namespace xmlpp diff --git a/libxml++/exceptions/validity_error.h b/libxml++/exceptions/validity_error.h index 503eeb3..e264e4b 100644 --- a/libxml++/exceptions/validity_error.h +++ b/libxml++/exceptions/validity_error.h @@ -32,6 +32,9 @@ class validity_error : public parse_error public: explicit validity_error(const Glib::ustring& message); ~validity_error() noexcept override; + + void raise() const override; + exception* clone() const override; }; } // namespace xmlpp diff --git a/libxml++/exceptions/wrapped_exception.cc b/libxml++/exceptions/wrapped_exception.cc new file mode 100644 index 0000000..062dbeb --- /dev/null +++ b/libxml++/exceptions/wrapped_exception.cc @@ -0,0 +1,46 @@ +/* Copyright (C) 2015 The libxml++ development team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "wrapped_exception.h" + +namespace xmlpp +{ + +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR + +wrapped_exception::wrapped_exception(std::exception_ptr exception_ptr) + : exception("Wrapped exception"), exception_ptr_(exception_ptr) +{ +} + +wrapped_exception::~wrapped_exception() noexcept +{ +} + +void wrapped_exception::raise() const +{ + std::rethrow_exception(exception_ptr_); +} + +exception* wrapped_exception::clone() const +{ + return new wrapped_exception(exception_ptr_); +} + +#endif // LIBXMLXX_HAVE_EXCEPTION_PTR + +} // namespace xmlpp diff --git a/libxml++/exceptions/wrapped_exception.h b/libxml++/exceptions/wrapped_exception.h new file mode 100644 index 0000000..ffcafea --- /dev/null +++ b/libxml++/exceptions/wrapped_exception.h @@ -0,0 +1,56 @@ +/* Copyright (C) 2015 The libxml++ development team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __LIBXMLPP_WRAPPED_EXCEPTION_H +#define __LIBXMLPP_WRAPPED_EXCEPTION_H + +#include + +#include +#include + +namespace xmlpp +{ + +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +/** Helper class for propagating an exception through C code. + * Should not be used by applications. + * Does not exist in systems that don't support std::exception_ptr. + * + * @newin{2,40} + */ +class wrapped_exception : public exception +{ +public: + explicit wrapped_exception(std::exception_ptr exception_ptr); + ~wrapped_exception() noexcept override; + + void raise() const override; + exception* clone() const override; + +private: + std::exception_ptr exception_ptr_; +}; +#endif //DOXYGEN_SHOULD_SKIP_THIS + +#endif // LIBXMLXX_HAVE_EXCEPTION_PTR + +} // namespace xmlpp + +#endif // __LIBXMLPP_WRAPPED_EXCEPTION_H diff --git a/libxml++/filelist.am b/libxml++/filelist.am index aeedd0c..ee338a8 100644 --- a/libxml++/filelist.am +++ b/libxml++/filelist.am @@ -15,7 +15,8 @@ h_exceptions_sources_public = \ exceptions/exception.h \ exceptions/parse_error.h \ exceptions/validity_error.h \ - exceptions/internal_error.h + exceptions/internal_error.h \ + exceptions/wrapped_exception.h h_io_sources_public = \ io/istreamparserinputbuffer.h \ io/outputbuffer.h \ diff --git a/libxml++/io/parserinputbuffer.cc b/libxml++/io/parserinputbuffer.cc index 891b5ac..e4d2473 100644 --- a/libxml++/io/parserinputbuffer.cc +++ b/libxml++/io/parserinputbuffer.cc @@ -1,4 +1,4 @@ -/* document.h +/* parserinputbuffer.cc * this file is part of libxml++ * * copyright (C) 2003 by libxml++ developer's team @@ -39,7 +39,7 @@ namespace xmlpp &ParserInputBufferCallback::on_close, static_cast(this), XML_CHAR_ENCODING_NONE); - if(impl_ == 0) + if (!impl_) { throw internal_error("Cannot initialise underlying xmlParserInputBuffer"); } @@ -54,7 +54,7 @@ namespace xmlpp bool result = do_close(); // the underlying structure is being freed by libxml, the pointer will soon be // invalid. - impl_ = 0; + impl_ = nullptr; return result; } diff --git a/libxml++/nodes/element.cc b/libxml++/nodes/element.cc index cb9baa9..3cc3697 100644 --- a/libxml++/nodes/element.cc +++ b/libxml++/nodes/element.cc @@ -67,7 +67,7 @@ Attribute* Element::get_attribute(const Glib::ustring& name, { ns_uri = get_namespace_uri_for_prefix(ns_prefix); if (ns_uri.empty()) - return 0; // No such prefix. + return nullptr; // No such prefix. } // The return value of xmlHasNsProp() may be either an xmlAttr*, pointing to an @@ -75,14 +75,14 @@ Attribute* Element::get_attribute(const Glib::ustring& name, // cast to an xmlAttr*, pointing to the declaration of an attribute with a // default value (XML_ATTRIBUTE_DECL). auto attr = xmlHasNsProp(const_cast(cobj()), (const xmlChar*)name.c_str(), - ns_uri.empty() ? 0 : (const xmlChar*)ns_uri.c_str()); + ns_uri.empty() ? nullptr : (const xmlChar*)ns_uri.c_str()); if (attr) { Node::create_wrapper(reinterpret_cast(attr)); return reinterpret_cast(attr->_private); } - return 0; + return nullptr; } const Attribute* Element::get_attribute(const Glib::ustring& name, @@ -128,7 +128,7 @@ Attribute* Element::set_attribute(const Glib::ustring& name, const Glib::ustring return reinterpret_cast(attr->_private); } else - return 0; + return nullptr; } void Element::remove_attribute(const Glib::ustring& name, const Glib::ustring& ns_prefix) @@ -155,7 +155,7 @@ Element* Element::add_child_element(xmlpp::Node* previous_sibling, const Glib::ustring& name, const Glib::ustring& ns_prefix) { if (!previous_sibling) - return 0; + return nullptr; auto child = create_new_child_element_node(name, ns_prefix); auto node = xmlAddNextSibling(previous_sibling->cobj(), child); @@ -166,7 +166,7 @@ Element* Element::add_child_element_before(xmlpp::Node* next_sibling, const Glib::ustring& name, const Glib::ustring& ns_prefix) { if (!next_sibling) - return 0; + return nullptr; auto child = create_new_child_element_node(name, ns_prefix); auto node = xmlAddPrevSibling(next_sibling->cobj(), child); @@ -186,7 +186,7 @@ Element* Element::add_child_element_with_new_ns(xmlpp::Node* previous_sibling, const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix) { if (!previous_sibling) - return 0; + return nullptr; auto child = create_new_child_element_node_with_new_ns(name, ns_uri, ns_prefix); auto node = xmlAddNextSibling(previous_sibling->cobj(), child); @@ -198,7 +198,7 @@ Element* Element::add_child_element_before_with_new_ns(xmlpp::Node* next_sibling const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix) { if (!next_sibling) - return 0; + return nullptr; auto child = create_new_child_element_node_with_new_ns(name, ns_uri, ns_prefix); auto node = xmlAddPrevSibling(next_sibling->cobj(), child); @@ -216,7 +216,7 @@ _xmlNode* Element::create_new_child_element_node(const Glib::ustring& name, if (ns_prefix.empty()) { //Retrieve default namespace if it exists - ns = xmlSearchNs(cobj()->doc, cobj(), 0); + ns = xmlSearchNs(cobj()->doc, cobj(), nullptr); } else { @@ -235,12 +235,12 @@ _xmlNode* Element::create_new_child_element_node_with_new_ns(const Glib::ustring if (cobj()->type != XML_ELEMENT_NODE) throw internal_error("You can only add child nodes to element nodes."); - auto child = xmlNewNode(0, (const xmlChar*)name.c_str()); + auto child = xmlNewNode(nullptr, (const xmlChar*)name.c_str()); if (!child) throw internal_error("Could not create new element node."); - auto ns = xmlNewNs(child, (const xmlChar*)(ns_uri.empty() ? 0 : ns_uri.c_str()), - (const xmlChar*)(ns_prefix.empty() ? 0 : ns_prefix.c_str()) ); + auto ns = xmlNewNs(child, (const xmlChar*)(ns_uri.empty() ? nullptr : ns_uri.c_str()), + (const xmlChar*)(ns_prefix.empty() ? nullptr : ns_prefix.c_str()) ); // xmlNewNs() does not create a namespace node for the predefined xml prefix. // It's usually defined in the document and not in any specific node. if (!ns && ns_prefix == "xml") @@ -302,13 +302,13 @@ TextNode* Element::add_child_text(const Glib::ustring& content) Node::create_wrapper(node); return static_cast(node->_private); } - return 0; + return nullptr; } TextNode* Element::add_child_text(xmlpp::Node* previous_sibling, const Glib::ustring& content) { if(!previous_sibling) - return 0; + return nullptr; if(cobj()->type == XML_ELEMENT_NODE) { @@ -324,13 +324,13 @@ TextNode* Element::add_child_text(xmlpp::Node* previous_sibling, const Glib::ust Node::create_wrapper(node); return static_cast(node->_private); } - return 0; + return nullptr; } TextNode* Element::add_child_text_before(xmlpp::Node* next_sibling, const Glib::ustring& content) { if(!next_sibling) - return 0; + return nullptr; if(cobj()->type == XML_ELEMENT_NODE) { @@ -346,7 +346,7 @@ TextNode* Element::add_child_text_before(xmlpp::Node* next_sibling, const Glib:: Node::create_wrapper(node); return static_cast(node->_private); } - return 0; + return nullptr; } bool Element::has_child_text() const @@ -357,13 +357,13 @@ bool Element::has_child_text() const void Element::set_namespace_declaration(const Glib::ustring& ns_uri, const Glib::ustring& ns_prefix) { //Create a new namespace declaration for this element: - auto ns = xmlNewNs(cobj(), (const xmlChar*)(ns_uri.empty() ? 0 : ns_uri.c_str()), - (const xmlChar*)(ns_prefix.empty() ? 0 : ns_prefix.c_str()) ); + auto ns = xmlNewNs(cobj(), (const xmlChar*)(ns_uri.empty() ? nullptr : ns_uri.c_str()), + (const xmlChar*)(ns_prefix.empty() ? nullptr : ns_prefix.c_str()) ); if (!ns) { // Not an error, if we try to assign the same uri to the prefix once again. ns = xmlSearchNs(cobj()->doc, cobj(), - (const xmlChar*)(ns_prefix.empty() ? 0 : ns_prefix.c_str())); + (const xmlChar*)(ns_prefix.empty() ? nullptr : ns_prefix.c_str())); const char* const previous_href = (ns && ns->href) ? (const char*)ns->href : ""; if (!ns || ns_uri != previous_href) throw exception("Could not add namespace declaration with URI=" + ns_uri + diff --git a/libxml++/nodes/element.h b/libxml++/nodes/element.h index bc879d9..e013828 100644 --- a/libxml++/nodes/element.h +++ b/libxml++/nodes/element.h @@ -59,7 +59,7 @@ public: /** Get the attribute with this name, and optionally with this namespace. * @param name The name of the attribute that will be retrieved. * @param ns_prefix Namespace prefix. - * @return The attribute, or 0 if no suitable Attribute was found. + * @return The attribute, or nullptr if no suitable Attribute was found. * Is either an AttributeNode*, pointing to an explicitly set * attribute, or an AttributeDeclaration*, pointing to the declaration * of an attribute with a default value. @@ -70,7 +70,7 @@ public: /** Get the attribute with this name, and optionally with this namespace. * @param name The name of the attribute that will be retrieved. * @param ns_prefix Namespace prefix. - * @return The attribute, or 0 if no suitable Attribute was found. + * @return The attribute, or nullptr if no suitable Attribute was found. * Is either an AttributeNode*, pointing to an explicitly set * attribute, or an AttributeDeclaration*, pointing to the declaration * of an attribute with a default value. @@ -95,7 +95,7 @@ public: * @param name The name of the attribute whose value will change. * @param value The new value for the attribute * @param ns_prefix Namespace prefix. If the prefix has not been declared then this method will throw an exception. - * @return The attribute that was changed, or 0 is no suitable Attribute was found. + * @return The attribute that was changed, or nullptr is no suitable Attribute was found. * @throws xmlpp::exception */ Attribute* set_attribute(const Glib::ustring& name, const Glib::ustring& value, diff --git a/libxml++/nodes/node.cc b/libxml++/nodes/node.cc index 16cb55f..71eab85 100644 --- a/libxml++/nodes/node.cc +++ b/libxml++/nodes/node.cc @@ -222,7 +222,7 @@ Node::Node(xmlNode* node) : impl_(node) { if (!impl_) - throw internal_error("xmlNode pointer cannot be 0"); + throw internal_error("xmlNode pointer cannot be nullptr"); impl_->_private = this; } @@ -238,7 +238,7 @@ const Element* Node::get_parent() const Element* Node::get_parent() { if(!(cobj()->parent && cobj()->parent->type == XML_ELEMENT_NODE)) - return 0; + return nullptr; Node::create_wrapper(cobj()->parent); return static_cast(cobj()->parent->_private); @@ -252,7 +252,7 @@ const Node* Node::get_next_sibling() const Node* Node::get_next_sibling() { if(!cobj()->next) - return 0; + return nullptr; Node::create_wrapper(cobj()->next); return static_cast(cobj()->next->_private); @@ -266,7 +266,7 @@ const Node* Node::get_previous_sibling() const Node* Node::get_previous_sibling() { if(!cobj()->prev) - return 0; + return nullptr; Node::create_wrapper(cobj()->prev); return static_cast(cobj()->prev->_private); @@ -276,7 +276,7 @@ Node* Node::get_first_child(const Glib::ustring& name) { auto child = impl_->children; if(!child) - return 0; + return nullptr; do { @@ -285,7 +285,7 @@ Node* Node::get_first_child(const Glib::ustring& name) } while((child = child->next)); - return 0; + return nullptr; } const Node* Node::get_first_child(const Glib::ustring& name) const @@ -320,7 +320,7 @@ void Node::remove_node(Node* node) Node* Node::import_node(const Node* node, bool recursive) { if (!node) - return 0; + return nullptr; //Create the node, by copying: auto imported_node = xmlDocCopyNode(const_cast(node->cobj()), impl_->doc, recursive); @@ -332,7 +332,7 @@ Node* Node::import_node(const Node* node, bool recursive) if (imported_node->type == XML_ATTRIBUTE_NODE && impl_->type == XML_ELEMENT_NODE) { auto old_attr = xmlHasNsProp(impl_, imported_node->name, - imported_node->ns ? imported_node->ns->href : 0); + imported_node->ns ? imported_node->ns->href : nullptr); if (old_attr && old_attr->type != XML_ATTRIBUTE_DECL) { // *this has an attribute with the same name as the imported attribute. @@ -396,12 +396,12 @@ Glib::ustring Node::get_path() const Node::NodeSet Node::find(const Glib::ustring& xpath) { - return find_common(xpath, 0, impl_); + return find_common(xpath, nullptr, impl_); } Node::const_NodeSet Node::find(const Glib::ustring& xpath) const { - return find_common(xpath, 0, impl_); + return find_common(xpath, nullptr, impl_); } Node::NodeSet Node::find(const Glib::ustring& xpath, const PrefixNsMap& namespaces) @@ -416,7 +416,7 @@ Node::const_NodeSet Node::find(const Glib::ustring& xpath, const PrefixNsMap& na bool Node::eval_to_boolean(const Glib::ustring& xpath, XPathResultType* result_type) const { - return eval_common_to_boolean(xpath, 0, result_type, impl_); + return eval_common_to_boolean(xpath, nullptr, result_type, impl_); } bool Node::eval_to_boolean(const Glib::ustring& xpath, const PrefixNsMap& namespaces, @@ -427,7 +427,7 @@ bool Node::eval_to_boolean(const Glib::ustring& xpath, const PrefixNsMap& namesp double Node::eval_to_number(const Glib::ustring& xpath, XPathResultType* result_type) const { - return eval_common_to_number(xpath, 0, result_type, impl_); + return eval_common_to_number(xpath, nullptr, result_type, impl_); } double Node::eval_to_number(const Glib::ustring& xpath, const PrefixNsMap& namespaces, @@ -438,7 +438,7 @@ double Node::eval_to_number(const Glib::ustring& xpath, const PrefixNsMap& names Glib::ustring Node::eval_to_string(const Glib::ustring& xpath, XPathResultType* result_type) const { - return eval_common_to_string(xpath, 0, result_type, impl_); + return eval_common_to_string(xpath, nullptr, result_type, impl_); } Glib::ustring Node::eval_to_string(const Glib::ustring& xpath, const PrefixNsMap& namespaces, @@ -502,7 +502,7 @@ void Node::set_namespace(const Glib::ustring& ns_prefix) } //Look for the existing namespace to use: - auto ns = xmlSearchNs( cobj()->doc, cobj(), (xmlChar*)(ns_prefix.empty() ? 0 : ns_prefix.c_str()) ); + auto ns = xmlSearchNs( cobj()->doc, cobj(), (xmlChar*)(ns_prefix.empty() ? nullptr : ns_prefix.c_str()) ); if(ns) { //Use it for this element: diff --git a/libxml++/nodes/node.h b/libxml++/nodes/node.h index 8966b8d..577505d 100644 --- a/libxml++/nodes/node.h +++ b/libxml++/nodes/node.h @@ -57,7 +57,7 @@ public: typedef std::vector NodeSet; typedef std::vector const_NodeSet; - /** @throws xmlpp::internal_error If @a node is 0. + /** @throws xmlpp::internal_error If @a node is nullptr. */ explicit Node(_xmlNode* node); @@ -100,39 +100,39 @@ public: int get_line() const; /** Get the parent element for this node. - * @returns The parent node, or 0 if the node has no parent element. + * @returns The parent node, or nullptr if the node has no parent element. */ const Element* get_parent() const; /** Get the parent element for this node. - * @returns The parent node, or 0 if the node has no parent element. + * @returns The parent node, or nullptr if the node has no parent element. */ Element* get_parent(); /** Get the next sibling for this node. - * @returns The next sibling, or 0 if the node has no next sibling. + * @returns The next sibling, or nullptr if the node has no next sibling. */ const Node* get_next_sibling() const; /** Get the next sibling for this node. - * @returns The next sibling, or 0 if the node has no next sibling. + * @returns The next sibling, or nullptr if the node has no next sibling. */ Node* get_next_sibling(); /** Get the previous sibling for this node . - * @returns The previous sibling, or 0 if the node has no previous sibling. + * @returns The previous sibling, or nullptr if the node has no previous sibling. */ const Node* get_previous_sibling() const; /** Get the previous sibling for this node. - * @returns The previous sibling, or 0 if the node has no previous sibling. + * @returns The previous sibling, or nullptr if the node has no previous sibling. */ Node* get_previous_sibling(); /** Get the first child of this node. * You may optionally get the first child node which has a certain name. * @param name The name of the requested child node, or an empty string. - * @returns The first child, or 0 if no child node (with the specified name) exists. + * @returns The first child, or nullptr if no child node (with the specified name) exists. * * @newin{2,36} */ @@ -141,7 +141,7 @@ public: /** Get the first child of this node. * You may optionally get the first child node which has a certain name. * @param name The name of the requested child node, or an empty string. - * @returns The first child, or 0 if no child node (with the specified name) exists. + * @returns The first child, or nullptr if no child node (with the specified name) exists. * * @newin{2,36} */ @@ -233,7 +233,7 @@ public: /** Evaluate an XPath expression. * @param xpath The XPath expression. * @param[out] result_type Result type of the XPath expression before conversion - * to boolean. If 0, the result type is not returned. + * to boolean. If nullptr, the result type is not returned. * @returns The value of the XPath expression. If the value is not of type boolean, * it is converted to boolean. * @throws xmlpp::exception If the XPath expression cannot be evaluated. @@ -248,7 +248,7 @@ public: * @param xpath The XPath expression. * @param namespaces A map of namespace prefixes to namespace URIs to be used while evaluating. * @param[out] result_type Result type of the XPath expression before conversion - * to boolean. If 0, the result type is not returned. + * to boolean. If nullptr, the result type is not returned. * @returns The value of the XPath expression. If the value is not of type boolean, * it is converted to boolean. * @throws xmlpp::exception If the XPath expression cannot be evaluated. @@ -262,7 +262,7 @@ public: /** Evaluate an XPath expression. * @param xpath The XPath expression. * @param[out] result_type Result type of the XPath expression before conversion - * to number. If 0, the result type is not returned. + * to number. If nullptr, the result type is not returned. * @returns The value of the XPath expression. If the value is not of type number, * it is converted to number. * @throws xmlpp::exception If the XPath expression cannot be evaluated. @@ -276,7 +276,7 @@ public: * @param xpath The XPath expression. * @param namespaces A map of namespace prefixes to namespace URIs to be used while evaluating. * @param[out] result_type Result type of the XPath expression before conversion - * to number. If 0, the result type is not returned. + * to number. If nullptr, the result type is not returned. * @returns The value of the XPath expression. If the value is not of type number, * it is converted to number. * @throws xmlpp::exception If the XPath expression cannot be evaluated. @@ -290,7 +290,7 @@ public: /** Evaluate an XPath expression. * @param xpath The XPath expression. * @param[out] result_type Result type of the XPath expression before conversion - * to string. If 0, the result type is not returned. + * to string. If nullptr, the result type is not returned. * @returns The value of the XPath expression. If the value is not of type string, * it is converted to string. * @throws xmlpp::exception If the XPath expression cannot be evaluated. @@ -304,7 +304,7 @@ public: * @param xpath The XPath expression. * @param namespaces A map of namespace prefixes to namespace URIs to be used while evaluating. * @param[out] result_type Result type of the XPath expression before conversion - * to string. If 0, the result type is not returned. + * to string. If nullptr, the result type is not returned. * @returns The value of the XPath expression. If the value is not of type string, * it is converted to string. * @throws xmlpp::exception If the XPath expression cannot be evaluated. diff --git a/libxml++/parsers/domparser.cc b/libxml++/parsers/domparser.cc index 2628a53..8ca3e7f 100644 --- a/libxml++/parsers/domparser.cc +++ b/libxml++/parsers/domparser.cc @@ -121,12 +121,12 @@ void DomParser::parse_context() } doc_ = new Document(context_->myDoc); - // This is to indicate to release_underlying that we took the + // This is to indicate to release_underlying() that we took the // ownership on the doc. context_->myDoc = nullptr; - //Free the parse context, but keep the document alive so people can navigate the DOM tree: - //TODO: Why not keep the context alive too? + // Free the parser context because it's not needed anymore, + // but keep the document alive so people can navigate the DOM tree: Parser::release_underlying(); } @@ -138,11 +138,11 @@ void DomParser::parse_stream(std::istream& in) xmlResetLastError(); context_ = xmlCreatePushParserCtxt( - 0, // Setting those two parameters to 0 force the parser - 0, // to create a document while parsing. - 0, // chunk - 0, // size - 0); // no filename for fetching external entities + nullptr, // Setting those two parameters to nullptr force the parser + nullptr, // to create a document while parsing. + nullptr, // chunk + 0, // size + nullptr); // no filename for fetching external entities if(!context_) { @@ -151,7 +151,11 @@ void DomParser::parse_stream(std::istream& in) initialize_context(); - //TODO: Shouldn't we use a Glib::ustring here, and some alternative to std::getline()? + // std::string or Glib::ustring? + // Output from the XML parser is UTF-8 encoded. + // But the istream "in" is input, i.e. an XML file. It can use any encoding. + // If it's not UTF-8, the file itself must contain information about which + // encoding it uses. See the XML specification. Thus use std::string. int firstParseError = XML_ERR_OK; std::string line; while(std::getline(in, line)) @@ -169,7 +173,7 @@ void DomParser::parse_stream(std::istream& in) firstParseError = parseError; } - const int parseError = xmlParseChunk(context_, 0, 0, 1 /* last chunk */); + const int parseError = xmlParseChunk(context_, nullptr, 0, 1 /* last chunk */); if (parseError != XML_ERR_OK && firstParseError == XML_ERR_OK) firstParseError = parseError; @@ -194,13 +198,12 @@ void DomParser::parse_stream(std::istream& in) } doc_ = new Document(context_->myDoc); - // This is to indicate to release_underlying that we took the + // This is to indicate to release_underlying() that we took the // ownership on the doc. context_->myDoc = nullptr; - - //Free the parse context, but keep the document alive so people can navigate the DOM tree: - //TODO: Why not keep the context alive too? + // Free the parser context because it's not needed anymore, + // but keep the document alive so people can navigate the DOM tree: Parser::release_underlying(); } diff --git a/libxml++/parsers/domparser.h b/libxml++/parsers/domparser.h index bcf997c..63010cc 100644 --- a/libxml++/parsers/domparser.h +++ b/libxml++/parsers/domparser.h @@ -79,12 +79,12 @@ public: operator bool() const; /** Get the parsed document. - * @returns A pointer to the parsed document, or 0. + * @returns A pointer to the parsed document, or nullptr. */ Document* get_document(); /** Get the parsed document. - * @returns A pointer to the parsed document, or 0. + * @returns A pointer to the parsed document, or nullptr. */ const Document* get_document() const; diff --git a/libxml++/parsers/parser.cc b/libxml++/parsers/parser.cc index e45a905..503987a 100644 --- a/libxml++/parsers/parser.cc +++ b/libxml++/parsers/parser.cc @@ -4,6 +4,7 @@ * included with libxml++ as the file COPYING. */ +#include "libxml++/exceptions/wrapped_exception.h" #include "libxml++/parsers/parser.h" #include @@ -34,7 +35,7 @@ struct Parser::Impl }; Parser::Parser() -: context_(nullptr), exception_ptr_(nullptr), pimpl_(new Impl) +: context_(nullptr), exception_(nullptr), pimpl_(new Impl) { } @@ -193,20 +194,7 @@ void Parser::on_validity_warning(const Glib::ustring& message) void Parser::check_for_error_and_warning_messages() { - Glib::ustring msg; - try - { - if (exception_ptr_) - std::rethrow_exception(exception_ptr_); - } - catch (const std::exception& e) - { - msg = e.what(); - } - catch (...) - { - msg = "Unknown exception\n"; - } + Glib::ustring msg(exception_ ? exception_->what() : ""); bool parser_msg = false; bool validity_msg = false; @@ -238,17 +226,10 @@ void Parser::check_for_error_and_warning_messages() pimpl_->validate_warning_.erase(); } - try - { - if (validity_msg) - throw validity_error(msg); - else if (parser_msg) - throw parse_error(msg); - } - catch (...) - { - exception_ptr_ = std::current_exception(); - } + if (validity_msg) + exception_.reset(new validity_error(msg)); + else if (parser_msg) + exception_.reset(new parse_error(msg)); } //static @@ -308,10 +289,7 @@ void Parser::callback_error_or_warning(MsgType msg_type, void* ctx, // returns an error message (as it usually does). //Convert the ... to a string: - char buff[1024]; - - vsnprintf(buff, sizeof(buff)/sizeof(buff[0]), msg, var_args); - ubuff = buff; + ubuff = format_printf_message(msg, var_args); } try @@ -342,7 +320,30 @@ void Parser::callback_error_or_warning(MsgType msg_type, void* ctx, void Parser::handle_exception() { - exception_ptr_ = std::current_exception(); + try + { + throw; // Re-throw current exception + } + catch (const exception& e) + { + exception_.reset(e.clone()); + } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR + catch (...) + { + exception_.reset(new wrapped_exception(std::current_exception())); + } +#else + catch (const std::exception& e) + { + exception_.reset(new exception(e.what())); + } + catch (...) + { + exception_.reset(new exception("An exception was thrown that is not derived from std::exception or xmlpp::exception.\n" + "It could not be caught and rethrown because this platform does not support std::exception_ptr.")); + } +#endif if (context_) xmlStopParser(context_); @@ -354,11 +355,10 @@ void Parser::check_for_exception() { check_for_error_and_warning_messages(); - if (exception_ptr_) + if (exception_) { - std::exception_ptr tmp(exception_ptr_); - exception_ptr_ = nullptr; - std::rethrow_exception(tmp); + std::unique_ptr tmp(std::move(exception_)); + tmp->raise(); } } diff --git a/libxml++/parsers/parser.h b/libxml++/parsers/parser.h index 4384b9f..71e65a2 100644 --- a/libxml++/parsers/parser.h +++ b/libxml++/parsers/parser.h @@ -19,7 +19,6 @@ #include #include // va_list #include // std::unique_ptr -#include // std::exception_ptr #ifndef DOXYGEN_SHOULD_SKIP_THIS extern "C" { @@ -198,7 +197,7 @@ protected: const char* msg, va_list var_args); _xmlParserCtxt* context_; - std::exception_ptr exception_ptr_; + std::unique_ptr exception_; private: struct Impl; diff --git a/libxml++/parsers/saxparser.cc b/libxml++/parsers/saxparser.cc index bb41549..473f90d 100644 --- a/libxml++/parsers/saxparser.cc +++ b/libxml++/parsers/saxparser.cc @@ -43,37 +43,37 @@ SaxParser::SaxParser(bool use_get_entity) { xmlSAXHandler temp = { SaxParserCallback::internal_subset, - 0, // isStandalone - 0, // hasInternalSubset - 0, // hasExternalSubset - 0, // resolveEntity - use_get_entity ? SaxParserCallback::get_entity : 0, // getEntity + nullptr, // isStandalone + nullptr, // hasInternalSubset + nullptr, // hasExternalSubset + nullptr, // resolveEntity + use_get_entity ? SaxParserCallback::get_entity : nullptr, // getEntity SaxParserCallback::entity_decl, // entityDecl - 0, // notationDecl - 0, // attributeDecl - 0, // elementDecl - 0, // unparsedEntityDecl - 0, // setDocumentLocator + nullptr, // notationDecl + nullptr, // attributeDecl + nullptr, // elementDecl + nullptr, // unparsedEntityDecl + nullptr, // setDocumentLocator SaxParserCallback::start_document, // startDocument SaxParserCallback::end_document, // endDocument SaxParserCallback::start_element, // startElement SaxParserCallback::end_element, // endElement - 0, // reference + nullptr, // reference SaxParserCallback::characters, // characters - 0, // ignorableWhitespace - 0, // processingInstruction + nullptr, // ignorableWhitespace + nullptr, // processingInstruction SaxParserCallback::comment, // comment SaxParserCallback::warning, // warning SaxParserCallback::error, // error SaxParserCallback::fatal_error, // fatalError - 0, // getParameterEntity + nullptr, // getParameterEntity SaxParserCallback::cdata_block, // cdataBlock - 0, // externalSubset - 0, // initialized - 0, // private - 0, // startElementNs - 0, // endElementNs - 0, // serror + nullptr, // externalSubset + 0, // initialized + nullptr, // private + nullptr, // startElementNs + nullptr, // endElementNs + nullptr, // serror }; *sax_handler_ = temp; @@ -221,10 +221,10 @@ void SaxParser::parse_stream(std::istream& in) context_ = xmlCreatePushParserCtxt( sax_handler_.get(), - 0, // user_data - 0, // chunk - 0, // size - 0); // no filename for fetching external entities + nullptr, // user_data + nullptr, // chunk + 0, // size + nullptr); // no filename for fetching external entities if(!context_) { @@ -233,10 +233,14 @@ void SaxParser::parse_stream(std::istream& in) initialize_context(); - //TODO: Shouldn't we use a Glib::ustring here, and some alternative to std::getline()? + // std::string or Glib::ustring? + // Output from the XML parser is UTF-8 encoded. + // But the istream "in" is input, i.e. an XML file. It can use any encoding. + // If it's not UTF-8, the file itself must contain information about which + // encoding it uses. See the XML specification. Thus use std::string. int firstParseError = XML_ERR_OK; std::string line; - while (!exception_ptr_ && std::getline(in, line)) + while (!exception_ && std::getline(in, line)) { // since getline does not get the line separator, we have to add it since the parser care // about layout in certain cases. @@ -252,10 +256,10 @@ void SaxParser::parse_stream(std::istream& in) firstParseError = parseError; } - if (!exception_ptr_) + if (!exception_) { //This is called just to terminate parsing. - const int parseError = xmlParseChunk(context_, 0 /* chunk */, 0 /* size */, 1 /* terminate (1 or 0) */); + const int parseError = xmlParseChunk(context_, nullptr /* chunk */, 0 /* size */, 1 /* terminate (1 or 0) */); if (parseError != XML_ERR_OK && firstParseError == XML_ERR_OK) firstParseError = parseError; @@ -289,10 +293,10 @@ void SaxParser::parse_chunk_raw(const unsigned char* contents, size_type bytes_c { context_ = xmlCreatePushParserCtxt( sax_handler_.get(), - 0, // user_data - 0, // chunk - 0, // size - 0); // no filename for fetching external entities + nullptr, // user_data + nullptr, // chunk + 0, // size + nullptr); // no filename for fetching external entities if(!context_) { @@ -304,7 +308,7 @@ void SaxParser::parse_chunk_raw(const unsigned char* contents, size_type bytes_c xmlCtxtResetLastError(context_); int parseError = XML_ERR_OK; - if (!exception_ptr_) + if (!exception_) parseError = xmlParseChunk(context_, (const char*)contents, bytes_count, 0 /* don't terminate */); check_for_exception(); @@ -325,10 +329,10 @@ void SaxParser::finish_chunk_parsing() { context_ = xmlCreatePushParserCtxt( sax_handler_.get(), - 0, // this, // user_data - 0, // chunk - 0, // size - 0); // no filename for fetching external entities + nullptr, // user_data + nullptr, // chunk + 0, // size + nullptr); // no filename for fetching external entities if(!context_) { @@ -340,9 +344,9 @@ void SaxParser::finish_chunk_parsing() xmlCtxtResetLastError(context_); int parseError = XML_ERR_OK; - if (!exception_ptr_) + if (!exception_) //This is called just to terminate parsing. - parseError = xmlParseChunk(context_, 0 /* chunk */, 0 /* size */, 1 /* terminate (1 or 0) */); + parseError = xmlParseChunk(context_, nullptr /* chunk */, 0 /* size */, 1 /* terminate (1 or 0) */); auto error_str = format_xml_parser_error(context_); if (error_str.empty() && parseError != XML_ERR_OK) @@ -429,7 +433,7 @@ void SaxParserCallback::end_document(void* context) auto the_context = static_cast<_xmlParserCtxt*>(context); auto parser = static_cast(the_context->_private); - if (parser->exception_ptr_) + if (parser->exception_) return; try @@ -523,15 +527,13 @@ void SaxParserCallback::warning(void* context, const char* fmt, ...) auto parser = static_cast(the_context->_private); va_list arg; - char buff[1024]; //TODO: Larger/Shared - va_start(arg, fmt); - vsnprintf(buff, sizeof(buff)/sizeof(buff[0]), fmt, arg); + const Glib::ustring buff = format_printf_message(fmt, arg); va_end(arg); try { - parser->on_warning(Glib::ustring(buff)); + parser->on_warning(buff); } catch (...) { @@ -544,19 +546,17 @@ void SaxParserCallback::error(void* context, const char* fmt, ...) auto the_context = static_cast<_xmlParserCtxt*>(context); auto parser = static_cast(the_context->_private); - va_list arg; - char buff[1024]; //TODO: Larger/Shared - - if (parser->exception_ptr_) + if (parser->exception_) return; + va_list arg; va_start(arg, fmt); - vsnprintf(buff, sizeof(buff)/sizeof(buff[0]), fmt, arg); + const Glib::ustring buff = format_printf_message(fmt, arg); va_end(arg); try { - parser->on_error(Glib::ustring(buff)); + parser->on_error(buff); } catch (...) { @@ -570,15 +570,13 @@ void SaxParserCallback::fatal_error(void* context, const char* fmt, ...) auto parser = static_cast(the_context->_private); va_list arg; - char buff[1024]; //TODO: Larger/Shared - va_start(arg, fmt); - vsnprintf(buff, sizeof(buff)/sizeof(buff[0]), fmt, arg); + const Glib::ustring buff = format_printf_message(fmt, arg); va_end(arg); try { - parser->on_fatal_error(Glib::ustring(buff)); + parser->on_fatal_error(buff); } catch (...) { diff --git a/libxml++/parsers/saxparser.h b/libxml++/parsers/saxparser.h index 83ce3a9..cba267b 100644 --- a/libxml++/parsers/saxparser.h +++ b/libxml++/parsers/saxparser.h @@ -25,6 +25,11 @@ namespace xmlpp { /** SAX XML parser. * Derive your own class and override the on_*() methods. * SAX = Simple API for XML + * + * In a system that does not support std::exception_ptr: If an overridden on_*() + * method throws an exception which is not derived from xmlpp::exception, + * that exception is replaced by a xmlpp::exception before it is propagated + * out of the parse method, such as parse_file(). */ class SaxParser : public Parser { @@ -194,7 +199,7 @@ protected: * Unlike the DomParser, the SaxParser will also tell you about entity references for the 5 predefined entities. * * @param name The entity reference name. - * @returns The resolved xmlEntity for the entity reference, or 0 if not found. + * @returns The resolved xmlEntity for the entity reference, or nullptr if not found. * You must include libxml/parser.h in order to use this C struct. * This instance will not be freed by the caller. */ diff --git a/libxml++/parsers/textreader.cc b/libxml++/parsers/textreader.cc index 5eb0414..223dd9a 100644 --- a/libxml++/parsers/textreader.cc +++ b/libxml++/parsers/textreader.cc @@ -38,7 +38,7 @@ TextReader::TextReader( size_type size, const Glib::ustring& uri) : propertyreader(new PropertyReader(*this)), - impl_( xmlReaderForMemory ((const char*)data, size, uri.c_str(), 0, 0) ), + impl_( xmlReaderForMemory ((const char*)data, size, uri.c_str(), nullptr, 0) ), severity_( 0 ) { if( ! impl_ ) @@ -301,7 +301,7 @@ Node* TextReader::get_current_node() } check_for_exceptions(); - return 0; + return nullptr; } const Node* TextReader::get_current_node() const @@ -329,7 +329,7 @@ Node* TextReader::expand() } check_for_exceptions(); - return 0; + return nullptr; } bool TextReader::next() @@ -407,7 +407,7 @@ Glib::ustring TextReader::PropertyReader::String(xmlChar* value, bool free) { owner_.check_for_exceptions(); - if(value == (xmlChar *)0) + if (!value) return Glib::ustring(); const Glib::ustring result = (char *)value; @@ -422,7 +422,7 @@ Glib::ustring TextReader::PropertyReader::String(xmlChar const* value) { owner_.check_for_exceptions(); - if(value == (xmlChar *)0) + if (!value) return Glib::ustring(); return (const char*)value; diff --git a/libxml++/parsers/textreader.h b/libxml++/parsers/textreader.h index 1ebd81a..15a67f0 100644 --- a/libxml++/parsers/textreader.h +++ b/libxml++/parsers/textreader.h @@ -94,7 +94,7 @@ class TextReader: public NonCopyable */ TextReader(const unsigned char* data, size_type size, const Glib::ustring& uri = Glib::ustring()); - ~TextReader(); + ~TextReader() override; /** Moves the position of the current instance to the next node in the stream, exposing its properties. * @return true if the node was read successfully, false if there are no more nodes to read. @@ -221,13 +221,13 @@ class TextReader: public NonCopyable * The C++ wrapper is not deleted. Using this method causes memory leaks, * unless you call xmlpp::Node::free_wrappers(), which is not intended to be * called by the application. - * @returns A pointer to the current node, or 0 in case of error. + * @returns A pointer to the current node, or nullptr in case of error. */ Node* get_current_node(); /** Get a pointer to the current node. * @warning See the non-const get_current_node(). - * @returns A pointer to the current node, or 0 in case of error. + * @returns A pointer to the current node, or nullptr in case of error. */ const Node* get_current_node() const; @@ -239,7 +239,7 @@ class TextReader: public NonCopyable * @warning The C++ wrappers are not deleted. Using this method causes memory leaks, * unless you call xmlpp::Node::free_wrappers(), which is not intended to be * called by the application. - * @returns A pointer to the current node, or 0 in case of error. + * @returns A pointer to the current node, or nullptr in case of error. * @throws xmlpp::parse_error * @throws xmlpp::validity_error */ diff --git a/libxml++/relaxngschema.cc b/libxml++/relaxngschema.cc index cf35ba8..02a2f16 100644 --- a/libxml++/relaxngschema.cc +++ b/libxml++/relaxngschema.cc @@ -91,7 +91,7 @@ void RelaxNGSchema::parse_memory(const Glib::ustring& contents) void RelaxNGSchema::parse_document(const Document* document) { if (!document) - throw parse_error("RelaxNGSchema::parse_document(): document must not be 0."); + throw parse_error("RelaxNGSchema::parse_document(): document must not be nullptr."); // xmlRelaxNGNewDocParserCtxt() takes a copy of the xmlDoc. parse_context(xmlRelaxNGNewDocParserCtxt(const_cast(document->cobj()))); diff --git a/libxml++/validators/dtdvalidator.cc b/libxml++/validators/dtdvalidator.cc index f5b718e..27560de 100644 --- a/libxml++/validators/dtdvalidator.cc +++ b/libxml++/validators/dtdvalidator.cc @@ -144,7 +144,7 @@ void DtdValidator::validate(const Document* document) { if (!document) { - throw internal_error("Document pointer cannot be 0."); + throw internal_error("Document pointer cannot be nullptr."); } if (!pimpl_->dtd) diff --git a/libxml++/validators/dtdvalidator.h b/libxml++/validators/dtdvalidator.h index 4513f8c..e8b841b 100644 --- a/libxml++/validators/dtdvalidator.h +++ b/libxml++/validators/dtdvalidator.h @@ -1,4 +1,4 @@ -/* xml++.h +/* dtdvalidator.h * libxml++ and this file are copyright (C) 2000 by Ari Johnson, * (C) 2002-2004 by the libxml dev team and * are covered by the GNU Lesser General Public License, which should be @@ -103,12 +103,12 @@ public: explicit operator bool() const noexcept override; /** Get the parsed DTD. - * @returns A pointer to the parsed DTD, or 0. + * @returns A pointer to the parsed DTD, or nullptr. */ Dtd* get_dtd(); /** Get the parsed DTD. - * @returns A pointer to the parsed DTD, or 0. + * @returns A pointer to the parsed DTD, or nullptr. */ const Dtd* get_dtd() const; diff --git a/libxml++/validators/relaxngvalidator.cc b/libxml++/validators/relaxngvalidator.cc index 7eb1036..4b7a58f 100644 --- a/libxml++/validators/relaxngvalidator.cc +++ b/libxml++/validators/relaxngvalidator.cc @@ -132,7 +132,7 @@ void RelaxNGValidator::initialize_context() void RelaxNGValidator::validate(const Document* document) { if (!document) - throw internal_error("RelaxNGValidator::validate(): document must not be 0."); + throw internal_error("RelaxNGValidator::validate(): document must not be nullptr."); if (!*this) throw internal_error("RelaxNGValidator::validate(): Must have a schema to validate document"); diff --git a/libxml++/validators/relaxngvalidator.h b/libxml++/validators/relaxngvalidator.h index 7d87309..e67b6b5 100644 --- a/libxml++/validators/relaxngvalidator.h +++ b/libxml++/validators/relaxngvalidator.h @@ -123,12 +123,12 @@ public: explicit operator bool() const noexcept override; /** Get the schema. - * @returns A pointer to the schema, or 0. + * @returns A pointer to the schema, or nullptr. */ RelaxNGSchema* get_schema(); /** Get the schema. - * @returns A pointer to the schema, or 0. + * @returns A pointer to the schema, or nullptr. */ const RelaxNGSchema* get_schema() const; diff --git a/libxml++/validators/validator.cc b/libxml++/validators/validator.cc index cd5d42d..69d0276 100644 --- a/libxml++/validators/validator.cc +++ b/libxml++/validators/validator.cc @@ -1,10 +1,11 @@ -/* xml++.cc +/* validator.cc * libxml++ and this file are copyright (C) 2000 by Ari Johnson * (C) 2002-2004 by the libxml dev team and * are covered by the GNU Lesser General Public License, which should be * included with libxml++ as the file COPYING. */ +#include "libxml++/exceptions/wrapped_exception.h" #include "libxml++/validators/validator.h" #include @@ -15,7 +16,7 @@ namespace xmlpp { Validator::Validator() -: exception_ptr_(nullptr) +: exception_(nullptr) { } @@ -49,20 +50,7 @@ void Validator::on_validity_warning(const Glib::ustring& message) void Validator::check_for_validity_messages() { - Glib::ustring msg; - try - { - if (exception_ptr_) - std::rethrow_exception(exception_ptr_); - } - catch (const std::exception& e) - { - msg = e.what(); - } - catch (...) - { - msg = "Unknown exception\n"; - } + Glib::ustring msg(exception_ ? exception_->what() : ""); bool validity_msg = false; if (!validate_error_.empty()) @@ -79,15 +67,8 @@ void Validator::check_for_validity_messages() validate_warning_.erase(); } - try - { - if (validity_msg) - throw validity_error(msg); - } - catch (...) - { - exception_ptr_ = std::current_exception(); - } + if (validity_msg) + exception_.reset(new validity_error(msg)); } void Validator::callback_validity_error(void* valid_, const char* msg, ...) @@ -98,15 +79,13 @@ void Validator::callback_validity_error(void* valid_, const char* msg, ...) { //Convert the ... to a string: va_list arg; - char buff[1024]; //TODO: Larger/Shared - va_start(arg, msg); - vsnprintf(buff, sizeof(buff)/sizeof(buff[0]), msg, arg); + const Glib::ustring buff = format_printf_message(msg, arg); va_end(arg); try { - validator->on_validity_error(Glib::ustring(buff)); + validator->on_validity_error(buff); } catch (...) { @@ -123,15 +102,13 @@ void Validator::callback_validity_warning(void* valid_, const char* msg, ...) { //Convert the ... to a string: va_list arg; - char buff[1024]; //TODO: Larger/Shared - va_start(arg, msg); - vsnprintf(buff, sizeof(buff)/sizeof(buff[0]), msg, arg); + const Glib::ustring buff = format_printf_message(msg, arg); va_end(arg); try { - validator->on_validity_warning(Glib::ustring(buff)); + validator->on_validity_warning(buff); } catch (...) { @@ -142,7 +119,30 @@ void Validator::callback_validity_warning(void* valid_, const char* msg, ...) void Validator::handle_exception() { - exception_ptr_ = std::current_exception(); + try + { + throw; // Re-throw current exception + } + catch (const exception& e) + { + exception_.reset(e.clone()); + } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR + catch (...) + { + exception_.reset(new wrapped_exception(std::current_exception())); + } +#else + catch (const std::exception& e) + { + exception_.reset(new exception(e.what())); + } + catch (...) + { + exception_.reset(new exception("An exception was thrown that is not derived from std::exception or xmlpp::exception.\n" + "It could not be caught and rethrown because this platform does not support std::exception_ptr.")); + } +#endif // Don't delete the DTD validation context or schema validation context // while validating. It would cause accesses to deallocated memory in libxml2 @@ -160,11 +160,10 @@ void Validator::check_for_exception() { check_for_validity_messages(); - if (exception_ptr_) + if (exception_) { - std::exception_ptr tmp(exception_ptr_); - exception_ptr_ = nullptr; - std::rethrow_exception(tmp); + std::unique_ptr tmp(std::move(exception_)); + tmp->raise(); } } diff --git a/libxml++/validators/validator.h b/libxml++/validators/validator.h index 93f443f..ed32460 100644 --- a/libxml++/validators/validator.h +++ b/libxml++/validators/validator.h @@ -15,7 +15,7 @@ #include #include #include -#include // std::exception_ptr +#include // std::unique_ptr #include extern "C" { @@ -77,7 +77,7 @@ protected: static void callback_validity_error(void* ctx, const char* msg, ...); static void callback_validity_warning(void* ctx, const char* msg, ...); - std::exception_ptr exception_ptr_; + std::unique_ptr exception_; // Built gradually - used in an exception at the end of validation. Glib::ustring validate_error_; Glib::ustring validate_warning_; diff --git a/libxml++/validators/xsdvalidator.cc b/libxml++/validators/xsdvalidator.cc index ebe1c91..cc26d07 100644 --- a/libxml++/validators/xsdvalidator.cc +++ b/libxml++/validators/xsdvalidator.cc @@ -130,7 +130,7 @@ void XsdValidator::initialize_context() void XsdValidator::validate(const Document* document) { if (!document) - throw internal_error("XsdValidator::validate(): document must not be 0."); + throw internal_error("XsdValidator::validate(): document must not be nullptr."); if (!*this) throw internal_error("XsdValidator::validate(): Must have a schema to validate document"); diff --git a/libxml++/validators/xsdvalidator.h b/libxml++/validators/xsdvalidator.h index ff4840b..c012f41 100644 --- a/libxml++/validators/xsdvalidator.h +++ b/libxml++/validators/xsdvalidator.h @@ -114,12 +114,12 @@ public: explicit operator bool() const noexcept override; /** Get the schema. - * @returns A pointer to the schema, or 0. + * @returns A pointer to the schema, or nullptr. */ XsdSchema* get_schema(); /** Get the schema. - * @returns A pointer to the schema, or 0. + * @returns A pointer to the schema, or nullptr. */ const XsdSchema* get_schema() const; diff --git a/libxml++/xsdschema.cc b/libxml++/xsdschema.cc index 4ad470e..1bcd943 100644 --- a/libxml++/xsdschema.cc +++ b/libxml++/xsdschema.cc @@ -94,7 +94,7 @@ void XsdSchema::parse_memory(const Glib::ustring& contents) void XsdSchema::parse_document(const Document* document) { if (!document) - throw parse_error("XsdSchema::parse_document(): document must not be 0."); + throw parse_error("XsdSchema::parse_document(): document must not be nullptr."); xmlResetLastError(); release_underlying(); diff --git a/libxml++config.h.in b/libxml++config.h.in index fa36073..0a90800 100755 --- a/libxml++config.h.in +++ b/libxml++config.h.in @@ -6,8 +6,8 @@ /* Define to omit deprecated API from the library. */ #undef LIBXMLXX_DISABLE_DEPRECATED -/* This is always set. This is only for backwards compatibility. */ -#undef LIBXMLCPP_EXCEPTIONS_ENABLED +/* Defined if the C++ library supports std::exception_ptr. */ +#undef LIBXMLXX_HAVE_EXCEPTION_PTR /* Major version number of libxml++. */ #undef LIBXMLXX_MAJOR_VERSION diff --git a/tests/Makefile.in b/tests/Makefile.in index 7e02d02..b746c30 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -83,13 +83,14 @@ check_PROGRAMS = \ saxparser_parse_stream_inconsistent_state/test$(EXEEXT) subdir = tests DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/macros/depcomp $(top_srcdir)/macros/test-driver + $(top_srcdir)/build/depcomp $(top_srcdir)/build/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/macros/libtool.m4 \ - $(top_srcdir)/macros/ltoptions.m4 \ - $(top_srcdir)/macros/ltsugar.m4 \ - $(top_srcdir)/macros/ltversion.m4 \ - $(top_srcdir)/macros/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/build/cxx_std.m4 \ + $(top_srcdir)/build/libtool.m4 \ + $(top_srcdir)/build/ltoptions.m4 \ + $(top_srcdir)/build/ltsugar.m4 \ + $(top_srcdir)/build/ltversion.m4 \ + $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -140,7 +141,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -depcomp = $(SHELL) $(top_srcdir)/macros/depcomp +depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @@ -378,7 +379,7 @@ RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/macros/test-driver +LOG_DRIVER = $(SHELL) $(top_srcdir)/build/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ @@ -393,7 +394,7 @@ am__set_b = \ am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/macros/test-driver +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) diff --git a/tests/saxparser_chunk_parsing_inconsistent_state/main.cc b/tests/saxparser_chunk_parsing_inconsistent_state/main.cc index 5e34233..136bfb7 100644 --- a/tests/saxparser_chunk_parsing_inconsistent_state/main.cc +++ b/tests/saxparser_chunk_parsing_inconsistent_state/main.cc @@ -15,13 +15,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include +#include + #include #include #include #include -#include - class MySaxParser : public xmlpp::SaxParser { protected: @@ -48,7 +49,11 @@ int main() parser.parse_chunk(" +#include + #include #include #include -#include - - class OnCdataBlockTestParser : public xmlpp::SaxParser { protected: @@ -40,7 +40,11 @@ void test_on_cdata_block() { parser.parse_memory(""); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_cdata_block runtime exception"); @@ -67,7 +71,11 @@ void test_on_characters() { parser.parse_memory("abc"); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_characters runtime exception"); @@ -94,7 +102,11 @@ void test_on_comment() { parser.parse_memory(""); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_comment runtime exception"); @@ -120,7 +132,11 @@ void test_on_end_document() { parser.parse_memory(""); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_end_document runtime exception"); @@ -147,7 +163,11 @@ void test_on_end_element() { parser.parse_memory(""); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_end_element runtime exception"); @@ -177,7 +197,11 @@ void test_on_entity_declaration() { parser.parse_memory("]>"); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_entity_declaration runtime exception"); @@ -203,7 +227,11 @@ void test_on_error() { parser.parse_memory("&unknown;"); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_error runtime exception"); @@ -235,7 +263,11 @@ void test_on_get_entity() { parser.parse_memory("]>&number;"); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_get_entity runtime exception"); @@ -261,7 +293,11 @@ void test_on_start_document() { parser.parse_memory(""); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_start_document runtime exception"); @@ -289,7 +325,11 @@ void test_on_start_element() { parser.parse_memory(""); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "on_start_element runtime exception"); diff --git a/tests/saxparser_parse_stream_inconsistent_state/main.cc b/tests/saxparser_parse_stream_inconsistent_state/main.cc index ea8cf44..4fd1320 100644 --- a/tests/saxparser_parse_stream_inconsistent_state/main.cc +++ b/tests/saxparser_parse_stream_inconsistent_state/main.cc @@ -15,13 +15,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include +#include + #include #include #include #include -#include - class MySaxParser : public xmlpp::SaxParser { protected: @@ -44,7 +45,11 @@ int main() std::stringstream ss(""); parser.parse_stream(ss); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "some custom runtime exception"); @@ -64,7 +69,11 @@ int main() // error should not have been thrown. g_assert_not_reached(); } +#ifdef LIBXMLXX_HAVE_EXCEPTION_PTR catch(const std::runtime_error& e) +#else + catch(const xmlpp::exception& e) +#endif { exceptionThrown = true; g_assert_cmpstr(e.what(), ==, "some custom runtime exception"); -- 2.7.4