aboutsummaryrefslogtreecommitdiff
path: root/libxml2-2.9.10/python
diff options
context:
space:
mode:
Diffstat (limited to 'libxml2-2.9.10/python')
-rw-r--r--libxml2-2.9.10/python/Makefile.am54
-rw-r--r--libxml2-2.9.10/python/Makefile.in1002
-rw-r--r--libxml2-2.9.10/python/README34
-rw-r--r--libxml2-2.9.10/python/TODO57
-rw-r--r--libxml2-2.9.10/python/drv_libxml2.py379
-rwxr-xr-xlibxml2-2.9.10/python/generator.py1228
-rw-r--r--libxml2-2.9.10/python/libxml.c3934
-rw-r--r--libxml2-2.9.10/python/libxml.py788
-rw-r--r--libxml2-2.9.10/python/libxml2-export.c2063
-rw-r--r--libxml2-2.9.10/python/libxml2-py.c14789
-rw-r--r--libxml2-2.9.10/python/libxml2-py.h2063
-rw-r--r--libxml2-2.9.10/python/libxml2-python-api.xml350
-rw-r--r--libxml2-2.9.10/python/libxml2.py9327
-rw-r--r--libxml2-2.9.10/python/libxml2class.py8539
-rw-r--r--libxml2-2.9.10/python/libxml2class.txt1177
-rw-r--r--libxml2-2.9.10/python/libxml_wrap.h279
-rwxr-xr-xlibxml2-2.9.10/python/setup.py.in242
-rw-r--r--libxml2-2.9.10/python/tests/Makefile.am78
-rw-r--r--libxml2-2.9.10/python/tests/Makefile.in688
-rwxr-xr-xlibxml2-2.9.10/python/tests/attribs.py34
-rwxr-xr-xlibxml2-2.9.10/python/tests/build.py59
-rwxr-xr-xlibxml2-2.9.10/python/tests/compareNodes.py50
-rwxr-xr-xlibxml2-2.9.10/python/tests/ctxterror.py56
-rwxr-xr-xlibxml2-2.9.10/python/tests/cutnpaste.py48
-rwxr-xr-xlibxml2-2.9.10/python/tests/dtdvalid.py32
-rwxr-xr-xlibxml2-2.9.10/python/tests/error.py51
-rwxr-xr-xlibxml2-2.9.10/python/tests/inbuf.py30
-rwxr-xr-xlibxml2-2.9.10/python/tests/indexes.py113
-rwxr-xr-xlibxml2-2.9.10/python/tests/input_callback.py148
-rw-r--r--libxml2-2.9.10/python/tests/invalid.xml6
-rwxr-xr-xlibxml2-2.9.10/python/tests/nsdel.py62
-rwxr-xr-xlibxml2-2.9.10/python/tests/outbuf.py110
-rwxr-xr-xlibxml2-2.9.10/python/tests/push.py35
-rwxr-xr-xlibxml2-2.9.10/python/tests/pushSAX.py64
-rwxr-xr-xlibxml2-2.9.10/python/tests/pushSAXhtml.py65
-rwxr-xr-xlibxml2-2.9.10/python/tests/reader.py446
-rwxr-xr-xlibxml2-2.9.10/python/tests/reader2.py265
-rwxr-xr-xlibxml2-2.9.10/python/tests/reader3.py160
-rwxr-xr-xlibxml2-2.9.10/python/tests/reader4.py50
-rwxr-xr-xlibxml2-2.9.10/python/tests/reader5.py47
-rwxr-xr-xlibxml2-2.9.10/python/tests/reader6.py128
-rwxr-xr-xlibxml2-2.9.10/python/tests/reader7.py101
-rwxr-xr-xlibxml2-2.9.10/python/tests/reader8.py36
-rwxr-xr-xlibxml2-2.9.10/python/tests/readererr.py56
-rwxr-xr-xlibxml2-2.9.10/python/tests/readernext.py86
-rwxr-xr-xlibxml2-2.9.10/python/tests/regexp.py32
-rwxr-xr-xlibxml2-2.9.10/python/tests/relaxng.py48
-rwxr-xr-xlibxml2-2.9.10/python/tests/resolver.py44
-rwxr-xr-xlibxml2-2.9.10/python/tests/schema.py52
-rwxr-xr-xlibxml2-2.9.10/python/tests/serialize.py150
-rwxr-xr-xlibxml2-2.9.10/python/tests/sync.py138
-rw-r--r--libxml2-2.9.10/python/tests/test.dtd1
-rwxr-xr-xlibxml2-2.9.10/python/tests/thread2.py99
-rwxr-xr-xlibxml2-2.9.10/python/tests/tst.py28
-rw-r--r--libxml2-2.9.10/python/tests/tst.xml1
-rwxr-xr-xlibxml2-2.9.10/python/tests/tstLastError.py82
-rwxr-xr-xlibxml2-2.9.10/python/tests/tstURI.py41
-rwxr-xr-xlibxml2-2.9.10/python/tests/tstmem.py36
-rwxr-xr-xlibxml2-2.9.10/python/tests/tstxpath.py63
-rw-r--r--libxml2-2.9.10/python/tests/valid.xml4
-rwxr-xr-xlibxml2-2.9.10/python/tests/validDTD.py59
-rwxr-xr-xlibxml2-2.9.10/python/tests/validRNG.py76
-rwxr-xr-xlibxml2-2.9.10/python/tests/validSchemas.py83
-rwxr-xr-xlibxml2-2.9.10/python/tests/validate.py82
-rwxr-xr-xlibxml2-2.9.10/python/tests/walker.py144
-rwxr-xr-xlibxml2-2.9.10/python/tests/xpath.py51
-rwxr-xr-xlibxml2-2.9.10/python/tests/xpathext.py49
-rwxr-xr-xlibxml2-2.9.10/python/tests/xpathleak.py55
-rwxr-xr-xlibxml2-2.9.10/python/tests/xpathns.py29
-rwxr-xr-xlibxml2-2.9.10/python/tests/xpathret.py57
-rw-r--r--libxml2-2.9.10/python/types.c955
71 files changed, 51868 insertions, 0 deletions
diff --git a/libxml2-2.9.10/python/Makefile.am b/libxml2-2.9.10/python/Makefile.am
new file mode 100644
index 0000000..34aed96
--- /dev/null
+++ b/libxml2-2.9.10/python/Makefile.am
@@ -0,0 +1,54 @@
+# Makefile for libxml2 python library
+AUTOMAKE_OPTIONS = 1.4 foreign
+
+SUBDIRS = . tests
+
+docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
+dist_docs_DATA = TODO
+
+EXTRA_DIST = \
+ setup.py \
+ generator.py \
+ libxml.py \
+ libxml2-export.c \
+ libxml2-python-api.xml \
+ libxml2class.py \
+ libxml2class.txt
+
+if WITH_PYTHON
+AM_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(PYTHON_INCLUDES)
+
+python_LTLIBRARIES = libxml2mod.la
+
+libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c
+libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \
+ $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS)
+
+BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
+
+# libxml.c #includes libxml2-export.c
+libxml.$(OBJEXT): libxml2-export.c
+
+libxml2.py: $(srcdir)/libxml.py libxml2class.py
+ cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@
+
+dist_python_DATA = \
+ drv_libxml2.py \
+ libxml2.py
+
+CLEANFILES = *.pyc
+
+MAINTAINERCLEANFILES = libxml2.py libxml2class.*
+
+API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
+GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+
+$(GENERATED): $(srcdir)/generator.py $(API_DESC)
+ $(PYTHON) $(srcdir)/generator.py $(srcdir)
+endif
+
+tests test: all
+ cd tests && $(MAKE) tests
diff --git a/libxml2-2.9.10/python/Makefile.in b/libxml2-2.9.10/python/Makefile.in
new file mode 100644
index 0000000..0aa972a
--- /dev/null
+++ b/libxml2-2.9.10/python/Makefile.in
@@ -0,0 +1,1002 @@
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = python
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_docs_DATA) \
+ $(am__dist_python_DATA_DIST) $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = setup.py
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(docsdir)" \
+ "$(DESTDIR)$(pythondir)"
+LTLIBRARIES = $(python_LTLIBRARIES)
+libxml2mod_la_LIBADD =
+am__libxml2mod_la_SOURCES_DIST = libxml.c libxml_wrap.h libxml2-py.h \
+ libxml2-py.c types.c
+@WITH_PYTHON_TRUE@am_libxml2mod_la_OBJECTS = libxml.lo libxml2-py.lo \
+@WITH_PYTHON_TRUE@ types.lo
+libxml2mod_la_OBJECTS = $(am_libxml2mod_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libxml2mod_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libxml2mod_la_LDFLAGS) $(LDFLAGS) -o $@
+@WITH_PYTHON_TRUE@am_libxml2mod_la_rpath = -rpath $(pythondir)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/libxml.Plo \
+ ./$(DEPDIR)/libxml2-py.Plo ./$(DEPDIR)/types.Plo
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libxml2mod_la_SOURCES)
+DIST_SOURCES = $(am__libxml2mod_la_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__dist_python_DATA_DIST = drv_libxml2.py libxml2.py
+DATA = $(dist_docs_DATA) $(dist_python_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir distdir-am
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/setup.py.in \
+ $(top_srcdir)/depcomp README TODO
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XML_PRIVATE_LIBS = @XML_PRIVATE_LIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Makefile for libxml2 python library
+AUTOMAKE_OPTIONS = 1.4 foreign
+SUBDIRS = . tests
+docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
+dist_docs_DATA = TODO
+EXTRA_DIST = \
+ setup.py \
+ generator.py \
+ libxml.py \
+ libxml2-export.c \
+ libxml2-python-api.xml \
+ libxml2class.py \
+ libxml2class.txt
+
+@WITH_PYTHON_TRUE@AM_CPPFLAGS = \
+@WITH_PYTHON_TRUE@ -I$(top_builddir)/include \
+@WITH_PYTHON_TRUE@ -I$(top_srcdir)/include \
+@WITH_PYTHON_TRUE@ -I$(PYTHON_INCLUDES)
+
+@WITH_PYTHON_TRUE@python_LTLIBRARIES = libxml2mod.la
+@WITH_PYTHON_TRUE@libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c
+@WITH_PYTHON_TRUE@libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \
+@WITH_PYTHON_TRUE@ $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS)
+
+@WITH_PYTHON_TRUE@BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
+@WITH_PYTHON_TRUE@dist_python_DATA = \
+@WITH_PYTHON_TRUE@ drv_libxml2.py \
+@WITH_PYTHON_TRUE@ libxml2.py
+
+@WITH_PYTHON_TRUE@CLEANFILES = *.pyc
+@WITH_PYTHON_TRUE@MAINTAINERCLEANFILES = libxml2.py libxml2class.*
+@WITH_PYTHON_TRUE@API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
+@WITH_PYTHON_TRUE@GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign python/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+install-pythonLTLIBRARIES: $(python_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(python_LTLIBRARIES)'; test -n "$(pythondir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pythondir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pythondir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pythondir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pythondir)"; \
+ }
+
+uninstall-pythonLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(python_LTLIBRARIES)'; test -n "$(pythondir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pythondir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pythondir)/$$f"; \
+ done
+
+clean-pythonLTLIBRARIES:
+ -test -z "$(python_LTLIBRARIES)" || rm -f $(python_LTLIBRARIES)
+ @list='$(python_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libxml2mod.la: $(libxml2mod_la_OBJECTS) $(libxml2mod_la_DEPENDENCIES) $(EXTRA_libxml2mod_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libxml2mod_la_LINK) $(am_libxml2mod_la_rpath) $(libxml2mod_la_OBJECTS) $(libxml2mod_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxml.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxml2-py.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/types.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-dist_docsDATA: $(dist_docs_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_docs_DATA)'; test -n "$(docsdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(docsdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(docsdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docsdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(docsdir)" || exit $$?; \
+ done
+
+uninstall-dist_docsDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_docs_DATA)'; test -n "$(docsdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(docsdir)'; $(am__uninstall_files_from_dir)
+install-dist_pythonDATA: $(dist_python_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_python_DATA)'; test -n "$(pythondir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pythondir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pythondir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythondir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythondir)" || exit $$?; \
+ done
+
+uninstall-dist_pythonDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_python_DATA)'; test -n "$(pythondir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pythondir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(pythondir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-pythonLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f ./$(DEPDIR)/libxml.Plo
+ -rm -f ./$(DEPDIR)/libxml2-py.Plo
+ -rm -f ./$(DEPDIR)/types.Plo
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dist_docsDATA install-dist_pythonDATA \
+ install-pythonLTLIBRARIES
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f ./$(DEPDIR)/libxml.Plo
+ -rm -f ./$(DEPDIR)/libxml2-py.Plo
+ -rm -f ./$(DEPDIR)/types.Plo
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-dist_docsDATA uninstall-dist_pythonDATA \
+ uninstall-pythonLTLIBRARIES
+
+.MAKE: $(am__recursive_targets) all check install install-am \
+ install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--depfiles check check-am clean clean-generic clean-libtool \
+ clean-pythonLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_docsDATA install-dist_pythonDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-pythonLTLIBRARIES install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-dist_docsDATA \
+ uninstall-dist_pythonDATA uninstall-pythonLTLIBRARIES
+
+.PRECIOUS: Makefile
+
+
+# libxml.c #includes libxml2-export.c
+@WITH_PYTHON_TRUE@libxml.$(OBJEXT): libxml2-export.c
+
+@WITH_PYTHON_TRUE@libxml2.py: $(srcdir)/libxml.py libxml2class.py
+@WITH_PYTHON_TRUE@ cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@
+
+@WITH_PYTHON_TRUE@$(GENERATED): $(srcdir)/generator.py $(API_DESC)
+@WITH_PYTHON_TRUE@ $(PYTHON) $(srcdir)/generator.py $(srcdir)
+
+tests test: all
+ cd tests && $(MAKE) tests
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libxml2-2.9.10/python/README b/libxml2-2.9.10/python/README
new file mode 100644
index 0000000..b46eee4
--- /dev/null
+++ b/libxml2-2.9.10/python/README
@@ -0,0 +1,34 @@
+ Module libxml2-python
+ =====================
+
+This is the libxml2 python module, providing access to the
+libxml2 and libxslt (if available) libraries. For general
+informationss on those XML and XSLT libraries check their
+web pages at :
+ http://xmlsoft.org/
+ and
+ http://xmlsoft.org/XSLT/
+
+The latest version of the sources for this module and the
+associated libraries can be found at:
+ ftp://xmlsoft.org/
+
+Binaries packages of the libxml2 and libxslt libraries can
+be found either on the FTP site for Linux, from external
+sources linked from the web pages, or as part of your set of
+packages provided with your operating system.
+
+NOTE:
+this module distribution is not the primary distribution
+of the libxml2 and libxslt Python binding code, but as
+the Python way of packaging those for non-Linux systems.
+The main sources are the libxml2 and libxslt tar.gz found on
+the site. One side effect is that the official RPM packages for
+those modules are not generated from the libxml2-python
+distributions but as part of the normal RPM packaging of
+those two libraries.
+The RPM packages can be found at:
+ http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python
+ http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python
+
+Daniel Veillard
diff --git a/libxml2-2.9.10/python/TODO b/libxml2-2.9.10/python/TODO
new file mode 100644
index 0000000..f446f6e
--- /dev/null
+++ b/libxml2-2.9.10/python/TODO
@@ -0,0 +1,57 @@
+ TODO for the libxml2 Python wrappers
+
+ $Id$
+
+Things to do:
+-------------
+
+- SAX interfaces
+ - push is done but no generic interface
+ - elementDecl need some work
+ - need more testing and check full callbacks for xmllib/sgmlop replacement
+- enums -> libxml.py
+- access to XPath variables
+- xmlBuffer exposure
+- xpathContext, being able to set/get info and clean it up
+- more work needed on context handling for function lookup
+ and use of an hash table.
+- add regression tests
+ - SAX flow
+- DTD element and attributes content accesses
+ - attribute handled in SAX
+ - element needed in both
+
+
+Done:
+-----
+- class hierarchy:
+ + make specific node type inherit from xmlNode
+ done, had to sort the classes in the output
+ + get the generator to output a classes.txt description
+ done libxml2class.txt
+- add regression tests
+ - tests/Makefile.am: export the Python class path
+ - xpath queries
+ - xpath extension
+ - check memory
+ - build tree
+ - saving
+- extensions based on a python.xml description of the new specific
+ interfaces
+ file libxml2-python-api.xml , first entry is xmlRegisterXPathFunction
+- spec file: automatically generate for pythonX.Y if found
+ Done, a bit ugly by running new makes in %install for each level
+ found.
+- error redirections and preformat
+- handling of node.content
+- access to xmlParserCtxt and push mode
+ - needed for SAX too
+ - entry points
+ - wrappers
+ - decent interface for setting/getting behaviour
+- memory debug interfaces
+- SAX interfaces
+ - basic stuff with push is available
+ - basic xmllib replacement
+
+Daniel Veillard
diff --git a/libxml2-2.9.10/python/drv_libxml2.py b/libxml2-2.9.10/python/drv_libxml2.py
new file mode 100644
index 0000000..71b1c67
--- /dev/null
+++ b/libxml2-2.9.10/python/drv_libxml2.py
@@ -0,0 +1,379 @@
+# -*- coding: iso-8859-1 -*-
+""" A SAX2 driver for libxml2, on top of it's XmlReader API
+
+USAGE
+ # put this file (drv_libxml2.py) in PYTHONPATH
+ import xml.sax
+ reader = xml.sax.make_parser(["drv_libxml2"])
+ # ...and the rest is standard python sax.
+
+CAVEATS
+ - Lexical handlers are supported, except for start/endEntity
+ (waiting for XmlReader.ResolveEntity) and start/endDTD
+ - Error callbacks are not exactly synchronous, they tend
+ to be invoked before the corresponding content callback,
+ because the underlying reader interface parses
+ data by chunks of 512 bytes
+
+TODO
+ - search for TODO
+ - some ErrorHandler events (warning)
+ - some ContentHandler events (setDocumentLocator, skippedEntity)
+ - EntityResolver (using libxml2.?)
+ - DTDHandler (if/when libxml2 exposes such node types)
+ - DeclHandler (if/when libxml2 exposes such node types)
+ - property_xml_string?
+ - feature_string_interning?
+ - Incremental parser
+ - additional performance tuning:
+ - one might cache callbacks to avoid some name lookups
+ - one might implement a smarter way to pass attributes to startElement
+ (some kind of lazy evaluation?)
+ - there might be room for improvement in start/endPrefixMapping
+ - other?
+
+"""
+
+__author__ = "Stéphane Bidoul <sbi@skynet.be>"
+__version__ = "0.3"
+
+import sys
+import codecs
+
+if sys.version_info[0] < 3:
+ __author__ = codecs.unicode_escape_decode(__author__)[0]
+
+ StringTypes = (str, unicode)
+ # libxml2 returns strings as UTF8
+ _decoder = codecs.lookup("utf8")[1]
+ def _d(s):
+ if s is None:
+ return s
+ else:
+ return _decoder(s)[0]
+else:
+ StringTypes = str
+ # s is Unicode `str` already
+ def _d(s):
+ return s
+
+from xml.sax._exceptions import *
+from xml.sax import xmlreader, saxutils
+from xml.sax.handler import \
+ feature_namespaces, \
+ feature_namespace_prefixes, \
+ feature_string_interning, \
+ feature_validation, \
+ feature_external_ges, \
+ feature_external_pes, \
+ property_lexical_handler, \
+ property_declaration_handler, \
+ property_dom_node, \
+ property_xml_string
+
+try:
+ import libxml2
+except ImportError:
+ raise SAXReaderNotAvailable("libxml2 not available: " \
+ "import error was: %s" % sys.exc_info()[1])
+
+class Locator(xmlreader.Locator):
+ """SAX Locator adapter for libxml2.xmlTextReaderLocator"""
+
+ def __init__(self,locator):
+ self.__locator = locator
+
+ def getColumnNumber(self):
+ "Return the column number where the current event ends."
+ return -1
+
+ def getLineNumber(self):
+ "Return the line number where the current event ends."
+ return self.__locator.LineNumber()
+
+ def getPublicId(self):
+ "Return the public identifier for the current event."
+ return None
+
+ def getSystemId(self):
+ "Return the system identifier for the current event."
+ return self.__locator.BaseURI()
+
+class LibXml2Reader(xmlreader.XMLReader):
+
+ def __init__(self):
+ xmlreader.XMLReader.__init__(self)
+ # features
+ self.__ns = 0
+ self.__nspfx = 0
+ self.__validate = 0
+ self.__extparams = 1
+ # parsing flag
+ self.__parsing = 0
+ # additional handlers
+ self.__lex_handler = None
+ self.__decl_handler = None
+ # error messages accumulator
+ self.__errors = None
+
+ def _errorHandler(self,arg,msg,severity,locator):
+ if self.__errors is None:
+ self.__errors = []
+ self.__errors.append((severity,
+ SAXParseException(msg,None,
+ Locator(locator))))
+
+ def _reportErrors(self,fatal):
+ for severity,exception in self.__errors:
+ if severity in (libxml2.PARSER_SEVERITY_VALIDITY_WARNING,
+ libxml2.PARSER_SEVERITY_WARNING):
+ self._err_handler.warning(exception)
+ else:
+ # when fatal is set, the parse will stop;
+ # we consider that the last error reported
+ # is the fatal one.
+ if fatal and exception is self.__errors[-1][1]:
+ self._err_handler.fatalError(exception)
+ else:
+ self._err_handler.error(exception)
+ self.__errors = None
+
+ def parse(self, source):
+ self.__parsing = 1
+ try:
+ # prepare source and create reader
+ if isinstance(source, StringTypes):
+ reader = libxml2.newTextReaderFilename(source)
+ else:
+ source = saxutils.prepare_input_source(source)
+ input = libxml2.inputBuffer(source.getByteStream())
+ reader = input.newTextReader(source.getSystemId())
+ reader.SetErrorHandler(self._errorHandler,None)
+ # configure reader
+ if self.__extparams:
+ reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
+ reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
+ reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+ reader.SetParserProp(libxml2.PARSER_VALIDATE,self.__validate)
+ else:
+ reader.SetParserProp(libxml2.PARSER_LOADDTD, 0)
+ # we reuse attribute maps (for a slight performance gain)
+ if self.__ns:
+ attributesNSImpl = xmlreader.AttributesNSImpl({},{})
+ else:
+ attributesImpl = xmlreader.AttributesImpl({})
+ # prefixes to pop (for endPrefixMapping)
+ prefixes = []
+ # start loop
+ self._cont_handler.startDocument()
+ while 1:
+ r = reader.Read()
+ # check for errors
+ if r == 1:
+ if not self.__errors is None:
+ self._reportErrors(0)
+ elif r == 0:
+ if not self.__errors is None:
+ self._reportErrors(0)
+ break # end of parse
+ else:
+ if not self.__errors is None:
+ self._reportErrors(1)
+ else:
+ self._err_handler.fatalError(\
+ SAXException("Read failed (no details available)"))
+ break # fatal parse error
+ # get node type
+ nodeType = reader.NodeType()
+ # Element
+ if nodeType == 1:
+ if self.__ns:
+ eltName = (_d(reader.NamespaceUri()),\
+ _d(reader.LocalName()))
+ eltQName = _d(reader.Name())
+ attributesNSImpl._attrs = attrs = {}
+ attributesNSImpl._qnames = qnames = {}
+ newPrefixes = []
+ while reader.MoveToNextAttribute():
+ qname = _d(reader.Name())
+ value = _d(reader.Value())
+ if qname.startswith("xmlns"):
+ if len(qname) > 5:
+ newPrefix = qname[6:]
+ else:
+ newPrefix = None
+ newPrefixes.append(newPrefix)
+ self._cont_handler.startPrefixMapping(\
+ newPrefix,value)
+ if not self.__nspfx:
+ continue # don't report xmlns attribute
+ attName = (_d(reader.NamespaceUri()),
+ _d(reader.LocalName()))
+ qnames[attName] = qname
+ attrs[attName] = value
+ reader.MoveToElement()
+ self._cont_handler.startElementNS( \
+ eltName,eltQName,attributesNSImpl)
+ if reader.IsEmptyElement():
+ self._cont_handler.endElementNS(eltName,eltQName)
+ for newPrefix in newPrefixes:
+ self._cont_handler.endPrefixMapping(newPrefix)
+ else:
+ prefixes.append(newPrefixes)
+ else:
+ eltName = _d(reader.Name())
+ attributesImpl._attrs = attrs = {}
+ while reader.MoveToNextAttribute():
+ attName = _d(reader.Name())
+ attrs[attName] = _d(reader.Value())
+ reader.MoveToElement()
+ self._cont_handler.startElement( \
+ eltName,attributesImpl)
+ if reader.IsEmptyElement():
+ self._cont_handler.endElement(eltName)
+ # EndElement
+ elif nodeType == 15:
+ if self.__ns:
+ self._cont_handler.endElementNS( \
+ (_d(reader.NamespaceUri()),_d(reader.LocalName())),
+ _d(reader.Name()))
+ for prefix in prefixes.pop():
+ self._cont_handler.endPrefixMapping(prefix)
+ else:
+ self._cont_handler.endElement(_d(reader.Name()))
+ # Text
+ elif nodeType == 3:
+ self._cont_handler.characters(_d(reader.Value()))
+ # Whitespace
+ elif nodeType == 13:
+ self._cont_handler.ignorableWhitespace(_d(reader.Value()))
+ # SignificantWhitespace
+ elif nodeType == 14:
+ self._cont_handler.characters(_d(reader.Value()))
+ # CDATA
+ elif nodeType == 4:
+ if not self.__lex_handler is None:
+ self.__lex_handler.startCDATA()
+ self._cont_handler.characters(_d(reader.Value()))
+ if not self.__lex_handler is None:
+ self.__lex_handler.endCDATA()
+ # EntityReference
+ elif nodeType == 5:
+ if not self.__lex_handler is None:
+ self.startEntity(_d(reader.Name()))
+ reader.ResolveEntity()
+ # EndEntity
+ elif nodeType == 16:
+ if not self.__lex_handler is None:
+ self.endEntity(_d(reader.Name()))
+ # ProcessingInstruction
+ elif nodeType == 7:
+ self._cont_handler.processingInstruction( \
+ _d(reader.Name()),_d(reader.Value()))
+ # Comment
+ elif nodeType == 8:
+ if not self.__lex_handler is None:
+ self.__lex_handler.comment(_d(reader.Value()))
+ # DocumentType
+ elif nodeType == 10:
+ #if not self.__lex_handler is None:
+ # self.__lex_handler.startDTD()
+ pass # TODO (how to detect endDTD? on first non-dtd event?)
+ # XmlDeclaration
+ elif nodeType == 17:
+ pass # TODO
+ # Entity
+ elif nodeType == 6:
+ pass # TODO (entity decl)
+ # Notation (decl)
+ elif nodeType == 12:
+ pass # TODO
+ # Attribute (never in this loop)
+ #elif nodeType == 2:
+ # pass
+ # Document (not exposed)
+ #elif nodeType == 9:
+ # pass
+ # DocumentFragment (never returned by XmlReader)
+ #elif nodeType == 11:
+ # pass
+ # None
+ #elif nodeType == 0:
+ # pass
+ # -
+ else:
+ raise SAXException("Unexpected node type %d" % nodeType)
+ if r == 0:
+ self._cont_handler.endDocument()
+ reader.Close()
+ finally:
+ self.__parsing = 0
+
+ def setDTDHandler(self, handler):
+ # TODO (when supported, the inherited method works just fine)
+ raise SAXNotSupportedException("DTDHandler not supported")
+
+ def setEntityResolver(self, resolver):
+ # TODO (when supported, the inherited method works just fine)
+ raise SAXNotSupportedException("EntityResolver not supported")
+
+ def getFeature(self, name):
+ if name == feature_namespaces:
+ return self.__ns
+ elif name == feature_namespace_prefixes:
+ return self.__nspfx
+ elif name == feature_validation:
+ return self.__validate
+ elif name == feature_external_ges:
+ return 1 # TODO (does that relate to PARSER_LOADDTD)?
+ elif name == feature_external_pes:
+ return self.__extparams
+ else:
+ raise SAXNotRecognizedException("Feature '%s' not recognized" % \
+ name)
+
+ def setFeature(self, name, state):
+ if self.__parsing:
+ raise SAXNotSupportedException("Cannot set feature %s " \
+ "while parsing" % name)
+ if name == feature_namespaces:
+ self.__ns = state
+ elif name == feature_namespace_prefixes:
+ self.__nspfx = state
+ elif name == feature_validation:
+ self.__validate = state
+ elif name == feature_external_ges:
+ if state == 0:
+ # TODO (does that relate to PARSER_LOADDTD)?
+ raise SAXNotSupportedException("Feature '%s' not supported" % \
+ name)
+ elif name == feature_external_pes:
+ self.__extparams = state
+ else:
+ raise SAXNotRecognizedException("Feature '%s' not recognized" % \
+ name)
+
+ def getProperty(self, name):
+ if name == property_lexical_handler:
+ return self.__lex_handler
+ elif name == property_declaration_handler:
+ return self.__decl_handler
+ else:
+ raise SAXNotRecognizedException("Property '%s' not recognized" % \
+ name)
+
+ def setProperty(self, name, value):
+ if name == property_lexical_handler:
+ self.__lex_handler = value
+ elif name == property_declaration_handler:
+ # TODO: remove if/when libxml2 supports dtd events
+ raise SAXNotSupportedException("Property '%s' not supported" % \
+ name)
+ self.__decl_handler = value
+ else:
+ raise SAXNotRecognizedException("Property '%s' not recognized" % \
+ name)
+
+def create_parser():
+ return LibXml2Reader()
+
diff --git a/libxml2-2.9.10/python/generator.py b/libxml2-2.9.10/python/generator.py
new file mode 100755
index 0000000..c0cb3ad
--- /dev/null
+++ b/libxml2-2.9.10/python/generator.py
@@ -0,0 +1,1228 @@
+#!/usr/bin/python -u
+#
+# generate python wrappers from the XML API description
+#
+
+functions = {}
+enums = {} # { enumType: { enumConstant: enumValue } }
+
+import os
+import sys
+import string
+
+if __name__ == "__main__":
+ # launched as a script
+ srcPref = os.path.dirname(sys.argv[0])
+else:
+ # imported
+ srcPref = os.path.dirname(__file__)
+
+#######################################################################
+#
+# That part if purely the API acquisition phase from the
+# XML API description
+#
+#######################################################################
+import os
+import xml.sax
+
+debug = 0
+
+def getparser():
+ # Attach parser to an unmarshalling object. return both objects.
+ target = docParser()
+ parser = xml.sax.make_parser()
+ parser.setContentHandler(target)
+ return parser, target
+
+class docParser(xml.sax.handler.ContentHandler):
+ def __init__(self):
+ self._methodname = None
+ self._data = []
+ self.in_function = 0
+
+ self.startElement = self.start
+ self.endElement = self.end
+ self.characters = self.data
+
+ def close(self):
+ if debug:
+ print("close")
+
+ def getmethodname(self):
+ return self._methodname
+
+ def data(self, text):
+ if debug:
+ print("data %s" % text)
+ self._data.append(text)
+
+ def start(self, tag, attrs):
+ if debug:
+ print("start %s, %s" % (tag, attrs))
+ if tag == 'function':
+ self._data = []
+ self.in_function = 1
+ self.function = None
+ self.function_cond = None
+ self.function_args = []
+ self.function_descr = None
+ self.function_return = None
+ self.function_file = None
+ if 'name' in attrs.keys():
+ self.function = attrs['name']
+ if 'file' in attrs.keys():
+ self.function_file = attrs['file']
+ elif tag == 'cond':
+ self._data = []
+ elif tag == 'info':
+ self._data = []
+ elif tag == 'arg':
+ if self.in_function == 1:
+ self.function_arg_name = None
+ self.function_arg_type = None
+ self.function_arg_info = None
+ if 'name' in attrs.keys():
+ self.function_arg_name = attrs['name']
+ if 'type' in attrs.keys():
+ self.function_arg_type = attrs['type']
+ if 'info' in attrs.keys():
+ self.function_arg_info = attrs['info']
+ elif tag == 'return':
+ if self.in_function == 1:
+ self.function_return_type = None
+ self.function_return_info = None
+ self.function_return_field = None
+ if 'type' in attrs.keys():
+ self.function_return_type = attrs['type']
+ if 'info' in attrs.keys():
+ self.function_return_info = attrs['info']
+ if 'field' in attrs.keys():
+ self.function_return_field = attrs['field']
+ elif tag == 'enum':
+ enum(attrs['type'],attrs['name'],attrs['value'])
+
+ def end(self, tag):
+ if debug:
+ print("end %s" % tag)
+ if tag == 'function':
+ if self.function != None:
+ function(self.function, self.function_descr,
+ self.function_return, self.function_args,
+ self.function_file, self.function_cond)
+ self.in_function = 0
+ elif tag == 'arg':
+ if self.in_function == 1:
+ self.function_args.append([self.function_arg_name,
+ self.function_arg_type,
+ self.function_arg_info])
+ elif tag == 'return':
+ if self.in_function == 1:
+ self.function_return = [self.function_return_type,
+ self.function_return_info,
+ self.function_return_field]
+ elif tag == 'info':
+ str = ''
+ for c in self._data:
+ str = str + c
+ if self.in_function == 1:
+ self.function_descr = str
+ elif tag == 'cond':
+ str = ''
+ for c in self._data:
+ str = str + c
+ if self.in_function == 1:
+ self.function_cond = str
+
+
+def function(name, desc, ret, args, file, cond):
+ functions[name] = (desc, ret, args, file, cond)
+
+def enum(type, name, value):
+ if type not in enums:
+ enums[type] = {}
+ enums[type][name] = value
+
+#######################################################################
+#
+# Some filtering rukes to drop functions/types which should not
+# be exposed as-is on the Python interface
+#
+#######################################################################
+
+skipped_modules = {
+ 'xmlmemory': None,
+ 'DOCBparser': None,
+ 'SAX': None,
+ 'hash': None,
+ 'list': None,
+ 'threads': None,
+# 'xpointer': None,
+}
+skipped_types = {
+ 'int *': "usually a return type",
+ 'xmlSAXHandlerPtr': "not the proper interface for SAX",
+ 'htmlSAXHandlerPtr': "not the proper interface for SAX",
+ 'xmlRMutexPtr': "thread specific, skipped",
+ 'xmlMutexPtr': "thread specific, skipped",
+ 'xmlGlobalStatePtr': "thread specific, skipped",
+ 'xmlListPtr': "internal representation not suitable for python",
+ 'xmlBufferPtr': "internal representation not suitable for python",
+ 'FILE *': None,
+}
+
+#######################################################################
+#
+# Table of remapping to/from the python type or class to the C
+# counterpart.
+#
+#######################################################################
+
+py_types = {
+ 'void': (None, None, None, None),
+ 'int': ('i', None, "int", "int"),
+ 'long': ('l', None, "long", "long"),
+ 'double': ('d', None, "double", "double"),
+ 'unsigned int': ('i', None, "int", "int"),
+ 'xmlChar': ('c', None, "int", "int"),
+ 'unsigned char *': ('z', None, "charPtr", "char *"),
+ 'char *': ('z', None, "charPtr", "char *"),
+ 'const char *': ('z', None, "charPtrConst", "const char *"),
+ 'xmlChar *': ('z', None, "xmlCharPtr", "xmlChar *"),
+ 'const xmlChar *': ('z', None, "xmlCharPtrConst", "const xmlChar *"),
+ 'xmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlDtdPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlDtdPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlDtd *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlDtd *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlAttrPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlAttrPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlAttr *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlAttr *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlEntityPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlEntityPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlEntity *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlEntity *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlElementPtr': ('O', "xmlElement", "xmlElementPtr", "xmlElementPtr"),
+ 'const xmlElementPtr': ('O', "xmlElement", "xmlElementPtr", "xmlElementPtr"),
+ 'xmlElement *': ('O', "xmlElement", "xmlElementPtr", "xmlElementPtr"),
+ 'const xmlElement *': ('O', "xmlElement", "xmlElementPtr", "xmlElementPtr"),
+ 'xmlAttributePtr': ('O', "xmlAttribute", "xmlAttributePtr", "xmlAttributePtr"),
+ 'const xmlAttributePtr': ('O', "xmlAttribute", "xmlAttributePtr", "xmlAttributePtr"),
+ 'xmlAttribute *': ('O', "xmlAttribute", "xmlAttributePtr", "xmlAttributePtr"),
+ 'const xmlAttribute *': ('O', "xmlAttribute", "xmlAttributePtr", "xmlAttributePtr"),
+ 'xmlNsPtr': ('O', "xmlNode", "xmlNsPtr", "xmlNsPtr"),
+ 'const xmlNsPtr': ('O', "xmlNode", "xmlNsPtr", "xmlNsPtr"),
+ 'xmlNs *': ('O', "xmlNode", "xmlNsPtr", "xmlNsPtr"),
+ 'const xmlNs *': ('O', "xmlNode", "xmlNsPtr", "xmlNsPtr"),
+ 'xmlDocPtr': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'const xmlDocPtr': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'xmlDoc *': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'const xmlDoc *': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'htmlDocPtr': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'const htmlDocPtr': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'htmlDoc *': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'const htmlDoc *': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'htmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const htmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'htmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const htmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlXPathContextPtr': ('O', "xmlXPathContext", "xmlXPathContextPtr", "xmlXPathContextPtr"),
+ 'xmlXPathContext *': ('O', "xpathContext", "xmlXPathContextPtr", "xmlXPathContextPtr"),
+ 'xmlXPathParserContextPtr': ('O', "xmlXPathParserContext", "xmlXPathParserContextPtr", "xmlXPathParserContextPtr"),
+ 'xmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
+ 'xmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
+ 'htmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
+ 'htmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
+ 'xmlValidCtxtPtr': ('O', "ValidCtxt", "xmlValidCtxtPtr", "xmlValidCtxtPtr"),
+ 'xmlCatalogPtr': ('O', "catalog", "xmlCatalogPtr", "xmlCatalogPtr"),
+ 'FILE *': ('O', "File", "FILEPtr", "FILE *"),
+ 'xmlURIPtr': ('O', "URI", "xmlURIPtr", "xmlURIPtr"),
+ 'xmlErrorPtr': ('O', "Error", "xmlErrorPtr", "xmlErrorPtr"),
+ 'xmlOutputBufferPtr': ('O', "outputBuffer", "xmlOutputBufferPtr", "xmlOutputBufferPtr"),
+ 'xmlParserInputBufferPtr': ('O', "inputBuffer", "xmlParserInputBufferPtr", "xmlParserInputBufferPtr"),
+ 'xmlRegexpPtr': ('O', "xmlReg", "xmlRegexpPtr", "xmlRegexpPtr"),
+ 'xmlTextReaderLocatorPtr': ('O', "xmlTextReaderLocator", "xmlTextReaderLocatorPtr", "xmlTextReaderLocatorPtr"),
+ 'xmlTextReaderPtr': ('O', "xmlTextReader", "xmlTextReaderPtr", "xmlTextReaderPtr"),
+ 'xmlRelaxNGPtr': ('O', "relaxNgSchema", "xmlRelaxNGPtr", "xmlRelaxNGPtr"),
+ 'xmlRelaxNGParserCtxtPtr': ('O', "relaxNgParserCtxt", "xmlRelaxNGParserCtxtPtr", "xmlRelaxNGParserCtxtPtr"),
+ 'xmlRelaxNGValidCtxtPtr': ('O', "relaxNgValidCtxt", "xmlRelaxNGValidCtxtPtr", "xmlRelaxNGValidCtxtPtr"),
+ 'xmlSchemaPtr': ('O', "Schema", "xmlSchemaPtr", "xmlSchemaPtr"),
+ 'xmlSchemaParserCtxtPtr': ('O', "SchemaParserCtxt", "xmlSchemaParserCtxtPtr", "xmlSchemaParserCtxtPtr"),
+ 'xmlSchemaValidCtxtPtr': ('O', "SchemaValidCtxt", "xmlSchemaValidCtxtPtr", "xmlSchemaValidCtxtPtr"),
+}
+
+py_return_types = {
+ 'xmlXPathObjectPtr': ('O', "foo", "xmlXPathObjectPtr", "xmlXPathObjectPtr"),
+}
+
+unknown_types = {}
+
+foreign_encoding_args = (
+ 'htmlCreateMemoryParserCtxt',
+ 'htmlCtxtReadMemory',
+ 'htmlParseChunk',
+ 'htmlReadMemory',
+ 'xmlCreateMemoryParserCtxt',
+ 'xmlCtxtReadMemory',
+ 'xmlCtxtResetPush',
+ 'xmlParseChunk',
+ 'xmlParseMemory',
+ 'xmlReadMemory',
+ 'xmlRecoverMemory',
+)
+
+#######################################################################
+#
+# This part writes the C <-> Python stubs libxml2-py.[ch] and
+# the table libxml2-export.c to add when registrering the Python module
+#
+#######################################################################
+
+# Class methods which are written by hand in libxml.c but the Python-level
+# code is still automatically generated (so they are not in skip_function()).
+skip_impl = (
+ 'xmlSaveFileTo',
+ 'xmlSaveFormatFileTo',
+)
+
+def skip_function(name):
+ if name[0:12] == "xmlXPathWrap":
+ return 1
+ if name == "xmlFreeParserCtxt":
+ return 1
+ if name == "xmlCleanupParser":
+ return 1
+ if name == "xmlFreeTextReader":
+ return 1
+# if name[0:11] == "xmlXPathNew":
+# return 1
+ # the next function is defined in libxml.c
+ if name == "xmlRelaxNGFreeValidCtxt":
+ return 1
+ if name == "xmlFreeValidCtxt":
+ return 1
+ if name == "xmlSchemaFreeValidCtxt":
+ return 1
+
+#
+# Those are skipped because the Const version is used of the bindings
+# instead.
+#
+ if name == "xmlTextReaderBaseUri":
+ return 1
+ if name == "xmlTextReaderLocalName":
+ return 1
+ if name == "xmlTextReaderName":
+ return 1
+ if name == "xmlTextReaderNamespaceUri":
+ return 1
+ if name == "xmlTextReaderPrefix":
+ return 1
+ if name == "xmlTextReaderXmlLang":
+ return 1
+ if name == "xmlTextReaderValue":
+ return 1
+ if name == "xmlOutputBufferClose": # handled by by the superclass
+ return 1
+ if name == "xmlOutputBufferFlush": # handled by by the superclass
+ return 1
+ if name == "xmlErrMemory":
+ return 1
+
+ if name == "xmlValidBuildContentModel":
+ return 1
+ if name == "xmlValidateElementDecl":
+ return 1
+ if name == "xmlValidateAttributeDecl":
+ return 1
+ if name == "xmlPopInputCallbacks":
+ return 1
+
+ return 0
+
+def print_function_wrapper(name, output, export, include):
+ global py_types
+ global unknown_types
+ global functions
+ global skipped_modules
+
+ try:
+ (desc, ret, args, file, cond) = functions[name]
+ except:
+ print("failed to get function %s infos")
+ return
+
+ if file in skipped_modules:
+ return 0
+ if skip_function(name) == 1:
+ return 0
+ if name in skip_impl:
+ # Don't delete the function entry in the caller.
+ return 1
+
+ c_call = ""
+ format=""
+ format_args=""
+ c_args=""
+ c_return=""
+ c_convert=""
+ c_release=""
+ num_bufs=0
+ for arg in args:
+ # This should be correct
+ if arg[1][0:6] == "const ":
+ arg[1] = arg[1][6:]
+ c_args = c_args + " %s %s;\n" % (arg[1], arg[0])
+ if arg[1] in py_types:
+ (f, t, n, c) = py_types[arg[1]]
+ if (f == 'z') and (name in foreign_encoding_args) and (num_bufs == 0):
+ f = 's#'
+ if f != None:
+ format = format + f
+ if t != None:
+ format_args = format_args + ", &pyobj_%s" % (arg[0])
+ c_args = c_args + " PyObject *pyobj_%s;\n" % (arg[0])
+ c_convert = c_convert + \
+ " %s = (%s) Py%s_Get(pyobj_%s);\n" % (arg[0],
+ arg[1], t, arg[0])
+ else:
+ format_args = format_args + ", &%s" % (arg[0])
+ if f == 's#':
+ format_args = format_args + ", &py_buffsize%d" % num_bufs
+ c_args = c_args + " int py_buffsize%d;\n" % num_bufs
+ num_bufs = num_bufs + 1
+ if c_call != "":
+ c_call = c_call + ", "
+ c_call = c_call + "%s" % (arg[0])
+ if t == "File":
+ c_release = c_release + \
+ " PyFile_Release(%s);\n" % (arg[0])
+ else:
+ if arg[1] in skipped_types:
+ return 0
+ if arg[1] in unknown_types:
+ lst = unknown_types[arg[1]]
+ lst.append(name)
+ else:
+ unknown_types[arg[1]] = [name]
+ return -1
+ if format != "":
+ format = format + ":%s" % (name)
+
+ if ret[0] == 'void':
+ if file == "python_accessor":
+ if args[1][1] == "char *" or args[1][1] == "xmlChar *":
+ c_call = "\n if (%s->%s != NULL) xmlFree(%s->%s);\n" % (
+ args[0][0], args[1][0], args[0][0], args[1][0])
+ c_call = c_call + " %s->%s = (%s)xmlStrdup((const xmlChar *)%s);\n" % (args[0][0],
+ args[1][0], args[1][1], args[1][0])
+ else:
+ c_call = "\n %s->%s = %s;\n" % (args[0][0], args[1][0],
+ args[1][0])
+ else:
+ c_call = "\n %s(%s);\n" % (name, c_call)
+ ret_convert = " Py_INCREF(Py_None);\n return(Py_None);\n"
+ elif ret[0] in py_types:
+ (f, t, n, c) = py_types[ret[0]]
+ c_return = c_return + " %s c_retval;\n" % (ret[0])
+ if file == "python_accessor" and ret[2] != None:
+ c_call = "\n c_retval = %s->%s;\n" % (args[0][0], ret[2])
+ else:
+ c_call = "\n c_retval = %s(%s);\n" % (name, c_call)
+ ret_convert = " py_retval = libxml_%sWrap((%s) c_retval);\n" % (n,c)
+ ret_convert = ret_convert + " return(py_retval);\n"
+ elif ret[0] in py_return_types:
+ (f, t, n, c) = py_return_types[ret[0]]
+ c_return = c_return + " %s c_retval;\n" % (ret[0])
+ c_call = "\n c_retval = %s(%s);\n" % (name, c_call)
+ ret_convert = " py_retval = libxml_%sWrap((%s) c_retval);\n" % (n,c)
+ ret_convert = ret_convert + " return(py_retval);\n"
+ else:
+ if ret[0] in skipped_types:
+ return 0
+ if ret[0] in unknown_types:
+ lst = unknown_types[ret[0]]
+ lst.append(name)
+ else:
+ unknown_types[ret[0]] = [name]
+ return -1
+
+ if cond != None and cond != "":
+ include.write("#if %s\n" % cond)
+ export.write("#if %s\n" % cond)
+ output.write("#if %s\n" % cond)
+
+ include.write("PyObject * ")
+ include.write("libxml_%s(PyObject *self, PyObject *args);\n" % (name))
+
+ export.write(" { (char *)\"%s\", libxml_%s, METH_VARARGS, NULL },\n" %
+ (name, name))
+
+ if file == "python":
+ # Those have been manually generated
+ if cond != None and cond != "":
+ include.write("#endif\n")
+ export.write("#endif\n")
+ output.write("#endif\n")
+ return 1
+ if file == "python_accessor" and ret[0] != "void" and ret[2] is None:
+ # Those have been manually generated
+ if cond != None and cond != "":
+ include.write("#endif\n")
+ export.write("#endif\n")
+ output.write("#endif\n")
+ return 1
+
+ output.write("PyObject *\n")
+ output.write("libxml_%s(PyObject *self ATTRIBUTE_UNUSED," % (name))
+ output.write(" PyObject *args")
+ if format == "":
+ output.write(" ATTRIBUTE_UNUSED")
+ output.write(") {\n")
+ if ret[0] != 'void':
+ output.write(" PyObject *py_retval;\n")
+ if c_return != "":
+ output.write(c_return)
+ if c_args != "":
+ output.write(c_args)
+ if format != "":
+ output.write("\n if (!PyArg_ParseTuple(args, (char *)\"%s\"%s))\n" %
+ (format, format_args))
+ output.write(" return(NULL);\n")
+ if c_convert != "":
+ output.write(c_convert)
+
+ output.write(c_call)
+ if c_release != "":
+ output.write(c_release)
+ output.write(ret_convert)
+ output.write("}\n\n")
+ if cond != None and cond != "":
+ include.write("#endif /* %s */\n" % cond)
+ export.write("#endif /* %s */\n" % cond)
+ output.write("#endif /* %s */\n" % cond)
+ return 1
+
+def buildStubs():
+ global py_types
+ global py_return_types
+ global unknown_types
+
+ try:
+ f = open(os.path.join(srcPref,"libxml2-api.xml"))
+ data = f.read()
+ (parser, target) = getparser()
+ parser.feed(data)
+ parser.close()
+ except IOError as msg:
+ try:
+ f = open(os.path.join(srcPref,"..","doc","libxml2-api.xml"))
+ data = f.read()
+ (parser, target) = getparser()
+ parser.feed(data)
+ parser.close()
+ except IOError as msg:
+ print(file, ":", msg)
+ sys.exit(1)
+
+ n = len(list(functions.keys()))
+ print("Found %d functions in libxml2-api.xml" % (n))
+
+ py_types['pythonObject'] = ('O', "pythonObject", "pythonObject", "pythonObject")
+ try:
+ f = open(os.path.join(srcPref,"libxml2-python-api.xml"))
+ data = f.read()
+ (parser, target) = getparser()
+ parser.feed(data)
+ parser.close()
+ except IOError as msg:
+ print(file, ":", msg)
+
+
+ print("Found %d functions in libxml2-python-api.xml" % (
+ len(list(functions.keys())) - n))
+ nb_wrap = 0
+ failed = 0
+ skipped = 0
+
+ include = open("libxml2-py.h", "w")
+ include.write("/* Generated */\n\n")
+ export = open("libxml2-export.c", "w")
+ export.write("/* Generated */\n\n")
+ wrapper = open("libxml2-py.c", "w")
+ wrapper.write("/* Generated */\n\n")
+ wrapper.write("#include <Python.h>\n")
+ wrapper.write("#include <libxml/xmlversion.h>\n")
+ wrapper.write("#include <libxml/tree.h>\n")
+ wrapper.write("#include <libxml/xmlschemastypes.h>\n")
+ wrapper.write("#include \"libxml_wrap.h\"\n")
+ wrapper.write("#include \"libxml2-py.h\"\n\n")
+ for function in sorted(functions.keys()):
+ ret = print_function_wrapper(function, wrapper, export, include)
+ if ret < 0:
+ failed = failed + 1
+ del functions[function]
+ if ret == 0:
+ skipped = skipped + 1
+ del functions[function]
+ if ret == 1:
+ nb_wrap = nb_wrap + 1
+ include.close()
+ export.close()
+ wrapper.close()
+
+ print("Generated %d wrapper functions, %d failed, %d skipped\n" % (nb_wrap,
+ failed, skipped))
+ print("Missing type converters: ")
+ for type in list(unknown_types.keys()):
+ print("%s:%d " % (type, len(unknown_types[type])))
+ print()
+
+#######################################################################
+#
+# This part writes part of the Python front-end classes based on
+# mapping rules between types and classes and also based on function
+# renaming to get consistent function names at the Python level
+#
+#######################################################################
+
+#
+# The type automatically remapped to generated classes
+#
+classes_type = {
+ "xmlNodePtr": ("._o", "xmlNode(_obj=%s)", "xmlNode"),
+ "xmlNode *": ("._o", "xmlNode(_obj=%s)", "xmlNode"),
+ "xmlDocPtr": ("._o", "xmlDoc(_obj=%s)", "xmlDoc"),
+ "xmlDoc *": ("._o", "xmlDoc(_obj=%s)", "xmlDoc"),
+ "htmlDocPtr": ("._o", "xmlDoc(_obj=%s)", "xmlDoc"),
+ "htmlxmlDocPtr *": ("._o", "xmlDoc(_obj=%s)", "xmlDoc"),
+ "xmlAttrPtr": ("._o", "xmlAttr(_obj=%s)", "xmlAttr"),
+ "xmlAttr *": ("._o", "xmlAttr(_obj=%s)", "xmlAttr"),
+ "xmlNsPtr": ("._o", "xmlNs(_obj=%s)", "xmlNs"),
+ "xmlNs *": ("._o", "xmlNs(_obj=%s)", "xmlNs"),
+ "xmlDtdPtr": ("._o", "xmlDtd(_obj=%s)", "xmlDtd"),
+ "xmlDtd *": ("._o", "xmlDtd(_obj=%s)", "xmlDtd"),
+ "xmlEntityPtr": ("._o", "xmlEntity(_obj=%s)", "xmlEntity"),
+ "xmlEntity *": ("._o", "xmlEntity(_obj=%s)", "xmlEntity"),
+ "xmlElementPtr": ("._o", "xmlElement(_obj=%s)", "xmlElement"),
+ "xmlElement *": ("._o", "xmlElement(_obj=%s)", "xmlElement"),
+ "xmlAttributePtr": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"),
+ "xmlAttribute *": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"),
+ "xmlXPathContextPtr": ("._o", "xpathContext(_obj=%s)", "xpathContext"),
+ "xmlXPathContext *": ("._o", "xpathContext(_obj=%s)", "xpathContext"),
+ "xmlXPathParserContext *": ("._o", "xpathParserContext(_obj=%s)", "xpathParserContext"),
+ "xmlXPathParserContextPtr": ("._o", "xpathParserContext(_obj=%s)", "xpathParserContext"),
+ "xmlParserCtxtPtr": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
+ "xmlParserCtxt *": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
+ "htmlParserCtxtPtr": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
+ "htmlParserCtxt *": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
+ "xmlValidCtxtPtr": ("._o", "ValidCtxt(_obj=%s)", "ValidCtxt"),
+ "xmlCatalogPtr": ("._o", "catalog(_obj=%s)", "catalog"),
+ "xmlURIPtr": ("._o", "URI(_obj=%s)", "URI"),
+ "xmlErrorPtr": ("._o", "Error(_obj=%s)", "Error"),
+ "xmlOutputBufferPtr": ("._o", "outputBuffer(_obj=%s)", "outputBuffer"),
+ "xmlParserInputBufferPtr": ("._o", "inputBuffer(_obj=%s)", "inputBuffer"),
+ "xmlRegexpPtr": ("._o", "xmlReg(_obj=%s)", "xmlReg"),
+ "xmlTextReaderLocatorPtr": ("._o", "xmlTextReaderLocator(_obj=%s)", "xmlTextReaderLocator"),
+ "xmlTextReaderPtr": ("._o", "xmlTextReader(_obj=%s)", "xmlTextReader"),
+ 'xmlRelaxNGPtr': ('._o', "relaxNgSchema(_obj=%s)", "relaxNgSchema"),
+ 'xmlRelaxNGParserCtxtPtr': ('._o', "relaxNgParserCtxt(_obj=%s)", "relaxNgParserCtxt"),
+ 'xmlRelaxNGValidCtxtPtr': ('._o', "relaxNgValidCtxt(_obj=%s)", "relaxNgValidCtxt"),
+ 'xmlSchemaPtr': ("._o", "Schema(_obj=%s)", "Schema"),
+ 'xmlSchemaParserCtxtPtr': ("._o", "SchemaParserCtxt(_obj=%s)", "SchemaParserCtxt"),
+ 'xmlSchemaValidCtxtPtr': ("._o", "SchemaValidCtxt(_obj=%s)", "SchemaValidCtxt"),
+}
+
+converter_type = {
+ "xmlXPathObjectPtr": "xpathObjectRet(%s)",
+}
+
+primary_classes = ["xmlNode", "xmlDoc"]
+
+classes_ancestor = {
+ "xmlNode" : "xmlCore",
+ "xmlDtd" : "xmlNode",
+ "xmlDoc" : "xmlNode",
+ "xmlAttr" : "xmlNode",
+ "xmlNs" : "xmlNode",
+ "xmlEntity" : "xmlNode",
+ "xmlElement" : "xmlNode",
+ "xmlAttribute" : "xmlNode",
+ "outputBuffer": "ioWriteWrapper",
+ "inputBuffer": "ioReadWrapper",
+ "parserCtxt": "parserCtxtCore",
+ "xmlTextReader": "xmlTextReaderCore",
+ "ValidCtxt": "ValidCtxtCore",
+ "SchemaValidCtxt": "SchemaValidCtxtCore",
+ "relaxNgValidCtxt": "relaxNgValidCtxtCore",
+}
+classes_destructors = {
+ "parserCtxt": "xmlFreeParserCtxt",
+ "catalog": "xmlFreeCatalog",
+ "URI": "xmlFreeURI",
+# "outputBuffer": "xmlOutputBufferClose",
+ "inputBuffer": "xmlFreeParserInputBuffer",
+ "xmlReg": "xmlRegFreeRegexp",
+ "xmlTextReader": "xmlFreeTextReader",
+ "relaxNgSchema": "xmlRelaxNGFree",
+ "relaxNgParserCtxt": "xmlRelaxNGFreeParserCtxt",
+ "relaxNgValidCtxt": "xmlRelaxNGFreeValidCtxt",
+ "Schema": "xmlSchemaFree",
+ "SchemaParserCtxt": "xmlSchemaFreeParserCtxt",
+ "SchemaValidCtxt": "xmlSchemaFreeValidCtxt",
+ "ValidCtxt": "xmlFreeValidCtxt",
+}
+
+functions_noexcept = {
+ "xmlHasProp": 1,
+ "xmlHasNsProp": 1,
+ "xmlDocSetRootElement": 1,
+ "xmlNodeGetNs": 1,
+ "xmlNodeGetNsDefs": 1,
+ "xmlNextElementSibling": 1,
+ "xmlPreviousElementSibling": 1,
+ "xmlFirstElementChild": 1,
+ "xmlLastElementChild": 1,
+}
+
+reference_keepers = {
+ "xmlTextReader": [('inputBuffer', 'input')],
+ "relaxNgValidCtxt": [('relaxNgSchema', 'schema')],
+ "SchemaValidCtxt": [('Schema', 'schema')],
+}
+
+function_classes = {}
+
+function_classes["None"] = []
+
+def nameFixup(name, classe, type, file):
+ listname = classe + "List"
+ ll = len(listname)
+ l = len(classe)
+ if name[0:l] == listname:
+ func = name[l:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:12] == "xmlParserGet" and file == "python_accessor":
+ func = name[12:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:12] == "xmlParserSet" and file == "python_accessor":
+ func = name[12:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:10] == "xmlNodeGet" and file == "python_accessor":
+ func = name[10:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:9] == "xmlURIGet" and file == "python_accessor":
+ func = name[9:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:9] == "xmlURISet" and file == "python_accessor":
+ func = name[6:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:11] == "xmlErrorGet" and file == "python_accessor":
+ func = name[11:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:17] == "xmlXPathParserGet" and file == "python_accessor":
+ func = name[17:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:11] == "xmlXPathGet" and file == "python_accessor":
+ func = name[11:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:11] == "xmlXPathSet" and file == "python_accessor":
+ func = name[8:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:15] == "xmlOutputBuffer" and file != "python":
+ func = name[15:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:20] == "xmlParserInputBuffer" and file != "python":
+ func = name[20:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:9] == "xmlRegexp" and file == "xmlregexp":
+ func = "regexp" + name[9:]
+ elif name[0:6] == "xmlReg" and file == "xmlregexp":
+ func = "regexp" + name[6:]
+ elif name[0:20] == "xmlTextReaderLocator" and file == "xmlreader":
+ func = name[20:]
+ elif name[0:18] == "xmlTextReaderConst" and file == "xmlreader":
+ func = name[18:]
+ elif name[0:13] == "xmlTextReader" and file == "xmlreader":
+ func = name[13:]
+ elif name[0:12] == "xmlReaderNew" and file == "xmlreader":
+ func = name[9:]
+ elif name[0:11] == "xmlACatalog":
+ func = name[11:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:l] == classe:
+ func = name[l:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:7] == "libxml_":
+ func = name[7:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:6] == "xmlGet":
+ func = name[6:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:3] == "xml":
+ func = name[3:]
+ func = func[0:1].lower() + func[1:]
+ else:
+ func = name
+ if func[0:5] == "xPath":
+ func = "xpath" + func[5:]
+ elif func[0:4] == "xPtr":
+ func = "xpointer" + func[4:]
+ elif func[0:8] == "xInclude":
+ func = "xinclude" + func[8:]
+ elif func[0:2] == "iD":
+ func = "ID" + func[2:]
+ elif func[0:3] == "uRI":
+ func = "URI" + func[3:]
+ elif func[0:4] == "uTF8":
+ func = "UTF8" + func[4:]
+ elif func[0:3] == 'sAX':
+ func = "SAX" + func[3:]
+ return func
+
+
+def functionCompare(info1, info2):
+ (index1, func1, name1, ret1, args1, file1) = info1
+ (index2, func2, name2, ret2, args2, file2) = info2
+ if file1 == file2:
+ if func1 < func2:
+ return -1
+ if func1 > func2:
+ return 1
+ if file1 == "python_accessor":
+ return -1
+ if file2 == "python_accessor":
+ return 1
+ if file1 < file2:
+ return -1
+ if file1 > file2:
+ return 1
+ return 0
+
+def cmp_to_key(mycmp):
+ 'Convert a cmp= function into a key= function'
+ class K(object):
+ def __init__(self, obj, *args):
+ self.obj = obj
+ def __lt__(self, other):
+ return mycmp(self.obj, other.obj) < 0
+ def __gt__(self, other):
+ return mycmp(self.obj, other.obj) > 0
+ def __eq__(self, other):
+ return mycmp(self.obj, other.obj) == 0
+ def __le__(self, other):
+ return mycmp(self.obj, other.obj) <= 0
+ def __ge__(self, other):
+ return mycmp(self.obj, other.obj) >= 0
+ def __ne__(self, other):
+ return mycmp(self.obj, other.obj) != 0
+ return K
+def writeDoc(name, args, indent, output):
+ if functions[name][0] is None or functions[name][0] == "":
+ return
+ val = functions[name][0]
+ val = val.replace("NULL", "None")
+ output.write(indent)
+ output.write('"""')
+ while len(val) > 60:
+ if val[0] == " ":
+ val = val[1:]
+ continue
+ str = val[0:60]
+ i = str.rfind(" ")
+ if i < 0:
+ i = 60
+ str = val[0:i]
+ val = val[i:]
+ output.write(str)
+ output.write('\n ')
+ output.write(indent)
+ output.write(val)
+ output.write(' """\n')
+
+def buildWrappers():
+ global ctypes
+ global py_types
+ global py_return_types
+ global unknown_types
+ global functions
+ global function_classes
+ global classes_type
+ global classes_list
+ global converter_type
+ global primary_classes
+ global converter_type
+ global classes_ancestor
+ global converter_type
+ global primary_classes
+ global classes_ancestor
+ global classes_destructors
+ global functions_noexcept
+
+ for type in classes_type.keys():
+ function_classes[classes_type[type][2]] = []
+
+ #
+ # Build the list of C types to look for ordered to start
+ # with primary classes
+ #
+ ctypes = []
+ classes_list = []
+ ctypes_processed = {}
+ classes_processed = {}
+ for classe in primary_classes:
+ classes_list.append(classe)
+ classes_processed[classe] = ()
+ for type in classes_type.keys():
+ tinfo = classes_type[type]
+ if tinfo[2] == classe:
+ ctypes.append(type)
+ ctypes_processed[type] = ()
+ for type in sorted(classes_type.keys()):
+ if type in ctypes_processed:
+ continue
+ tinfo = classes_type[type]
+ if tinfo[2] not in classes_processed:
+ classes_list.append(tinfo[2])
+ classes_processed[tinfo[2]] = ()
+
+ ctypes.append(type)
+ ctypes_processed[type] = ()
+
+ for name in functions.keys():
+ found = 0
+ (desc, ret, args, file, cond) = functions[name]
+ for type in ctypes:
+ classe = classes_type[type][2]
+
+ if name[0:3] == "xml" and len(args) >= 1 and args[0][1] == type:
+ found = 1
+ func = nameFixup(name, classe, type, file)
+ info = (0, func, name, ret, args, file)
+ function_classes[classe].append(info)
+ elif name[0:3] == "xml" and len(args) >= 2 and args[1][1] == type \
+ and file != "python_accessor":
+ found = 1
+ func = nameFixup(name, classe, type, file)
+ info = (1, func, name, ret, args, file)
+ function_classes[classe].append(info)
+ elif name[0:4] == "html" and len(args) >= 1 and args[0][1] == type:
+ found = 1
+ func = nameFixup(name, classe, type, file)
+ info = (0, func, name, ret, args, file)
+ function_classes[classe].append(info)
+ elif name[0:4] == "html" and len(args) >= 2 and args[1][1] == type \
+ and file != "python_accessor":
+ found = 1
+ func = nameFixup(name, classe, type, file)
+ info = (1, func, name, ret, args, file)
+ function_classes[classe].append(info)
+ if found == 1:
+ continue
+ if name[0:8] == "xmlXPath":
+ continue
+ if name[0:6] == "xmlStr":
+ continue
+ if name[0:10] == "xmlCharStr":
+ continue
+ func = nameFixup(name, "None", file, file)
+ info = (0, func, name, ret, args, file)
+ function_classes['None'].append(info)
+
+ classes = open("libxml2class.py", "w")
+ txt = open("libxml2class.txt", "w")
+ txt.write(" Generated Classes for libxml2-python\n\n")
+
+ txt.write("#\n# Global functions of the module\n#\n\n")
+ if "None" in function_classes:
+ flist = function_classes["None"]
+ flist = sorted(flist, key=cmp_to_key(functionCompare))
+ oldfile = ""
+ for info in flist:
+ (index, func, name, ret, args, file) = info
+ if file != oldfile:
+ classes.write("#\n# Functions from module %s\n#\n\n" % file)
+ txt.write("\n# functions from module %s\n" % file)
+ oldfile = file
+ classes.write("def %s(" % func)
+ txt.write("%s()\n" % func)
+ n = 0
+ for arg in args:
+ if n != 0:
+ classes.write(", ")
+ classes.write("%s" % arg[0])
+ n = n + 1
+ classes.write("):\n")
+ writeDoc(name, args, ' ', classes)
+
+ for arg in args:
+ if arg[1] in classes_type:
+ classes.write(" if %s is None: %s__o = None\n" %
+ (arg[0], arg[0]))
+ classes.write(" else: %s__o = %s%s\n" %
+ (arg[0], arg[0], classes_type[arg[1]][0]))
+ if arg[1] in py_types:
+ (f, t, n, c) = py_types[arg[1]]
+ if t == "File":
+ classes.write(" if %s is not None: %s.flush()\n" % (
+ arg[0], arg[0]))
+
+ if ret[0] != "void":
+ classes.write(" ret = ")
+ else:
+ classes.write(" ")
+ classes.write("libxml2mod.%s(" % name)
+ n = 0
+ for arg in args:
+ if n != 0:
+ classes.write(", ")
+ classes.write("%s" % arg[0])
+ if arg[1] in classes_type:
+ classes.write("__o")
+ n = n + 1
+ classes.write(")\n")
+
+# This may be needed to reposition the I/O, but likely to cause more harm
+# than good. Those changes in Python3 really break the model.
+# for arg in args:
+# if arg[1] in py_types:
+# (f, t, n, c) = py_types[arg[1]]
+# if t == "File":
+# classes.write(" if %s is not None: %s.seek(0,0)\n"%(
+# arg[0], arg[0]))
+
+ if ret[0] != "void":
+ if ret[0] in classes_type:
+ #
+ # Raise an exception
+ #
+ if name in functions_noexcept:
+ classes.write(" if ret is None:return None\n")
+ elif name.find("URI") >= 0:
+ classes.write(
+ " if ret is None:raise uriError('%s() failed')\n"
+ % (name))
+ elif name.find("XPath") >= 0:
+ classes.write(
+ " if ret is None:raise xpathError('%s() failed')\n"
+ % (name))
+ elif name.find("Parse") >= 0:
+ classes.write(
+ " if ret is None:raise parserError('%s() failed')\n"
+ % (name))
+ else:
+ classes.write(
+ " if ret is None:raise treeError('%s() failed')\n"
+ % (name))
+ classes.write(" return ")
+ classes.write(classes_type[ret[0]][1] % ("ret"))
+ classes.write("\n")
+ else:
+ classes.write(" return ret\n")
+ classes.write("\n")
+
+ txt.write("\n\n#\n# Set of classes of the module\n#\n\n")
+ for classname in classes_list:
+ if classname == "None":
+ pass
+ else:
+ if classname in classes_ancestor:
+ txt.write("\n\nClass %s(%s)\n" % (classname,
+ classes_ancestor[classname]))
+ classes.write("class %s(%s):\n" % (classname,
+ classes_ancestor[classname]))
+ classes.write(" def __init__(self, _obj=None):\n")
+ if classes_ancestor[classname] == "xmlCore" or \
+ classes_ancestor[classname] == "xmlNode":
+ classes.write(" if checkWrapper(_obj) != 0:")
+ classes.write(" raise TypeError")
+ classes.write("('%s got a wrong wrapper object type')\n" % \
+ classname)
+ if classname in reference_keepers:
+ rlist = reference_keepers[classname]
+ for ref in rlist:
+ classes.write(" self.%s = None\n" % ref[1])
+ classes.write(" self._o = _obj\n")
+ classes.write(" %s.__init__(self, _obj=_obj)\n\n" % (
+ classes_ancestor[classname]))
+ if classes_ancestor[classname] == "xmlCore" or \
+ classes_ancestor[classname] == "xmlNode":
+ classes.write(" def __repr__(self):\n")
+ format = "<%s (%%s) object at 0x%%x>" % (classname)
+ classes.write(" return \"%s\" %% (self.name, int(pos_id (self)))\n\n" % (
+ format))
+ else:
+ txt.write("Class %s()\n" % (classname))
+ classes.write("class %s:\n" % (classname))
+ classes.write(" def __init__(self, _obj=None):\n")
+ if classname in reference_keepers:
+ list = reference_keepers[classname]
+ for ref in list:
+ classes.write(" self.%s = None\n" % ref[1])
+ classes.write(" if _obj != None:self._o = _obj;return\n")
+ classes.write(" self._o = None\n\n")
+ destruct=None
+ if classname in classes_destructors:
+ classes.write(" def __del__(self):\n")
+ classes.write(" if self._o != None:\n")
+ classes.write(" libxml2mod.%s(self._o)\n" %
+ classes_destructors[classname])
+ classes.write(" self._o = None\n\n")
+ destruct=classes_destructors[classname]
+ flist = function_classes[classname]
+ flist = sorted(flist, key=cmp_to_key(functionCompare))
+ oldfile = ""
+ for info in flist:
+ (index, func, name, ret, args, file) = info
+ #
+ # Do not provide as method the destructors for the class
+ # to avoid double free
+ #
+ if name == destruct:
+ continue
+ if file != oldfile:
+ if file == "python_accessor":
+ classes.write(" # accessors for %s\n" % (classname))
+ txt.write(" # accessors\n")
+ else:
+ classes.write(" #\n")
+ classes.write(" # %s functions from module %s\n" % (
+ classname, file))
+ txt.write("\n # functions from module %s\n" % file)
+ classes.write(" #\n\n")
+ oldfile = file
+ classes.write(" def %s(self" % func)
+ txt.write(" %s()\n" % func)
+ n = 0
+ for arg in args:
+ if n != index:
+ classes.write(", %s" % arg[0])
+ n = n + 1
+ classes.write("):\n")
+ writeDoc(name, args, ' ', classes)
+ n = 0
+ for arg in args:
+ if arg[1] in classes_type:
+ if n != index:
+ classes.write(" if %s is None: %s__o = None\n" %
+ (arg[0], arg[0]))
+ classes.write(" else: %s__o = %s%s\n" %
+ (arg[0], arg[0], classes_type[arg[1]][0]))
+ n = n + 1
+ if ret[0] != "void":
+ classes.write(" ret = ")
+ else:
+ classes.write(" ")
+ classes.write("libxml2mod.%s(" % name)
+ n = 0
+ for arg in args:
+ if n != 0:
+ classes.write(", ")
+ if n != index:
+ classes.write("%s" % arg[0])
+ if arg[1] in classes_type:
+ classes.write("__o")
+ else:
+ classes.write("self")
+ if arg[1] in classes_type:
+ classes.write(classes_type[arg[1]][0])
+ n = n + 1
+ classes.write(")\n")
+ if ret[0] != "void":
+ if ret[0] in classes_type:
+ #
+ # Raise an exception
+ #
+ if name in functions_noexcept:
+ classes.write(
+ " if ret is None:return None\n")
+ elif name.find("URI") >= 0:
+ classes.write(
+ " if ret is None:raise uriError('%s() failed')\n"
+ % (name))
+ elif name.find("XPath") >= 0:
+ classes.write(
+ " if ret is None:raise xpathError('%s() failed')\n"
+ % (name))
+ elif name.find("Parse") >= 0:
+ classes.write(
+ " if ret is None:raise parserError('%s() failed')\n"
+ % (name))
+ else:
+ classes.write(
+ " if ret is None:raise treeError('%s() failed')\n"
+ % (name))
+
+ #
+ # generate the returned class wrapper for the object
+ #
+ classes.write(" __tmp = ")
+ classes.write(classes_type[ret[0]][1] % ("ret"))
+ classes.write("\n")
+
+ #
+ # Sometime one need to keep references of the source
+ # class in the returned class object.
+ # See reference_keepers for the list
+ #
+ tclass = classes_type[ret[0]][2]
+ if tclass in reference_keepers:
+ list = reference_keepers[tclass]
+ for pref in list:
+ if pref[0] == classname:
+ classes.write(" __tmp.%s = self\n" %
+ pref[1])
+ #
+ # return the class
+ #
+ classes.write(" return __tmp\n")
+ elif ret[0] in converter_type:
+ #
+ # Raise an exception
+ #
+ if name in functions_noexcept:
+ classes.write(
+ " if ret is None:return None")
+ elif name.find("URI") >= 0:
+ classes.write(
+ " if ret is None:raise uriError('%s() failed')\n"
+ % (name))
+ elif name.find("XPath") >= 0:
+ classes.write(
+ " if ret is None:raise xpathError('%s() failed')\n"
+ % (name))
+ elif name.find("Parse") >= 0:
+ classes.write(
+ " if ret is None:raise parserError('%s() failed')\n"
+ % (name))
+ else:
+ classes.write(
+ " if ret is None:raise treeError('%s() failed')\n"
+ % (name))
+ classes.write(" return ")
+ classes.write(converter_type[ret[0]] % ("ret"))
+ classes.write("\n")
+ else:
+ classes.write(" return ret\n")
+ classes.write("\n")
+
+ #
+ # Generate enum constants
+ #
+ for type,enum in enums.items():
+ classes.write("# %s\n" % type)
+ items = enum.items()
+ items = sorted(items, key=(lambda i: int(i[1])))
+ for name,value in items:
+ classes.write("%s = %s\n" % (name,value))
+ classes.write("\n")
+
+ txt.close()
+ classes.close()
+
+buildStubs()
+buildWrappers()
diff --git a/libxml2-2.9.10/python/libxml.c b/libxml2-2.9.10/python/libxml.c
new file mode 100644
index 0000000..bc676c4
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml.c
@@ -0,0 +1,3934 @@
+/*
+ * libxml.c: this modules implements the main part of the glue of the
+ * libxml2 library and the Python interpreter. It provides the
+ * entry points where an automatically generated stub is either
+ * unpractical or would not match cleanly the Python model.
+ *
+ * If compiled with MERGED_MODULES, the entry point will be used to
+ * initialize both the libxml2 and the libxslt wrappers
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+#include <Python.h>
+#include <fileobject.h>
+/* #include "config.h" */
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/xmlIO.h>
+#include <libxml/c14n.h>
+#include <libxml/xmlreader.h>
+#include <libxml/xmlsave.h>
+#include "libxml_wrap.h"
+#include "libxml2-py.h"
+
+#if defined(WITH_TRIO)
+#include "trio.h"
+#define vsnprintf trio_vsnprintf
+#endif
+
+/* #define DEBUG */
+/* #define DEBUG_SAX */
+/* #define DEBUG_XPATH */
+/* #define DEBUG_ERROR */
+/* #define DEBUG_MEMORY */
+/* #define DEBUG_FILES */
+/* #define DEBUG_LOADER */
+
+#if PY_MAJOR_VERSION >= 3
+PyObject *PyInit_libxml2mod(void);
+
+#define PY_IMPORT_STRING_SIZE PyUnicode_FromStringAndSize
+#define PY_IMPORT_STRING PyUnicode_FromString
+#else
+void initlibxml2mod(void);
+#define PY_IMPORT_STRING_SIZE PyString_FromStringAndSize
+#define PY_IMPORT_STRING PyString_FromString
+#endif
+
+
+/**
+ * TODO:
+ *
+ * macro to flag unimplemented blocks
+ */
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+/*
+ * the following vars are used for XPath extensions, but
+ * are also referenced within the parser cleanup routine.
+ */
+static int libxml_xpathCallbacksInitialized = 0;
+
+typedef struct libxml_xpathCallback {
+ xmlXPathContextPtr ctx;
+ xmlChar *name;
+ xmlChar *ns_uri;
+ PyObject *function;
+} libxml_xpathCallback, *libxml_xpathCallbackPtr;
+typedef libxml_xpathCallback libxml_xpathCallbackArray[];
+static int libxml_xpathCallbacksAllocd = 10;
+static libxml_xpathCallbackArray *libxml_xpathCallbacks = NULL;
+static int libxml_xpathCallbacksNb = 0;
+
+/************************************************************************
+ * *
+ * Memory debug interface *
+ * *
+ ************************************************************************/
+
+#if 0
+extern void xmlMemFree(void *ptr);
+extern void *xmlMemMalloc(size_t size);
+extern void *xmlMemRealloc(void *ptr, size_t size);
+extern char *xmlMemoryStrdup(const char *str);
+#endif
+
+static int libxmlMemoryDebugActivated = 0;
+static long libxmlMemoryAllocatedBase = 0;
+
+static int libxmlMemoryDebug = 0;
+static xmlFreeFunc freeFunc = NULL;
+static xmlMallocFunc mallocFunc = NULL;
+static xmlReallocFunc reallocFunc = NULL;
+static xmlStrdupFunc strdupFunc = NULL;
+
+static void
+libxml_xmlErrorInitialize(void); /* forward declare */
+
+PyObject *
+libxml_xmlMemoryUsed(PyObject * self ATTRIBUTE_UNUSED,
+ PyObject * args ATTRIBUTE_UNUSED)
+{
+ long ret;
+ PyObject *py_retval;
+
+ ret = xmlMemUsed();
+
+ py_retval = libxml_longWrap(ret);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlDebugMemory(PyObject * self ATTRIBUTE_UNUSED, PyObject * args)
+{
+ int activate;
+ PyObject *py_retval;
+ long ret;
+
+ if (!PyArg_ParseTuple(args, (char *) "i:xmlDebugMemory", &activate))
+ return (NULL);
+
+#ifdef DEBUG_MEMORY
+ printf("libxml_xmlDebugMemory(%d) called\n", activate);
+#endif
+
+ if (activate != 0) {
+ if (libxmlMemoryDebug == 0) {
+ /*
+ * First initialize the library and grab the old memory handlers
+ * and switch the library to memory debugging
+ */
+ xmlMemGet((xmlFreeFunc *) & freeFunc,
+ (xmlMallocFunc *) & mallocFunc,
+ (xmlReallocFunc *) & reallocFunc,
+ (xmlStrdupFunc *) & strdupFunc);
+ if ((freeFunc == xmlMemFree) && (mallocFunc == xmlMemMalloc) &&
+ (reallocFunc == xmlMemRealloc) &&
+ (strdupFunc == xmlMemoryStrdup)) {
+ libxmlMemoryAllocatedBase = xmlMemUsed();
+ } else {
+ /*
+ * cleanup first, because some memory has been
+ * allocated with the non-debug malloc in xmlInitParser
+ * when the python module was imported
+ */
+ xmlCleanupParser();
+ ret = (long) xmlMemSetup(xmlMemFree, xmlMemMalloc,
+ xmlMemRealloc, xmlMemoryStrdup);
+ if (ret < 0)
+ goto error;
+ libxmlMemoryAllocatedBase = xmlMemUsed();
+ /* reinitialize */
+ xmlInitParser();
+ libxml_xmlErrorInitialize();
+ }
+ ret = 0;
+ } else if (libxmlMemoryDebugActivated == 0) {
+ libxmlMemoryAllocatedBase = xmlMemUsed();
+ ret = 0;
+ } else {
+ ret = xmlMemUsed() - libxmlMemoryAllocatedBase;
+ }
+ libxmlMemoryDebug = 1;
+ libxmlMemoryDebugActivated = 1;
+ } else {
+ if (libxmlMemoryDebugActivated == 1)
+ ret = xmlMemUsed() - libxmlMemoryAllocatedBase;
+ else
+ ret = 0;
+ libxmlMemoryDebugActivated = 0;
+ }
+ error:
+ py_retval = libxml_longWrap(ret);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlPythonCleanupParser(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args ATTRIBUTE_UNUSED) {
+
+ int ix;
+ long freed = -1;
+
+ if (libxmlMemoryDebug) {
+ freed = xmlMemUsed();
+ }
+
+ xmlCleanupParser();
+ /*
+ * Need to confirm whether we really want to do this (required for
+ * memcheck) in all cases...
+ */
+
+ if (libxml_xpathCallbacks != NULL) { /* if ext funcs declared */
+ for (ix=0; ix<libxml_xpathCallbacksNb; ix++) {
+ if ((*libxml_xpathCallbacks)[ix].name != NULL)
+ xmlFree((*libxml_xpathCallbacks)[ix].name);
+ if ((*libxml_xpathCallbacks)[ix].ns_uri != NULL)
+ xmlFree((*libxml_xpathCallbacks)[ix].ns_uri);
+ }
+ libxml_xpathCallbacksNb = 0;
+ xmlFree(libxml_xpathCallbacks);
+ libxml_xpathCallbacks = NULL;
+ }
+
+ if (libxmlMemoryDebug) {
+ freed -= xmlMemUsed();
+ libxmlMemoryAllocatedBase -= freed;
+ if (libxmlMemoryAllocatedBase < 0)
+ libxmlMemoryAllocatedBase = 0;
+ }
+
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlDumpMemory(ATTRIBUTE_UNUSED PyObject * self,
+ ATTRIBUTE_UNUSED PyObject * args)
+{
+
+ if (libxmlMemoryDebug != 0)
+ xmlMemoryDump();
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
+/************************************************************************
+ * *
+ * Handling Python FILE I/O at the C level *
+ * The raw I/O attack directly the File objects, while the *
+ * other routines address the ioWrapper instance instead *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlPythonFileCloseUnref:
+ * @context: the I/O context
+ *
+ * Close an I/O channel
+ */
+static int
+xmlPythonFileCloseRaw (void * context) {
+ PyObject *file, *ret;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileCloseUnref\n");
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ ret = PyEval_CallMethod(file, (char *) "close", (char *) "()");
+ if (ret != NULL) {
+ Py_DECREF(ret);
+ }
+ Py_DECREF(file);
+ return(0);
+}
+
+/**
+ * xmlPythonFileReadRaw:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the Python file in the I/O channel
+ *
+ * Returns the number of bytes read
+ */
+static int
+xmlPythonFileReadRaw (void * context, char * buffer, int len) {
+ PyObject *file;
+ PyObject *ret;
+ int lenread = -1;
+ char *data;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileReadRaw: %d\n", len);
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ ret = PyEval_CallMethod(file, (char *) "read", (char *) "(i)", len);
+ if (ret == NULL) {
+ printf("xmlPythonFileReadRaw: result is NULL\n");
+ return(-1);
+ } else if (PyBytes_Check(ret)) {
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+#ifdef PyUnicode_Check
+ } else if PyUnicode_Check (ret) {
+#if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+
+ /* tmp doesn't need to be deallocated */
+ tmp = PyUnicode_AsUTF8AndSize(ret, &size);
+
+ lenread = (int) size;
+ data = (char *) tmp;
+#else
+ PyObject *b;
+ b = PyUnicode_AsUTF8String(ret);
+ if (b == NULL) {
+ printf("xmlPythonFileReadRaw: failed to convert to UTF-8\n");
+ return(-1);
+ }
+ lenread = PyBytes_Size(b);
+ data = PyBytes_AsString(b);
+ Py_DECREF(b);
+#endif
+#endif
+ } else {
+ printf("xmlPythonFileReadRaw: result is not a String\n");
+ Py_DECREF(ret);
+ return(-1);
+ }
+ if (lenread > len)
+ memcpy(buffer, data, len);
+ else
+ memcpy(buffer, data, lenread);
+ Py_DECREF(ret);
+ return(lenread);
+}
+
+/**
+ * xmlPythonFileRead:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the I/O channel.
+ *
+ * Returns the number of bytes read
+ */
+static int
+xmlPythonFileRead (void * context, char * buffer, int len) {
+ PyObject *file;
+ PyObject *ret;
+ int lenread = -1;
+ char *data;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileRead: %d\n", len);
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ ret = PyEval_CallMethod(file, (char *) "io_read", (char *) "(i)", len);
+ if (ret == NULL) {
+ printf("xmlPythonFileRead: result is NULL\n");
+ return(-1);
+ } else if (PyBytes_Check(ret)) {
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+#ifdef PyUnicode_Check
+ } else if PyUnicode_Check (ret) {
+#if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+
+ /* tmp doesn't need to be deallocated */
+ tmp = PyUnicode_AsUTF8AndSize(ret, &size);
+
+ lenread = (int) size;
+ data = (char *) tmp;
+#else
+ PyObject *b;
+ b = PyUnicode_AsUTF8String(ret);
+ if (b == NULL) {
+ printf("xmlPythonFileRead: failed to convert to UTF-8\n");
+ return(-1);
+ }
+ lenread = PyBytes_Size(b);
+ data = PyBytes_AsString(b);
+ Py_DECREF(b);
+#endif
+#endif
+ } else {
+ printf("xmlPythonFileRead: result is not a String\n");
+ Py_DECREF(ret);
+ return(-1);
+ }
+ if (lenread > len)
+ memcpy(buffer, data, len);
+ else
+ memcpy(buffer, data, lenread);
+ Py_DECREF(ret);
+ return(lenread);
+}
+
+/**
+ * xmlFileWrite:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Write @len bytes from @buffer to the I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlPythonFileWrite (void * context, const char * buffer, int len) {
+ PyObject *file;
+ PyObject *string;
+ PyObject *ret = NULL;
+ int written = -1;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileWrite: %d\n", len);
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ string = PY_IMPORT_STRING_SIZE(buffer, len);
+ if (string == NULL) return(-1);
+ if (PyObject_HasAttrString(file, (char *) "io_write")) {
+ ret = PyEval_CallMethod(file, (char *) "io_write", (char *) "(O)",
+ string);
+ } else if (PyObject_HasAttrString(file, (char *) "write")) {
+ ret = PyEval_CallMethod(file, (char *) "write", (char *) "(O)",
+ string);
+ }
+ Py_DECREF(string);
+ if (ret == NULL) {
+ printf("xmlPythonFileWrite: result is NULL\n");
+ return(-1);
+ } else if (PyLong_Check(ret)) {
+ written = (int) PyLong_AsLong(ret);
+ Py_DECREF(ret);
+ } else if (ret == Py_None) {
+ written = len;
+ Py_DECREF(ret);
+ } else {
+ printf("xmlPythonFileWrite: result is not an Int nor None\n");
+ Py_DECREF(ret);
+ }
+ return(written);
+}
+
+/**
+ * xmlPythonFileClose:
+ * @context: the I/O context
+ *
+ * Close an I/O channel
+ */
+static int
+xmlPythonFileClose (void * context) {
+ PyObject *file, *ret = NULL;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileClose\n");
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ if (PyObject_HasAttrString(file, (char *) "io_close")) {
+ ret = PyEval_CallMethod(file, (char *) "io_close", (char *) "()");
+ } else if (PyObject_HasAttrString(file, (char *) "flush")) {
+ ret = PyEval_CallMethod(file, (char *) "flush", (char *) "()");
+ }
+ if (ret != NULL) {
+ Py_DECREF(ret);
+ }
+ return(0);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlOutputBufferCreatePythonFile:
+ * @file: a PyFile_Type
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered output for the progressive saving to a PyFile_Type
+ * buffered C I/O
+ *
+ * Returns the new parser output or NULL
+ */
+static xmlOutputBufferPtr
+xmlOutputBufferCreatePythonFile(PyObject *file,
+ xmlCharEncodingHandlerPtr encoder) {
+ xmlOutputBufferPtr ret;
+
+ if (file == NULL) return(NULL);
+
+ ret = xmlAllocOutputBuffer(encoder);
+ if (ret != NULL) {
+ ret->context = file;
+ /* Py_INCREF(file); */
+ ret->writecallback = xmlPythonFileWrite;
+ ret->closecallback = xmlPythonFileClose;
+ }
+
+ return(ret);
+}
+
+PyObject *
+libxml_xmlCreateOutputBuffer(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ PyObject *py_retval;
+ PyObject *file;
+ xmlChar *encoding;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ xmlOutputBufferPtr buffer;
+
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlOutputBufferCreate",
+ &file, &encoding))
+ return(NULL);
+ if ((encoding != NULL) && (encoding[0] != 0)) {
+ handler = xmlFindCharEncodingHandler((const char *) encoding);
+ }
+ buffer = xmlOutputBufferCreatePythonFile(file, handler);
+ if (buffer == NULL)
+ printf("libxml_xmlCreateOutputBuffer: buffer == NULL\n");
+ py_retval = libxml_xmlOutputBufferPtrWrap(buffer);
+ return(py_retval);
+}
+
+/**
+ * libxml_outputBufferGetPythonFile:
+ * @buffer: the I/O buffer
+ *
+ * read the Python I/O from the CObject
+ *
+ * Returns the new parser output or NULL
+ */
+static PyObject *
+libxml_outputBufferGetPythonFile(ATTRIBUTE_UNUSED PyObject *self,
+ PyObject *args) {
+ PyObject *buffer;
+ PyObject *file;
+ xmlOutputBufferPtr obj;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:outputBufferGetPythonFile",
+ &buffer))
+ return(NULL);
+
+ obj = PyoutputBuffer_Get(buffer);
+ if (obj == NULL) {
+ fprintf(stderr,
+ "outputBufferGetPythonFile: obj == NULL\n");
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+ if (obj->closecallback != xmlPythonFileClose) {
+ fprintf(stderr,
+ "outputBufferGetPythonFile: not a python file wrapper\n");
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+ file = (PyObject *) obj->context;
+ if (file == NULL) {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+ Py_INCREF(file);
+ return(file);
+}
+
+static PyObject *
+libxml_xmlOutputBufferClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlOutputBufferClose", &pyobj_out))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+ /* Buffer may already have been destroyed elsewhere. This is harmless. */
+ if (out == NULL) {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+
+ c_retval = xmlOutputBufferClose(out);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlOutputBufferFlush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlOutputBufferFlush", &pyobj_out))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+
+ c_retval = xmlOutputBufferFlush(out);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlSaveFileTo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlSaveFileTo", &pyobj_buf, &pyobj_cur, &encoding))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFileTo(buf, cur, encoding);
+ /* xmlSaveTo() freed the memory pointed to by buf, so record that in the
+ * Python object. */
+ ((PyoutputBuffer_Object *)(pyobj_buf))->obj = NULL;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlSaveFormatFileTo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzi:xmlSaveFormatFileTo", &pyobj_buf, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFormatFileTo(buf, cur, encoding, format);
+ /* xmlSaveFormatFileTo() freed the memory pointed to by buf, so record that
+ * in the Python object */
+ ((PyoutputBuffer_Object *)(pyobj_buf))->obj = NULL;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+
+/**
+ * xmlParserInputBufferCreatePythonFile:
+ * @file: a PyFile_Type
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered output for the progressive saving to a PyFile_Type
+ * buffered C I/O
+ *
+ * Returns the new parser output or NULL
+ */
+static xmlParserInputBufferPtr
+xmlParserInputBufferCreatePythonFile(PyObject *file,
+ xmlCharEncoding encoding) {
+ xmlParserInputBufferPtr ret;
+
+ if (file == NULL) return(NULL);
+
+ ret = xmlAllocParserInputBuffer(encoding);
+ if (ret != NULL) {
+ ret->context = file;
+ /* Py_INCREF(file); */
+ ret->readcallback = xmlPythonFileRead;
+ ret->closecallback = xmlPythonFileClose;
+ }
+
+ return(ret);
+}
+
+PyObject *
+libxml_xmlCreateInputBuffer(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ PyObject *py_retval;
+ PyObject *file;
+ xmlChar *encoding;
+ xmlCharEncoding enc = XML_CHAR_ENCODING_NONE;
+ xmlParserInputBufferPtr buffer;
+
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlParserInputBufferCreate",
+ &file, &encoding))
+ return(NULL);
+ if ((encoding != NULL) && (encoding[0] != 0)) {
+ enc = xmlParseCharEncoding((const char *) encoding);
+ }
+ buffer = xmlParserInputBufferCreatePythonFile(file, enc);
+ if (buffer == NULL)
+ printf("libxml_xmlParserInputBufferCreate: buffer == NULL\n");
+ py_retval = libxml_xmlParserInputBufferPtrWrap(buffer);
+ return(py_retval);
+}
+
+/************************************************************************
+ * *
+ * Providing the resolver at the Python level *
+ * *
+ ************************************************************************/
+
+static xmlExternalEntityLoader defaultExternalEntityLoader = NULL;
+static PyObject *pythonExternalEntityLoaderObjext;
+
+static xmlParserInputPtr
+pythonExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr result = NULL;
+ if (pythonExternalEntityLoaderObjext != NULL) {
+ PyObject *ret;
+ PyObject *ctxtobj;
+
+ ctxtobj = libxml_xmlParserCtxtPtrWrap(ctxt);
+#ifdef DEBUG_LOADER
+ printf("pythonExternalEntityLoader: ready to call\n");
+#endif
+
+ ret = PyObject_CallFunction(pythonExternalEntityLoaderObjext,
+ (char *) "(ssO)", URL, ID, ctxtobj);
+ Py_XDECREF(ctxtobj);
+#ifdef DEBUG_LOADER
+ printf("pythonExternalEntityLoader: result ");
+ PyObject_Print(ret, stdout, 0);
+ printf("\n");
+#endif
+
+ if (ret != NULL) {
+ if (PyObject_HasAttrString(ret, (char *) "read")) {
+ xmlParserInputBufferPtr buf;
+
+ buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);
+ if (buf != NULL) {
+ buf->context = ret;
+ buf->readcallback = xmlPythonFileReadRaw;
+ buf->closecallback = xmlPythonFileCloseRaw;
+ result = xmlNewIOInputStream(ctxt, buf,
+ XML_CHAR_ENCODING_NONE);
+ }
+#if 0
+ } else {
+ if (URL != NULL)
+ printf("pythonExternalEntityLoader: can't read %s\n",
+ URL);
+#endif
+ }
+ if (result == NULL) {
+ Py_DECREF(ret);
+ } else if (URL != NULL) {
+ result->filename = (char *) xmlStrdup((const xmlChar *)URL);
+ result->directory = xmlParserGetDirectory((const char *) URL);
+ }
+ }
+ }
+ if ((result == NULL) && (defaultExternalEntityLoader != NULL)) {
+ result = defaultExternalEntityLoader(URL, ID, ctxt);
+ }
+ return(result);
+}
+
+PyObject *
+libxml_xmlSetEntityLoader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ PyObject *py_retval;
+ PyObject *loader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:libxml_xmlSetEntityLoader",
+ &loader))
+ return(NULL);
+
+ if (!PyCallable_Check(loader)) {
+ PyErr_SetString(PyExc_ValueError, "entity loader is not callable");
+ return(NULL);
+ }
+
+#ifdef DEBUG_LOADER
+ printf("libxml_xmlSetEntityLoader\n");
+#endif
+ if (defaultExternalEntityLoader == NULL)
+ defaultExternalEntityLoader = xmlGetExternalEntityLoader();
+
+ Py_XDECREF(pythonExternalEntityLoaderObjext);
+ pythonExternalEntityLoaderObjext = loader;
+ Py_XINCREF(pythonExternalEntityLoaderObjext);
+ xmlSetExternalEntityLoader(pythonExternalEntityLoader);
+
+ py_retval = PyLong_FromLong(0);
+ return(py_retval);
+}
+
+/************************************************************************
+ * *
+ * Input callback registration *
+ * *
+ ************************************************************************/
+static PyObject *pythonInputOpenCallbackObject;
+static int pythonInputCallbackID = -1;
+
+static int
+pythonInputMatchCallback(ATTRIBUTE_UNUSED const char *URI)
+{
+ /* Always return success, real decision whether URI is supported will be
+ * made in open callback. */
+ return 1;
+}
+
+static void *
+pythonInputOpenCallback(const char *URI)
+{
+ PyObject *ret;
+
+ ret = PyObject_CallFunction(pythonInputOpenCallbackObject,
+ (char *)"s", URI);
+ if (ret == Py_None) {
+ Py_DECREF(Py_None);
+ return NULL;
+ }
+ return ret;
+}
+
+PyObject *
+libxml_xmlRegisterInputCallback(ATTRIBUTE_UNUSED PyObject *self,
+ PyObject *args) {
+ PyObject *cb;
+
+ if (!PyArg_ParseTuple(args,
+ (const char *)"O:libxml_xmlRegisterInputCallback", &cb))
+ return(NULL);
+
+ if (!PyCallable_Check(cb)) {
+ PyErr_SetString(PyExc_ValueError, "input callback is not callable");
+ return(NULL);
+ }
+
+ /* Python module registers a single callback and manages the list of
+ * all callbacks internally. This is necessitated by xmlInputMatchCallback
+ * API, which does not allow for passing of data objects to discriminate
+ * different Python methods. */
+ if (pythonInputCallbackID == -1) {
+ pythonInputCallbackID = xmlRegisterInputCallbacks(
+ pythonInputMatchCallback, pythonInputOpenCallback,
+ xmlPythonFileReadRaw, xmlPythonFileCloseRaw);
+ if (pythonInputCallbackID == -1)
+ return PyErr_NoMemory();
+ pythonInputOpenCallbackObject = cb;
+ Py_INCREF(pythonInputOpenCallbackObject);
+ }
+
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlUnregisterInputCallback(ATTRIBUTE_UNUSED PyObject *self,
+ ATTRIBUTE_UNUSED PyObject *args) {
+ int ret;
+
+ ret = xmlPopInputCallbacks();
+ if (pythonInputCallbackID != -1) {
+ /* Assert that the right input callback was popped. libxml's API does not
+ * allow removal by ID, so all that could be done is an assert. */
+ if (pythonInputCallbackID == ret) {
+ pythonInputCallbackID = -1;
+ Py_DECREF(pythonInputOpenCallbackObject);
+ pythonInputOpenCallbackObject = NULL;
+ } else {
+ PyErr_SetString(PyExc_AssertionError, "popped non-python input callback");
+ return(NULL);
+ }
+ } else if (ret == -1) {
+ /* No more callbacks to pop */
+ PyErr_SetString(PyExc_IndexError, "no input callbacks to pop");
+ return(NULL);
+ }
+
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+/************************************************************************
+ * *
+ * Handling SAX/xmllib/sgmlop callback interfaces *
+ * *
+ ************************************************************************/
+
+static void
+pythonStartElement(void *user_data, const xmlChar * name,
+ const xmlChar ** attrs)
+{
+ int i;
+ PyObject *handler;
+ PyObject *dict;
+ PyObject *attrname;
+ PyObject *attrvalue;
+ PyObject *result = NULL;
+ int type = 0;
+
+#ifdef DEBUG_SAX
+ printf("pythonStartElement(%s) called\n", name);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "startElement"))
+ type = 1;
+ else if (PyObject_HasAttrString(handler, (char *) "start"))
+ type = 2;
+ if (type != 0) {
+ /*
+ * the xmllib interface always generates a dictionary,
+ * possibly empty
+ */
+ if ((attrs == NULL) && (type == 1)) {
+ Py_XINCREF(Py_None);
+ dict = Py_None;
+ } else if (attrs == NULL) {
+ dict = PyDict_New();
+ } else {
+ dict = PyDict_New();
+ for (i = 0; attrs[i] != NULL; i++) {
+ attrname = PY_IMPORT_STRING((char *) attrs[i]);
+ i++;
+ if (attrs[i] != NULL) {
+ attrvalue = PY_IMPORT_STRING((char *) attrs[i]);
+ } else {
+ Py_XINCREF(Py_None);
+ attrvalue = Py_None;
+ }
+ PyDict_SetItem(dict, attrname, attrvalue);
+ Py_DECREF(attrname);
+ Py_DECREF(attrvalue);
+ }
+ }
+
+ if (type == 1)
+ result = PyObject_CallMethod(handler, (char *) "startElement",
+ (char *) "sO", name, dict);
+ else if (type == 2)
+ result = PyObject_CallMethod(handler, (char *) "start",
+ (char *) "sO", name, dict);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(dict);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonStartDocument(void *user_data)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonStartDocument() called\n");
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "startDocument")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "startDocument", NULL);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonEndDocument(void *user_data)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonEndDocument() called\n");
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "endDocument")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "endDocument", NULL);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+ /*
+ * The reference to the handler is released there
+ */
+ Py_XDECREF(handler);
+}
+
+static void
+pythonEndElement(void *user_data, const xmlChar * name)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonEndElement(%s) called\n", name);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "endElement")) {
+ result = PyObject_CallMethod(handler, (char *) "endElement",
+ (char *) "s", name);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ } else if (PyObject_HasAttrString(handler, (char *) "end")) {
+ result = PyObject_CallMethod(handler, (char *) "end",
+ (char *) "s", name);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonReference(void *user_data, const xmlChar * name)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonReference(%s) called\n", name);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "reference")) {
+ result = PyObject_CallMethod(handler, (char *) "reference",
+ (char *) "s", name);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonCharacters(void *user_data, const xmlChar * ch, int len)
+{
+ PyObject *handler;
+ PyObject *result = NULL;
+ int type = 0;
+
+#ifdef DEBUG_SAX
+ printf("pythonCharacters(%s, %d) called\n", ch, len);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "characters"))
+ type = 1;
+ else if (PyObject_HasAttrString(handler, (char *) "data"))
+ type = 2;
+ if (type != 0) {
+ if (type == 1)
+ result = PyObject_CallMethod(handler, (char *) "characters",
+ (char *) "s#", ch, len);
+ else if (type == 2)
+ result = PyObject_CallMethod(handler, (char *) "data",
+ (char *) "s#", ch, len);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonIgnorableWhitespace(void *user_data, const xmlChar * ch, int len)
+{
+ PyObject *handler;
+ PyObject *result = NULL;
+ int type = 0;
+
+#ifdef DEBUG_SAX
+ printf("pythonIgnorableWhitespace(%s, %d) called\n", ch, len);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "ignorableWhitespace"))
+ type = 1;
+ else if (PyObject_HasAttrString(handler, (char *) "data"))
+ type = 2;
+ if (type != 0) {
+ if (type == 1)
+ result =
+ PyObject_CallMethod(handler,
+ (char *) "ignorableWhitespace",
+ (char *) "s#", ch, len);
+ else if (type == 2)
+ result =
+ PyObject_CallMethod(handler, (char *) "data",
+ (char *) "s#", ch, len);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonProcessingInstruction(void *user_data,
+ const xmlChar * target, const xmlChar * data)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonProcessingInstruction(%s, %s) called\n", target, data);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "processingInstruction")) {
+ result = PyObject_CallMethod(handler, (char *)
+ "processingInstruction",
+ (char *) "ss", target, data);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonComment(void *user_data, const xmlChar * value)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonComment(%s) called\n", value);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "comment")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "comment", (char *) "s",
+ value);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonWarning(void *user_data, const char *msg, ...)
+{
+ PyObject *handler;
+ PyObject *result;
+ va_list args;
+ char buf[1024];
+
+#ifdef DEBUG_SAX
+ printf("pythonWarning(%s) called\n", msg);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "warning")) {
+ va_start(args, msg);
+ vsnprintf(buf, 1023, msg, args);
+ va_end(args);
+ buf[1023] = 0;
+ result =
+ PyObject_CallMethod(handler, (char *) "warning", (char *) "s",
+ buf);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonError(void *user_data, const char *msg, ...)
+{
+ PyObject *handler;
+ PyObject *result;
+ va_list args;
+ char buf[1024];
+
+#ifdef DEBUG_SAX
+ printf("pythonError(%s) called\n", msg);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "error")) {
+ va_start(args, msg);
+ vsnprintf(buf, 1023, msg, args);
+ va_end(args);
+ buf[1023] = 0;
+ result =
+ PyObject_CallMethod(handler, (char *) "error", (char *) "s",
+ buf);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonFatalError(void *user_data, const char *msg, ...)
+{
+ PyObject *handler;
+ PyObject *result;
+ va_list args;
+ char buf[1024];
+
+#ifdef DEBUG_SAX
+ printf("pythonFatalError(%s) called\n", msg);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "fatalError")) {
+ va_start(args, msg);
+ vsnprintf(buf, 1023, msg, args);
+ va_end(args);
+ buf[1023] = 0;
+ result =
+ PyObject_CallMethod(handler, (char *) "fatalError",
+ (char *) "s", buf);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonCdataBlock(void *user_data, const xmlChar * ch, int len)
+{
+ PyObject *handler;
+ PyObject *result = NULL;
+ int type = 0;
+
+#ifdef DEBUG_SAX
+ printf("pythonCdataBlock(%s, %d) called\n", ch, len);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "cdataBlock"))
+ type = 1;
+ else if (PyObject_HasAttrString(handler, (char *) "cdata"))
+ type = 2;
+ if (type != 0) {
+ if (type == 1)
+ result =
+ PyObject_CallMethod(handler, (char *) "cdataBlock",
+ (char *) "s#", ch, len);
+ else if (type == 2)
+ result =
+ PyObject_CallMethod(handler, (char *) "cdata",
+ (char *) "s#", ch, len);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonExternalSubset(void *user_data,
+ const xmlChar * name,
+ const xmlChar * externalID, const xmlChar * systemID)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonExternalSubset(%s, %s, %s) called\n",
+ name, externalID, systemID);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "externalSubset")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "externalSubset",
+ (char *) "sss", name, externalID,
+ systemID);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonEntityDecl(void *user_data,
+ const xmlChar * name,
+ int type,
+ const xmlChar * publicId,
+ const xmlChar * systemId, xmlChar * content)
+{
+ PyObject *handler;
+ PyObject *result;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "entityDecl")) {
+ result = PyObject_CallMethod(handler, (char *) "entityDecl",
+ (char *) "sisss", name, type,
+ publicId, systemId, content);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+
+
+static void
+
+pythonNotationDecl(void *user_data,
+ const xmlChar * name,
+ const xmlChar * publicId, const xmlChar * systemId)
+{
+ PyObject *handler;
+ PyObject *result;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "notationDecl")) {
+ result = PyObject_CallMethod(handler, (char *) "notationDecl",
+ (char *) "sss", name, publicId,
+ systemId);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonAttributeDecl(void *user_data,
+ const xmlChar * elem,
+ const xmlChar * name,
+ int type,
+ int def,
+ const xmlChar * defaultValue, xmlEnumerationPtr tree)
+{
+ PyObject *handler;
+ PyObject *nameList;
+ PyObject *newName;
+ xmlEnumerationPtr node;
+ PyObject *result;
+ int count;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "attributeDecl")) {
+ count = 0;
+ for (node = tree; node != NULL; node = node->next) {
+ count++;
+ }
+ nameList = PyList_New(count);
+ count = 0;
+ for (node = tree; node != NULL; node = node->next) {
+ newName = PY_IMPORT_STRING((char *) node->name);
+ PyList_SetItem(nameList, count, newName);
+ Py_DECREF(newName);
+ count++;
+ }
+ result = PyObject_CallMethod(handler, (char *) "attributeDecl",
+ (char *) "ssiisO", elem, name, type,
+ def, defaultValue, nameList);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(nameList);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonElementDecl(void *user_data,
+ const xmlChar * name,
+ int type, ATTRIBUTE_UNUSED xmlElementContentPtr content)
+{
+ PyObject *handler;
+ PyObject *obj;
+ PyObject *result;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "elementDecl")) {
+ /* TODO: wrap in an elementContent object */
+ printf
+ ("pythonElementDecl: xmlElementContentPtr wrapper missing !\n");
+ obj = Py_None;
+ /* Py_XINCREF(Py_None); isn't the reference just borrowed ??? */
+ result = PyObject_CallMethod(handler, (char *) "elementDecl",
+ (char *) "siO", name, type, obj);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonUnparsedEntityDecl(void *user_data,
+ const xmlChar * name,
+ const xmlChar * publicId,
+ const xmlChar * systemId,
+ const xmlChar * notationName)
+{
+ PyObject *handler;
+ PyObject *result;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "unparsedEntityDecl")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "unparsedEntityDecl",
+ (char *) "ssss", name, publicId, systemId,
+ notationName);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonInternalSubset(void *user_data, const xmlChar * name,
+ const xmlChar * ExternalID, const xmlChar * SystemID)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonInternalSubset(%s, %s, %s) called\n",
+ name, ExternalID, SystemID);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "internalSubset")) {
+ result = PyObject_CallMethod(handler, (char *) "internalSubset",
+ (char *) "sss", name, ExternalID,
+ SystemID);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static xmlSAXHandler pythonSaxHandler = {
+ pythonInternalSubset,
+ NULL, /* TODO pythonIsStandalone, */
+ NULL, /* TODO pythonHasInternalSubset, */
+ NULL, /* TODO pythonHasExternalSubset, */
+ NULL, /* TODO pythonResolveEntity, */
+ NULL, /* TODO pythonGetEntity, */
+ pythonEntityDecl,
+ pythonNotationDecl,
+ pythonAttributeDecl,
+ pythonElementDecl,
+ pythonUnparsedEntityDecl,
+ NULL, /* OBSOLETED pythonSetDocumentLocator, */
+ pythonStartDocument,
+ pythonEndDocument,
+ pythonStartElement,
+ pythonEndElement,
+ pythonReference,
+ pythonCharacters,
+ pythonIgnorableWhitespace,
+ pythonProcessingInstruction,
+ pythonComment,
+ pythonWarning,
+ pythonError,
+ pythonFatalError,
+ NULL, /* TODO pythonGetParameterEntity, */
+ pythonCdataBlock,
+ pythonExternalSubset,
+ 1,
+ NULL, /* TODO migrate to SAX2 */
+ NULL,
+ NULL,
+ NULL
+};
+
+/************************************************************************
+ * *
+ * Handling of specific parser context *
+ * *
+ ************************************************************************/
+
+PyObject *
+libxml_xmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ const char *chunk;
+ int size;
+ const char *URI;
+ PyObject *pyobj_SAX = NULL;
+ xmlSAXHandlerPtr SAX = NULL;
+ xmlParserCtxtPtr ret;
+ PyObject *pyret;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "Oziz:xmlCreatePushParser", &pyobj_SAX, &chunk,
+ &size, &URI))
+ return (NULL);
+
+#ifdef DEBUG
+ printf("libxml_xmlCreatePushParser(%p, %s, %d, %s) called\n",
+ pyobj_SAX, chunk, size, URI);
+#endif
+ if (pyobj_SAX != Py_None) {
+ SAX = &pythonSaxHandler;
+ Py_INCREF(pyobj_SAX);
+ /* The reference is released in pythonEndDocument() */
+ }
+ ret = xmlCreatePushParserCtxt(SAX, pyobj_SAX, chunk, size, URI);
+ pyret = libxml_xmlParserCtxtPtrWrap(ret);
+ return (pyret);
+}
+
+PyObject *
+libxml_htmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+#ifdef LIBXML_HTML_ENABLED
+ const char *chunk;
+ int size;
+ const char *URI;
+ PyObject *pyobj_SAX = NULL;
+ xmlSAXHandlerPtr SAX = NULL;
+ xmlParserCtxtPtr ret;
+ PyObject *pyret;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "Oziz:htmlCreatePushParser", &pyobj_SAX, &chunk,
+ &size, &URI))
+ return (NULL);
+
+#ifdef DEBUG
+ printf("libxml_htmlCreatePushParser(%p, %s, %d, %s) called\n",
+ pyobj_SAX, chunk, size, URI);
+#endif
+ if (pyobj_SAX != Py_None) {
+ SAX = &pythonSaxHandler;
+ Py_INCREF(pyobj_SAX);
+ /* The reference is released in pythonEndDocument() */
+ }
+ ret = htmlCreatePushParserCtxt(SAX, pyobj_SAX, chunk, size, URI,
+ XML_CHAR_ENCODING_NONE);
+ pyret = libxml_xmlParserCtxtPtrWrap(ret);
+ return (pyret);
+#else
+ Py_INCREF(Py_None);
+ return (Py_None);
+#endif /* LIBXML_HTML_ENABLED */
+}
+
+PyObject *
+libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+#ifdef LIBXML_SAX1_ENABLED
+ int recover;
+ const char *URI;
+ PyObject *pyobj_SAX = NULL;
+ xmlSAXHandlerPtr SAX = NULL;
+
+ if (!PyArg_ParseTuple(args, (char *) "Osi:xmlSAXParseFile", &pyobj_SAX,
+ &URI, &recover))
+ return (NULL);
+
+#ifdef DEBUG
+ printf("libxml_xmlSAXParseFile(%p, %s, %d) called\n",
+ pyobj_SAX, URI, recover);
+#endif
+ if (pyobj_SAX == Py_None) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ SAX = &pythonSaxHandler;
+ Py_INCREF(pyobj_SAX);
+ /* The reference is released in pythonEndDocument() */
+ xmlSAXUserParseFile(SAX, pyobj_SAX, URI);
+#endif /* LIBXML_SAX1_ENABLED */
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
+PyObject *
+libxml_htmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+#ifdef LIBXML_HTML_ENABLED
+ const char *URI;
+ const char *encoding;
+ PyObject *pyobj_SAX = NULL;
+ xmlSAXHandlerPtr SAX = NULL;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "Osz:htmlSAXParseFile", &pyobj_SAX, &URI,
+ &encoding))
+ return (NULL);
+
+#ifdef DEBUG
+ printf("libxml_htmlSAXParseFile(%p, %s, %s) called\n",
+ pyobj_SAX, URI, encoding);
+#endif
+ if (pyobj_SAX == Py_None) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ SAX = &pythonSaxHandler;
+ Py_INCREF(pyobj_SAX);
+ /* The reference is released in pythonEndDocument() */
+ htmlSAXParseFile(URI, encoding, SAX, pyobj_SAX);
+ Py_INCREF(Py_None);
+ return (Py_None);
+#else
+ Py_INCREF(Py_None);
+ return (Py_None);
+#endif /* LIBXML_HTML_ENABLED */
+}
+
+/************************************************************************
+ * *
+ * Error message callback *
+ * *
+ ************************************************************************/
+
+static PyObject *libxml_xmlPythonErrorFuncHandler = NULL;
+static PyObject *libxml_xmlPythonErrorFuncCtxt = NULL;
+
+/* helper to build a xmlMalloc'ed string from a format and va_list */
+/*
+ * disabled the loop, the repeated call to vsnprintf without reset of ap
+ * in case the initial buffer was too small segfaulted on x86_64
+ * we now directly vsnprintf on a large buffer.
+ */
+static char *
+libxml_buildMessage(const char *msg, va_list ap)
+{
+ int chars;
+ char *str;
+
+ str = (char *) xmlMalloc(1000);
+ if (str == NULL)
+ return NULL;
+
+ chars = vsnprintf(str, 999, msg, ap);
+ if (chars >= 998)
+ str[999] = 0;
+
+ return str;
+}
+
+static void
+libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
+ ...)
+{
+ va_list ap;
+ PyObject *list;
+ PyObject *message;
+ PyObject *result;
+ char str[1000];
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
+#endif
+
+
+ if (libxml_xmlPythonErrorFuncHandler == NULL) {
+ va_start(ap, msg);
+ vfprintf(stderr, msg, ap);
+ va_end(ap);
+ } else {
+ va_start(ap, msg);
+ if (vsnprintf(str, 999, msg, ap) >= 998)
+ str[999] = 0;
+ va_end(ap);
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
+ Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
+ message = libxml_charPtrConstWrap(str);
+ PyTuple_SetItem(list, 1, message);
+ result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+libxml_xmlErrorInitialize(void)
+{
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlErrorInitialize() called\n");
+#endif
+ xmlSetGenericErrorFunc(NULL, libxml_xmlErrorFuncHandler);
+ xmlThrDefSetGenericErrorFunc(NULL, libxml_xmlErrorFuncHandler);
+}
+
+static PyObject *
+libxml_xmlRegisterErrorHandler(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *py_retval;
+ PyObject *pyobj_f;
+ PyObject *pyobj_ctx;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OO:xmlRegisterErrorHandler", &pyobj_f,
+ &pyobj_ctx))
+ return (NULL);
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlRegisterErrorHandler(%p, %p) called\n", pyobj_ctx,
+ pyobj_f);
+#endif
+
+ if (libxml_xmlPythonErrorFuncHandler != NULL) {
+ Py_XDECREF(libxml_xmlPythonErrorFuncHandler);
+ }
+ if (libxml_xmlPythonErrorFuncCtxt != NULL) {
+ Py_XDECREF(libxml_xmlPythonErrorFuncCtxt);
+ }
+
+ Py_XINCREF(pyobj_ctx);
+ Py_XINCREF(pyobj_f);
+
+ /* TODO: check f is a function ! */
+ libxml_xmlPythonErrorFuncHandler = pyobj_f;
+ libxml_xmlPythonErrorFuncCtxt = pyobj_ctx;
+
+ py_retval = libxml_intWrap(1);
+ return (py_retval);
+}
+
+
+/************************************************************************
+ * *
+ * Per parserCtxt error handler *
+ * *
+ ************************************************************************/
+
+typedef struct
+{
+ PyObject *f;
+ PyObject *arg;
+} xmlParserCtxtPyCtxt;
+typedef xmlParserCtxtPyCtxt *xmlParserCtxtPyCtxtPtr;
+
+static void
+libxml_xmlParserCtxtGenericErrorFuncHandler(void *ctx, int severity, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlParserCtxtPtr ctxt;
+ xmlParserCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlParserCtxtGenericErrorFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ ctxt = (xmlParserCtxtPtr)ctx;
+ pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private;
+
+ list = PyTuple_New(4);
+ PyTuple_SetItem(list, 0, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ PyTuple_SetItem(list, 1, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 2, libxml_intWrap(severity));
+ PyTuple_SetItem(list, 3, Py_None);
+ Py_INCREF(Py_None);
+ result = PyEval_CallObject(pyCtxt->f, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlParserCtxtErrorFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlParserCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_ERROR,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlParserCtxtWarningFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlParserCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_WARNING,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlParserCtxtValidityErrorFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlParserCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_VALIDITY_ERROR,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlParserCtxtValidityWarningFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlParserCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_VALIDITY_WARNING,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static PyObject *
+libxml_xmlParserCtxtSetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
+{
+ PyObject *py_retval;
+ xmlParserCtxtPtr ctxt;
+ xmlParserCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_ctxt;
+ PyObject *pyobj_f;
+ PyObject *pyobj_arg;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlParserCtxtSetErrorHandler",
+ &pyobj_ctxt, &pyobj_f, &pyobj_arg))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+ if (ctxt->_private == NULL) {
+ pyCtxt = xmlMalloc(sizeof(xmlParserCtxtPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ memset(pyCtxt,0,sizeof(xmlParserCtxtPyCtxt));
+ ctxt->_private = pyCtxt;
+ }
+ else {
+ pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private;
+ }
+ /* TODO: check f is a function ! */
+ Py_XDECREF(pyCtxt->f);
+ Py_XINCREF(pyobj_f);
+ pyCtxt->f = pyobj_f;
+ Py_XDECREF(pyCtxt->arg);
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+
+ if (pyobj_f != Py_None) {
+ ctxt->sax->error = libxml_xmlParserCtxtErrorFuncHandler;
+ ctxt->sax->warning = libxml_xmlParserCtxtWarningFuncHandler;
+ ctxt->vctxt.error = libxml_xmlParserCtxtValidityErrorFuncHandler;
+ ctxt->vctxt.warning = libxml_xmlParserCtxtValidityWarningFuncHandler;
+ }
+ else {
+ ctxt->sax->error = xmlParserError;
+ ctxt->vctxt.error = xmlParserValidityError;
+ ctxt->sax->warning = xmlParserWarning;
+ ctxt->vctxt.warning = xmlParserValidityWarning;
+ }
+
+ py_retval = libxml_intWrap(1);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlParserCtxtGetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
+{
+ PyObject *py_retval;
+ xmlParserCtxtPtr ctxt;
+ xmlParserCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserCtxtGetErrorHandler",
+ &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+ py_retval = PyTuple_New(2);
+ if (ctxt->_private != NULL) {
+ pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private;
+
+ PyTuple_SetItem(py_retval, 0, pyCtxt->f);
+ Py_XINCREF(pyCtxt->f);
+ PyTuple_SetItem(py_retval, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ }
+ else {
+ /* no python error handler registered */
+ PyTuple_SetItem(py_retval, 0, Py_None);
+ Py_XINCREF(Py_None);
+ PyTuple_SetItem(py_retval, 1, Py_None);
+ Py_XINCREF(Py_None);
+ }
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlFreeParserCtxt(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlParserCtxtPyCtxtPtr pyCtxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ if (ctxt != NULL) {
+ pyCtxt = (xmlParserCtxtPyCtxtPtr)((xmlParserCtxtPtr)ctxt)->_private;
+ if (pyCtxt) {
+ Py_XDECREF(pyCtxt->f);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ xmlFreeParserCtxt(ctxt);
+ }
+
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+/***
+ * xmlValidCtxt stuff
+ */
+
+typedef struct
+{
+ PyObject *warn;
+ PyObject *error;
+ PyObject *arg;
+} xmlValidCtxtPyCtxt;
+typedef xmlValidCtxtPyCtxt *xmlValidCtxtPyCtxtPtr;
+
+static void
+libxml_xmlValidCtxtGenericErrorFuncHandler(void *ctx, ATTRIBUTE_UNUSED int severity, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlValidCtxtGenericErrorFuncHandler(%p, %d, %s, ...) called\n", ctx, severity, str);
+#endif
+
+ pyCtxt = (xmlValidCtxtPyCtxtPtr)ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->error, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlValidCtxtGenericWarningFuncHandler(void *ctx, ATTRIBUTE_UNUSED int severity, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlValidCtxtGenericWarningFuncHandler(%p, %d, %s, ...) called\n", ctx, severity, str);
+#endif
+
+ pyCtxt = (xmlValidCtxtPyCtxtPtr)ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->warn, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlValidCtxtErrorFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlValidCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_VALIDITY_ERROR,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlValidCtxtWarningFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlValidCtxtGenericWarningFuncHandler(ctx,XML_PARSER_SEVERITY_VALIDITY_WARNING,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static PyObject *
+libxml_xmlSetValidErrors(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ PyObject *pyobj_error;
+ PyObject *pyobj_warn;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_arg = Py_None;
+ xmlValidCtxtPtr ctxt;
+ xmlValidCtxtPyCtxtPtr pyCtxt;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OOO|O:xmlSetValidErrors", &pyobj_ctx, &pyobj_error, &pyobj_warn, &pyobj_arg))
+ return (NULL);
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlSetValidErrors(%p, %p, %p) called\n", pyobj_ctx, pyobj_error, pyobj_warn);
+#endif
+
+ ctxt = PyValidCtxt_Get(pyobj_ctx);
+ pyCtxt = xmlMalloc(sizeof(xmlValidCtxtPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ memset(pyCtxt, 0, sizeof(xmlValidCtxtPyCtxt));
+
+
+ /* TODO: check warn and error is a function ! */
+ Py_XDECREF(pyCtxt->error);
+ Py_XINCREF(pyobj_error);
+ pyCtxt->error = pyobj_error;
+
+ Py_XDECREF(pyCtxt->warn);
+ Py_XINCREF(pyobj_warn);
+ pyCtxt->warn = pyobj_warn;
+
+ Py_XDECREF(pyCtxt->arg);
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+
+ ctxt->error = libxml_xmlValidCtxtErrorFuncHandler;
+ ctxt->warning = libxml_xmlValidCtxtWarningFuncHandler;
+ ctxt->userData = pyCtxt;
+
+ py_retval = libxml_intWrap(1);
+ return (py_retval);
+}
+
+
+static PyObject *
+libxml_xmlFreeValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlValidCtxtPtr cur;
+ xmlValidCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeValidCtxt", &pyobj_cur))
+ return(NULL);
+ cur = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_cur);
+
+ pyCtxt = (xmlValidCtxtPyCtxtPtr)(cur->userData);
+ if (pyCtxt != NULL)
+ {
+ Py_XDECREF(pyCtxt->error);
+ Py_XDECREF(pyCtxt->warn);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+
+ xmlFreeValidCtxt(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#ifdef LIBXML_READER_ENABLED
+/************************************************************************
+ * *
+ * Per xmlTextReader error handler *
+ * *
+ ************************************************************************/
+
+typedef struct
+{
+ PyObject *f;
+ PyObject *arg;
+} xmlTextReaderPyCtxt;
+typedef xmlTextReaderPyCtxt *xmlTextReaderPyCtxtPtr;
+
+static void
+libxml_xmlTextReaderErrorCallback(void *arg,
+ const char *msg,
+ int severity,
+ xmlTextReaderLocatorPtr locator)
+{
+ xmlTextReaderPyCtxt *pyCtxt = (xmlTextReaderPyCtxt *)arg;
+ PyObject *list;
+ PyObject *result;
+
+ list = PyTuple_New(4);
+ PyTuple_SetItem(list, 0, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ PyTuple_SetItem(list, 1, libxml_charPtrConstWrap(msg));
+ PyTuple_SetItem(list, 2, libxml_intWrap(severity));
+ PyTuple_SetItem(list, 3, libxml_xmlTextReaderLocatorPtrWrap(locator));
+ result = PyEval_CallObject(pyCtxt->f, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static PyObject *
+libxml_xmlTextReaderSetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
+{
+ xmlTextReaderPtr reader;
+ xmlTextReaderPyCtxtPtr pyCtxt;
+ xmlTextReaderErrorFunc f;
+ void *arg;
+ PyObject *pyobj_reader;
+ PyObject *pyobj_f;
+ PyObject *pyobj_arg;
+ PyObject *py_retval;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlTextReaderSetErrorHandler", &pyobj_reader, &pyobj_f, &pyobj_arg))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ /* clear previous error handler */
+ xmlTextReaderGetErrorHandler(reader,&f,&arg);
+ if (arg != NULL) {
+ if (f == (xmlTextReaderErrorFunc) libxml_xmlTextReaderErrorCallback) {
+ /* ok, it's our error handler! */
+ pyCtxt = (xmlTextReaderPyCtxtPtr)arg;
+ Py_XDECREF(pyCtxt->f);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ else {
+ /*
+ * there already an arg, and it's not ours,
+ * there is definitely something wrong going on here...
+ * we don't know how to free it, so we bail out...
+ */
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ }
+ xmlTextReaderSetErrorHandler(reader,NULL,NULL);
+ /* set new error handler */
+ if (pyobj_f != Py_None)
+ {
+ pyCtxt = (xmlTextReaderPyCtxtPtr)xmlMalloc(sizeof(xmlTextReaderPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ Py_XINCREF(pyobj_f);
+ pyCtxt->f = pyobj_f;
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+ xmlTextReaderSetErrorHandler(reader,
+ (xmlTextReaderErrorFunc) libxml_xmlTextReaderErrorCallback,
+ pyCtxt);
+ }
+
+ py_retval = libxml_intWrap(1);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlTextReaderGetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
+{
+ xmlTextReaderPtr reader;
+ xmlTextReaderPyCtxtPtr pyCtxt;
+ xmlTextReaderErrorFunc f;
+ void *arg;
+ PyObject *pyobj_reader;
+ PyObject *py_retval;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderSetErrorHandler", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ xmlTextReaderGetErrorHandler(reader,&f,&arg);
+ py_retval = PyTuple_New(2);
+ if (f == (xmlTextReaderErrorFunc)libxml_xmlTextReaderErrorCallback) {
+ /* ok, it's our error handler! */
+ pyCtxt = (xmlTextReaderPyCtxtPtr)arg;
+ PyTuple_SetItem(py_retval, 0, pyCtxt->f);
+ Py_XINCREF(pyCtxt->f);
+ PyTuple_SetItem(py_retval, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ }
+ else
+ {
+ /* f is null or it's not our error handler */
+ PyTuple_SetItem(py_retval, 0, Py_None);
+ Py_XINCREF(Py_None);
+ PyTuple_SetItem(py_retval, 1, Py_None);
+ Py_XINCREF(Py_None);
+ }
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlFreeTextReader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlTextReaderPyCtxtPtr pyCtxt;
+ xmlTextReaderErrorFunc f;
+ void *arg;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeTextReader", &pyobj_reader))
+ return(NULL);
+ if (!PyCapsule_CheckExact(pyobj_reader)) {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ if (reader == NULL) {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+
+ xmlTextReaderGetErrorHandler(reader,&f,&arg);
+ if (arg != NULL) {
+ if (f == (xmlTextReaderErrorFunc) libxml_xmlTextReaderErrorCallback) {
+ /* ok, it's our error handler! */
+ pyCtxt = (xmlTextReaderPyCtxtPtr)arg;
+ Py_XDECREF(pyCtxt->f);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ /*
+ * else, something wrong happened, because the error handler is
+ * not owned by the python bindings...
+ */
+ }
+
+ xmlFreeTextReader(reader);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+#endif
+
+/************************************************************************
+ * *
+ * XPath extensions *
+ * *
+ ************************************************************************/
+
+static void
+libxml_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs)
+{
+ PyObject *list, *cur, *result;
+ xmlXPathObjectPtr obj;
+ xmlXPathContextPtr rctxt;
+ PyObject *current_function = NULL;
+ const xmlChar *name;
+ const xmlChar *ns_uri;
+ int i;
+
+ if (ctxt == NULL)
+ return;
+ rctxt = ctxt->context;
+ if (rctxt == NULL)
+ return;
+ name = rctxt->function;
+ ns_uri = rctxt->functionURI;
+#ifdef DEBUG_XPATH
+ printf("libxml_xmlXPathFuncCallback called name %s URI %s\n", name,
+ ns_uri);
+#endif
+
+ /*
+ * Find the function, it should be there it was there at lookup
+ */
+ for (i = 0; i < libxml_xpathCallbacksNb; i++) {
+ if ( /* TODO (ctxt == libxml_xpathCallbacks[i].ctx) && */
+ (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
+ (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
+ current_function = (*libxml_xpathCallbacks)[i].function;
+ }
+ }
+ if (current_function == NULL) {
+ printf
+ ("libxml_xmlXPathFuncCallback: internal error %s not found !\n",
+ name);
+ return;
+ }
+
+ list = PyTuple_New(nargs + 1);
+ PyTuple_SetItem(list, 0, libxml_xmlXPathParserContextPtrWrap(ctxt));
+ for (i = nargs - 1; i >= 0; i--) {
+ obj = valuePop(ctxt);
+ cur = libxml_xmlXPathObjectPtrWrap(obj);
+ PyTuple_SetItem(list, i + 1, cur);
+ }
+ result = PyEval_CallObject(current_function, list);
+ Py_DECREF(list);
+
+ obj = libxml_xmlXPathObjectPtrConvert(result);
+ valuePush(ctxt, obj);
+}
+
+static xmlXPathFunction
+libxml_xmlXPathFuncLookupFunc(void *ctxt, const xmlChar * name,
+ const xmlChar * ns_uri)
+{
+ int i;
+
+#ifdef DEBUG_XPATH
+ printf("libxml_xmlXPathFuncLookupFunc(%p, %s, %s) called\n",
+ ctxt, name, ns_uri);
+#endif
+ /*
+ * This is called once only. The address is then stored in the
+ * XPath expression evaluation, the proper object to call can
+ * then still be found using the execution context function
+ * and functionURI fields.
+ */
+ for (i = 0; i < libxml_xpathCallbacksNb; i++) {
+ if ((ctxt == (*libxml_xpathCallbacks)[i].ctx) &&
+ (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
+ (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
+ return (libxml_xmlXPathFuncCallback);
+ }
+ }
+ return (NULL);
+}
+
+static void
+libxml_xpathCallbacksInitialize(void)
+{
+ int i;
+
+ if (libxml_xpathCallbacksInitialized != 0)
+ return;
+
+#ifdef DEBUG_XPATH
+ printf("libxml_xpathCallbacksInitialized called\n");
+#endif
+ libxml_xpathCallbacks = (libxml_xpathCallbackArray*)xmlMalloc(
+ libxml_xpathCallbacksAllocd*sizeof(libxml_xpathCallback));
+
+ for (i = 0; i < libxml_xpathCallbacksAllocd; i++) {
+ (*libxml_xpathCallbacks)[i].ctx = NULL;
+ (*libxml_xpathCallbacks)[i].name = NULL;
+ (*libxml_xpathCallbacks)[i].ns_uri = NULL;
+ (*libxml_xpathCallbacks)[i].function = NULL;
+ }
+ libxml_xpathCallbacksInitialized = 1;
+}
+
+PyObject *
+libxml_xmlRegisterXPathFunction(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *py_retval;
+ int c_retval = 0;
+ xmlChar *name;
+ xmlChar *ns_uri;
+ xmlXPathContextPtr ctx;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_f;
+ int i;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OszO:registerXPathFunction", &pyobj_ctx, &name,
+ &ns_uri, &pyobj_f))
+ return (NULL);
+
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+ if (libxml_xpathCallbacksInitialized == 0)
+ libxml_xpathCallbacksInitialize();
+ xmlXPathRegisterFuncLookup(ctx, libxml_xmlXPathFuncLookupFunc, ctx);
+
+ if ((pyobj_ctx == NULL) || (name == NULL) || (pyobj_f == NULL)) {
+ py_retval = libxml_intWrap(-1);
+ return (py_retval);
+ }
+#ifdef DEBUG_XPATH
+ printf("libxml_registerXPathFunction(%p, %s, %s) called\n",
+ ctx, name, ns_uri);
+#endif
+ for (i = 0; i < libxml_xpathCallbacksNb; i++) {
+ if ((ctx == (*libxml_xpathCallbacks)[i].ctx) &&
+ (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
+ (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
+ Py_XINCREF(pyobj_f);
+ Py_XDECREF((*libxml_xpathCallbacks)[i].function);
+ (*libxml_xpathCallbacks)[i].function = pyobj_f;
+ c_retval = 1;
+ goto done;
+ }
+ }
+ if (libxml_xpathCallbacksNb >= libxml_xpathCallbacksAllocd) {
+ libxml_xpathCallbacksAllocd+=10;
+ libxml_xpathCallbacks = (libxml_xpathCallbackArray*)xmlRealloc(
+ libxml_xpathCallbacks,
+ libxml_xpathCallbacksAllocd*sizeof(libxml_xpathCallback));
+ }
+ i = libxml_xpathCallbacksNb++;
+ Py_XINCREF(pyobj_f);
+ (*libxml_xpathCallbacks)[i].ctx = ctx;
+ (*libxml_xpathCallbacks)[i].name = xmlStrdup(name);
+ (*libxml_xpathCallbacks)[i].ns_uri = xmlStrdup(ns_uri);
+ (*libxml_xpathCallbacks)[i].function = pyobj_f;
+ c_retval = 1;
+
+ done:
+ py_retval = libxml_intWrap((int) c_retval);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlXPathRegisterVariable(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *py_retval;
+ int c_retval = 0;
+ xmlChar *name;
+ xmlChar *ns_uri;
+ xmlXPathContextPtr ctx;
+ xmlXPathObjectPtr val;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_value;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OszO:xpathRegisterVariable", &pyobj_ctx, &name,
+ &ns_uri, &pyobj_value))
+ return (NULL);
+
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+ val = libxml_xmlXPathObjectPtrConvert(pyobj_value);
+
+ c_retval = xmlXPathRegisterVariableNS(ctx, name, ns_uri, val);
+ py_retval = libxml_intWrap(c_retval);
+ return (py_retval);
+}
+
+/************************************************************************
+ * *
+ * Global properties access *
+ * *
+ ************************************************************************/
+static PyObject *
+libxml_name(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ const xmlChar *res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:name", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_name: cur = %p type %d\n", cur, cur->type);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:{
+ xmlDocPtr doc = (xmlDocPtr) cur;
+
+ res = doc->URL;
+ break;
+ }
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->name;
+ break;
+ }
+ case XML_NAMESPACE_DECL:{
+ xmlNsPtr ns = (xmlNsPtr) cur;
+
+ res = ns->prefix;
+ break;
+ }
+ default:
+ res = cur->name;
+ break;
+ }
+ resultobj = libxml_constxmlCharPtrWrap(res);
+
+ return resultobj;
+}
+
+static PyObject *
+libxml_doc(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlDocPtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:doc", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_doc: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ res = NULL;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->doc;
+ break;
+ }
+ case XML_NAMESPACE_DECL:
+ res = NULL;
+ break;
+ default:
+ res = cur->doc;
+ break;
+ }
+ resultobj = libxml_xmlDocPtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_properties(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlAttrPtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:properties", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+ if ((cur != NULL) && (cur->type == XML_ELEMENT_NODE))
+ res = cur->properties;
+ else
+ res = NULL;
+ resultobj = libxml_xmlAttrPtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_next(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:next", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_next: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ res = NULL;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = (xmlNodePtr) attr->next;
+ break;
+ }
+ case XML_NAMESPACE_DECL:{
+ xmlNsPtr ns = (xmlNsPtr) cur;
+
+ res = (xmlNodePtr) ns->next;
+ break;
+ }
+ default:
+ res = cur->next;
+ break;
+
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_prev(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:prev", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_prev: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ res = NULL;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = (xmlNodePtr) attr->prev;
+ }
+ break;
+ case XML_NAMESPACE_DECL:
+ res = NULL;
+ break;
+ default:
+ res = cur->prev;
+ break;
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_children(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:children", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_children: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DTD_NODE:
+ res = cur->children;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->children;
+ break;
+ }
+ default:
+ res = NULL;
+ break;
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_last(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:last", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_last: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DTD_NODE:
+ res = cur->last;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->last;
+ break;
+ }
+ default:
+ res = NULL;
+ break;
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_parent(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:parent", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_parent: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ res = NULL;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->parent;
+ }
+ break;
+ case XML_ENTITY_DECL:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ res = NULL;
+ break;
+ default:
+ res = cur->parent;
+ break;
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_type(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ const xmlChar *res = NULL;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:last", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+ if (cur == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+#ifdef DEBUG
+ printf("libxml_type: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ res = (const xmlChar *) "element";
+ break;
+ case XML_ATTRIBUTE_NODE:
+ res = (const xmlChar *) "attribute";
+ break;
+ case XML_TEXT_NODE:
+ res = (const xmlChar *) "text";
+ break;
+ case XML_CDATA_SECTION_NODE:
+ res = (const xmlChar *) "cdata";
+ break;
+ case XML_ENTITY_REF_NODE:
+ res = (const xmlChar *) "entity_ref";
+ break;
+ case XML_ENTITY_NODE:
+ res = (const xmlChar *) "entity";
+ break;
+ case XML_PI_NODE:
+ res = (const xmlChar *) "pi";
+ break;
+ case XML_COMMENT_NODE:
+ res = (const xmlChar *) "comment";
+ break;
+ case XML_DOCUMENT_NODE:
+ res = (const xmlChar *) "document_xml";
+ break;
+ case XML_DOCUMENT_TYPE_NODE:
+ res = (const xmlChar *) "doctype";
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ res = (const xmlChar *) "fragment";
+ break;
+ case XML_NOTATION_NODE:
+ res = (const xmlChar *) "notation";
+ break;
+ case XML_HTML_DOCUMENT_NODE:
+ res = (const xmlChar *) "document_html";
+ break;
+ case XML_DTD_NODE:
+ res = (const xmlChar *) "dtd";
+ break;
+ case XML_ELEMENT_DECL:
+ res = (const xmlChar *) "elem_decl";
+ break;
+ case XML_ATTRIBUTE_DECL:
+ res = (const xmlChar *) "attribute_decl";
+ break;
+ case XML_ENTITY_DECL:
+ res = (const xmlChar *) "entity_decl";
+ break;
+ case XML_NAMESPACE_DECL:
+ res = (const xmlChar *) "namespace";
+ break;
+ case XML_XINCLUDE_START:
+ res = (const xmlChar *) "xinclude_start";
+ break;
+ case XML_XINCLUDE_END:
+ res = (const xmlChar *) "xinclude_end";
+ break;
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+ res = (const xmlChar *) "document_docbook";
+ break;
+#endif
+ }
+#ifdef DEBUG
+ printf("libxml_type: cur = %p: %s\n", cur, res);
+#endif
+
+ resultobj = libxml_constxmlCharPtrWrap(res);
+ return resultobj;
+}
+
+/************************************************************************
+ * *
+ * Specific accessor functions *
+ * *
+ ************************************************************************/
+PyObject *
+libxml_xmlNodeGetNsDefs(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "O:xmlNodeGetNsDefs", &pyobj_node))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ if ((node == NULL) || (node->type != XML_ELEMENT_NODE)) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ c_retval = node->nsDef;
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlNodeRemoveNsDef(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ xmlNsPtr ns, prev;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar *href;
+ xmlNsPtr c_retval;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "Oz:xmlNodeRemoveNsDef", &pyobj_node, &href))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = NULL;
+
+ if ((node == NULL) || (node->type != XML_ELEMENT_NODE)) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+ if (href == NULL) {
+ ns = node->nsDef;
+ node->nsDef = NULL;
+ c_retval = 0;
+ }
+ else {
+ prev = NULL;
+ ns = node->nsDef;
+ while (ns != NULL) {
+ if (xmlStrEqual(ns->href, href)) {
+ if (prev != NULL)
+ prev->next = ns->next;
+ else
+ node->nsDef = ns->next;
+ ns->next = NULL;
+ c_retval = 0;
+ break;
+ }
+ prev = ns;
+ ns = ns->next;
+ }
+ }
+
+ c_retval = ns;
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlNodeGetNs(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:xmlNodeGetNs", &pyobj_node))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ if ((node == NULL) ||
+ ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ c_retval = node->ns;
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return (py_retval);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/************************************************************************
+ * *
+ * Serialization front-end *
+ * *
+ ************************************************************************/
+
+static PyObject *
+libxml_serializeNode(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval = NULL;
+ xmlChar *c_retval;
+ PyObject *pyobj_node;
+ xmlNodePtr node;
+ xmlDocPtr doc;
+ const char *encoding;
+ int format;
+ xmlSaveCtxtPtr ctxt;
+ xmlBufferPtr buf;
+ int options = 0;
+
+ if (!PyArg_ParseTuple(args, (char *) "Ozi:serializeNode", &pyobj_node,
+ &encoding, &format))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ if (node == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ if (node->type == XML_DOCUMENT_NODE) {
+ doc = (xmlDocPtr) node;
+ node = NULL;
+#ifdef LIBXML_HTML_ENABLED
+ } else if (node->type == XML_HTML_DOCUMENT_NODE) {
+ doc = (xmlDocPtr) node;
+ node = NULL;
+#endif
+ } else {
+ if (node->type == XML_NAMESPACE_DECL)
+ doc = NULL;
+ else
+ doc = node->doc;
+ if ((doc == NULL) || (doc->type == XML_DOCUMENT_NODE)) {
+#ifdef LIBXML_HTML_ENABLED
+ } else if (doc->type == XML_HTML_DOCUMENT_NODE) {
+#endif /* LIBXML_HTML_ENABLED */
+ } else {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ }
+
+
+ buf = xmlBufferCreate();
+ if (buf == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ if (format) options |= XML_SAVE_FORMAT;
+ ctxt = xmlSaveToBuffer(buf, encoding, options);
+ if (ctxt == NULL) {
+ xmlBufferFree(buf);
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ if (node == NULL)
+ xmlSaveDoc(ctxt, doc);
+ else
+ xmlSaveTree(ctxt, node);
+ xmlSaveClose(ctxt);
+
+ c_retval = buf->content;
+ buf->content = NULL;
+
+ xmlBufferFree(buf);
+ py_retval = libxml_charPtrWrap((char *) c_retval);
+
+ return (py_retval);
+}
+
+static PyObject *
+libxml_saveNodeTo(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_file = NULL;
+ FILE *output;
+ PyObject *pyobj_node;
+ xmlNodePtr node;
+ xmlDocPtr doc;
+ const char *encoding;
+ int format;
+ int len;
+ xmlOutputBufferPtr buf;
+ xmlCharEncodingHandlerPtr handler = NULL;
+
+ if (!PyArg_ParseTuple(args, (char *) "OOzi:serializeNode", &pyobj_node,
+ &py_file, &encoding, &format))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ if (node == NULL) {
+ return (PyLong_FromLong((long) -1));
+ }
+ output = PyFile_Get(py_file);
+ if (output == NULL) {
+ return (PyLong_FromLong((long) -1));
+ }
+
+ if (node->type == XML_DOCUMENT_NODE) {
+ doc = (xmlDocPtr) node;
+ } else if (node->type == XML_HTML_DOCUMENT_NODE) {
+ doc = (xmlDocPtr) node;
+ } else {
+ doc = node->doc;
+ }
+#ifdef LIBXML_HTML_ENABLED
+ if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ if (encoding == NULL)
+ encoding = (const char *) htmlGetMetaEncoding(doc);
+ }
+#endif /* LIBXML_HTML_ENABLED */
+ if (encoding != NULL) {
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL) {
+ return (PyLong_FromLong((long) -1));
+ }
+ }
+ if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("HTML");
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("ascii");
+ }
+
+ buf = xmlOutputBufferCreateFile(output, handler);
+ if (node->type == XML_DOCUMENT_NODE) {
+ len = xmlSaveFormatFileTo(buf, doc, encoding, format);
+#ifdef LIBXML_HTML_ENABLED
+ } else if (node->type == XML_HTML_DOCUMENT_NODE) {
+ htmlDocContentDumpFormatOutput(buf, doc, encoding, format);
+ len = xmlOutputBufferClose(buf);
+ } else if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ htmlNodeDumpFormatOutput(buf, doc, node, encoding, format);
+ len = xmlOutputBufferClose(buf);
+#endif /* LIBXML_HTML_ENABLED */
+ } else {
+ xmlNodeDumpOutput(buf, doc, node, 0, format, encoding);
+ len = xmlOutputBufferClose(buf);
+ }
+ PyFile_Release(output);
+ return (PyLong_FromLong((long) len));
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * Extra stuff *
+ * *
+ ************************************************************************/
+PyObject *
+libxml_xmlNewNode(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ xmlChar *name;
+ xmlNodePtr node;
+
+ if (!PyArg_ParseTuple(args, (char *) "s:xmlNewNode", &name))
+ return (NULL);
+ node = (xmlNodePtr) xmlNewNode(NULL, name);
+#ifdef DEBUG
+ printf("NewNode: %s : %p\n", name, (void *) node);
+#endif
+
+ if (node == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ py_retval = libxml_xmlNodePtrWrap(node);
+ return (py_retval);
+}
+
+
+/************************************************************************
+ * *
+ * Local Catalog stuff *
+ * *
+ ************************************************************************/
+static PyObject *
+libxml_addLocalCatalog(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ xmlChar *URL;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os:addLocalCatalog", &pyobj_ctxt, &URL))
+ return(NULL);
+
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ if (URL != NULL) {
+ ctxt->catalogs = xmlCatalogAddLocal(ctxt->catalogs, URL);
+ }
+
+#ifdef DEBUG
+ printf("LocalCatalog: %s\n", URL);
+#endif
+
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+/************************************************************************
+ * *
+ * RelaxNG error handler registration *
+ * *
+ ************************************************************************/
+
+typedef struct
+{
+ PyObject *warn;
+ PyObject *error;
+ PyObject *arg;
+} xmlRelaxNGValidCtxtPyCtxt;
+typedef xmlRelaxNGValidCtxtPyCtxt *xmlRelaxNGValidCtxtPyCtxtPtr;
+
+static void
+libxml_xmlRelaxNGValidityGenericErrorFuncHandler(void *ctx, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlRelaxNGValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlRelaxNGValidityGenericErrorFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ pyCtxt = (xmlRelaxNGValidCtxtPyCtxtPtr)ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->error, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlRelaxNGValidityGenericWarningFuncHandler(void *ctx, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlRelaxNGValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlRelaxNGValidityGenericWarningFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ pyCtxt = (xmlRelaxNGValidCtxtPyCtxtPtr)ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->warn, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlRelaxNGValidityErrorFunc(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlRelaxNGValidityGenericErrorFuncHandler(ctx, libxml_buildMessage(msg, ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlRelaxNGValidityWarningFunc(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlRelaxNGValidityGenericWarningFuncHandler(ctx, libxml_buildMessage(msg, ap));
+ va_end(ap);
+}
+
+static PyObject *
+libxml_xmlRelaxNGSetValidErrors(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ PyObject *pyobj_error;
+ PyObject *pyobj_warn;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_arg = Py_None;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ xmlRelaxNGValidCtxtPyCtxtPtr pyCtxt;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OOO|O:xmlRelaxNGSetValidErrors", &pyobj_ctx, &pyobj_error, &pyobj_warn, &pyobj_arg))
+ return (NULL);
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlRelaxNGSetValidErrors(%p, %p, %p) called\n", pyobj_ctx, pyobj_error, pyobj_warn);
+#endif
+
+ ctxt = PyrelaxNgValidCtxt_Get(pyobj_ctx);
+ if (xmlRelaxNGGetValidErrors(ctxt, NULL, NULL, (void **) &pyCtxt) == -1)
+ {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+
+ if (pyCtxt == NULL)
+ {
+ /* first time to set the error handlers */
+ pyCtxt = xmlMalloc(sizeof(xmlRelaxNGValidCtxtPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ memset(pyCtxt, 0, sizeof(xmlRelaxNGValidCtxtPyCtxt));
+ }
+
+ /* TODO: check warn and error is a function ! */
+ Py_XDECREF(pyCtxt->error);
+ Py_XINCREF(pyobj_error);
+ pyCtxt->error = pyobj_error;
+
+ Py_XDECREF(pyCtxt->warn);
+ Py_XINCREF(pyobj_warn);
+ pyCtxt->warn = pyobj_warn;
+
+ Py_XDECREF(pyCtxt->arg);
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+
+ xmlRelaxNGSetValidErrors(ctxt, &libxml_xmlRelaxNGValidityErrorFunc, &libxml_xmlRelaxNGValidityWarningFunc, pyCtxt);
+
+ py_retval = libxml_intWrap(1);
+ return (py_retval);
+}
+
+static PyObject *
+libxml_xmlRelaxNGFreeValidCtxt(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ xmlRelaxNGValidCtxtPtr ctxt;
+ xmlRelaxNGValidCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGFreeValidCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+
+ if (xmlRelaxNGGetValidErrors(ctxt, NULL, NULL, (void **) &pyCtxt) == 0)
+ {
+ if (pyCtxt != NULL)
+ {
+ Py_XDECREF(pyCtxt->error);
+ Py_XDECREF(pyCtxt->warn);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ }
+
+ xmlRelaxNGFreeValidCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+typedef struct
+{
+ PyObject *warn;
+ PyObject *error;
+ PyObject *arg;
+} xmlSchemaValidCtxtPyCtxt;
+typedef xmlSchemaValidCtxtPyCtxt *xmlSchemaValidCtxtPyCtxtPtr;
+
+static void
+libxml_xmlSchemaValidityGenericErrorFuncHandler(void *ctx, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlSchemaValidityGenericErrorFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ pyCtxt = (xmlSchemaValidCtxtPyCtxtPtr) ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->error, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlSchemaValidityGenericWarningFuncHandler(void *ctx, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlSchemaValidityGenericWarningFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ pyCtxt = (xmlSchemaValidCtxtPyCtxtPtr) ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->warn, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlSchemaValidityErrorFunc(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlSchemaValidityGenericErrorFuncHandler(ctx, libxml_buildMessage(msg, ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlSchemaValidityWarningFunc(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlSchemaValidityGenericWarningFuncHandler(ctx, libxml_buildMessage(msg, ap));
+ va_end(ap);
+}
+
+PyObject *
+libxml_xmlSchemaSetValidErrors(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ PyObject *pyobj_error;
+ PyObject *pyobj_warn;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_arg = Py_None;
+ xmlSchemaValidCtxtPtr ctxt;
+ xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OOO|O:xmlSchemaSetValidErrors", &pyobj_ctx, &pyobj_error, &pyobj_warn, &pyobj_arg))
+ return (NULL);
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlSchemaSetValidErrors(%p, %p, %p) called\n", pyobj_ctx, pyobj_error, pyobj_warn);
+#endif
+
+ ctxt = PySchemaValidCtxt_Get(pyobj_ctx);
+ if (xmlSchemaGetValidErrors(ctxt, NULL, NULL, (void **) &pyCtxt) == -1)
+ {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+
+ if (pyCtxt == NULL)
+ {
+ /* first time to set the error handlers */
+ pyCtxt = xmlMalloc(sizeof(xmlSchemaValidCtxtPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ memset(pyCtxt, 0, sizeof(xmlSchemaValidCtxtPyCtxt));
+ }
+
+ /* TODO: check warn and error is a function ! */
+ Py_XDECREF(pyCtxt->error);
+ Py_XINCREF(pyobj_error);
+ pyCtxt->error = pyobj_error;
+
+ Py_XDECREF(pyCtxt->warn);
+ Py_XINCREF(pyobj_warn);
+ pyCtxt->warn = pyobj_warn;
+
+ Py_XDECREF(pyCtxt->arg);
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+
+ xmlSchemaSetValidErrors(ctxt, &libxml_xmlSchemaValidityErrorFunc, &libxml_xmlSchemaValidityWarningFunc, pyCtxt);
+
+ py_retval = libxml_intWrap(1);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlSchemaFreeValidCtxt(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ xmlSchemaValidCtxtPtr ctxt;
+ xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaFreeValidCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ if (xmlSchemaGetValidErrors(ctxt, NULL, NULL, (void **) &pyCtxt) == 0)
+ {
+ if (pyCtxt != NULL)
+ {
+ Py_XDECREF(pyCtxt->error);
+ Py_XDECREF(pyCtxt->warn);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ }
+
+ xmlSchemaFreeValidCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif
+
+#ifdef LIBXML_C14N_ENABLED
+#ifdef LIBXML_OUTPUT_ENABLED
+
+/************************************************************************
+ * *
+ * XML Canonicalization c14n *
+ * *
+ ************************************************************************/
+
+static int
+PyxmlNodeSet_Convert(PyObject *py_nodeset, xmlNodeSetPtr *result)
+{
+ xmlNodeSetPtr nodeSet;
+ int is_tuple = 0;
+
+ if (PyTuple_Check(py_nodeset))
+ is_tuple = 1;
+ else if (PyList_Check(py_nodeset))
+ is_tuple = 0;
+ else if (py_nodeset == Py_None) {
+ *result = NULL;
+ return 0;
+ }
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "must be a tuple or list of nodes.");
+ return -1;
+ }
+
+ nodeSet = (xmlNodeSetPtr) xmlMalloc(sizeof(xmlNodeSet));
+ if (nodeSet == NULL) {
+ PyErr_SetString(PyExc_MemoryError, "");
+ return -1;
+ }
+
+ nodeSet->nodeNr = 0;
+ nodeSet->nodeMax = (is_tuple
+ ? PyTuple_GET_SIZE(py_nodeset)
+ : PyList_GET_SIZE(py_nodeset));
+ nodeSet->nodeTab
+ = (xmlNodePtr *) xmlMalloc (nodeSet->nodeMax
+ * sizeof(xmlNodePtr));
+ if (nodeSet->nodeTab == NULL) {
+ xmlFree(nodeSet);
+ PyErr_SetString(PyExc_MemoryError, "");
+ return -1;
+ }
+ memset(nodeSet->nodeTab, 0 ,
+ nodeSet->nodeMax * sizeof(xmlNodePtr));
+
+ {
+ int idx;
+ for (idx=0; idx < nodeSet->nodeMax; ++idx) {
+ xmlNodePtr pynode =
+ PyxmlNode_Get (is_tuple
+ ? PyTuple_GET_ITEM(py_nodeset, idx)
+ : PyList_GET_ITEM(py_nodeset, idx));
+ if (pynode)
+ nodeSet->nodeTab[nodeSet->nodeNr++] = pynode;
+ }
+ }
+ *result = nodeSet;
+ return 0;
+}
+
+static int
+PystringSet_Convert(PyObject *py_strings, xmlChar *** result)
+{
+ /* NOTE: the array should be freed, but the strings are shared
+ with the python strings and so must not be freed. */
+
+ xmlChar ** strings;
+ int is_tuple = 0;
+ int count;
+ int init_index = 0;
+
+ if (PyTuple_Check(py_strings))
+ is_tuple = 1;
+ else if (PyList_Check(py_strings))
+ is_tuple = 0;
+ else if (py_strings == Py_None) {
+ *result = NULL;
+ return 0;
+ }
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "must be a tuple or list of strings.");
+ return -1;
+ }
+
+ count = (is_tuple
+ ? PyTuple_GET_SIZE(py_strings)
+ : PyList_GET_SIZE(py_strings));
+
+ strings = (xmlChar **) xmlMalloc(sizeof(xmlChar *) * count);
+
+ if (strings == NULL) {
+ PyErr_SetString(PyExc_MemoryError, "");
+ return -1;
+ }
+
+ memset(strings, 0 , sizeof(xmlChar *) * count);
+
+ {
+ int idx;
+ for (idx=0; idx < count; ++idx) {
+ char* s = PyBytes_AsString
+ (is_tuple
+ ? PyTuple_GET_ITEM(py_strings, idx)
+ : PyList_GET_ITEM(py_strings, idx));
+ if (s)
+ strings[init_index++] = (xmlChar *)s;
+ else {
+ xmlFree(strings);
+ PyErr_SetString(PyExc_TypeError,
+ "must be a tuple or list of strings.");
+ return -1;
+ }
+ }
+ }
+
+ *result = strings;
+ return 0;
+}
+
+static PyObject *
+libxml_C14NDocDumpMemory(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *py_retval = NULL;
+
+ PyObject *pyobj_doc;
+ PyObject *pyobj_nodes;
+ int exclusive;
+ PyObject *pyobj_prefixes;
+ int with_comments;
+
+ xmlDocPtr doc;
+ xmlNodeSetPtr nodes;
+ xmlChar **prefixes = NULL;
+ xmlChar *doc_txt;
+
+ int result;
+
+ if (!PyArg_ParseTuple(args, (char *) "OOiOi:C14NDocDumpMemory",
+ &pyobj_doc,
+ &pyobj_nodes,
+ &exclusive,
+ &pyobj_prefixes,
+ &with_comments))
+ return (NULL);
+
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ if (!doc) {
+ PyErr_SetString(PyExc_TypeError, "bad document.");
+ return NULL;
+ }
+
+ result = PyxmlNodeSet_Convert(pyobj_nodes, &nodes);
+ if (result < 0) return NULL;
+
+ if (exclusive) {
+ result = PystringSet_Convert(pyobj_prefixes, &prefixes);
+ if (result < 0) {
+ if (nodes) {
+ xmlFree(nodes->nodeTab);
+ xmlFree(nodes);
+ }
+ return NULL;
+ }
+ }
+
+ result = xmlC14NDocDumpMemory(doc,
+ nodes,
+ exclusive,
+ prefixes,
+ with_comments,
+ &doc_txt);
+
+ if (nodes) {
+ xmlFree(nodes->nodeTab);
+ xmlFree(nodes);
+ }
+ if (prefixes) {
+ xmlChar ** idx = prefixes;
+ while (*idx) xmlFree(*(idx++));
+ xmlFree(prefixes);
+ }
+
+ if (result < 0) {
+ PyErr_SetString(PyExc_Exception,
+ "libxml2 xmlC14NDocDumpMemory failure.");
+ return NULL;
+ }
+ else {
+ py_retval = PY_IMPORT_STRING_SIZE((const char *) doc_txt,
+ result);
+ xmlFree(doc_txt);
+ return py_retval;
+ }
+}
+
+static PyObject *
+libxml_C14NDocSaveTo(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *pyobj_doc;
+ PyObject *py_file;
+ PyObject *pyobj_nodes;
+ int exclusive;
+ PyObject *pyobj_prefixes;
+ int with_comments;
+
+ xmlDocPtr doc;
+ xmlNodeSetPtr nodes;
+ xmlChar **prefixes = NULL;
+ FILE * output;
+ xmlOutputBufferPtr buf;
+
+ int result;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *) "OOiOiO:C14NDocSaveTo",
+ &pyobj_doc,
+ &pyobj_nodes,
+ &exclusive,
+ &pyobj_prefixes,
+ &with_comments,
+ &py_file))
+ return (NULL);
+
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ if (!doc) {
+ PyErr_SetString(PyExc_TypeError, "bad document.");
+ return NULL;
+ }
+
+ output = PyFile_Get(py_file);
+ if (output == NULL) {
+ PyErr_SetString(PyExc_TypeError, "bad file.");
+ return NULL;
+ }
+ buf = xmlOutputBufferCreateFile(output, NULL);
+
+ result = PyxmlNodeSet_Convert(pyobj_nodes, &nodes);
+ if (result < 0) return NULL;
+
+ if (exclusive) {
+ result = PystringSet_Convert(pyobj_prefixes, &prefixes);
+ if (result < 0) {
+ if (nodes) {
+ xmlFree(nodes->nodeTab);
+ xmlFree(nodes);
+ }
+ return NULL;
+ }
+ }
+
+ result = xmlC14NDocSaveTo(doc,
+ nodes,
+ exclusive,
+ prefixes,
+ with_comments,
+ buf);
+
+ if (nodes) {
+ xmlFree(nodes->nodeTab);
+ xmlFree(nodes);
+ }
+ if (prefixes) {
+ xmlChar ** idx = prefixes;
+ while (*idx) xmlFree(*(idx++));
+ xmlFree(prefixes);
+ }
+
+ PyFile_Release(output);
+ len = xmlOutputBufferClose(buf);
+
+ if (result < 0) {
+ PyErr_SetString(PyExc_Exception,
+ "libxml2 xmlC14NDocSaveTo failure.");
+ return NULL;
+ }
+ else
+ return PyLong_FromLong((long) len);
+}
+
+#endif
+#endif
+
+static PyObject *
+libxml_getObjDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+
+ PyObject *obj;
+ char *str;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:getObjDesc", &obj))
+ return NULL;
+ str = PyCapsule_GetPointer(obj, PyCapsule_GetName(obj));
+ return Py_BuildValue((char *)"s", str);
+}
+
+static PyObject *
+libxml_compareNodesEqual(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+
+ PyObject *py_node1, *py_node2;
+ xmlNodePtr node1, node2;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:compareNodesEqual",
+ &py_node1, &py_node2))
+ return NULL;
+ /* To compare two node objects, we compare their pointer addresses */
+ node1 = PyxmlNode_Get(py_node1);
+ node2 = PyxmlNode_Get(py_node2);
+ if ( node1 == node2 )
+ return Py_BuildValue((char *)"i", 1);
+ else
+ return Py_BuildValue((char *)"i", 0);
+
+}
+
+static PyObject *
+libxml_nodeHash(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+
+ PyObject *py_node1;
+ xmlNodePtr node1;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:nodeHash", &py_node1))
+ return NULL;
+ /* For simplicity, we use the node pointer address as a hash value */
+ node1 = PyxmlNode_Get(py_node1);
+
+ return PyLong_FromVoidPtr(node1);
+
+}
+
+/************************************************************************
+ * *
+ * The registration stuff *
+ * *
+ ************************************************************************/
+static PyMethodDef libxmlMethods[] = {
+#include "libxml2-export.c"
+ {(char *) "name", libxml_name, METH_VARARGS, NULL},
+ {(char *) "children", libxml_children, METH_VARARGS, NULL},
+ {(char *) "properties", libxml_properties, METH_VARARGS, NULL},
+ {(char *) "last", libxml_last, METH_VARARGS, NULL},
+ {(char *) "prev", libxml_prev, METH_VARARGS, NULL},
+ {(char *) "next", libxml_next, METH_VARARGS, NULL},
+ {(char *) "parent", libxml_parent, METH_VARARGS, NULL},
+ {(char *) "type", libxml_type, METH_VARARGS, NULL},
+ {(char *) "doc", libxml_doc, METH_VARARGS, NULL},
+ {(char *) "xmlNewNode", libxml_xmlNewNode, METH_VARARGS, NULL},
+ {(char *) "xmlNodeRemoveNsDef", libxml_xmlNodeRemoveNsDef, METH_VARARGS, NULL},
+ {(char *)"xmlSetValidErrors", libxml_xmlSetValidErrors, METH_VARARGS, NULL},
+ {(char *)"xmlFreeValidCtxt", libxml_xmlFreeValidCtxt, METH_VARARGS, NULL},
+#ifdef LIBXML_OUTPUT_ENABLED
+ {(char *) "serializeNode", libxml_serializeNode, METH_VARARGS, NULL},
+ {(char *) "saveNodeTo", libxml_saveNodeTo, METH_VARARGS, NULL},
+ {(char *) "outputBufferCreate", libxml_xmlCreateOutputBuffer, METH_VARARGS, NULL},
+ {(char *) "outputBufferGetPythonFile", libxml_outputBufferGetPythonFile, METH_VARARGS, NULL},
+ {(char *) "xmlOutputBufferClose", libxml_xmlOutputBufferClose, METH_VARARGS, NULL},
+ { (char *)"xmlOutputBufferFlush", libxml_xmlOutputBufferFlush, METH_VARARGS, NULL },
+ { (char *)"xmlSaveFileTo", libxml_xmlSaveFileTo, METH_VARARGS, NULL },
+ { (char *)"xmlSaveFormatFileTo", libxml_xmlSaveFormatFileTo, METH_VARARGS, NULL },
+#endif /* LIBXML_OUTPUT_ENABLED */
+ {(char *) "inputBufferCreate", libxml_xmlCreateInputBuffer, METH_VARARGS, NULL},
+ {(char *) "setEntityLoader", libxml_xmlSetEntityLoader, METH_VARARGS, NULL},
+ {(char *)"xmlRegisterErrorHandler", libxml_xmlRegisterErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlParserCtxtSetErrorHandler", libxml_xmlParserCtxtSetErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlParserCtxtGetErrorHandler", libxml_xmlParserCtxtGetErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlFreeParserCtxt", libxml_xmlFreeParserCtxt, METH_VARARGS, NULL },
+#ifdef LIBXML_READER_ENABLED
+ {(char *)"xmlTextReaderSetErrorHandler", libxml_xmlTextReaderSetErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlTextReaderGetErrorHandler", libxml_xmlTextReaderGetErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlFreeTextReader", libxml_xmlFreeTextReader, METH_VARARGS, NULL },
+#endif
+ {(char *)"addLocalCatalog", libxml_addLocalCatalog, METH_VARARGS, NULL },
+#ifdef LIBXML_SCHEMAS_ENABLED
+ {(char *)"xmlRelaxNGSetValidErrors", libxml_xmlRelaxNGSetValidErrors, METH_VARARGS, NULL},
+ {(char *)"xmlRelaxNGFreeValidCtxt", libxml_xmlRelaxNGFreeValidCtxt, METH_VARARGS, NULL},
+ {(char *)"xmlSchemaSetValidErrors", libxml_xmlSchemaSetValidErrors, METH_VARARGS, NULL},
+ {(char *)"xmlSchemaFreeValidCtxt", libxml_xmlSchemaFreeValidCtxt, METH_VARARGS, NULL},
+#endif
+#ifdef LIBXML_C14N_ENABLED
+#ifdef LIBXML_OUTPUT_ENABLED
+ {(char *)"xmlC14NDocDumpMemory", libxml_C14NDocDumpMemory, METH_VARARGS, NULL},
+ {(char *)"xmlC14NDocSaveTo", libxml_C14NDocSaveTo, METH_VARARGS, NULL},
+#endif
+#endif
+ {(char *) "getObjDesc", libxml_getObjDesc, METH_VARARGS, NULL},
+ {(char *) "compareNodesEqual", libxml_compareNodesEqual, METH_VARARGS, NULL},
+ {(char *) "nodeHash", libxml_nodeHash, METH_VARARGS, NULL},
+ {(char *) "xmlRegisterInputCallback", libxml_xmlRegisterInputCallback, METH_VARARGS, NULL},
+ {(char *) "xmlUnregisterInputCallback", libxml_xmlUnregisterInputCallback, METH_VARARGS, NULL},
+ {NULL, NULL, 0, NULL}
+};
+
+#if PY_MAJOR_VERSION >= 3
+#define INITERROR return NULL
+
+static struct PyModuleDef moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "libxml2mod",
+ NULL,
+ -1,
+ libxmlMethods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+#else
+#define INITERROR return
+
+#ifdef MERGED_MODULES
+extern void initlibxsltmod(void);
+#endif
+
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+PyObject *PyInit_libxml2mod(void)
+#else
+void initlibxml2mod(void)
+#endif
+{
+ PyObject *module;
+
+#if PY_MAJOR_VERSION >= 3
+ module = PyModule_Create(&moduledef);
+#else
+ /* initialize the python extension module */
+ module = Py_InitModule((char *) "libxml2mod", libxmlMethods);
+#endif
+ if (module == NULL)
+ INITERROR;
+
+ /* initialize libxml2 */
+ xmlInitParser();
+ /* TODO this probably need to be revamped for Python3 */
+ libxml_xmlErrorInitialize();
+
+#if PY_MAJOR_VERSION < 3
+#ifdef MERGED_MODULES
+ initlibxsltmod();
+#endif
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+ return module;
+#endif
+}
diff --git a/libxml2-2.9.10/python/libxml.py b/libxml2-2.9.10/python/libxml.py
new file mode 100644
index 0000000..2466cc9
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml.py
@@ -0,0 +1,788 @@
+import libxml2mod
+import types
+import sys
+
+# The root of all libxml2 errors.
+class libxmlError(Exception): pass
+
+# Type of the wrapper class for the C objects wrappers
+def checkWrapper(obj):
+ try:
+ n = type(_obj).__name__
+ if n != 'PyCObject' and n != 'PyCapsule':
+ return 1
+ except:
+ return 0
+ return 0
+
+#
+# id() is sometimes negative ...
+#
+def pos_id(o):
+ i = id(o)
+ if (i < 0):
+ return (sys.maxsize - i)
+ return i
+
+#
+# Errors raised by the wrappers when some tree handling failed.
+#
+class treeError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class parserError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class uriError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class xpathError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class ioWrapper:
+ def __init__(self, _obj):
+ self.__io = _obj
+ self._o = None
+
+ def io_close(self):
+ if self.__io == None:
+ return(-1)
+ self.__io.close()
+ self.__io = None
+ return(0)
+
+ def io_flush(self):
+ if self.__io == None:
+ return(-1)
+ self.__io.flush()
+ return(0)
+
+ def io_read(self, len = -1):
+ if self.__io == None:
+ return(-1)
+ try:
+ if len < 0:
+ ret = self.__io.read()
+ else:
+ ret = self.__io.read(len)
+ except Exception:
+ import sys
+ e = sys.exc_info()[1]
+ print("failed to read from Python:", type(e))
+ print("on IO:", self.__io)
+ self.__io == None
+ return(-1)
+
+ return(ret)
+
+ def io_write(self, str, len = -1):
+ if self.__io == None:
+ return(-1)
+ if len < 0:
+ return(self.__io.write(str))
+ return(self.__io.write(str, len))
+
+class ioReadWrapper(ioWrapper):
+ def __init__(self, _obj, enc = ""):
+ ioWrapper.__init__(self, _obj)
+ self._o = libxml2mod.xmlCreateInputBuffer(self, enc)
+
+ def __del__(self):
+ print("__del__")
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+ def close(self):
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+class ioWriteWrapper(ioWrapper):
+ def __init__(self, _obj, enc = ""):
+# print "ioWriteWrapper.__init__", _obj
+ if type(_obj) == type(''):
+ print("write io from a string")
+ self.o = None
+ elif type(_obj).__name__ == 'PyCapsule':
+ file = libxml2mod.outputBufferGetPythonFile(_obj)
+ if file != None:
+ ioWrapper.__init__(self, file)
+ else:
+ ioWrapper.__init__(self, _obj)
+ self._o = _obj
+# elif type(_obj) == types.InstanceType:
+# print(("write io from instance of %s" % (_obj.__class__)))
+# ioWrapper.__init__(self, _obj)
+# self._o = libxml2mod.xmlCreateOutputBuffer(self, enc)
+ else:
+ file = libxml2mod.outputBufferGetPythonFile(_obj)
+ if file != None:
+ ioWrapper.__init__(self, file)
+ else:
+ ioWrapper.__init__(self, _obj)
+ self._o = _obj
+
+ def __del__(self):
+# print "__del__"
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+ def flush(self):
+ self.io_flush()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+ def close(self):
+ self.io_flush()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+#
+# Example of a class to handle SAX events
+#
+class SAXCallback:
+ """Base class for SAX handlers"""
+ def startDocument(self):
+ """called at the start of the document"""
+ pass
+
+ def endDocument(self):
+ """called at the end of the document"""
+ pass
+
+ def startElement(self, tag, attrs):
+ """called at the start of every element, tag is the name of
+ the element, attrs is a dictionary of the element's attributes"""
+ pass
+
+ def endElement(self, tag):
+ """called at the start of every element, tag is the name of
+ the element"""
+ pass
+
+ def characters(self, data):
+ """called when character data have been read, data is the string
+ containing the data, multiple consecutive characters() callback
+ are possible."""
+ pass
+
+ def cdataBlock(self, data):
+ """called when CDATA section have been read, data is the string
+ containing the data, multiple consecutive cdataBlock() callback
+ are possible."""
+ pass
+
+ def reference(self, name):
+ """called when an entity reference has been found"""
+ pass
+
+ def ignorableWhitespace(self, data):
+ """called when potentially ignorable white spaces have been found"""
+ pass
+
+ def processingInstruction(self, target, data):
+ """called when a PI has been found, target contains the PI name and
+ data is the associated data in the PI"""
+ pass
+
+ def comment(self, content):
+ """called when a comment has been found, content contains the comment"""
+ pass
+
+ def externalSubset(self, name, externalID, systemID):
+ """called when a DOCTYPE declaration has been found, name is the
+ DTD name and externalID, systemID are the DTD public and system
+ identifier for that DTd if available"""
+ pass
+
+ def internalSubset(self, name, externalID, systemID):
+ """called when a DOCTYPE declaration has been found, name is the
+ DTD name and externalID, systemID are the DTD public and system
+ identifier for that DTD if available"""
+ pass
+
+ def entityDecl(self, name, type, externalID, systemID, content):
+ """called when an ENTITY declaration has been found, name is the
+ entity name and externalID, systemID are the entity public and
+ system identifier for that entity if available, type indicates
+ the entity type, and content reports it's string content"""
+ pass
+
+ def notationDecl(self, name, externalID, systemID):
+ """called when an NOTATION declaration has been found, name is the
+ notation name and externalID, systemID are the notation public and
+ system identifier for that notation if available"""
+ pass
+
+ def attributeDecl(self, elem, name, type, defi, defaultValue, nameList):
+ """called when an ATTRIBUTE definition has been found"""
+ pass
+
+ def elementDecl(self, name, type, content):
+ """called when an ELEMENT definition has been found"""
+ pass
+
+ def entityDecl(self, name, publicId, systemID, notationName):
+ """called when an unparsed ENTITY declaration has been found,
+ name is the entity name and publicId,, systemID are the entity
+ public and system identifier for that entity if available,
+ and notationName indicate the associated NOTATION"""
+ pass
+
+ def warning(self, msg):
+ #print msg
+ pass
+
+ def error(self, msg):
+ raise parserError(msg)
+
+ def fatalError(self, msg):
+ raise parserError(msg)
+
+#
+# This class is the ancestor of all the Node classes. It provides
+# the basic functionalities shared by all nodes (and handle
+# gracefylly the exception), like name, navigation in the tree,
+# doc reference, content access and serializing to a string or URI
+#
+class xmlCore:
+ def __init__(self, _obj=None):
+ if _obj != None:
+ self._o = _obj;
+ return
+ self._o = None
+
+ def __eq__(self, other):
+ if other == None:
+ return False
+ ret = libxml2mod.compareNodesEqual(self._o, other._o)
+ if ret == None:
+ return False
+ return ret == True
+ def __ne__(self, other):
+ if other == None:
+ return True
+ ret = libxml2mod.compareNodesEqual(self._o, other._o)
+ return not ret
+ def __hash__(self):
+ ret = libxml2mod.nodeHash(self._o)
+ return ret
+
+ def __str__(self):
+ return self.serialize()
+ def get_parent(self):
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_children(self):
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_last(self):
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_next(self):
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_properties(self):
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ def get_prev(self):
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_content(self):
+ return libxml2mod.xmlNodeGetContent(self._o)
+ getContent = get_content # why is this duplicate naming needed ?
+ def get_name(self):
+ return libxml2mod.name(self._o)
+ def get_type(self):
+ return libxml2mod.type(self._o)
+ def get_doc(self):
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ if self.type in ["document_xml", "document_html"]:
+ return xmlDoc(_obj=self._o)
+ else:
+ return None
+ return xmlDoc(_obj=ret)
+ #
+ # Those are common attributes to nearly all type of nodes
+ # defined as python2 properties
+ #
+ import sys
+ if float(sys.version[0:3]) < 2.2:
+ def __getattr__(self, attr):
+ if attr == "parent":
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "properties":
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ elif attr == "children":
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "last":
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "next":
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "prev":
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "content":
+ return libxml2mod.xmlNodeGetContent(self._o)
+ elif attr == "name":
+ return libxml2mod.name(self._o)
+ elif attr == "type":
+ return libxml2mod.type(self._o)
+ elif attr == "doc":
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ if self.type == "document_xml" or self.type == "document_html":
+ return xmlDoc(_obj=self._o)
+ else:
+ return None
+ return xmlDoc(_obj=ret)
+ raise AttributeError(attr)
+ else:
+ parent = property(get_parent, None, None, "Parent node")
+ children = property(get_children, None, None, "First child node")
+ last = property(get_last, None, None, "Last sibling node")
+ next = property(get_next, None, None, "Next sibling node")
+ prev = property(get_prev, None, None, "Previous sibling node")
+ properties = property(get_properties, None, None, "List of properies")
+ content = property(get_content, None, None, "Content of this node")
+ name = property(get_name, None, None, "Node name")
+ type = property(get_type, None, None, "Node type")
+ doc = property(get_doc, None, None, "The document this node belongs to")
+
+ #
+ # Serialization routines, the optional arguments have the following
+ # meaning:
+ # encoding: string to ask saving in a specific encoding
+ # indent: if 1 the serializer is asked to indent the output
+ #
+ def serialize(self, encoding = None, format = 0):
+ return libxml2mod.serializeNode(self._o, encoding, format)
+ def saveTo(self, file, encoding = None, format = 0):
+ return libxml2mod.saveNodeTo(self._o, file, encoding, format)
+
+ #
+ # Canonicalization routines:
+ #
+ # nodes: the node set (tuple or list) to be included in the
+ # canonized image or None if all document nodes should be
+ # included.
+ # exclusive: the exclusive flag (0 - non-exclusive
+ # canonicalization; otherwise - exclusive canonicalization)
+ # prefixes: the list of inclusive namespace prefixes (strings),
+ # or None if there is no inclusive namespaces (only for
+ # exclusive canonicalization, ignored otherwise)
+ # with_comments: include comments in the result (!=0) or not
+ # (==0)
+ def c14nMemory(self,
+ nodes=None,
+ exclusive=0,
+ prefixes=None,
+ with_comments=0):
+ if nodes:
+ nodes = [n._o for n in nodes]
+ return libxml2mod.xmlC14NDocDumpMemory(
+ self.get_doc()._o,
+ nodes,
+ exclusive != 0,
+ prefixes,
+ with_comments != 0)
+ def c14nSaveTo(self,
+ file,
+ nodes=None,
+ exclusive=0,
+ prefixes=None,
+ with_comments=0):
+ if nodes:
+ nodes = [n._o for n in nodes]
+ return libxml2mod.xmlC14NDocSaveTo(
+ self.get_doc()._o,
+ nodes,
+ exclusive != 0,
+ prefixes,
+ with_comments != 0,
+ file)
+
+ #
+ # Selecting nodes using XPath, a bit slow because the context
+ # is allocated/freed every time but convenient.
+ #
+ def xpathEval(self, expr):
+ doc = self.doc
+ if doc == None:
+ return None
+ ctxt = doc.xpathNewContext()
+ ctxt.setContextNode(self)
+ res = ctxt.xpathEval(expr)
+ ctxt.xpathFreeContext()
+ return res
+
+# #
+# # Selecting nodes using XPath, faster because the context
+# # is allocated just once per xmlDoc.
+# #
+# # Removed: DV memleaks c.f. #126735
+# #
+# def xpathEval2(self, expr):
+# doc = self.doc
+# if doc == None:
+# return None
+# try:
+# doc._ctxt.setContextNode(self)
+# except:
+# doc._ctxt = doc.xpathNewContext()
+# doc._ctxt.setContextNode(self)
+# res = doc._ctxt.xpathEval(expr)
+# return res
+ def xpathEval2(self, expr):
+ return self.xpathEval(expr)
+
+ # Remove namespaces
+ def removeNsDef(self, href):
+ """
+ Remove a namespace definition from a node. If href is None,
+ remove all of the ns definitions on that node. The removed
+ namespaces are returned as a linked list.
+
+ Note: If any child nodes referred to the removed namespaces,
+ they will be left with dangling links. You should call
+ renconciliateNs() to fix those pointers.
+
+ Note: This method does not free memory taken by the ns
+ definitions. You will need to free it manually with the
+ freeNsList() method on the returns xmlNs object.
+ """
+
+ ret = libxml2mod.xmlNodeRemoveNsDef(self._o, href)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ # support for python2 iterators
+ def walk_depth_first(self):
+ return xmlCoreDepthFirstItertor(self)
+ def walk_breadth_first(self):
+ return xmlCoreBreadthFirstItertor(self)
+ __iter__ = walk_depth_first
+
+ def free(self):
+ try:
+ self.doc._ctxt.xpathFreeContext()
+ except:
+ pass
+ libxml2mod.xmlFreeDoc(self._o)
+
+
+#
+# implements the depth-first iterator for libxml2 DOM tree
+#
+class xmlCoreDepthFirstItertor:
+ def __init__(self, node):
+ self.node = node
+ self.parents = []
+ def __iter__(self):
+ return self
+ def __next__(self):
+ while 1:
+ if self.node:
+ ret = self.node
+ self.parents.append(self.node)
+ self.node = self.node.children
+ return ret
+ try:
+ parent = self.parents.pop()
+ except IndexError:
+ raise StopIteration
+ self.node = parent.next
+ next = __next__
+
+#
+# implements the breadth-first iterator for libxml2 DOM tree
+#
+class xmlCoreBreadthFirstItertor:
+ def __init__(self, node):
+ self.node = node
+ self.parents = []
+ def __iter__(self):
+ return self
+ def __next__(self):
+ while 1:
+ if self.node:
+ ret = self.node
+ self.parents.append(self.node)
+ self.node = self.node.next
+ return ret
+ try:
+ parent = self.parents.pop()
+ except IndexError:
+ raise StopIteration
+ self.node = parent.children
+ next = __next__
+
+#
+# converters to present a nicer view of the XPath returns
+#
+def nodeWrap(o):
+ # TODO try to cast to the most appropriate node class
+ name = libxml2mod.type(o)
+ if name == "element" or name == "text":
+ return xmlNode(_obj=o)
+ if name == "attribute":
+ return xmlAttr(_obj=o)
+ if name[0:8] == "document":
+ return xmlDoc(_obj=o)
+ if name == "namespace":
+ return xmlNs(_obj=o)
+ if name == "elem_decl":
+ return xmlElement(_obj=o)
+ if name == "attribute_decl":
+ return xmlAttribute(_obj=o)
+ if name == "entity_decl":
+ return xmlEntity(_obj=o)
+ if name == "dtd":
+ return xmlDtd(_obj=o)
+ return xmlNode(_obj=o)
+
+def xpathObjectRet(o):
+ otype = type(o)
+ if otype == type([]):
+ ret = list(map(xpathObjectRet, o))
+ return ret
+ elif otype == type(()):
+ ret = list(map(xpathObjectRet, o))
+ return tuple(ret)
+ elif otype == type('') or otype == type(0) or otype == type(0.0):
+ return o
+ else:
+ return nodeWrap(o)
+
+#
+# register an XPath function
+#
+def registerXPathFunction(ctxt, name, ns_uri, f):
+ ret = libxml2mod.xmlRegisterXPathFunction(ctxt, name, ns_uri, f)
+
+#
+# For the xmlTextReader parser configuration
+#
+PARSER_LOADDTD=1
+PARSER_DEFAULTATTRS=2
+PARSER_VALIDATE=3
+PARSER_SUBST_ENTITIES=4
+
+#
+# For the error callback severities
+#
+PARSER_SEVERITY_VALIDITY_WARNING=1
+PARSER_SEVERITY_VALIDITY_ERROR=2
+PARSER_SEVERITY_WARNING=3
+PARSER_SEVERITY_ERROR=4
+
+#
+# register the libxml2 error handler
+#
+def registerErrorHandler(f, ctx):
+ """Register a Python written function to for error reporting.
+ The function is called back as f(ctx, error). """
+ import sys
+ if 'libxslt' not in sys.modules:
+ # normal behaviour when libxslt is not imported
+ ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)
+ else:
+ # when libxslt is already imported, one must
+ # use libxst's error handler instead
+ import libxslt
+ ret = libxslt.registerErrorHandler(f,ctx)
+ return ret
+
+class parserCtxtCore:
+
+ def __init__(self, _obj=None):
+ if _obj != None:
+ self._o = _obj;
+ return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserCtxt(self._o)
+ self._o = None
+
+ def setErrorHandler(self,f,arg):
+ """Register an error handler that will be called back as
+ f(arg,msg,severity,reserved).
+
+ @reserved is currently always None."""
+ libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg)
+
+ def getErrorHandler(self):
+ """Return (f,arg) as previously registered with setErrorHandler
+ or (None,None)."""
+ return libxml2mod.xmlParserCtxtGetErrorHandler(self._o)
+
+ def addLocalCatalog(self, uri):
+ """Register a local catalog with the parser"""
+ return libxml2mod.addLocalCatalog(self._o, uri)
+
+
+class ValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for DTD validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+class SchemaValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for Schema validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlSchemaSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+class relaxNgValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for RelaxNG validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+def _xmlTextReaderErrorFunc(xxx_todo_changeme,msg,severity,locator):
+ """Intermediate callback to wrap the locator"""
+ (f,arg) = xxx_todo_changeme
+ return f(arg,msg,severity,xmlTextReaderLocator(locator))
+
+class xmlTextReaderCore:
+
+ def __init__(self, _obj=None):
+ self.input = None
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeTextReader(self._o)
+ self._o = None
+
+ def SetErrorHandler(self,f,arg):
+ """Register an error handler that will be called back as
+ f(arg,msg,severity,locator)."""
+ if f is None:
+ libxml2mod.xmlTextReaderSetErrorHandler(\
+ self._o,None,None)
+ else:
+ libxml2mod.xmlTextReaderSetErrorHandler(\
+ self._o,_xmlTextReaderErrorFunc,(f,arg))
+
+ def GetErrorHandler(self):
+ """Return (f,arg) as previously registered with setErrorHandler
+ or (None,None)."""
+ f,arg = libxml2mod.xmlTextReaderGetErrorHandler(self._o)
+ if f is None:
+ return None,None
+ else:
+ # assert f is _xmlTextReaderErrorFunc
+ return arg
+
+#
+# The cleanup now goes though a wrapper in libxml.c
+#
+def cleanupParser():
+ libxml2mod.xmlPythonCleanupParser()
+
+#
+# The interface to xmlRegisterInputCallbacks.
+# Since this API does not allow to pass a data object along with
+# match/open callbacks, it is necessary to maintain a list of all
+# Python callbacks.
+#
+__input_callbacks = []
+def registerInputCallback(func):
+ def findOpenCallback(URI):
+ for cb in reversed(__input_callbacks):
+ o = cb(URI)
+ if o is not None:
+ return o
+ libxml2mod.xmlRegisterInputCallback(findOpenCallback)
+ __input_callbacks.append(func)
+
+def popInputCallbacks():
+ # First pop python-level callbacks, when no more available - start
+ # popping built-in ones.
+ if len(__input_callbacks) > 0:
+ __input_callbacks.pop()
+ if len(__input_callbacks) == 0:
+ libxml2mod.xmlUnregisterInputCallback()
+
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+#
+# Everything before this line comes from libxml.py
+# Everything after this line is automatically generated
+#
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
diff --git a/libxml2-2.9.10/python/libxml2-export.c b/libxml2-2.9.10/python/libxml2-export.c
new file mode 100644
index 0000000..84073ea
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml2-export.c
@@ -0,0 +1,2063 @@
+/* Generated */
+
+#if defined(LIBXML_DOCB_ENABLED)
+ { (char *)"docbDefaultSAXHandlerInit", libxml_docbDefaultSAXHandlerInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DOCB_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlAutoCloseTag", libxml_htmlAutoCloseTag, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCreateFileParserCtxt", libxml_htmlCreateFileParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCreateMemoryParserCtxt", libxml_htmlCreateMemoryParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCreatePushParser", libxml_htmlCreatePushParser, METH_VARARGS, NULL },
+#endif
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReadDoc", libxml_htmlCtxtReadDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReadFd", libxml_htmlCtxtReadFd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReadFile", libxml_htmlCtxtReadFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReadMemory", libxml_htmlCtxtReadMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReset", libxml_htmlCtxtReset, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtUseOptions", libxml_htmlCtxtUseOptions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlDefaultSAXHandlerInit", libxml_htmlDefaultSAXHandlerInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlDocContentDumpFormatOutput", libxml_htmlDocContentDumpFormatOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlDocContentDumpOutput", libxml_htmlDocContentDumpOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlDocDump", libxml_htmlDocDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlFreeParserCtxt", libxml_htmlFreeParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlGetMetaEncoding", libxml_htmlGetMetaEncoding, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlHandleOmittedElem", libxml_htmlHandleOmittedElem, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlInitAutoClose", libxml_htmlInitAutoClose, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlIsAutoClosed", libxml_htmlIsAutoClosed, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlIsBooleanAttr", libxml_htmlIsBooleanAttr, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlIsScriptAttribute", libxml_htmlIsScriptAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlNewDoc", libxml_htmlNewDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlNewDocNoDtD", libxml_htmlNewDocNoDtD, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlNewParserCtxt", libxml_htmlNewParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlNodeDumpFile", libxml_htmlNodeDumpFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlNodeDumpFileFormat", libxml_htmlNodeDumpFileFormat, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlNodeDumpFormatOutput", libxml_htmlNodeDumpFormatOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlNodeDumpOutput", libxml_htmlNodeDumpOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseCharRef", libxml_htmlParseCharRef, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+ { (char *)"htmlParseChunk", libxml_htmlParseChunk, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseDoc", libxml_htmlParseDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseDocument", libxml_htmlParseDocument, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseElement", libxml_htmlParseElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseFile", libxml_htmlParseFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlReadDoc", libxml_htmlReadDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlReadFd", libxml_htmlReadFd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlReadFile", libxml_htmlReadFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlReadMemory", libxml_htmlReadMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlSAXParseFile", libxml_htmlSAXParseFile, METH_VARARGS, NULL },
+#endif
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlSaveFile", libxml_htmlSaveFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlSaveFileEnc", libxml_htmlSaveFileEnc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlSaveFileFormat", libxml_htmlSaveFileFormat, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlSetMetaEncoding", libxml_htmlSetMetaEncoding, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+ { (char *)"namePop", libxml_namePop, METH_VARARGS, NULL },
+ { (char *)"namePush", libxml_namePush, METH_VARARGS, NULL },
+ { (char *)"nodePop", libxml_nodePop, METH_VARARGS, NULL },
+ { (char *)"nodePush", libxml_nodePush, METH_VARARGS, NULL },
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"valuePop", libxml_valuePop, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogAdd", libxml_xmlACatalogAdd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlACatalogDump", libxml_xmlACatalogDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogRemove", libxml_xmlACatalogRemove, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogResolve", libxml_xmlACatalogResolve, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogResolvePublic", libxml_xmlACatalogResolvePublic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogResolveSystem", libxml_xmlACatalogResolveSystem, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogResolveURI", libxml_xmlACatalogResolveURI, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlAddChild", libxml_xmlAddChild, METH_VARARGS, NULL },
+ { (char *)"xmlAddChildList", libxml_xmlAddChildList, METH_VARARGS, NULL },
+ { (char *)"xmlAddDocEntity", libxml_xmlAddDocEntity, METH_VARARGS, NULL },
+ { (char *)"xmlAddDtdEntity", libxml_xmlAddDtdEntity, METH_VARARGS, NULL },
+ { (char *)"xmlAddEncodingAlias", libxml_xmlAddEncodingAlias, METH_VARARGS, NULL },
+ { (char *)"xmlAddNextSibling", libxml_xmlAddNextSibling, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlAddPrevSibling", libxml_xmlAddPrevSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+ { (char *)"xmlAddSibling", libxml_xmlAddSibling, METH_VARARGS, NULL },
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlBoolToText", libxml_xmlBoolToText, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+ { (char *)"xmlBuildQName", libxml_xmlBuildQName, METH_VARARGS, NULL },
+ { (char *)"xmlBuildRelativeURI", libxml_xmlBuildRelativeURI, METH_VARARGS, NULL },
+ { (char *)"xmlBuildURI", libxml_xmlBuildURI, METH_VARARGS, NULL },
+ { (char *)"xmlByteConsumed", libxml_xmlByteConsumed, METH_VARARGS, NULL },
+ { (char *)"xmlCanonicPath", libxml_xmlCanonicPath, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogAdd", libxml_xmlCatalogAdd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogCleanup", libxml_xmlCatalogCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogConvert", libxml_xmlCatalogConvert, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlCatalogDump", libxml_xmlCatalogDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogGetPublic", libxml_xmlCatalogGetPublic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogGetSystem", libxml_xmlCatalogGetSystem, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogIsEmpty", libxml_xmlCatalogIsEmpty, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogRemove", libxml_xmlCatalogRemove, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogResolve", libxml_xmlCatalogResolve, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogResolvePublic", libxml_xmlCatalogResolvePublic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogResolveSystem", libxml_xmlCatalogResolveSystem, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogResolveURI", libxml_xmlCatalogResolveURI, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogSetDebug", libxml_xmlCatalogSetDebug, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlCharStrdup", libxml_xmlCharStrdup, METH_VARARGS, NULL },
+ { (char *)"xmlCharStrndup", libxml_xmlCharStrndup, METH_VARARGS, NULL },
+ { (char *)"xmlCheckFilename", libxml_xmlCheckFilename, METH_VARARGS, NULL },
+ { (char *)"xmlCheckLanguageID", libxml_xmlCheckLanguageID, METH_VARARGS, NULL },
+ { (char *)"xmlCheckUTF8", libxml_xmlCheckUTF8, METH_VARARGS, NULL },
+ { (char *)"xmlCheckVersion", libxml_xmlCheckVersion, METH_VARARGS, NULL },
+ { (char *)"xmlCleanupCharEncodingHandlers", libxml_xmlCleanupCharEncodingHandlers, METH_VARARGS, NULL },
+ { (char *)"xmlCleanupEncodingAliases", libxml_xmlCleanupEncodingAliases, METH_VARARGS, NULL },
+ { (char *)"xmlCleanupGlobals", libxml_xmlCleanupGlobals, METH_VARARGS, NULL },
+ { (char *)"xmlCleanupInputCallbacks", libxml_xmlCleanupInputCallbacks, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlCleanupOutputCallbacks", libxml_xmlCleanupOutputCallbacks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlCleanupPredefinedEntities", libxml_xmlCleanupPredefinedEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlClearParserCtxt", libxml_xmlClearParserCtxt, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlConvertSGMLCatalog", libxml_xmlConvertSGMLCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlCopyChar", libxml_xmlCopyChar, METH_VARARGS, NULL },
+ { (char *)"xmlCopyCharMultiByte", libxml_xmlCopyCharMultiByte, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlCopyDoc", libxml_xmlCopyDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlCopyDtd", libxml_xmlCopyDtd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlCopyError", libxml_xmlCopyError, METH_VARARGS, NULL },
+ { (char *)"xmlCopyNamespace", libxml_xmlCopyNamespace, METH_VARARGS, NULL },
+ { (char *)"xmlCopyNamespaceList", libxml_xmlCopyNamespaceList, METH_VARARGS, NULL },
+ { (char *)"xmlCopyNode", libxml_xmlCopyNode, METH_VARARGS, NULL },
+ { (char *)"xmlCopyNodeList", libxml_xmlCopyNodeList, METH_VARARGS, NULL },
+ { (char *)"xmlCopyProp", libxml_xmlCopyProp, METH_VARARGS, NULL },
+ { (char *)"xmlCopyPropList", libxml_xmlCopyPropList, METH_VARARGS, NULL },
+ { (char *)"xmlCreateDocParserCtxt", libxml_xmlCreateDocParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCreateEntityParserCtxt", libxml_xmlCreateEntityParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCreateFileParserCtxt", libxml_xmlCreateFileParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCreateInputBuffer", libxml_xmlCreateInputBuffer, METH_VARARGS, NULL },
+ { (char *)"xmlCreateIntSubset", libxml_xmlCreateIntSubset, METH_VARARGS, NULL },
+ { (char *)"xmlCreateMemoryParserCtxt", libxml_xmlCreateMemoryParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCreateOutputBuffer", libxml_xmlCreateOutputBuffer, METH_VARARGS, NULL },
+ { (char *)"xmlCreatePushParser", libxml_xmlCreatePushParser, METH_VARARGS, NULL },
+ { (char *)"xmlCreateURI", libxml_xmlCreateURI, METH_VARARGS, NULL },
+ { (char *)"xmlCreateURLParserCtxt", libxml_xmlCreateURLParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReadDoc", libxml_xmlCtxtReadDoc, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReadFd", libxml_xmlCtxtReadFd, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReadFile", libxml_xmlCtxtReadFile, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReadMemory", libxml_xmlCtxtReadMemory, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReset", libxml_xmlCtxtReset, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtResetPush", libxml_xmlCtxtResetPush, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtUseOptions", libxml_xmlCtxtUseOptions, METH_VARARGS, NULL },
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugCheckDocument", libxml_xmlDebugCheckDocument, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpAttr", libxml_xmlDebugDumpAttr, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpAttrList", libxml_xmlDebugDumpAttrList, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpDTD", libxml_xmlDebugDumpDTD, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpDocument", libxml_xmlDebugDumpDocument, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpDocumentHead", libxml_xmlDebugDumpDocumentHead, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpEntities", libxml_xmlDebugDumpEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpNode", libxml_xmlDebugDumpNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpNodeList", libxml_xmlDebugDumpNodeList, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpOneNode", libxml_xmlDebugDumpOneNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpString", libxml_xmlDebugDumpString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+ { (char *)"xmlDebugMemory", libxml_xmlDebugMemory, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlDecodeEntities", libxml_xmlDecodeEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlDefaultSAXHandlerInit", libxml_xmlDefaultSAXHandlerInit, METH_VARARGS, NULL },
+ { (char *)"xmlDelEncodingAlias", libxml_xmlDelEncodingAlias, METH_VARARGS, NULL },
+ { (char *)"xmlDictCleanup", libxml_xmlDictCleanup, METH_VARARGS, NULL },
+ { (char *)"xmlDocCopyNode", libxml_xmlDocCopyNode, METH_VARARGS, NULL },
+ { (char *)"xmlDocCopyNodeList", libxml_xmlDocCopyNodeList, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlDocDump", libxml_xmlDocDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlDocFormatDump", libxml_xmlDocFormatDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+ { (char *)"xmlDocGetRootElement", libxml_xmlDocGetRootElement, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+ { (char *)"xmlDocSetRootElement", libxml_xmlDocSetRootElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+ { (char *)"xmlDumpMemory", libxml_xmlDumpMemory, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlElemDump", libxml_xmlElemDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlEncodeEntities", libxml_xmlEncodeEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlEncodeEntitiesReentrant", libxml_xmlEncodeEntitiesReentrant, METH_VARARGS, NULL },
+ { (char *)"xmlEncodeSpecialChars", libxml_xmlEncodeSpecialChars, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetCode", libxml_xmlErrorGetCode, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetDomain", libxml_xmlErrorGetDomain, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetFile", libxml_xmlErrorGetFile, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetLevel", libxml_xmlErrorGetLevel, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetLine", libxml_xmlErrorGetLine, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetMessage", libxml_xmlErrorGetMessage, METH_VARARGS, NULL },
+ { (char *)"xmlFileMatch", libxml_xmlFileMatch, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlFirstElementChild", libxml_xmlFirstElementChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlFreeCatalog", libxml_xmlFreeCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlFreeDoc", libxml_xmlFreeDoc, METH_VARARGS, NULL },
+ { (char *)"xmlFreeDtd", libxml_xmlFreeDtd, METH_VARARGS, NULL },
+ { (char *)"xmlFreeNode", libxml_xmlFreeNode, METH_VARARGS, NULL },
+ { (char *)"xmlFreeNodeList", libxml_xmlFreeNodeList, METH_VARARGS, NULL },
+ { (char *)"xmlFreeNs", libxml_xmlFreeNs, METH_VARARGS, NULL },
+ { (char *)"xmlFreeNsList", libxml_xmlFreeNsList, METH_VARARGS, NULL },
+ { (char *)"xmlFreeParserInputBuffer", libxml_xmlFreeParserInputBuffer, METH_VARARGS, NULL },
+ { (char *)"xmlFreeProp", libxml_xmlFreeProp, METH_VARARGS, NULL },
+ { (char *)"xmlFreePropList", libxml_xmlFreePropList, METH_VARARGS, NULL },
+ { (char *)"xmlFreeURI", libxml_xmlFreeURI, METH_VARARGS, NULL },
+ { (char *)"xmlGetCompressMode", libxml_xmlGetCompressMode, METH_VARARGS, NULL },
+ { (char *)"xmlGetDocCompressMode", libxml_xmlGetDocCompressMode, METH_VARARGS, NULL },
+ { (char *)"xmlGetDocEntity", libxml_xmlGetDocEntity, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdAttrDesc", libxml_xmlGetDtdAttrDesc, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdElementDesc", libxml_xmlGetDtdElementDesc, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdEntity", libxml_xmlGetDtdEntity, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdQAttrDesc", libxml_xmlGetDtdQAttrDesc, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdQElementDesc", libxml_xmlGetDtdQElementDesc, METH_VARARGS, NULL },
+ { (char *)"xmlGetEncodingAlias", libxml_xmlGetEncodingAlias, METH_VARARGS, NULL },
+ { (char *)"xmlGetID", libxml_xmlGetID, METH_VARARGS, NULL },
+ { (char *)"xmlGetIntSubset", libxml_xmlGetIntSubset, METH_VARARGS, NULL },
+ { (char *)"xmlGetLastChild", libxml_xmlGetLastChild, METH_VARARGS, NULL },
+ { (char *)"xmlGetLastError", libxml_xmlGetLastError, METH_VARARGS, NULL },
+ { (char *)"xmlGetLineNo", libxml_xmlGetLineNo, METH_VARARGS, NULL },
+ { (char *)"xmlGetNoNsProp", libxml_xmlGetNoNsProp, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlGetNodePath", libxml_xmlGetNodePath, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+ { (char *)"xmlGetNsProp", libxml_xmlGetNsProp, METH_VARARGS, NULL },
+ { (char *)"xmlGetParameterEntity", libxml_xmlGetParameterEntity, METH_VARARGS, NULL },
+ { (char *)"xmlGetPredefinedEntity", libxml_xmlGetPredefinedEntity, METH_VARARGS, NULL },
+ { (char *)"xmlGetProp", libxml_xmlGetProp, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlHandleEntity", libxml_xmlHandleEntity, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlHasNsProp", libxml_xmlHasNsProp, METH_VARARGS, NULL },
+ { (char *)"xmlHasProp", libxml_xmlHasProp, METH_VARARGS, NULL },
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlIOFTPMatch", libxml_xmlIOFTPMatch, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlIOHTTPMatch", libxml_xmlIOHTTPMatch, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+ { (char *)"xmlInitCharEncodingHandlers", libxml_xmlInitCharEncodingHandlers, METH_VARARGS, NULL },
+ { (char *)"xmlInitGlobals", libxml_xmlInitGlobals, METH_VARARGS, NULL },
+ { (char *)"xmlInitParser", libxml_xmlInitParser, METH_VARARGS, NULL },
+ { (char *)"xmlInitParserCtxt", libxml_xmlInitParserCtxt, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlInitializeCatalog", libxml_xmlInitializeCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlInitializeDict", libxml_xmlInitializeDict, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlInitializePredefinedEntities", libxml_xmlInitializePredefinedEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlIsBaseChar", libxml_xmlIsBaseChar, METH_VARARGS, NULL },
+ { (char *)"xmlIsBlank", libxml_xmlIsBlank, METH_VARARGS, NULL },
+ { (char *)"xmlIsBlankNode", libxml_xmlIsBlankNode, METH_VARARGS, NULL },
+ { (char *)"xmlIsChar", libxml_xmlIsChar, METH_VARARGS, NULL },
+ { (char *)"xmlIsCombining", libxml_xmlIsCombining, METH_VARARGS, NULL },
+ { (char *)"xmlIsDigit", libxml_xmlIsDigit, METH_VARARGS, NULL },
+ { (char *)"xmlIsExtender", libxml_xmlIsExtender, METH_VARARGS, NULL },
+ { (char *)"xmlIsID", libxml_xmlIsID, METH_VARARGS, NULL },
+ { (char *)"xmlIsIdeographic", libxml_xmlIsIdeographic, METH_VARARGS, NULL },
+ { (char *)"xmlIsLetter", libxml_xmlIsLetter, METH_VARARGS, NULL },
+ { (char *)"xmlIsMixedElement", libxml_xmlIsMixedElement, METH_VARARGS, NULL },
+ { (char *)"xmlIsPubidChar", libxml_xmlIsPubidChar, METH_VARARGS, NULL },
+ { (char *)"xmlIsRef", libxml_xmlIsRef, METH_VARARGS, NULL },
+ { (char *)"xmlIsXHTML", libxml_xmlIsXHTML, METH_VARARGS, NULL },
+ { (char *)"xmlKeepBlanksDefault", libxml_xmlKeepBlanksDefault, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlLastElementChild", libxml_xmlLastElementChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlLineNumbersDefault", libxml_xmlLineNumbersDefault, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlLoadACatalog", libxml_xmlLoadACatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlLoadCatalog", libxml_xmlLoadCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlLoadCatalogs", libxml_xmlLoadCatalogs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlLoadSGMLSuperCatalog", libxml_xmlLoadSGMLSuperCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlLsCountNode", libxml_xmlLsCountNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlLsOneNode", libxml_xmlLsOneNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+ { (char *)"xmlMemoryUsed", libxml_xmlMemoryUsed, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlNamespaceParseNCName", libxml_xmlNamespaceParseNCName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlNamespaceParseNSDef", libxml_xmlNamespaceParseNSDef, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlNanoFTPCleanup", libxml_xmlNanoFTPCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlNanoFTPInit", libxml_xmlNanoFTPInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlNanoFTPProxy", libxml_xmlNanoFTPProxy, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlNanoFTPScanProxy", libxml_xmlNanoFTPScanProxy, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlNanoHTTPCleanup", libxml_xmlNanoHTTPCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlNanoHTTPInit", libxml_xmlNanoHTTPInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlNanoHTTPScanProxy", libxml_xmlNanoHTTPScanProxy, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+ { (char *)"xmlNewCDataBlock", libxml_xmlNewCDataBlock, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlNewCatalog", libxml_xmlNewCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlNewCharRef", libxml_xmlNewCharRef, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlNewChild", libxml_xmlNewChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+ { (char *)"xmlNewComment", libxml_xmlNewComment, METH_VARARGS, NULL },
+ { (char *)"xmlNewDoc", libxml_xmlNewDoc, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocComment", libxml_xmlNewDocComment, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNewDocFragment", libxml_xmlNewDocFragment, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNewDocNode", libxml_xmlNewDocNode, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocNodeEatName", libxml_xmlNewDocNodeEatName, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocPI", libxml_xmlNewDocPI, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocProp", libxml_xmlNewDocProp, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNewDocRawNode", libxml_xmlNewDocRawNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNewDocText", libxml_xmlNewDocText, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocTextLen", libxml_xmlNewDocTextLen, METH_VARARGS, NULL },
+ { (char *)"xmlNewDtd", libxml_xmlNewDtd, METH_VARARGS, NULL },
+ { (char *)"xmlNewEntity", libxml_xmlNewEntity, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlNewGlobalNs", libxml_xmlNewGlobalNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlNewNode", libxml_xmlNewNode, METH_VARARGS, NULL },
+ { (char *)"xmlNewNodeEatName", libxml_xmlNewNodeEatName, METH_VARARGS, NULL },
+ { (char *)"xmlNewNs", libxml_xmlNewNs, METH_VARARGS, NULL },
+ { (char *)"xmlNewNsProp", libxml_xmlNewNsProp, METH_VARARGS, NULL },
+ { (char *)"xmlNewNsPropEatName", libxml_xmlNewNsPropEatName, METH_VARARGS, NULL },
+ { (char *)"xmlNewPI", libxml_xmlNewPI, METH_VARARGS, NULL },
+ { (char *)"xmlNewParserCtxt", libxml_xmlNewParserCtxt, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlNewProp", libxml_xmlNewProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+ { (char *)"xmlNewReference", libxml_xmlNewReference, METH_VARARGS, NULL },
+ { (char *)"xmlNewText", libxml_xmlNewText, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNewTextChild", libxml_xmlNewTextChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNewTextLen", libxml_xmlNewTextLen, METH_VARARGS, NULL },
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlNewTextReader", libxml_xmlNewTextReader, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlNewTextReaderFilename", libxml_xmlNewTextReaderFilename, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlNewValidCtxt", libxml_xmlNewValidCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+ { (char *)"xmlNextChar", libxml_xmlNextChar, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNextElementSibling", libxml_xmlNextElementSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNodeAddContent", libxml_xmlNodeAddContent, METH_VARARGS, NULL },
+ { (char *)"xmlNodeAddContentLen", libxml_xmlNodeAddContentLen, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlNodeDumpOutput", libxml_xmlNodeDumpOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+ { (char *)"xmlNodeGetBase", libxml_xmlNodeGetBase, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetContent", libxml_xmlNodeGetContent, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetLang", libxml_xmlNodeGetLang, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetNs", libxml_xmlNodeGetNs, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetNsDefs", libxml_xmlNodeGetNsDefs, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetSpacePreserve", libxml_xmlNodeGetSpacePreserve, METH_VARARGS, NULL },
+ { (char *)"xmlNodeIsText", libxml_xmlNodeIsText, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeListGetRawString", libxml_xmlNodeListGetRawString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNodeListGetString", libxml_xmlNodeListGetString, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlNodeSetBase", libxml_xmlNodeSetBase, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+ { (char *)"xmlNodeSetContent", libxml_xmlNodeSetContent, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeSetContentLen", libxml_xmlNodeSetContentLen, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeSetLang", libxml_xmlNodeSetLang, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeSetName", libxml_xmlNodeSetName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeSetSpacePreserve", libxml_xmlNodeSetSpacePreserve, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNormalizeURIPath", libxml_xmlNormalizeURIPath, METH_VARARGS, NULL },
+ { (char *)"xmlNormalizeWindowsPath", libxml_xmlNormalizeWindowsPath, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlOutputBufferGetContent", libxml_xmlOutputBufferGetContent, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlOutputBufferWrite", libxml_xmlOutputBufferWrite, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlOutputBufferWriteString", libxml_xmlOutputBufferWriteString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+ { (char *)"xmlParseAttValue", libxml_xmlParseAttValue, METH_VARARGS, NULL },
+ { (char *)"xmlParseAttributeListDecl", libxml_xmlParseAttributeListDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseCDSect", libxml_xmlParseCDSect, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlParseCatalogFile", libxml_xmlParseCatalogFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlParseCharData", libxml_xmlParseCharData, METH_VARARGS, NULL },
+ { (char *)"xmlParseCharRef", libxml_xmlParseCharRef, METH_VARARGS, NULL },
+#if defined(LIBXML_PUSH_ENABLED)
+ { (char *)"xmlParseChunk", libxml_xmlParseChunk, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_PUSH_ENABLED) */
+ { (char *)"xmlParseComment", libxml_xmlParseComment, METH_VARARGS, NULL },
+ { (char *)"xmlParseContent", libxml_xmlParseContent, METH_VARARGS, NULL },
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlParseDTD", libxml_xmlParseDTD, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseDoc", libxml_xmlParseDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseDocTypeDecl", libxml_xmlParseDocTypeDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseDocument", libxml_xmlParseDocument, METH_VARARGS, NULL },
+ { (char *)"xmlParseElement", libxml_xmlParseElement, METH_VARARGS, NULL },
+ { (char *)"xmlParseElementDecl", libxml_xmlParseElementDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseEncName", libxml_xmlParseEncName, METH_VARARGS, NULL },
+ { (char *)"xmlParseEncodingDecl", libxml_xmlParseEncodingDecl, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseEndTag", libxml_xmlParseEndTag, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseEntity", libxml_xmlParseEntity, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseEntityDecl", libxml_xmlParseEntityDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseEntityRef", libxml_xmlParseEntityRef, METH_VARARGS, NULL },
+ { (char *)"xmlParseExtParsedEnt", libxml_xmlParseExtParsedEnt, METH_VARARGS, NULL },
+ { (char *)"xmlParseExternalSubset", libxml_xmlParseExternalSubset, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseFile", libxml_xmlParseFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseMarkupDecl", libxml_xmlParseMarkupDecl, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseMemory", libxml_xmlParseMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseMisc", libxml_xmlParseMisc, METH_VARARGS, NULL },
+ { (char *)"xmlParseName", libxml_xmlParseName, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlParseNamespace", libxml_xmlParseNamespace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlParseNmtoken", libxml_xmlParseNmtoken, METH_VARARGS, NULL },
+ { (char *)"xmlParseNotationDecl", libxml_xmlParseNotationDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParsePEReference", libxml_xmlParsePEReference, METH_VARARGS, NULL },
+ { (char *)"xmlParsePI", libxml_xmlParsePI, METH_VARARGS, NULL },
+ { (char *)"xmlParsePITarget", libxml_xmlParsePITarget, METH_VARARGS, NULL },
+ { (char *)"xmlParsePubidLiteral", libxml_xmlParsePubidLiteral, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlParseQuotedString", libxml_xmlParseQuotedString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlParseReference", libxml_xmlParseReference, METH_VARARGS, NULL },
+ { (char *)"xmlParseSDDecl", libxml_xmlParseSDDecl, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseStartTag", libxml_xmlParseStartTag, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseSystemLiteral", libxml_xmlParseSystemLiteral, METH_VARARGS, NULL },
+ { (char *)"xmlParseTextDecl", libxml_xmlParseTextDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseURI", libxml_xmlParseURI, METH_VARARGS, NULL },
+ { (char *)"xmlParseURIRaw", libxml_xmlParseURIRaw, METH_VARARGS, NULL },
+ { (char *)"xmlParseURIReference", libxml_xmlParseURIReference, METH_VARARGS, NULL },
+ { (char *)"xmlParseVersionInfo", libxml_xmlParseVersionInfo, METH_VARARGS, NULL },
+ { (char *)"xmlParseVersionNum", libxml_xmlParseVersionNum, METH_VARARGS, NULL },
+ { (char *)"xmlParseXMLDecl", libxml_xmlParseXMLDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParserGetDirectory", libxml_xmlParserGetDirectory, METH_VARARGS, NULL },
+ { (char *)"xmlParserGetDoc", libxml_xmlParserGetDoc, METH_VARARGS, NULL },
+ { (char *)"xmlParserGetIsValid", libxml_xmlParserGetIsValid, METH_VARARGS, NULL },
+ { (char *)"xmlParserGetWellFormed", libxml_xmlParserGetWellFormed, METH_VARARGS, NULL },
+ { (char *)"xmlParserHandlePEReference", libxml_xmlParserHandlePEReference, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlParserHandleReference", libxml_xmlParserHandleReference, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlParserInputBufferGrow", libxml_xmlParserInputBufferGrow, METH_VARARGS, NULL },
+ { (char *)"xmlParserInputBufferPush", libxml_xmlParserInputBufferPush, METH_VARARGS, NULL },
+ { (char *)"xmlParserInputBufferRead", libxml_xmlParserInputBufferRead, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetLineNumbers", libxml_xmlParserSetLineNumbers, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetLoadSubset", libxml_xmlParserSetLoadSubset, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetPedantic", libxml_xmlParserSetPedantic, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetReplaceEntities", libxml_xmlParserSetReplaceEntities, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetValidate", libxml_xmlParserSetValidate, METH_VARARGS, NULL },
+ { (char *)"xmlPathToURI", libxml_xmlPathToURI, METH_VARARGS, NULL },
+ { (char *)"xmlPedanticParserDefault", libxml_xmlPedanticParserDefault, METH_VARARGS, NULL },
+ { (char *)"xmlPopInput", libxml_xmlPopInput, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlPreviousElementSibling", libxml_xmlPreviousElementSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlPrintURI", libxml_xmlPrintURI, METH_VARARGS, NULL },
+ { (char *)"xmlPythonCleanupParser", libxml_xmlPythonCleanupParser, METH_VARARGS, NULL },
+ { (char *)"xmlReadDoc", libxml_xmlReadDoc, METH_VARARGS, NULL },
+ { (char *)"xmlReadFd", libxml_xmlReadFd, METH_VARARGS, NULL },
+ { (char *)"xmlReadFile", libxml_xmlReadFile, METH_VARARGS, NULL },
+ { (char *)"xmlReadMemory", libxml_xmlReadMemory, METH_VARARGS, NULL },
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderForDoc", libxml_xmlReaderForDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderForFd", libxml_xmlReaderForFd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderForFile", libxml_xmlReaderForFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderForMemory", libxml_xmlReaderForMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewDoc", libxml_xmlReaderNewDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewFd", libxml_xmlReaderNewFd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewFile", libxml_xmlReaderNewFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewMemory", libxml_xmlReaderNewMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewWalker", libxml_xmlReaderNewWalker, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderWalker", libxml_xmlReaderWalker, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlReconciliateNs", libxml_xmlReconciliateNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlRecoverDoc", libxml_xmlRecoverDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlRecoverFile", libxml_xmlRecoverFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlRecoverMemory", libxml_xmlRecoverMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegFreeRegexp", libxml_xmlRegFreeRegexp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegexpCompile", libxml_xmlRegexpCompile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegexpExec", libxml_xmlRegexpExec, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegexpIsDeterminist", libxml_xmlRegexpIsDeterminist, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegexpPrint", libxml_xmlRegexpPrint, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+ { (char *)"xmlRegisterDefaultInputCallbacks", libxml_xmlRegisterDefaultInputCallbacks, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlRegisterDefaultOutputCallbacks", libxml_xmlRegisterDefaultOutputCallbacks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlRegisterHTTPPostCallbacks", libxml_xmlRegisterHTTPPostCallbacks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlRegisterXPathFunction", libxml_xmlRegisterXPathFunction, METH_VARARGS, NULL },
+#endif
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGCleanupTypes", libxml_xmlRelaxNGCleanupTypes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlRelaxNGDump", libxml_xmlRelaxNGDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlRelaxNGDumpTree", libxml_xmlRelaxNGDumpTree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGFree", libxml_xmlRelaxNGFree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGFreeParserCtxt", libxml_xmlRelaxNGFreeParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGInitTypes", libxml_xmlRelaxNGInitTypes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGNewDocParserCtxt", libxml_xmlRelaxNGNewDocParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGNewMemParserCtxt", libxml_xmlRelaxNGNewMemParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGNewParserCtxt", libxml_xmlRelaxNGNewParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGNewValidCtxt", libxml_xmlRelaxNGNewValidCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGParse", libxml_xmlRelaxNGParse, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidateDoc", libxml_xmlRelaxNGValidateDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidateFullElement", libxml_xmlRelaxNGValidateFullElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidatePopElement", libxml_xmlRelaxNGValidatePopElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidatePushCData", libxml_xmlRelaxNGValidatePushCData, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidatePushElement", libxml_xmlRelaxNGValidatePushElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxParserSetFlag", libxml_xmlRelaxParserSetFlag, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+ { (char *)"xmlRemoveID", libxml_xmlRemoveID, METH_VARARGS, NULL },
+ { (char *)"xmlRemoveProp", libxml_xmlRemoveProp, METH_VARARGS, NULL },
+ { (char *)"xmlRemoveRef", libxml_xmlRemoveRef, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+ { (char *)"xmlReplaceNode", libxml_xmlReplaceNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+ { (char *)"xmlResetError", libxml_xmlResetError, METH_VARARGS, NULL },
+ { (char *)"xmlResetLastError", libxml_xmlResetLastError, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlSAXDefaultVersion", libxml_xmlSAXDefaultVersion, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlSAXParseFile", libxml_xmlSAXParseFile, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSaveFile", libxml_xmlSaveFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSaveFileEnc", libxml_xmlSaveFileEnc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSaveFormatFile", libxml_xmlSaveFormatFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSaveFormatFileEnc", libxml_xmlSaveFormatFileEnc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+ { (char *)"xmlSaveUri", libxml_xmlSaveUri, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlScanName", libxml_xmlScanName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaCleanupTypes", libxml_xmlSchemaCleanupTypes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaCollapseString", libxml_xmlSchemaCollapseString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSchemaDump", libxml_xmlSchemaDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaFree", libxml_xmlSchemaFree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaFreeParserCtxt", libxml_xmlSchemaFreeParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaInitTypes", libxml_xmlSchemaInitTypes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaIsValid", libxml_xmlSchemaIsValid, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaNewDocParserCtxt", libxml_xmlSchemaNewDocParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaNewMemParserCtxt", libxml_xmlSchemaNewMemParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaNewParserCtxt", libxml_xmlSchemaNewParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaNewValidCtxt", libxml_xmlSchemaNewValidCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaParse", libxml_xmlSchemaParse, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaSetValidOptions", libxml_xmlSchemaSetValidOptions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidCtxtGetOptions", libxml_xmlSchemaValidCtxtGetOptions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidCtxtGetParserCtxt", libxml_xmlSchemaValidCtxtGetParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidateDoc", libxml_xmlSchemaValidateDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidateFile", libxml_xmlSchemaValidateFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidateOneElement", libxml_xmlSchemaValidateOneElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidateSetFilename", libxml_xmlSchemaValidateSetFilename, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaWhiteSpaceReplace", libxml_xmlSchemaWhiteSpaceReplace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+ { (char *)"xmlSearchNs", libxml_xmlSearchNs, METH_VARARGS, NULL },
+ { (char *)"xmlSearchNsByHref", libxml_xmlSearchNsByHref, METH_VARARGS, NULL },
+ { (char *)"xmlSetCompressMode", libxml_xmlSetCompressMode, METH_VARARGS, NULL },
+ { (char *)"xmlSetDocCompressMode", libxml_xmlSetDocCompressMode, METH_VARARGS, NULL },
+ { (char *)"xmlSetEntityLoader", libxml_xmlSetEntityLoader, METH_VARARGS, NULL },
+ { (char *)"xmlSetListDoc", libxml_xmlSetListDoc, METH_VARARGS, NULL },
+ { (char *)"xmlSetNs", libxml_xmlSetNs, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+ { (char *)"xmlSetNsProp", libxml_xmlSetNsProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+ { (char *)"xmlSetProp", libxml_xmlSetProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+ { (char *)"xmlSetTreeDoc", libxml_xmlSetTreeDoc, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlSetupParserForBuffer", libxml_xmlSetupParserForBuffer, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlShellPrintNode", libxml_xmlShellPrintNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlShellPrintXPathError", libxml_xmlShellPrintXPathError, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) */
+ { (char *)"xmlSkipBlankChars", libxml_xmlSkipBlankChars, METH_VARARGS, NULL },
+ { (char *)"xmlStopParser", libxml_xmlStopParser, METH_VARARGS, NULL },
+ { (char *)"xmlStrEqual", libxml_xmlStrEqual, METH_VARARGS, NULL },
+ { (char *)"xmlStrQEqual", libxml_xmlStrQEqual, METH_VARARGS, NULL },
+ { (char *)"xmlStrcasecmp", libxml_xmlStrcasecmp, METH_VARARGS, NULL },
+ { (char *)"xmlStrcasestr", libxml_xmlStrcasestr, METH_VARARGS, NULL },
+ { (char *)"xmlStrcat", libxml_xmlStrcat, METH_VARARGS, NULL },
+ { (char *)"xmlStrchr", libxml_xmlStrchr, METH_VARARGS, NULL },
+ { (char *)"xmlStrcmp", libxml_xmlStrcmp, METH_VARARGS, NULL },
+ { (char *)"xmlStrdup", libxml_xmlStrdup, METH_VARARGS, NULL },
+ { (char *)"xmlStringDecodeEntities", libxml_xmlStringDecodeEntities, METH_VARARGS, NULL },
+ { (char *)"xmlStringGetNodeList", libxml_xmlStringGetNodeList, METH_VARARGS, NULL },
+ { (char *)"xmlStringLenDecodeEntities", libxml_xmlStringLenDecodeEntities, METH_VARARGS, NULL },
+ { (char *)"xmlStringLenGetNodeList", libxml_xmlStringLenGetNodeList, METH_VARARGS, NULL },
+ { (char *)"xmlStrlen", libxml_xmlStrlen, METH_VARARGS, NULL },
+ { (char *)"xmlStrncasecmp", libxml_xmlStrncasecmp, METH_VARARGS, NULL },
+ { (char *)"xmlStrncat", libxml_xmlStrncat, METH_VARARGS, NULL },
+ { (char *)"xmlStrncatNew", libxml_xmlStrncatNew, METH_VARARGS, NULL },
+ { (char *)"xmlStrncmp", libxml_xmlStrncmp, METH_VARARGS, NULL },
+ { (char *)"xmlStrndup", libxml_xmlStrndup, METH_VARARGS, NULL },
+ { (char *)"xmlStrstr", libxml_xmlStrstr, METH_VARARGS, NULL },
+ { (char *)"xmlStrsub", libxml_xmlStrsub, METH_VARARGS, NULL },
+ { (char *)"xmlSubstituteEntitiesDefault", libxml_xmlSubstituteEntitiesDefault, METH_VARARGS, NULL },
+ { (char *)"xmlTextConcat", libxml_xmlTextConcat, METH_VARARGS, NULL },
+ { (char *)"xmlTextMerge", libxml_xmlTextMerge, METH_VARARGS, NULL },
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderAttributeCount", libxml_xmlTextReaderAttributeCount, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderByteConsumed", libxml_xmlTextReaderByteConsumed, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderClose", libxml_xmlTextReaderClose, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstBaseUri", libxml_xmlTextReaderConstBaseUri, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstEncoding", libxml_xmlTextReaderConstEncoding, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstLocalName", libxml_xmlTextReaderConstLocalName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstName", libxml_xmlTextReaderConstName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstNamespaceUri", libxml_xmlTextReaderConstNamespaceUri, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstPrefix", libxml_xmlTextReaderConstPrefix, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstString", libxml_xmlTextReaderConstString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstValue", libxml_xmlTextReaderConstValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstXmlLang", libxml_xmlTextReaderConstXmlLang, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstXmlVersion", libxml_xmlTextReaderConstXmlVersion, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderCurrentDoc", libxml_xmlTextReaderCurrentDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderCurrentNode", libxml_xmlTextReaderCurrentNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderDepth", libxml_xmlTextReaderDepth, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderExpand", libxml_xmlTextReaderExpand, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetAttribute", libxml_xmlTextReaderGetAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetAttributeNo", libxml_xmlTextReaderGetAttributeNo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetAttributeNs", libxml_xmlTextReaderGetAttributeNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetParserColumnNumber", libxml_xmlTextReaderGetParserColumnNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetParserLineNumber", libxml_xmlTextReaderGetParserLineNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetParserProp", libxml_xmlTextReaderGetParserProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetRemainder", libxml_xmlTextReaderGetRemainder, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderHasAttributes", libxml_xmlTextReaderHasAttributes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderHasValue", libxml_xmlTextReaderHasValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderIsDefault", libxml_xmlTextReaderIsDefault, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderIsEmptyElement", libxml_xmlTextReaderIsEmptyElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderIsNamespaceDecl", libxml_xmlTextReaderIsNamespaceDecl, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderIsValid", libxml_xmlTextReaderIsValid, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderLocatorBaseURI", libxml_xmlTextReaderLocatorBaseURI, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderLocatorLineNumber", libxml_xmlTextReaderLocatorLineNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderLookupNamespace", libxml_xmlTextReaderLookupNamespace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToAttribute", libxml_xmlTextReaderMoveToAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToAttributeNo", libxml_xmlTextReaderMoveToAttributeNo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToAttributeNs", libxml_xmlTextReaderMoveToAttributeNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToElement", libxml_xmlTextReaderMoveToElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToFirstAttribute", libxml_xmlTextReaderMoveToFirstAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToNextAttribute", libxml_xmlTextReaderMoveToNextAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderNext", libxml_xmlTextReaderNext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderNextSibling", libxml_xmlTextReaderNextSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderNodeType", libxml_xmlTextReaderNodeType, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderNormalization", libxml_xmlTextReaderNormalization, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderPreserve", libxml_xmlTextReaderPreserve, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderQuoteChar", libxml_xmlTextReaderQuoteChar, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderRead", libxml_xmlTextReaderRead, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderReadAttributeValue", libxml_xmlTextReaderReadAttributeValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+ { (char *)"xmlTextReaderReadInnerXml", libxml_xmlTextReaderReadInnerXml, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+ { (char *)"xmlTextReaderReadOuterXml", libxml_xmlTextReaderReadOuterXml, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderReadState", libxml_xmlTextReaderReadState, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderReadString", libxml_xmlTextReaderReadString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderRelaxNGSetSchema", libxml_xmlTextReaderRelaxNGSetSchema, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderRelaxNGValidate", libxml_xmlTextReaderRelaxNGValidate, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderRelaxNGValidateCtxt", libxml_xmlTextReaderRelaxNGValidateCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderSchemaValidate", libxml_xmlTextReaderSchemaValidate, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderSchemaValidateCtxt", libxml_xmlTextReaderSchemaValidateCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderSetParserProp", libxml_xmlTextReaderSetParserProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderSetSchema", libxml_xmlTextReaderSetSchema, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderSetup", libxml_xmlTextReaderSetup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderStandalone", libxml_xmlTextReaderStandalone, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+ { (char *)"xmlThrDefDefaultBufferSize", libxml_xmlThrDefDefaultBufferSize, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefDoValidityCheckingDefaultValue", libxml_xmlThrDefDoValidityCheckingDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefGetWarningsDefaultValue", libxml_xmlThrDefGetWarningsDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefIndentTreeOutput", libxml_xmlThrDefIndentTreeOutput, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefKeepBlanksDefaultValue", libxml_xmlThrDefKeepBlanksDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefLineNumbersDefaultValue", libxml_xmlThrDefLineNumbersDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefLoadExtDtdDefaultValue", libxml_xmlThrDefLoadExtDtdDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefParserDebugEntities", libxml_xmlThrDefParserDebugEntities, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefPedanticParserDefaultValue", libxml_xmlThrDefPedanticParserDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefSaveNoEmptyTags", libxml_xmlThrDefSaveNoEmptyTags, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefSubstituteEntitiesDefaultValue", libxml_xmlThrDefSubstituteEntitiesDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefTreeIndentString", libxml_xmlThrDefTreeIndentString, METH_VARARGS, NULL },
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsAegeanNumbers", libxml_xmlUCSIsAegeanNumbers, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsAlphabeticPresentationForms", libxml_xmlUCSIsAlphabeticPresentationForms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArabic", libxml_xmlUCSIsArabic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArabicPresentationFormsA", libxml_xmlUCSIsArabicPresentationFormsA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArabicPresentationFormsB", libxml_xmlUCSIsArabicPresentationFormsB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArmenian", libxml_xmlUCSIsArmenian, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArrows", libxml_xmlUCSIsArrows, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBasicLatin", libxml_xmlUCSIsBasicLatin, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBengali", libxml_xmlUCSIsBengali, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBlock", libxml_xmlUCSIsBlock, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBlockElements", libxml_xmlUCSIsBlockElements, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBopomofo", libxml_xmlUCSIsBopomofo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBopomofoExtended", libxml_xmlUCSIsBopomofoExtended, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBoxDrawing", libxml_xmlUCSIsBoxDrawing, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBraillePatterns", libxml_xmlUCSIsBraillePatterns, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBuhid", libxml_xmlUCSIsBuhid, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsByzantineMusicalSymbols", libxml_xmlUCSIsByzantineMusicalSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKCompatibility", libxml_xmlUCSIsCJKCompatibility, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKCompatibilityForms", libxml_xmlUCSIsCJKCompatibilityForms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKCompatibilityIdeographs", libxml_xmlUCSIsCJKCompatibilityIdeographs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKCompatibilityIdeographsSupplement", libxml_xmlUCSIsCJKCompatibilityIdeographsSupplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKRadicalsSupplement", libxml_xmlUCSIsCJKRadicalsSupplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKSymbolsandPunctuation", libxml_xmlUCSIsCJKSymbolsandPunctuation, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKUnifiedIdeographs", libxml_xmlUCSIsCJKUnifiedIdeographs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKUnifiedIdeographsExtensionA", libxml_xmlUCSIsCJKUnifiedIdeographsExtensionA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKUnifiedIdeographsExtensionB", libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCat", libxml_xmlUCSIsCat, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatC", libxml_xmlUCSIsCatC, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatCc", libxml_xmlUCSIsCatCc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatCf", libxml_xmlUCSIsCatCf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatCo", libxml_xmlUCSIsCatCo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatCs", libxml_xmlUCSIsCatCs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatL", libxml_xmlUCSIsCatL, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLl", libxml_xmlUCSIsCatLl, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLm", libxml_xmlUCSIsCatLm, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLo", libxml_xmlUCSIsCatLo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLt", libxml_xmlUCSIsCatLt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLu", libxml_xmlUCSIsCatLu, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatM", libxml_xmlUCSIsCatM, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatMc", libxml_xmlUCSIsCatMc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatMe", libxml_xmlUCSIsCatMe, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatMn", libxml_xmlUCSIsCatMn, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatN", libxml_xmlUCSIsCatN, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatNd", libxml_xmlUCSIsCatNd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatNl", libxml_xmlUCSIsCatNl, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatNo", libxml_xmlUCSIsCatNo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatP", libxml_xmlUCSIsCatP, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPc", libxml_xmlUCSIsCatPc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPd", libxml_xmlUCSIsCatPd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPe", libxml_xmlUCSIsCatPe, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPf", libxml_xmlUCSIsCatPf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPi", libxml_xmlUCSIsCatPi, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPo", libxml_xmlUCSIsCatPo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPs", libxml_xmlUCSIsCatPs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatS", libxml_xmlUCSIsCatS, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatSc", libxml_xmlUCSIsCatSc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatSk", libxml_xmlUCSIsCatSk, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatSm", libxml_xmlUCSIsCatSm, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatSo", libxml_xmlUCSIsCatSo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatZ", libxml_xmlUCSIsCatZ, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatZl", libxml_xmlUCSIsCatZl, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatZp", libxml_xmlUCSIsCatZp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatZs", libxml_xmlUCSIsCatZs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCherokee", libxml_xmlUCSIsCherokee, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCombiningDiacriticalMarks", libxml_xmlUCSIsCombiningDiacriticalMarks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCombiningDiacriticalMarksforSymbols", libxml_xmlUCSIsCombiningDiacriticalMarksforSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCombiningHalfMarks", libxml_xmlUCSIsCombiningHalfMarks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCombiningMarksforSymbols", libxml_xmlUCSIsCombiningMarksforSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsControlPictures", libxml_xmlUCSIsControlPictures, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCurrencySymbols", libxml_xmlUCSIsCurrencySymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCypriotSyllabary", libxml_xmlUCSIsCypriotSyllabary, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCyrillic", libxml_xmlUCSIsCyrillic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCyrillicSupplement", libxml_xmlUCSIsCyrillicSupplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsDeseret", libxml_xmlUCSIsDeseret, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsDevanagari", libxml_xmlUCSIsDevanagari, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsDingbats", libxml_xmlUCSIsDingbats, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsEnclosedAlphanumerics", libxml_xmlUCSIsEnclosedAlphanumerics, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsEnclosedCJKLettersandMonths", libxml_xmlUCSIsEnclosedCJKLettersandMonths, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsEthiopic", libxml_xmlUCSIsEthiopic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGeneralPunctuation", libxml_xmlUCSIsGeneralPunctuation, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGeometricShapes", libxml_xmlUCSIsGeometricShapes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGeorgian", libxml_xmlUCSIsGeorgian, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGothic", libxml_xmlUCSIsGothic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGreek", libxml_xmlUCSIsGreek, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGreekExtended", libxml_xmlUCSIsGreekExtended, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGreekandCoptic", libxml_xmlUCSIsGreekandCoptic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGujarati", libxml_xmlUCSIsGujarati, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGurmukhi", libxml_xmlUCSIsGurmukhi, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHalfwidthandFullwidthForms", libxml_xmlUCSIsHalfwidthandFullwidthForms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHangulCompatibilityJamo", libxml_xmlUCSIsHangulCompatibilityJamo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHangulJamo", libxml_xmlUCSIsHangulJamo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHangulSyllables", libxml_xmlUCSIsHangulSyllables, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHanunoo", libxml_xmlUCSIsHanunoo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHebrew", libxml_xmlUCSIsHebrew, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHighPrivateUseSurrogates", libxml_xmlUCSIsHighPrivateUseSurrogates, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHighSurrogates", libxml_xmlUCSIsHighSurrogates, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHiragana", libxml_xmlUCSIsHiragana, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsIPAExtensions", libxml_xmlUCSIsIPAExtensions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsIdeographicDescriptionCharacters", libxml_xmlUCSIsIdeographicDescriptionCharacters, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKanbun", libxml_xmlUCSIsKanbun, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKangxiRadicals", libxml_xmlUCSIsKangxiRadicals, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKannada", libxml_xmlUCSIsKannada, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKatakana", libxml_xmlUCSIsKatakana, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKatakanaPhoneticExtensions", libxml_xmlUCSIsKatakanaPhoneticExtensions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKhmer", libxml_xmlUCSIsKhmer, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKhmerSymbols", libxml_xmlUCSIsKhmerSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLao", libxml_xmlUCSIsLao, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLatin1Supplement", libxml_xmlUCSIsLatin1Supplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLatinExtendedA", libxml_xmlUCSIsLatinExtendedA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLatinExtendedAdditional", libxml_xmlUCSIsLatinExtendedAdditional, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLatinExtendedB", libxml_xmlUCSIsLatinExtendedB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLetterlikeSymbols", libxml_xmlUCSIsLetterlikeSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLimbu", libxml_xmlUCSIsLimbu, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLinearBIdeograms", libxml_xmlUCSIsLinearBIdeograms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLinearBSyllabary", libxml_xmlUCSIsLinearBSyllabary, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLowSurrogates", libxml_xmlUCSIsLowSurrogates, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMalayalam", libxml_xmlUCSIsMalayalam, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMathematicalAlphanumericSymbols", libxml_xmlUCSIsMathematicalAlphanumericSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMathematicalOperators", libxml_xmlUCSIsMathematicalOperators, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousMathematicalSymbolsA", libxml_xmlUCSIsMiscellaneousMathematicalSymbolsA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousMathematicalSymbolsB", libxml_xmlUCSIsMiscellaneousMathematicalSymbolsB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousSymbols", libxml_xmlUCSIsMiscellaneousSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousSymbolsandArrows", libxml_xmlUCSIsMiscellaneousSymbolsandArrows, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousTechnical", libxml_xmlUCSIsMiscellaneousTechnical, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMongolian", libxml_xmlUCSIsMongolian, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMusicalSymbols", libxml_xmlUCSIsMusicalSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMyanmar", libxml_xmlUCSIsMyanmar, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsNumberForms", libxml_xmlUCSIsNumberForms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOgham", libxml_xmlUCSIsOgham, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOldItalic", libxml_xmlUCSIsOldItalic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOpticalCharacterRecognition", libxml_xmlUCSIsOpticalCharacterRecognition, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOriya", libxml_xmlUCSIsOriya, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOsmanya", libxml_xmlUCSIsOsmanya, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsPhoneticExtensions", libxml_xmlUCSIsPhoneticExtensions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsPrivateUse", libxml_xmlUCSIsPrivateUse, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsPrivateUseArea", libxml_xmlUCSIsPrivateUseArea, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsRunic", libxml_xmlUCSIsRunic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsShavian", libxml_xmlUCSIsShavian, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSinhala", libxml_xmlUCSIsSinhala, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSmallFormVariants", libxml_xmlUCSIsSmallFormVariants, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSpacingModifierLetters", libxml_xmlUCSIsSpacingModifierLetters, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSpecials", libxml_xmlUCSIsSpecials, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSuperscriptsandSubscripts", libxml_xmlUCSIsSuperscriptsandSubscripts, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementalArrowsA", libxml_xmlUCSIsSupplementalArrowsA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementalArrowsB", libxml_xmlUCSIsSupplementalArrowsB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementalMathematicalOperators", libxml_xmlUCSIsSupplementalMathematicalOperators, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementaryPrivateUseAreaA", libxml_xmlUCSIsSupplementaryPrivateUseAreaA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementaryPrivateUseAreaB", libxml_xmlUCSIsSupplementaryPrivateUseAreaB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSyriac", libxml_xmlUCSIsSyriac, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTagalog", libxml_xmlUCSIsTagalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTagbanwa", libxml_xmlUCSIsTagbanwa, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTags", libxml_xmlUCSIsTags, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTaiLe", libxml_xmlUCSIsTaiLe, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTaiXuanJingSymbols", libxml_xmlUCSIsTaiXuanJingSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTamil", libxml_xmlUCSIsTamil, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTelugu", libxml_xmlUCSIsTelugu, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsThaana", libxml_xmlUCSIsThaana, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsThai", libxml_xmlUCSIsThai, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTibetan", libxml_xmlUCSIsTibetan, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsUgaritic", libxml_xmlUCSIsUgaritic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsUnifiedCanadianAboriginalSyllabics", libxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsVariationSelectors", libxml_xmlUCSIsVariationSelectors, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsVariationSelectorsSupplement", libxml_xmlUCSIsVariationSelectorsSupplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsYiRadicals", libxml_xmlUCSIsYiRadicals, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsYiSyllables", libxml_xmlUCSIsYiSyllables, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsYijingHexagramSymbols", libxml_xmlUCSIsYijingHexagramSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+ { (char *)"xmlURIEscape", libxml_xmlURIEscape, METH_VARARGS, NULL },
+ { (char *)"xmlURIEscapeStr", libxml_xmlURIEscapeStr, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetAuthority", libxml_xmlURIGetAuthority, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetFragment", libxml_xmlURIGetFragment, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetOpaque", libxml_xmlURIGetOpaque, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetPath", libxml_xmlURIGetPath, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetPort", libxml_xmlURIGetPort, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetQuery", libxml_xmlURIGetQuery, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetQueryRaw", libxml_xmlURIGetQueryRaw, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetScheme", libxml_xmlURIGetScheme, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetServer", libxml_xmlURIGetServer, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetUser", libxml_xmlURIGetUser, METH_VARARGS, NULL },
+ { (char *)"xmlURISetAuthority", libxml_xmlURISetAuthority, METH_VARARGS, NULL },
+ { (char *)"xmlURISetFragment", libxml_xmlURISetFragment, METH_VARARGS, NULL },
+ { (char *)"xmlURISetOpaque", libxml_xmlURISetOpaque, METH_VARARGS, NULL },
+ { (char *)"xmlURISetPath", libxml_xmlURISetPath, METH_VARARGS, NULL },
+ { (char *)"xmlURISetPort", libxml_xmlURISetPort, METH_VARARGS, NULL },
+ { (char *)"xmlURISetQuery", libxml_xmlURISetQuery, METH_VARARGS, NULL },
+ { (char *)"xmlURISetQueryRaw", libxml_xmlURISetQueryRaw, METH_VARARGS, NULL },
+ { (char *)"xmlURISetScheme", libxml_xmlURISetScheme, METH_VARARGS, NULL },
+ { (char *)"xmlURISetServer", libxml_xmlURISetServer, METH_VARARGS, NULL },
+ { (char *)"xmlURISetUser", libxml_xmlURISetUser, METH_VARARGS, NULL },
+ { (char *)"xmlURIUnescapeString", libxml_xmlURIUnescapeString, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Charcmp", libxml_xmlUTF8Charcmp, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Size", libxml_xmlUTF8Size, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strlen", libxml_xmlUTF8Strlen, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strloc", libxml_xmlUTF8Strloc, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strndup", libxml_xmlUTF8Strndup, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strpos", libxml_xmlUTF8Strpos, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strsize", libxml_xmlUTF8Strsize, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strsub", libxml_xmlUTF8Strsub, METH_VARARGS, NULL },
+ { (char *)"xmlUnlinkNode", libxml_xmlUnlinkNode, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlUnsetNsProp", libxml_xmlUnsetNsProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlUnsetProp", libxml_xmlUnsetProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidCtxtNormalizeAttributeValue", libxml_xmlValidCtxtNormalizeAttributeValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidNormalizeAttributeValue", libxml_xmlValidNormalizeAttributeValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateDocument", libxml_xmlValidateDocument, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateDocumentFinal", libxml_xmlValidateDocumentFinal, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateDtd", libxml_xmlValidateDtd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateDtdFinal", libxml_xmlValidateDtdFinal, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateElement", libxml_xmlValidateElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlValidateNCName", libxml_xmlValidateNCName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlValidateNMToken", libxml_xmlValidateNMToken, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlValidateName", libxml_xmlValidateName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateNameValue", libxml_xmlValidateNameValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateNamesValue", libxml_xmlValidateNamesValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateNmtokenValue", libxml_xmlValidateNmtokenValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateNmtokensValue", libxml_xmlValidateNmtokensValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlValidateNotationUse", libxml_xmlValidateNotationUse, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateOneAttribute", libxml_xmlValidateOneAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateOneElement", libxml_xmlValidateOneElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateOneNamespace", libxml_xmlValidateOneNamespace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlValidatePopElement", libxml_xmlValidatePopElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlValidatePushCData", libxml_xmlValidatePushCData, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlValidatePushElement", libxml_xmlValidatePushElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlValidateQName", libxml_xmlValidateQName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateRoot", libxml_xmlValidateRoot, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlXIncludeProcess", libxml_xmlXIncludeProcess, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlXIncludeProcessFlags", libxml_xmlXIncludeProcessFlags, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlXIncludeProcessTree", libxml_xmlXIncludeProcessTree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlXIncludeProcessTreeFlags", libxml_xmlXIncludeProcessTreeFlags, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathAddValues", libxml_xmlXPathAddValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathBooleanFunction", libxml_xmlXPathBooleanFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastBooleanToNumber", libxml_xmlXPathCastBooleanToNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastBooleanToString", libxml_xmlXPathCastBooleanToString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastNodeToNumber", libxml_xmlXPathCastNodeToNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastNodeToString", libxml_xmlXPathCastNodeToString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastNumberToBoolean", libxml_xmlXPathCastNumberToBoolean, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastNumberToString", libxml_xmlXPathCastNumberToString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastStringToBoolean", libxml_xmlXPathCastStringToBoolean, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastStringToNumber", libxml_xmlXPathCastStringToNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCeilingFunction", libxml_xmlXPathCeilingFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCmpNodes", libxml_xmlXPathCmpNodes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCompareValues", libxml_xmlXPathCompareValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathConcatFunction", libxml_xmlXPathConcatFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathContainsFunction", libxml_xmlXPathContainsFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathContextSetCache", libxml_xmlXPathContextSetCache, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCountFunction", libxml_xmlXPathCountFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathDivValues", libxml_xmlXPathDivValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathEqualValues", libxml_xmlXPathEqualValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathErr", libxml_xmlXPathErr, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathEval", libxml_xmlXPathEval, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathEvalExpr", libxml_xmlXPathEvalExpr, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathEvalExpression", libxml_xmlXPathEvalExpression, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathFalseFunction", libxml_xmlXPathFalseFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathFloorFunction", libxml_xmlXPathFloorFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathFreeContext", libxml_xmlXPathFreeContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathFreeParserContext", libxml_xmlXPathFreeParserContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetContextDoc", libxml_xmlXPathGetContextDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetContextNode", libxml_xmlXPathGetContextNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetContextPosition", libxml_xmlXPathGetContextPosition, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetContextSize", libxml_xmlXPathGetContextSize, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetFunction", libxml_xmlXPathGetFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetFunctionURI", libxml_xmlXPathGetFunctionURI, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathIdFunction", libxml_xmlXPathIdFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlXPathInit", libxml_xmlXPathInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlXPathIsInf", libxml_xmlXPathIsInf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlXPathIsNaN", libxml_xmlXPathIsNaN, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathIsNodeType", libxml_xmlXPathIsNodeType, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathLangFunction", libxml_xmlXPathLangFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathLastFunction", libxml_xmlXPathLastFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathLocalNameFunction", libxml_xmlXPathLocalNameFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathModValues", libxml_xmlXPathModValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathMultValues", libxml_xmlXPathMultValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNamespaceURIFunction", libxml_xmlXPathNamespaceURIFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewBoolean", libxml_xmlXPathNewBoolean, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewCString", libxml_xmlXPathNewCString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewContext", libxml_xmlXPathNewContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewFloat", libxml_xmlXPathNewFloat, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewNodeSet", libxml_xmlXPathNewNodeSet, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewParserContext", libxml_xmlXPathNewParserContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewString", libxml_xmlXPathNewString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewValueTree", libxml_xmlXPathNewValueTree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextAncestor", libxml_xmlXPathNextAncestor, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextAncestorOrSelf", libxml_xmlXPathNextAncestorOrSelf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextAttribute", libxml_xmlXPathNextAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextChild", libxml_xmlXPathNextChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextDescendant", libxml_xmlXPathNextDescendant, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextDescendantOrSelf", libxml_xmlXPathNextDescendantOrSelf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextFollowing", libxml_xmlXPathNextFollowing, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextFollowingSibling", libxml_xmlXPathNextFollowingSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextNamespace", libxml_xmlXPathNextNamespace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextParent", libxml_xmlXPathNextParent, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextPreceding", libxml_xmlXPathNextPreceding, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextPrecedingSibling", libxml_xmlXPathNextPrecedingSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextSelf", libxml_xmlXPathNextSelf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNodeEval", libxml_xmlXPathNodeEval, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNodeSetFreeNs", libxml_xmlXPathNodeSetFreeNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNormalizeFunction", libxml_xmlXPathNormalizeFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNotEqualValues", libxml_xmlXPathNotEqualValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNotFunction", libxml_xmlXPathNotFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNsLookup", libxml_xmlXPathNsLookup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNumberFunction", libxml_xmlXPathNumberFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathOrderDocElems", libxml_xmlXPathOrderDocElems, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathParseNCName", libxml_xmlXPathParseNCName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathParseName", libxml_xmlXPathParseName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathParserGetContext", libxml_xmlXPathParserGetContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathPopBoolean", libxml_xmlXPathPopBoolean, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathPopNumber", libxml_xmlXPathPopNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathPopString", libxml_xmlXPathPopString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathPositionFunction", libxml_xmlXPathPositionFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisterAllFunctions", libxml_xmlXPathRegisterAllFunctions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisterNs", libxml_xmlXPathRegisterNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisterVariable", libxml_xmlXPathRegisterVariable, METH_VARARGS, NULL },
+#endif
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisteredFuncsCleanup", libxml_xmlXPathRegisteredFuncsCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisteredNsCleanup", libxml_xmlXPathRegisteredNsCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisteredVariablesCleanup", libxml_xmlXPathRegisteredVariablesCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRoot", libxml_xmlXPathRoot, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRoundFunction", libxml_xmlXPathRoundFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSetContextDoc", libxml_xmlXPathSetContextDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSetContextNode", libxml_xmlXPathSetContextNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathStartsWithFunction", libxml_xmlXPathStartsWithFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathStringEvalNumber", libxml_xmlXPathStringEvalNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathStringFunction", libxml_xmlXPathStringFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathStringLengthFunction", libxml_xmlXPathStringLengthFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSubValues", libxml_xmlXPathSubValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSubstringAfterFunction", libxml_xmlXPathSubstringAfterFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSubstringBeforeFunction", libxml_xmlXPathSubstringBeforeFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSubstringFunction", libxml_xmlXPathSubstringFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSumFunction", libxml_xmlXPathSumFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathTranslateFunction", libxml_xmlXPathTranslateFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathTrueFunction", libxml_xmlXPathTrueFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathValueFlipSign", libxml_xmlXPathValueFlipSign, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathVariableLookup", libxml_xmlXPathVariableLookup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathVariableLookupNS", libxml_xmlXPathVariableLookupNS, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPatherror", libxml_xmlXPatherror, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrEval", libxml_xmlXPtrEval, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrEvalRangePredicate", libxml_xmlXPtrEvalRangePredicate, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewCollapsedRange", libxml_xmlXPtrNewCollapsedRange, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewContext", libxml_xmlXPtrNewContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewLocationSetNodes", libxml_xmlXPtrNewLocationSetNodes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewRange", libxml_xmlXPtrNewRange, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewRangeNodes", libxml_xmlXPtrNewRangeNodes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrRangeToFunction", libxml_xmlXPtrRangeToFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
diff --git a/libxml2-2.9.10/python/libxml2-py.c b/libxml2-2.9.10/python/libxml2-py.c
new file mode 100644
index 0000000..705c171
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml2-py.c
@@ -0,0 +1,14789 @@
+/* Generated */
+
+#include <Python.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/xmlschemastypes.h>
+#include "libxml_wrap.h"
+#include "libxml2-py.h"
+
+#if defined(LIBXML_DOCB_ENABLED)
+PyObject *
+libxml_docbDefaultSAXHandlerInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ docbDefaultSAXHandlerInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DOCB_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlAutoCloseTag(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ htmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OzO:htmlAutoCloseTag", &pyobj_doc, &name, &pyobj_elem))
+ return(NULL);
+ doc = (htmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (htmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = htmlAutoCloseTag(doc, name, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCreateFileParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlParserCtxtPtr c_retval;
+ char * filename;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlCreateFileParserCtxt", &filename, &encoding))
+ return(NULL);
+
+ c_retval = htmlCreateFileParserCtxt(filename, encoding);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCreateMemoryParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlParserCtxtPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#i:htmlCreateMemoryParserCtxt", &buffer, &py_buffsize0, &size))
+ return(NULL);
+
+ c_retval = htmlCreateMemoryParserCtxt(buffer, size);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+#endif
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReadDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzzi:htmlCtxtReadDoc", &pyobj_ctxt, &cur, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtReadDoc(ctxt, cur, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReadFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oizzi:htmlCtxtReadFd", &pyobj_ctxt, &fd, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtReadFd(ctxt, fd, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReadFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzi:htmlCtxtReadFile", &pyobj_ctxt, &filename, &encoding, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtReadFile(ctxt, filename, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReadMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#izzi:htmlCtxtReadMemory", &pyobj_ctxt, &buffer, &py_buffsize0, &size, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtReadMemory(ctxt, buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlCtxtReset", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ htmlCtxtReset(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtUseOptions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:htmlCtxtUseOptions", &pyobj_ctxt, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtUseOptions(ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlDefaultSAXHandlerInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ htmlDefaultSAXHandlerInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlDocContentDumpFormatOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzi:htmlDocContentDumpFormatOutput", &pyobj_buf, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlDocContentDumpFormatOutput(buf, cur, encoding, format);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlDocContentDumpOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:htmlDocContentDumpOutput", &pyobj_buf, &pyobj_cur, &encoding))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlDocContentDumpOutput(buf, cur, encoding);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlDocDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * f;
+ PyObject *pyobj_f;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:htmlDocDump", &pyobj_f, &pyobj_cur))
+ return(NULL);
+ f = (FILE *) PyFile_Get(pyobj_f);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlDocDump(f, cur);
+ PyFile_Release(f);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlFreeParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlFreeParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ htmlFreeParserCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlGetMetaEncoding(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ htmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlGetMetaEncoding", &pyobj_doc))
+ return(NULL);
+ doc = (htmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = htmlGetMetaEncoding(doc);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlHandleOmittedElem(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:htmlHandleOmittedElem", &val))
+ return(NULL);
+
+ c_retval = htmlHandleOmittedElem(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlInitAutoClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ htmlInitAutoClose();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlIsAutoClosed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlDocPtr doc;
+ PyObject *pyobj_doc;
+ htmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:htmlIsAutoClosed", &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ doc = (htmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (htmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = htmlIsAutoClosed(doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlIsBooleanAttr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:htmlIsBooleanAttr", &name))
+ return(NULL);
+
+ c_retval = htmlIsBooleanAttr(name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlIsScriptAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:htmlIsScriptAttribute", &name))
+ return(NULL);
+
+ c_retval = htmlIsScriptAttribute(name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlNewDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ xmlChar * URI;
+ xmlChar * ExternalID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlNewDoc", &URI, &ExternalID))
+ return(NULL);
+
+ c_retval = htmlNewDoc(URI, ExternalID);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlNewDocNoDtD(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ xmlChar * URI;
+ xmlChar * ExternalID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlNewDocNoDtD", &URI, &ExternalID))
+ return(NULL);
+
+ c_retval = htmlNewDocNoDtD(URI, ExternalID);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ htmlParserCtxtPtr c_retval;
+
+ c_retval = htmlNewParserCtxt();
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlNodeDumpFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * out;
+ PyObject *pyobj_out;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:htmlNodeDumpFile", &pyobj_out, &pyobj_doc, &pyobj_cur))
+ return(NULL);
+ out = (FILE *) PyFile_Get(pyobj_out);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlNodeDumpFile(out, doc, cur);
+ PyFile_Release(out);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlNodeDumpFileFormat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * out;
+ PyObject *pyobj_out;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOzi:htmlNodeDumpFileFormat", &pyobj_out, &pyobj_doc, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ out = (FILE *) PyFile_Get(pyobj_out);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlNodeDumpFileFormat(out, doc, cur, encoding, format);
+ PyFile_Release(out);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlNodeDumpFormatOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOzi:htmlNodeDumpFormatOutput", &pyobj_buf, &pyobj_doc, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlNodeDumpOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOz:htmlNodeDumpOutput", &pyobj_buf, &pyobj_doc, &pyobj_cur, &encoding))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlNodeDumpOutput(buf, doc, cur, encoding);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseCharRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlParseCharRef", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlParseCharRef(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+PyObject *
+libxml_htmlParseChunk(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * chunk;
+ int py_buffsize0;
+ int size;
+ int terminate;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#ii:htmlParseChunk", &pyobj_ctxt, &chunk, &py_buffsize0, &size, &terminate))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlParseChunk(ctxt, chunk, size, terminate);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ xmlChar * cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlParseDoc", &cur, &encoding))
+ return(NULL);
+
+ c_retval = htmlParseDoc(cur, encoding);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlParseDocument", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlParseDocument(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlParseElement", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ htmlParseElement(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ char * filename;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlParseFile", &filename, &encoding))
+ return(NULL);
+
+ c_retval = htmlParseFile(filename, encoding);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlReadDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzzi:htmlReadDoc", &cur, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = htmlReadDoc(cur, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlReadFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"izzi:htmlReadFd", &fd, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = htmlReadFd(fd, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlReadFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:htmlReadFile", &filename, &encoding, &options))
+ return(NULL);
+
+ c_retval = htmlReadFile(filename, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlReadMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#izzi:htmlReadMemory", &buffer, &py_buffsize0, &size, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = htmlReadMemory(buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+#endif
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlSaveFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:htmlSaveFile", &filename, &pyobj_cur))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlSaveFile(filename, cur);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlSaveFileEnc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOz:htmlSaveFileEnc", &filename, &pyobj_cur, &encoding))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlSaveFileEnc(filename, cur, encoding);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlSaveFileFormat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOzi:htmlSaveFileFormat", &filename, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlSaveFileFormat(filename, cur, encoding, format);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlSetMetaEncoding(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:htmlSetMetaEncoding", &pyobj_doc, &encoding))
+ return(NULL);
+ doc = (htmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = htmlSetMetaEncoding(doc, encoding);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+PyObject *
+libxml_namePop(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:namePop", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = namePop(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_namePush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:namePush", &pyobj_ctxt, &value))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = namePush(ctxt, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_nodePop(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:nodePop", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = nodePop(ctxt);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_nodePush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr value;
+ PyObject *pyobj_value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:nodePush", &pyobj_ctxt, &pyobj_value))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+ value = (xmlNodePtr) PyxmlNode_Get(pyobj_value);
+
+ c_retval = nodePush(ctxt, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_valuePop(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:valuePop", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = valuePop(ctxt);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogAdd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * type;
+ xmlChar * orig;
+ xmlChar * replace;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzz:xmlACatalogAdd", &pyobj_catal, &type, &orig, &replace))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogAdd(catal, type, orig, replace);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlACatalogDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ FILE * out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlACatalogDump", &pyobj_catal, &pyobj_out))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+ out = (FILE *) PyFile_Get(pyobj_out);
+
+ xmlACatalogDump(catal, out);
+ PyFile_Release(out);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogRemove(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlACatalogRemove", &pyobj_catal, &value))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogRemove(catal, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogResolve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * pubID;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlACatalogResolve", &pyobj_catal, &pubID, &sysID))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogResolve(catal, pubID, sysID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogResolvePublic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * pubID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlACatalogResolvePublic", &pyobj_catal, &pubID))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogResolvePublic(catal, pubID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogResolveSystem(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlACatalogResolveSystem", &pyobj_catal, &sysID))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogResolveSystem(catal, sysID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogResolveURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlACatalogResolveURI", &pyobj_catal, &URI))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogResolveURI(catal, URI);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlAddChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddChild", &pyobj_parent, &pyobj_cur))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlAddChild(parent, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddChildList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddChildList", &pyobj_parent, &pyobj_cur))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlAddChildList(parent, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddDocEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ int type;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozizzz:xmlAddDocEntity", &pyobj_doc, &name, &type, &ExternalID, &SystemID, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlAddDocEntity(doc, name, type, ExternalID, SystemID, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddDtdEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ int type;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozizzz:xmlAddDtdEntity", &pyobj_doc, &name, &type, &ExternalID, &SystemID, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlAddDtdEntity(doc, name, type, ExternalID, SystemID, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddEncodingAlias(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * name;
+ char * alias;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlAddEncodingAlias", &name, &alias))
+ return(NULL);
+
+ c_retval = xmlAddEncodingAlias(name, alias);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddNextSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddNextSibling", &pyobj_cur, &pyobj_elem))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlAddNextSibling(cur, elem);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlAddPrevSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddPrevSibling", &pyobj_cur, &pyobj_elem))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlAddPrevSibling(cur, elem);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+PyObject *
+libxml_xmlAddSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddSibling", &pyobj_cur, &pyobj_elem))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlAddSibling(cur, elem);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlBoolToText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ int boolval;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlBoolToText", &boolval))
+ return(NULL);
+
+ c_retval = xmlBoolToText(boolval);
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+PyObject *
+libxml_xmlBuildQName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * ncname;
+ xmlChar * prefix;
+ xmlChar * memory;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzzi:xmlBuildQName", &ncname, &prefix, &memory, &len))
+ return(NULL);
+
+ c_retval = xmlBuildQName(ncname, prefix, memory, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlBuildRelativeURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * URI;
+ xmlChar * base;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlBuildRelativeURI", &URI, &base))
+ return(NULL);
+
+ c_retval = xmlBuildRelativeURI(URI, base);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlBuildURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * URI;
+ xmlChar * base;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlBuildURI", &URI, &base))
+ return(NULL);
+
+ c_retval = xmlBuildURI(URI, base);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlByteConsumed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ long c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlByteConsumed", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlByteConsumed(ctxt);
+ py_retval = libxml_longWrap((long) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCanonicPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCanonicPath", &path))
+ return(NULL);
+
+ c_retval = xmlCanonicPath(path);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogAdd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * type;
+ xmlChar * orig;
+ xmlChar * replace;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzz:xmlCatalogAdd", &type, &orig, &replace))
+ return(NULL);
+
+ c_retval = xmlCatalogAdd(type, orig, replace);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCatalogCleanup();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogConvert(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ int c_retval;
+
+ c_retval = xmlCatalogConvert();
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlCatalogDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCatalogDump", &pyobj_out))
+ return(NULL);
+ out = (FILE *) PyFile_Get(pyobj_out);
+
+ xmlCatalogDump(out);
+ PyFile_Release(out);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogGetPublic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * pubID;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogGetPublic", &pubID))
+ return(NULL);
+
+ c_retval = xmlCatalogGetPublic(pubID);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogGetSystem(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogGetSystem", &sysID))
+ return(NULL);
+
+ c_retval = xmlCatalogGetSystem(sysID);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogIsEmpty(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCatalogIsEmpty", &pyobj_catal))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlCatalogIsEmpty(catal);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogRemove(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogRemove", &value))
+ return(NULL);
+
+ c_retval = xmlCatalogRemove(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogResolve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * pubID;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlCatalogResolve", &pubID, &sysID))
+ return(NULL);
+
+ c_retval = xmlCatalogResolve(pubID, sysID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogResolvePublic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * pubID;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogResolvePublic", &pubID))
+ return(NULL);
+
+ c_retval = xmlCatalogResolvePublic(pubID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogResolveSystem(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogResolveSystem", &sysID))
+ return(NULL);
+
+ c_retval = xmlCatalogResolveSystem(sysID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogResolveURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogResolveURI", &URI))
+ return(NULL);
+
+ c_retval = xmlCatalogResolveURI(URI);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogSetDebug(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int level;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlCatalogSetDebug", &level))
+ return(NULL);
+
+ c_retval = xmlCatalogSetDebug(level);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlCharStrdup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ char * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCharStrdup", &cur))
+ return(NULL);
+
+ c_retval = xmlCharStrdup(cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCharStrndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ char * cur;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlCharStrndup", &cur, &len))
+ return(NULL);
+
+ c_retval = xmlCharStrndup(cur, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCheckFilename(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCheckFilename", &path))
+ return(NULL);
+
+ c_retval = xmlCheckFilename(path);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCheckLanguageID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * lang;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCheckLanguageID", &lang))
+ return(NULL);
+
+ c_retval = xmlCheckLanguageID(lang);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCheckUTF8(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned char * utf;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCheckUTF8", &utf))
+ return(NULL);
+
+ c_retval = xmlCheckUTF8(utf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCheckVersion(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ int version;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlCheckVersion", &version))
+ return(NULL);
+
+ xmlCheckVersion(version);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCleanupCharEncodingHandlers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupCharEncodingHandlers();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCleanupEncodingAliases(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupEncodingAliases();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCleanupGlobals(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupGlobals();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCleanupInputCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupInputCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlCleanupOutputCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupOutputCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlCleanupPredefinedEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupPredefinedEntities();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlClearParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlClearParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlClearParserCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlConvertSGMLCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlConvertSGMLCatalog", &pyobj_catal))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlConvertSGMLCatalog(catal);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlCopyChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int len;
+ xmlChar * out;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"izi:xmlCopyChar", &len, &out, &val))
+ return(NULL);
+
+ c_retval = xmlCopyChar(len, out, val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyCharMultiByte(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * out;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlCopyCharMultiByte", &out, &val))
+ return(NULL);
+
+ c_retval = xmlCopyCharMultiByte(out, val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlCopyDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ int recursive;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlCopyDoc", &pyobj_doc, &recursive))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlCopyDoc(doc, recursive);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlCopyDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCopyDtd", &pyobj_dtd))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlCopyDtd(dtd);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlCopyError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr from;
+ PyObject *pyobj_from;
+ xmlErrorPtr to;
+ PyObject *pyobj_to;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlCopyError", &pyobj_from, &pyobj_to))
+ return(NULL);
+ from = (xmlErrorPtr) PyError_Get(pyobj_from);
+ to = (xmlErrorPtr) PyError_Get(pyobj_to);
+
+ c_retval = xmlCopyError(from, to);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNsPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCopyNamespace", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNsPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlCopyNamespace(cur);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyNamespaceList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNsPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCopyNamespaceList", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNsPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlCopyNamespaceList(cur);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ int extended;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlCopyNode", &pyobj_node, &extended))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlCopyNode(node, extended);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCopyNodeList", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlCopyNodeList(node);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr target;
+ PyObject *pyobj_target;
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlCopyProp", &pyobj_target, &pyobj_cur))
+ return(NULL);
+ target = (xmlNodePtr) PyxmlNode_Get(pyobj_target);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlCopyProp(target, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyPropList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr target;
+ PyObject *pyobj_target;
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlCopyPropList", &pyobj_target, &pyobj_cur))
+ return(NULL);
+ target = (xmlNodePtr) PyxmlNode_Get(pyobj_target);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlCopyPropList(target, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateDocParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ xmlChar * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCreateDocParserCtxt", &cur))
+ return(NULL);
+
+ c_retval = xmlCreateDocParserCtxt(cur);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateEntityParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ xmlChar * URL;
+ xmlChar * ID;
+ xmlChar * base;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzz:xmlCreateEntityParserCtxt", &URL, &ID, &base))
+ return(NULL);
+
+ c_retval = xmlCreateEntityParserCtxt(URL, ID, base);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateFileParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCreateFileParserCtxt", &filename))
+ return(NULL);
+
+ c_retval = xmlCreateFileParserCtxt(filename);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateIntSubset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzz:xmlCreateIntSubset", &pyobj_doc, &name, &ExternalID, &SystemID))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlCreateIntSubset(doc, name, ExternalID, SystemID);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateMemoryParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#i:xmlCreateMemoryParserCtxt", &buffer, &py_buffsize0, &size))
+ return(NULL);
+
+ c_retval = xmlCreateMemoryParserCtxt(buffer, size);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ xmlURIPtr c_retval;
+
+ c_retval = xmlCreateURI();
+ py_retval = libxml_xmlURIPtrWrap((xmlURIPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateURLParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ char * filename;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlCreateURLParserCtxt", &filename, &options))
+ return(NULL);
+
+ c_retval = xmlCreateURLParserCtxt(filename, options);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReadDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzzi:xmlCtxtReadDoc", &pyobj_ctxt, &cur, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtReadDoc(ctxt, cur, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReadFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oizzi:xmlCtxtReadFd", &pyobj_ctxt, &fd, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtReadFd(ctxt, fd, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReadFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzi:xmlCtxtReadFile", &pyobj_ctxt, &filename, &encoding, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtReadFile(ctxt, filename, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReadMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#izzi:xmlCtxtReadMemory", &pyobj_ctxt, &buffer, &py_buffsize0, &size, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtReadMemory(ctxt, buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCtxtReset", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlCtxtReset(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCtxtResetPush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * chunk;
+ int py_buffsize0;
+ int size;
+ char * filename;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#izz:xmlCtxtResetPush", &pyobj_ctxt, &chunk, &py_buffsize0, &size, &filename, &encoding))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtResetPush(ctxt, chunk, size, filename, encoding);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtUseOptions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlCtxtUseOptions", &pyobj_ctxt, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtUseOptions(ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugCheckDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugCheckDocument", &pyobj_output, &pyobj_doc))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlDebugCheckDocument(output, doc);
+ PyFile_Release(output);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpAttr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpAttr", &pyobj_output, &pyobj_attr, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ xmlDebugDumpAttr(output, attr, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpAttrList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpAttrList", &pyobj_output, &pyobj_attr, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ xmlDebugDumpAttrList(output, attr, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpDTD(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugDumpDTD", &pyobj_output, &pyobj_dtd))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ xmlDebugDumpDTD(output, dtd);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugDumpDocument", &pyobj_output, &pyobj_doc))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlDebugDumpDocument(output, doc);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpDocumentHead(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugDumpDocumentHead", &pyobj_output, &pyobj_doc))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlDebugDumpDocumentHead(output, doc);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugDumpEntities", &pyobj_output, &pyobj_doc))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlDebugDumpEntities(output, doc);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpNode", &pyobj_output, &pyobj_node, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlDebugDumpNode(output, node, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpNodeList", &pyobj_output, &pyobj_node, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlDebugDumpNodeList(output, node, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpOneNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpOneNode", &pyobj_output, &pyobj_node, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlDebugDumpOneNode(output, node, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlDebugDumpString", &pyobj_output, &str))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+
+ xmlDebugDumpString(output, str);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlDecodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int len;
+ int what;
+ xmlChar end;
+ xmlChar end2;
+ xmlChar end3;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oiiccc:xmlDecodeEntities", &pyobj_ctxt, &len, &what, &end, &end2, &end3))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlDecodeEntities(ctxt, len, what, end, end2, end3);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlDefaultSAXHandlerInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlDefaultSAXHandlerInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlDelEncodingAlias(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * alias;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlDelEncodingAlias", &alias))
+ return(NULL);
+
+ c_retval = xmlDelEncodingAlias(alias);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlDictCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlDictCleanup();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlDocCopyNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ int extended;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDocCopyNode", &pyobj_node, &pyobj_doc, &extended))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlDocCopyNode(node, doc, extended);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlDocCopyNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDocCopyNodeList", &pyobj_doc, &pyobj_node))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlDocCopyNodeList(doc, node);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlDocDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * f;
+ PyObject *pyobj_f;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDocDump", &pyobj_f, &pyobj_cur))
+ return(NULL);
+ f = (FILE *) PyFile_Get(pyobj_f);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlDocDump(f, cur);
+ PyFile_Release(f);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlDocFormatDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * f;
+ PyObject *pyobj_f;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDocFormatDump", &pyobj_f, &pyobj_cur, &format))
+ return(NULL);
+ f = (FILE *) PyFile_Get(pyobj_f);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlDocFormatDump(f, cur, format);
+ PyFile_Release(f);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject *
+libxml_xmlDocGetRootElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlDocGetRootElement", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlDocGetRootElement(doc);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+PyObject *
+libxml_xmlDocSetRootElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr root;
+ PyObject *pyobj_root;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDocSetRootElement", &pyobj_doc, &pyobj_root))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ root = (xmlNodePtr) PyxmlNode_Get(pyobj_root);
+
+ c_retval = xmlDocSetRootElement(doc, root);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlElemDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * f;
+ PyObject *pyobj_f;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlElemDump", &pyobj_f, &pyobj_doc, &pyobj_cur))
+ return(NULL);
+ f = (FILE *) PyFile_Get(pyobj_f);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlElemDump(f, doc, cur);
+ PyFile_Release(f);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlEncodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * input;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlEncodeEntities", &pyobj_doc, &input))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlEncodeEntities(doc, input);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlEncodeEntitiesReentrant(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * input;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlEncodeEntitiesReentrant", &pyobj_doc, &input))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlEncodeEntitiesReentrant(doc, input);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlEncodeSpecialChars(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * input;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlEncodeSpecialChars", &pyobj_doc, &input))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlEncodeSpecialChars(doc, input);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetCode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetCode", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->code;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetDomain(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetDomain", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->domain;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetFile", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->file;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetLevel(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetLevel", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->level;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetLine(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetLine", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->line;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetMessage(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetMessage", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->message;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlFileMatch(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlFileMatch", &filename))
+ return(NULL);
+
+ c_retval = xmlFileMatch(filename);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlFirstElementChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFirstElementChild", &pyobj_parent))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+
+ c_retval = xmlFirstElementChild(parent);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlFreeCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeCatalog", &pyobj_catal))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ xmlFreeCatalog(catal);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlFreeDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeDoc", &pyobj_cur))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeDoc(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlDtdPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeDtd", &pyobj_cur))
+ return(NULL);
+ cur = (xmlDtdPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeDtd(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeNode", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeNode(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeNodeList", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeNodeList(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNsPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeNs", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNsPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeNs(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeNsList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNsPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeNsList", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNsPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeNsList(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeParserInputBuffer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserInputBufferPtr in;
+ PyObject *pyobj_in;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeParserInputBuffer", &pyobj_in))
+ return(NULL);
+ in = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_in);
+
+ xmlFreeParserInputBuffer(in);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeProp", &pyobj_cur))
+ return(NULL);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeProp(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreePropList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreePropList", &pyobj_cur))
+ return(NULL);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreePropList(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr uri;
+ PyObject *pyobj_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeURI", &pyobj_uri))
+ return(NULL);
+ uri = (xmlURIPtr) PyURI_Get(pyobj_uri);
+
+ xmlFreeURI(uri);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlGetCompressMode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ int c_retval;
+
+ c_retval = xmlGetCompressMode();
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDocCompressMode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetDocCompressMode", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetDocCompressMode(doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDocEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetDocEntity", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetDocEntity(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdAttrDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttributePtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+ xmlChar * elem;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlGetDtdAttrDesc", &pyobj_dtd, &elem, &name))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlGetDtdAttrDesc(dtd, elem, name);
+ py_retval = libxml_xmlAttributePtrWrap((xmlAttributePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdElementDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlElementPtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetDtdElementDesc", &pyobj_dtd, &name))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlGetDtdElementDesc(dtd, name);
+ py_retval = libxml_xmlElementPtrWrap((xmlElementPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetDtdEntity", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetDtdEntity(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdQAttrDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttributePtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+ xmlChar * elem;
+ xmlChar * name;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzz:xmlGetDtdQAttrDesc", &pyobj_dtd, &elem, &name, &prefix))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlGetDtdQAttrDesc(dtd, elem, name, prefix);
+ py_retval = libxml_xmlAttributePtrWrap((xmlAttributePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdQElementDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlElementPtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+ xmlChar * name;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlGetDtdQElementDesc", &pyobj_dtd, &name, &prefix))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlGetDtdQElementDesc(dtd, name, prefix);
+ py_retval = libxml_xmlElementPtrWrap((xmlElementPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetEncodingAlias(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ char * alias;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlGetEncodingAlias", &alias))
+ return(NULL);
+
+ c_retval = xmlGetEncodingAlias(alias);
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * ID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetID", &pyobj_doc, &ID))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetID(doc, ID);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetIntSubset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetIntSubset", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetIntSubset(doc);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetLastChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNode * parent;
+ PyObject *pyobj_parent;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetLastChild", &pyobj_parent))
+ return(NULL);
+ parent = (xmlNode *) PyxmlNode_Get(pyobj_parent);
+
+ c_retval = xmlGetLastChild(parent);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetLastError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ xmlErrorPtr c_retval;
+
+ c_retval = xmlGetLastError();
+ py_retval = libxml_xmlErrorPtrWrap((xmlErrorPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetLineNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ long c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetLineNo", &pyobj_node))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetLineNo(node);
+ py_retval = libxml_longWrap((long) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetNoNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetNoNsProp", &pyobj_node, &name))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetNoNsProp(node, name);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlGetNodePath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetNodePath", &pyobj_node))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetNodePath(node);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+PyObject *
+libxml_xmlGetNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+ xmlChar * nameSpace;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlGetNsProp", &pyobj_node, &name, &nameSpace))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetNsProp(node, name, nameSpace);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetParameterEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetParameterEntity", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetParameterEntity(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetPredefinedEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlGetPredefinedEntity", &name))
+ return(NULL);
+
+ c_retval = xmlGetPredefinedEntity(name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetProp", &pyobj_node, &name))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetProp(node, name);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlHandleEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlEntityPtr entity;
+ PyObject *pyobj_entity;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlHandleEntity", &pyobj_ctxt, &pyobj_entity))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+ entity = (xmlEntityPtr) PyxmlNode_Get(pyobj_entity);
+
+ xmlHandleEntity(ctxt, entity);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlHasNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+ xmlChar * nameSpace;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlHasNsProp", &pyobj_node, &name, &nameSpace))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlHasNsProp(node, name, nameSpace);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlHasProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlHasProp", &pyobj_node, &name))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlHasProp(node, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlIOFTPMatch(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlIOFTPMatch", &filename))
+ return(NULL);
+
+ c_retval = xmlIOFTPMatch(filename);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlIOHTTPMatch(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlIOHTTPMatch", &filename))
+ return(NULL);
+
+ c_retval = xmlIOHTTPMatch(filename);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+PyObject *
+libxml_xmlInitCharEncodingHandlers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitCharEncodingHandlers();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlInitGlobals(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitGlobals();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlInitParser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitParser();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlInitParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlInitParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlInitParserCtxt(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlInitializeCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitializeCatalog();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlInitializeDict(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ int c_retval;
+
+ c_retval = xmlInitializeDict();
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlInitializePredefinedEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitializePredefinedEntities();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlIsBaseChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsBaseChar", &ch))
+ return(NULL);
+
+ c_retval = xmlIsBaseChar(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsBlank(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsBlank", &ch))
+ return(NULL);
+
+ c_retval = xmlIsBlank(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsBlankNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlIsBlankNode", &pyobj_node))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlIsBlankNode(node);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsChar", &ch))
+ return(NULL);
+
+ c_retval = xmlIsChar(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsCombining(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsCombining", &ch))
+ return(NULL);
+
+ c_retval = xmlIsCombining(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsDigit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsDigit", &ch))
+ return(NULL);
+
+ c_retval = xmlIsDigit(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsExtender(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsExtender", &ch))
+ return(NULL);
+
+ c_retval = xmlIsExtender(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlIsID", &pyobj_doc, &pyobj_elem, &pyobj_attr))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlIsID(doc, elem, attr);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsIdeographic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsIdeographic", &ch))
+ return(NULL);
+
+ c_retval = xmlIsIdeographic(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsLetter(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int c;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsLetter", &c))
+ return(NULL);
+
+ c_retval = xmlIsLetter(c);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsMixedElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlIsMixedElement", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlIsMixedElement(doc, name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsPubidChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsPubidChar", &ch))
+ return(NULL);
+
+ c_retval = xmlIsPubidChar(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlIsRef", &pyobj_doc, &pyobj_elem, &pyobj_attr))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlIsRef(doc, elem, attr);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsXHTML(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * systemID;
+ xmlChar * publicID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlIsXHTML", &systemID, &publicID))
+ return(NULL);
+
+ c_retval = xmlIsXHTML(systemID, publicID);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlKeepBlanksDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlKeepBlanksDefault", &val))
+ return(NULL);
+
+ c_retval = xmlKeepBlanksDefault(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlLastElementChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlLastElementChild", &pyobj_parent))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+
+ c_retval = xmlLastElementChild(parent);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlLineNumbersDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlLineNumbersDefault", &val))
+ return(NULL);
+
+ c_retval = xmlLineNumbersDefault(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlLoadACatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlCatalogPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlLoadACatalog", &filename))
+ return(NULL);
+
+ c_retval = xmlLoadACatalog(filename);
+ py_retval = libxml_xmlCatalogPtrWrap((xmlCatalogPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlLoadCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlLoadCatalog", &filename))
+ return(NULL);
+
+ c_retval = xmlLoadCatalog(filename);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlLoadCatalogs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ char * pathss;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlLoadCatalogs", &pathss))
+ return(NULL);
+
+ xmlLoadCatalogs(pathss);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlLoadSGMLSuperCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlCatalogPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlLoadSGMLSuperCatalog", &filename))
+ return(NULL);
+
+ c_retval = xmlLoadSGMLSuperCatalog(filename);
+ py_retval = libxml_xmlCatalogPtrWrap((xmlCatalogPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlLsCountNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlLsCountNode", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlLsCountNode(node);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlLsOneNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlLsOneNode", &pyobj_output, &pyobj_node))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlLsOneNode(output, node);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlNamespaceParseNCName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNamespaceParseNCName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlNamespaceParseNCName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlNamespaceParseNSDef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNamespaceParseNSDef", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlNamespaceParseNSDef(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlNanoFTPCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlNanoFTPCleanup();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlNanoFTPInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlNanoFTPInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlNanoFTPProxy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ char * host;
+ int port;
+ char * user;
+ char * passwd;
+ int type;
+
+ if (!PyArg_ParseTuple(args, (char *)"zizzi:xmlNanoFTPProxy", &host, &port, &user, &passwd, &type))
+ return(NULL);
+
+ xmlNanoFTPProxy(host, port, user, passwd, type);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlNanoFTPScanProxy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ char * URL;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNanoFTPScanProxy", &URL))
+ return(NULL);
+
+ xmlNanoFTPScanProxy(URL);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlNanoHTTPCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlNanoHTTPCleanup();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlNanoHTTPInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlNanoHTTPInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlNanoHTTPScanProxy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ char * URL;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNanoHTTPScanProxy", &URL))
+ return(NULL);
+
+ xmlNanoHTTPScanProxy(URL);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+PyObject *
+libxml_xmlNewCDataBlock(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlNewCDataBlock", &pyobj_doc, &content, &len))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewCDataBlock(doc, content, len);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlNewCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlCatalogPtr c_retval;
+ int sgml;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlNewCatalog", &sgml))
+ return(NULL);
+
+ c_retval = xmlNewCatalog(sgml);
+ py_retval = libxml_xmlCatalogPtrWrap((xmlCatalogPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlNewCharRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewCharRef", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewCharRef(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlNewChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewChild", &pyobj_parent, &pyobj_ns, &name, &content))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewChild(parent, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject *
+libxml_xmlNewComment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNewComment", &content))
+ return(NULL);
+
+ c_retval = xmlNewComment(content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlChar * version;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNewDoc", &version))
+ return(NULL);
+
+ c_retval = xmlNewDoc(version);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocComment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewDocComment", &pyobj_doc, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocComment(doc, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNewDocFragment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNewDocFragment", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocFragment(doc);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNewDocNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewDocNode", &pyobj_doc, &pyobj_ns, &name, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewDocNode(doc, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocNodeEatName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewDocNodeEatName", &pyobj_doc, &pyobj_ns, &name, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewDocNodeEatName(doc, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocPI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewDocPI", &pyobj_doc, &name, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocPI(doc, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewDocProp", &pyobj_doc, &name, &value))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocProp(doc, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNewDocRawNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewDocRawNode", &pyobj_doc, &pyobj_ns, &name, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewDocRawNode(doc, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNewDocText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewDocText", &pyobj_doc, &content))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocText(doc, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocTextLen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlNewDocTextLen", &pyobj_doc, &content, &len))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocTextLen(doc, content, len);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzz:xmlNewDtd", &pyobj_doc, &name, &ExternalID, &SystemID))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDtd(doc, name, ExternalID, SystemID);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ int type;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozizzz:xmlNewEntity", &pyobj_doc, &name, &type, &ExternalID, &SystemID, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewEntity(doc, name, type, ExternalID, SystemID, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlNewGlobalNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * href;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewGlobalNs", &pyobj_doc, &href, &prefix))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewGlobalNs(doc, href, prefix);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlNewNodeEatName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewNodeEatName", &pyobj_ns, &name))
+ return(NULL);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewNodeEatName(ns, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * href;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewNs", &pyobj_node, &href, &prefix))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlNewNs(node, href, prefix);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewNsProp", &pyobj_node, &pyobj_ns, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewNsProp(node, ns, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewNsPropEatName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewNsPropEatName", &pyobj_node, &pyobj_ns, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewNsPropEatName(node, ns, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewPI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlNewPI", &name, &content))
+ return(NULL);
+
+ c_retval = xmlNewPI(name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+
+ c_retval = xmlNewParserCtxt();
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlNewProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewProp", &pyobj_node, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlNewProp(node, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject *
+libxml_xmlNewReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewReference", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewReference(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNewText", &content))
+ return(NULL);
+
+ c_retval = xmlNewText(content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNewTextChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewTextChild", &pyobj_parent, &pyobj_ns, &name, &content))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewTextChild(parent, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNewTextLen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlNewTextLen", &content, &len))
+ return(NULL);
+
+ c_retval = xmlNewTextLen(content, len);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlNewTextReader(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ xmlParserInputBufferPtr input;
+ PyObject *pyobj_input;
+ char * URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewTextReader", &pyobj_input, &URI))
+ return(NULL);
+ input = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_input);
+
+ c_retval = xmlNewTextReader(input, URI);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlNewTextReaderFilename(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ char * URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNewTextReaderFilename", &URI))
+ return(NULL);
+
+ c_retval = xmlNewTextReaderFilename(URI);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlNewValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ xmlValidCtxtPtr c_retval;
+
+ c_retval = xmlNewValidCtxt();
+ py_retval = libxml_xmlValidCtxtPtrWrap((xmlValidCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+PyObject *
+libxml_xmlNextChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNextChar", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlNextChar(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNextElementSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNextElementSibling", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlNextElementSibling(node);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNodeAddContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeAddContent", &pyobj_cur, &content))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeAddContent(cur, content);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlNodeAddContentLen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlNodeAddContentLen", &pyobj_cur, &content, &len))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeAddContentLen(cur, content, len);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlNodeDumpOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ int level;
+ int format;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOiiz:xmlNodeDumpOutput", &pyobj_buf, &pyobj_doc, &pyobj_cur, &level, &format, &encoding))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeDumpOutput(buf, doc, cur, level, format, encoding);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject *
+libxml_xmlNodeGetBase(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlNode * cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlNodeGetBase", &pyobj_doc, &pyobj_cur))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNode *) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlNodeGetBase(doc, cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNodeGetContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetContent", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNode *) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlNodeGetContent(cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNodeGetLang(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetLang", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNode *) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlNodeGetLang(cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNodeGetSpacePreserve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNode * cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetSpacePreserve", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNode *) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlNodeGetSpacePreserve(cur);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNodeIsText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeIsText", &pyobj_node))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlNodeIsText(node);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeListGetRawString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlNode * list;
+ PyObject *pyobj_list;
+ int inLine;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlNodeListGetRawString", &pyobj_doc, &pyobj_list, &inLine))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+ list = (xmlNode *) PyxmlNode_Get(pyobj_list);
+
+ c_retval = xmlNodeListGetRawString(doc, list, inLine);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNodeListGetString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNode * list;
+ PyObject *pyobj_list;
+ int inLine;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlNodeListGetString", &pyobj_doc, &pyobj_list, &inLine))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ list = (xmlNode *) PyxmlNode_Get(pyobj_list);
+
+ c_retval = xmlNodeListGetString(doc, list, inLine);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlNodeSetBase(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeSetBase", &pyobj_cur, &uri))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetBase(cur, uri);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+PyObject *
+libxml_xmlNodeSetContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeSetContent", &pyobj_cur, &content))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetContent(cur, content);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeSetContentLen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlNodeSetContentLen", &pyobj_cur, &content, &len))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetContentLen(cur, content, len);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeSetLang(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * lang;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeSetLang", &pyobj_cur, &lang))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetLang(cur, lang);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeSetName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeSetName", &pyobj_cur, &name))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetName(cur, name);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeSetSpacePreserve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlNodeSetSpacePreserve", &pyobj_cur, &val))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetSpacePreserve(cur, val);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNormalizeURIPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNormalizeURIPath", &path))
+ return(NULL);
+
+ c_retval = xmlNormalizeURIPath(path);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNormalizeWindowsPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNormalizeWindowsPath", &path))
+ return(NULL);
+
+ c_retval = xmlNormalizeWindowsPath(path);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlOutputBufferGetContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlOutputBufferGetContent", &pyobj_out))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+
+ c_retval = xmlOutputBufferGetContent(out);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlOutputBufferWrite(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+ int len;
+ char * buf;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oiz:xmlOutputBufferWrite", &pyobj_out, &len, &buf))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+
+ c_retval = xmlOutputBufferWrite(out, len, buf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlOutputBufferWriteString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+ char * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlOutputBufferWriteString", &pyobj_out, &str))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+
+ c_retval = xmlOutputBufferWriteString(out, str);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject *
+libxml_xmlParseAttValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseAttValue", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseAttValue(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseAttributeListDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseAttributeListDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseAttributeListDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseCDSect(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseCDSect", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseCDSect(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlParseCatalogFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseCatalogFile", &filename))
+ return(NULL);
+
+ c_retval = xmlParseCatalogFile(filename);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlParseCharData(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int cdata;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParseCharData", &pyobj_ctxt, &cdata))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseCharData(ctxt, cdata);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseCharRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseCharRef", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseCharRef(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_PUSH_ENABLED)
+PyObject *
+libxml_xmlParseChunk(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * chunk;
+ int py_buffsize0;
+ int size;
+ int terminate;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#ii:xmlParseChunk", &pyobj_ctxt, &chunk, &py_buffsize0, &size, &terminate))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseChunk(ctxt, chunk, size, terminate);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_PUSH_ENABLED) */
+PyObject *
+libxml_xmlParseComment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseComment", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseComment(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseContent", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseContent(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlParseDTD(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlParseDTD", &ExternalID, &SystemID))
+ return(NULL);
+
+ c_retval = xmlParseDTD(ExternalID, SystemID);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlChar * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseDoc", &cur))
+ return(NULL);
+
+ c_retval = xmlParseDoc(cur);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseDocTypeDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseDocTypeDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseDocTypeDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseDocument", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseDocument(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseElement", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseElement(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseElementDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseElementDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseElementDecl(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseEncName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEncName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseEncName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseEncodingDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEncodingDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseEncodingDecl(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseEndTag(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEndTag", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseEndTag(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseEntity", &filename))
+ return(NULL);
+
+ c_retval = xmlParseEntity(filename);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseEntityDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEntityDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseEntityDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseEntityRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEntityRef", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseEntityRef(ctxt);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseExtParsedEnt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseExtParsedEnt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseExtParsedEnt(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseExternalSubset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlParseExternalSubset", &pyobj_ctxt, &ExternalID, &SystemID))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseExternalSubset(ctxt, ExternalID, SystemID);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseFile", &filename))
+ return(NULL);
+
+ c_retval = xmlParseFile(filename);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseMarkupDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseMarkupDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseMarkupDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#i:xmlParseMemory", &buffer, &py_buffsize0, &size))
+ return(NULL);
+
+ c_retval = xmlParseMemory(buffer, size);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseMisc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseMisc", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseMisc(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseName(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlParseNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseNamespace", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseNamespace(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlParseNmtoken(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseNmtoken", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseNmtoken(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseNotationDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseNotationDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseNotationDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParsePEReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePEReference", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParsePEReference(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParsePI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePI", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParsePI(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParsePITarget(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePITarget", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParsePITarget(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParsePubidLiteral(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePubidLiteral", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParsePubidLiteral(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlParseQuotedString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseQuotedString", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseQuotedString(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlParseReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseReference", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseReference(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseSDDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseSDDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseSDDecl(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseStartTag(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseStartTag", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseStartTag(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseSystemLiteral(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseSystemLiteral", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseSystemLiteral(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseTextDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseTextDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseTextDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlURIPtr c_retval;
+ char * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseURI", &str))
+ return(NULL);
+
+ c_retval = xmlParseURI(str);
+ py_retval = libxml_xmlURIPtrWrap((xmlURIPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseURIRaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlURIPtr c_retval;
+ char * str;
+ int raw;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlParseURIRaw", &str, &raw))
+ return(NULL);
+
+ c_retval = xmlParseURIRaw(str, raw);
+ py_retval = libxml_xmlURIPtrWrap((xmlURIPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseURIReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlURIPtr uri;
+ PyObject *pyobj_uri;
+ char * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlParseURIReference", &pyobj_uri, &str))
+ return(NULL);
+ uri = (xmlURIPtr) PyURI_Get(pyobj_uri);
+
+ c_retval = xmlParseURIReference(uri, str);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseVersionInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseVersionInfo", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseVersionInfo(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseVersionNum(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseVersionNum", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseVersionNum(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseXMLDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseXMLDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseXMLDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserGetDirectory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ char * c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParserGetDirectory", &filename))
+ return(NULL);
+
+ c_retval = xmlParserGetDirectory(filename);
+ py_retval = libxml_charPtrWrap((char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserGetDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserGetDoc", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = ctxt->myDoc;
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserGetIsValid(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserGetIsValid", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = ctxt->valid;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserGetWellFormed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserGetWellFormed", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = ctxt->wellFormed;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserHandlePEReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserHandlePEReference", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParserHandlePEReference(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlParserHandleReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserHandleReference", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParserHandleReference(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlParserInputBufferGrow(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserInputBufferPtr in;
+ PyObject *pyobj_in;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserInputBufferGrow", &pyobj_in, &len))
+ return(NULL);
+ in = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_in);
+
+ c_retval = xmlParserInputBufferGrow(in, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserInputBufferPush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserInputBufferPtr in;
+ PyObject *pyobj_in;
+ int len;
+ char * buf;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oiz:xmlParserInputBufferPush", &pyobj_in, &len, &buf))
+ return(NULL);
+ in = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_in);
+
+ c_retval = xmlParserInputBufferPush(in, len, buf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserInputBufferRead(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserInputBufferPtr in;
+ PyObject *pyobj_in;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserInputBufferRead", &pyobj_in, &len))
+ return(NULL);
+ in = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_in);
+
+ c_retval = xmlParserInputBufferRead(in, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserSetLineNumbers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int linenumbers;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetLineNumbers", &pyobj_ctxt, &linenumbers))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->linenumbers = linenumbers;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserSetLoadSubset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int loadsubset;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetLoadSubset", &pyobj_ctxt, &loadsubset))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->loadsubset = loadsubset;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserSetPedantic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int pedantic;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetPedantic", &pyobj_ctxt, &pedantic))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->pedantic = pedantic;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserSetReplaceEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int replaceEntities;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetReplaceEntities", &pyobj_ctxt, &replaceEntities))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->replaceEntities = replaceEntities;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserSetValidate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int validate;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetValidate", &pyobj_ctxt, &validate))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->validate = validate;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlPathToURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlPathToURI", &path))
+ return(NULL);
+
+ c_retval = xmlPathToURI(path);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlPedanticParserDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlPedanticParserDefault", &val))
+ return(NULL);
+
+ c_retval = xmlPedanticParserDefault(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlPopInput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlPopInput", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlPopInput(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlPreviousElementSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlPreviousElementSibling", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlPreviousElementSibling(node);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlPrintURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * stream;
+ PyObject *pyobj_stream;
+ xmlURIPtr uri;
+ PyObject *pyobj_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlPrintURI", &pyobj_stream, &pyobj_uri))
+ return(NULL);
+ stream = (FILE *) PyFile_Get(pyobj_stream);
+ uri = (xmlURIPtr) PyURI_Get(pyobj_uri);
+
+ xmlPrintURI(stream, uri);
+ PyFile_Release(stream);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlReadDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzzi:xmlReadDoc", &cur, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReadDoc(cur, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlReadFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"izzi:xmlReadFd", &fd, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReadFd(fd, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlReadFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlReadFile", &filename, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReadFile(filename, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlReadMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#izzi:xmlReadMemory", &buffer, &py_buffsize0, &size, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReadMemory(buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderForDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzzi:xmlReaderForDoc", &cur, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReaderForDoc(cur, URL, encoding, options);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderForFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"izzi:xmlReaderForFd", &fd, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReaderForFd(fd, URL, encoding, options);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderForFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlReaderForFile", &filename, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReaderForFile(filename, encoding, options);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderForMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ char * buffer;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zizzi:xmlReaderForMemory", &buffer, &size, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReaderForMemory(buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzzi:xmlReaderNewDoc", &pyobj_reader, &cur, &URL, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlReaderNewDoc(reader, cur, URL, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oizzi:xmlReaderNewFd", &pyobj_reader, &fd, &URL, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlReaderNewFd(reader, fd, URL, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzi:xmlReaderNewFile", &pyobj_reader, &filename, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlReaderNewFile(reader, filename, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ char * buffer;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozizzi:xmlReaderNewMemory", &pyobj_reader, &buffer, &size, &URL, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlReaderNewMemory(reader, buffer, size, URL, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewWalker(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlReaderNewWalker", &pyobj_reader, &pyobj_doc))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlReaderNewWalker(reader, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderWalker(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlReaderWalker", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlReaderWalker(doc);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlReconciliateNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr tree;
+ PyObject *pyobj_tree;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlReconciliateNs", &pyobj_doc, &pyobj_tree))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ tree = (xmlNodePtr) PyxmlNode_Get(pyobj_tree);
+
+ c_retval = xmlReconciliateNs(doc, tree);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlRecoverDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlChar * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlRecoverDoc", &cur))
+ return(NULL);
+
+ c_retval = xmlRecoverDoc(cur);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlRecoverFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlRecoverFile", &filename))
+ return(NULL);
+
+ c_retval = xmlRecoverFile(filename);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlRecoverMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#i:xmlRecoverMemory", &buffer, &py_buffsize0, &size))
+ return(NULL);
+
+ c_retval = xmlRecoverMemory(buffer, size);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegFreeRegexp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlRegexpPtr regexp;
+ PyObject *pyobj_regexp;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRegFreeRegexp", &pyobj_regexp))
+ return(NULL);
+ regexp = (xmlRegexpPtr) PyxmlReg_Get(pyobj_regexp);
+
+ xmlRegFreeRegexp(regexp);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegexpCompile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRegexpPtr c_retval;
+ xmlChar * regexp;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlRegexpCompile", &regexp))
+ return(NULL);
+
+ c_retval = xmlRegexpCompile(regexp);
+ py_retval = libxml_xmlRegexpPtrWrap((xmlRegexpPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegexpExec(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRegexpPtr comp;
+ PyObject *pyobj_comp;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlRegexpExec", &pyobj_comp, &content))
+ return(NULL);
+ comp = (xmlRegexpPtr) PyxmlReg_Get(pyobj_comp);
+
+ c_retval = xmlRegexpExec(comp, content);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegexpIsDeterminist(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRegexpPtr comp;
+ PyObject *pyobj_comp;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRegexpIsDeterminist", &pyobj_comp))
+ return(NULL);
+ comp = (xmlRegexpPtr) PyxmlReg_Get(pyobj_comp);
+
+ c_retval = xmlRegexpIsDeterminist(comp);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegexpPrint(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlRegexpPtr regexp;
+ PyObject *pyobj_regexp;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRegexpPrint", &pyobj_output, &pyobj_regexp))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ regexp = (xmlRegexpPtr) PyxmlReg_Get(pyobj_regexp);
+
+ xmlRegexpPrint(output, regexp);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+PyObject *
+libxml_xmlRegisterDefaultInputCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlRegisterDefaultInputCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlRegisterDefaultOutputCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlRegisterDefaultOutputCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlRegisterHTTPPostCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlRegisterHTTPPostCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+#endif
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGCleanupTypes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlRelaxNGCleanupTypes();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlRelaxNGDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRelaxNGDump", &pyobj_output, &pyobj_schema))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ xmlRelaxNGDump(output, schema);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlRelaxNGDumpTree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRelaxNGDumpTree", &pyobj_output, &pyobj_schema))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ xmlRelaxNGDumpTree(output, schema);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGFree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGFree", &pyobj_schema))
+ return(NULL);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ xmlRelaxNGFree(schema);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGFreeParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlRelaxNGParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGFreeParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlRelaxNGParserCtxtPtr) PyrelaxNgParserCtxt_Get(pyobj_ctxt);
+
+ xmlRelaxNGFreeParserCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGInitTypes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ int c_retval;
+
+ c_retval = xmlRelaxNGInitTypes();
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGNewDocParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGParserCtxtPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGNewDocParserCtxt", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlRelaxNGNewDocParserCtxt(doc);
+ py_retval = libxml_xmlRelaxNGParserCtxtPtrWrap((xmlRelaxNGParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGNewMemParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGParserCtxtPtr c_retval;
+ char * buffer;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlRelaxNGNewMemParserCtxt", &buffer, &size))
+ return(NULL);
+
+ c_retval = xmlRelaxNGNewMemParserCtxt(buffer, size);
+ py_retval = libxml_xmlRelaxNGParserCtxtPtrWrap((xmlRelaxNGParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGParserCtxtPtr c_retval;
+ char * URL;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlRelaxNGNewParserCtxt", &URL))
+ return(NULL);
+
+ c_retval = xmlRelaxNGNewParserCtxt(URL);
+ py_retval = libxml_xmlRelaxNGParserCtxtPtrWrap((xmlRelaxNGParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGNewValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGValidCtxtPtr c_retval;
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGNewValidCtxt", &pyobj_schema))
+ return(NULL);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ c_retval = xmlRelaxNGNewValidCtxt(schema);
+ py_retval = libxml_xmlRelaxNGValidCtxtPtrWrap((xmlRelaxNGValidCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGParse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGPtr c_retval;
+ xmlRelaxNGParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGParse", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlRelaxNGParserCtxtPtr) PyrelaxNgParserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlRelaxNGParse(ctxt);
+ py_retval = libxml_xmlRelaxNGPtrWrap((xmlRelaxNGPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidateDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRelaxNGValidateDoc", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlRelaxNGValidateDoc(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidateFullElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlRelaxNGValidateFullElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlRelaxNGValidateFullElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidatePopElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlRelaxNGValidatePopElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlRelaxNGValidatePopElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidatePushCData(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * data;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlRelaxNGValidatePushCData", &pyobj_ctxt, &data, &len))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlRelaxNGValidatePushCData(ctxt, data, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidatePushElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlRelaxNGValidatePushElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlRelaxNGValidatePushElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxParserSetFlag(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int flags;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlRelaxParserSetFlag", &pyobj_ctxt, &flags))
+ return(NULL);
+ ctxt = (xmlRelaxNGParserCtxtPtr) PyrelaxNgParserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlRelaxParserSetFlag(ctxt, flags);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject *
+libxml_xmlRemoveID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRemoveID", &pyobj_doc, &pyobj_attr))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlRemoveID(doc, attr);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlRemoveProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRemoveProp", &pyobj_cur))
+ return(NULL);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlRemoveProp(cur);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlRemoveRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRemoveRef", &pyobj_doc, &pyobj_attr))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlRemoveRef(doc, attr);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+PyObject *
+libxml_xmlReplaceNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr old;
+ PyObject *pyobj_old;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlReplaceNode", &pyobj_old, &pyobj_cur))
+ return(NULL);
+ old = (xmlNodePtr) PyxmlNode_Get(pyobj_old);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlReplaceNode(old, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+PyObject *
+libxml_xmlResetError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlErrorPtr err;
+ PyObject *pyobj_err;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlResetError", &pyobj_err))
+ return(NULL);
+ err = (xmlErrorPtr) PyError_Get(pyobj_err);
+
+ xmlResetError(err);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlResetLastError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlResetLastError();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlSAXDefaultVersion(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int version;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlSAXDefaultVersion", &version))
+ return(NULL);
+
+ c_retval = xmlSAXDefaultVersion(version);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSaveFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlSaveFile", &filename, &pyobj_cur))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFile(filename, cur);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSaveFileEnc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOz:xmlSaveFileEnc", &filename, &pyobj_cur, &encoding))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFileEnc(filename, cur, encoding);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSaveFormatFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOi:xmlSaveFormatFile", &filename, &pyobj_cur, &format))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFormatFile(filename, cur, format);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSaveFormatFileEnc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOzi:xmlSaveFormatFileEnc", &filename, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFormatFileEnc(filename, cur, encoding, format);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject *
+libxml_xmlSaveUri(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlURIPtr uri;
+ PyObject *pyobj_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSaveUri", &pyobj_uri))
+ return(NULL);
+ uri = (xmlURIPtr) PyURI_Get(pyobj_uri);
+
+ c_retval = xmlSaveUri(uri);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlScanName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlScanName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlScanName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaCleanupTypes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlSchemaCleanupTypes();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaCollapseString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlSchemaCollapseString", &value))
+ return(NULL);
+
+ c_retval = xmlSchemaCollapseString(value);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSchemaDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlSchemaPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaDump", &pyobj_output, &pyobj_schema))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ schema = (xmlSchemaPtr) PySchema_Get(pyobj_schema);
+
+ xmlSchemaDump(output, schema);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaFree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlSchemaPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaFree", &pyobj_schema))
+ return(NULL);
+ schema = (xmlSchemaPtr) PySchema_Get(pyobj_schema);
+
+ xmlSchemaFree(schema);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaFreeParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlSchemaParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaFreeParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaParserCtxtPtr) PySchemaParserCtxt_Get(pyobj_ctxt);
+
+ xmlSchemaFreeParserCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaInitTypes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlSchemaInitTypes();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaIsValid(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaIsValid", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaIsValid(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaNewDocParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaParserCtxtPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaNewDocParserCtxt", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlSchemaNewDocParserCtxt(doc);
+ py_retval = libxml_xmlSchemaParserCtxtPtrWrap((xmlSchemaParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaNewMemParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaParserCtxtPtr c_retval;
+ char * buffer;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlSchemaNewMemParserCtxt", &buffer, &size))
+ return(NULL);
+
+ c_retval = xmlSchemaNewMemParserCtxt(buffer, size);
+ py_retval = libxml_xmlSchemaParserCtxtPtrWrap((xmlSchemaParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaParserCtxtPtr c_retval;
+ char * URL;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlSchemaNewParserCtxt", &URL))
+ return(NULL);
+
+ c_retval = xmlSchemaNewParserCtxt(URL);
+ py_retval = libxml_xmlSchemaParserCtxtPtrWrap((xmlSchemaParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaNewValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaValidCtxtPtr c_retval;
+ xmlSchemaPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaNewValidCtxt", &pyobj_schema))
+ return(NULL);
+ schema = (xmlSchemaPtr) PySchema_Get(pyobj_schema);
+
+ c_retval = xmlSchemaNewValidCtxt(schema);
+ py_retval = libxml_xmlSchemaValidCtxtPtrWrap((xmlSchemaValidCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaParse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaPtr c_retval;
+ xmlSchemaParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaParse", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaParserCtxtPtr) PySchemaParserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaParse(ctxt);
+ py_retval = libxml_xmlSchemaPtrWrap((xmlSchemaPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaSetValidOptions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlSchemaSetValidOptions", &pyobj_ctxt, &options))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaSetValidOptions(ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidCtxtGetOptions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaValidCtxtGetOptions", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaValidCtxtGetOptions(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidCtxtGetParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaValidCtxtGetParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaValidCtxtGetParserCtxt(ctxt);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidateDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateDoc", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlSchemaValidateDoc(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidateFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * filename;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlSchemaValidateFile", &pyobj_ctxt, &filename, &options))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaValidateFile(ctxt, filename, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidateOneElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateOneElement", &pyobj_ctxt, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlSchemaValidateOneElement(ctxt, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidateSetFilename(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlSchemaValidCtxtPtr vctxt;
+ PyObject *pyobj_vctxt;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlSchemaValidateSetFilename", &pyobj_vctxt, &filename))
+ return(NULL);
+ vctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_vctxt);
+
+ xmlSchemaValidateSetFilename(vctxt, filename);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaWhiteSpaceReplace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlSchemaWhiteSpaceReplace", &value))
+ return(NULL);
+
+ c_retval = xmlSchemaWhiteSpaceReplace(value);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject *
+libxml_xmlSearchNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * nameSpace;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlSearchNs", &pyobj_doc, &pyobj_node, &nameSpace))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlSearchNs(doc, node, nameSpace);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlSearchNsByHref(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * href;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlSearchNsByHref", &pyobj_doc, &pyobj_node, &href))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlSearchNsByHref(doc, node, href);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlSetCompressMode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ int mode;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlSetCompressMode", &mode))
+ return(NULL);
+
+ xmlSetCompressMode(mode);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlSetDocCompressMode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ int mode;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlSetDocCompressMode", &pyobj_doc, &mode))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlSetDocCompressMode(doc, mode);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlSetListDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr list;
+ PyObject *pyobj_list;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSetListDoc", &pyobj_list, &pyobj_doc))
+ return(NULL);
+ list = (xmlNodePtr) PyxmlNode_Get(pyobj_list);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlSetListDoc(list, doc);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlSetNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSetNs", &pyobj_node, &pyobj_ns))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ xmlSetNs(node, ns);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_xmlSetNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlSetNsProp", &pyobj_node, &pyobj_ns, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlSetNsProp(node, ns, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_xmlSetProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlSetProp", &pyobj_node, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlSetProp(node, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+PyObject *
+libxml_xmlSetTreeDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr tree;
+ PyObject *pyobj_tree;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSetTreeDoc", &pyobj_tree, &pyobj_doc))
+ return(NULL);
+ tree = (xmlNodePtr) PyxmlNode_Get(pyobj_tree);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlSetTreeDoc(tree, doc);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlSetupParserForBuffer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * buffer;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlSetupParserForBuffer", &pyobj_ctxt, &buffer, &filename))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlSetupParserForBuffer(ctxt, buffer, filename);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlShellPrintNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlShellPrintNode", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlShellPrintNode(node);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlShellPrintXPathError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ int errorType;
+ char * arg;
+
+ if (!PyArg_ParseTuple(args, (char *)"iz:xmlShellPrintXPathError", &errorType, &arg))
+ return(NULL);
+
+ xmlShellPrintXPathError(errorType, arg);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) */
+PyObject *
+libxml_xmlSkipBlankChars(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSkipBlankChars", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSkipBlankChars(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStopParser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlStopParser", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlStopParser(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlStrEqual(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrEqual", &str1, &str2))
+ return(NULL);
+
+ c_retval = xmlStrEqual(str1, str2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrQEqual(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * pref;
+ xmlChar * name;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzz:xmlStrQEqual", &pref, &name, &str))
+ return(NULL);
+
+ c_retval = xmlStrQEqual(pref, name, str);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrcasecmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrcasecmp", &str1, &str2))
+ return(NULL);
+
+ c_retval = xmlStrcasecmp(str1, str2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrcasestr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * str;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrcasestr", &str, &val))
+ return(NULL);
+
+ c_retval = xmlStrcasestr(str, val);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrcat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * cur;
+ xmlChar * add;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrcat", &cur, &add))
+ return(NULL);
+
+ c_retval = xmlStrcat(cur, add);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrchr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * str;
+ xmlChar val;
+
+ if (!PyArg_ParseTuple(args, (char *)"zc:xmlStrchr", &str, &val))
+ return(NULL);
+
+ c_retval = xmlStrchr(str, val);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrcmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrcmp", &str1, &str2))
+ return(NULL);
+
+ c_retval = xmlStrcmp(str1, str2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrdup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlStrdup", &cur))
+ return(NULL);
+
+ c_retval = xmlStrdup(cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStringDecodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * str;
+ int what;
+ xmlChar end;
+ xmlChar end2;
+ xmlChar end3;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oziccc:xmlStringDecodeEntities", &pyobj_ctxt, &str, &what, &end, &end2, &end3))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlStringDecodeEntities(ctxt, str, what, end, end2, end3);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStringGetNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlStringGetNodeList", &pyobj_doc, &value))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlStringGetNodeList(doc, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStringLenDecodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * str;
+ int len;
+ int what;
+ xmlChar end;
+ xmlChar end2;
+ xmlChar end3;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oziiccc:xmlStringLenDecodeEntities", &pyobj_ctxt, &str, &len, &what, &end, &end2, &end3))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlStringLenDecodeEntities(ctxt, str, len, what, end, end2, end3);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStringLenGetNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * value;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlStringLenGetNodeList", &pyobj_doc, &value, &len))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlStringLenGetNodeList(doc, value, len);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrlen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlStrlen", &str))
+ return(NULL);
+
+ c_retval = xmlStrlen(str);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrncasecmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlStrncasecmp", &str1, &str2, &len))
+ return(NULL);
+
+ c_retval = xmlStrncasecmp(str1, str2, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrncat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * cur;
+ xmlChar * add;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlStrncat", &cur, &add, &len))
+ return(NULL);
+
+ c_retval = xmlStrncat(cur, add, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrncatNew(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlStrncatNew", &str1, &str2, &len))
+ return(NULL);
+
+ c_retval = xmlStrncatNew(str1, str2, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrncmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlStrncmp", &str1, &str2, &len))
+ return(NULL);
+
+ c_retval = xmlStrncmp(str1, str2, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * cur;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlStrndup", &cur, &len))
+ return(NULL);
+
+ c_retval = xmlStrndup(cur, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrstr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * str;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrstr", &str, &val))
+ return(NULL);
+
+ c_retval = xmlStrstr(str, val);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrsub(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * str;
+ int start;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zii:xmlStrsub", &str, &start, &len))
+ return(NULL);
+
+ c_retval = xmlStrsub(str, start, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlSubstituteEntitiesDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlSubstituteEntitiesDefault", &val))
+ return(NULL);
+
+ c_retval = xmlSubstituteEntitiesDefault(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlTextConcat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlTextConcat", &pyobj_node, &content, &len))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlTextConcat(node, content, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlTextMerge(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr first;
+ PyObject *pyobj_first;
+ xmlNodePtr second;
+ PyObject *pyobj_second;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlTextMerge", &pyobj_first, &pyobj_second))
+ return(NULL);
+ first = (xmlNodePtr) PyxmlNode_Get(pyobj_first);
+ second = (xmlNodePtr) PyxmlNode_Get(pyobj_second);
+
+ c_retval = xmlTextMerge(first, second);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderAttributeCount(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderAttributeCount", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderAttributeCount(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderByteConsumed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ long c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderByteConsumed", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderByteConsumed(reader);
+ py_retval = libxml_longWrap((long) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderClose", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderClose(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstBaseUri(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstBaseUri", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstBaseUri(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstEncoding(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstEncoding", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstEncoding(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstLocalName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstLocalName", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstLocalName(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstName", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstName(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstNamespaceUri(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstNamespaceUri", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstNamespaceUri(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstPrefix(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstPrefix", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstPrefix(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderConstString", &pyobj_reader, &str))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstString(reader, str);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstValue", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstValue(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstXmlLang(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstXmlLang", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstXmlLang(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstXmlVersion(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstXmlVersion", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstXmlVersion(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderCurrentDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderCurrentDoc", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderCurrentDoc(reader);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderCurrentNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderCurrentNode", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderCurrentNode(reader);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderDepth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderDepth", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderDepth(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderExpand(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderExpand", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderExpand(reader);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderGetAttribute", &pyobj_reader, &name))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetAttribute(reader, name);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetAttributeNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int no;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlTextReaderGetAttributeNo", &pyobj_reader, &no))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetAttributeNo(reader, no);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetAttributeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * localName;
+ xmlChar * namespaceURI;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlTextReaderGetAttributeNs", &pyobj_reader, &localName, &namespaceURI))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetAttributeNs(reader, localName, namespaceURI);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetParserColumnNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderGetParserColumnNumber", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetParserColumnNumber(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetParserLineNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderGetParserLineNumber", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetParserLineNumber(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetParserProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int prop;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlTextReaderGetParserProp", &pyobj_reader, &prop))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetParserProp(reader, prop);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetRemainder(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserInputBufferPtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderGetRemainder", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetRemainder(reader);
+ py_retval = libxml_xmlParserInputBufferPtrWrap((xmlParserInputBufferPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderHasAttributes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderHasAttributes", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderHasAttributes(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderHasValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderHasValue", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderHasValue(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderIsDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderIsDefault", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderIsDefault(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderIsEmptyElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderIsEmptyElement", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderIsEmptyElement(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderIsNamespaceDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderIsNamespaceDecl", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderIsNamespaceDecl(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderIsValid(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderIsValid", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderIsValid(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderLocatorBaseURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderLocatorPtr locator;
+ PyObject *pyobj_locator;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderLocatorBaseURI", &pyobj_locator))
+ return(NULL);
+ locator = (xmlTextReaderLocatorPtr) PyxmlTextReaderLocator_Get(pyobj_locator);
+
+ c_retval = xmlTextReaderLocatorBaseURI(locator);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderLocatorLineNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderLocatorPtr locator;
+ PyObject *pyobj_locator;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderLocatorLineNumber", &pyobj_locator))
+ return(NULL);
+ locator = (xmlTextReaderLocatorPtr) PyxmlTextReaderLocator_Get(pyobj_locator);
+
+ c_retval = xmlTextReaderLocatorLineNumber(locator);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderLookupNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderLookupNamespace", &pyobj_reader, &prefix))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderLookupNamespace(reader, prefix);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderMoveToAttribute", &pyobj_reader, &name))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToAttribute(reader, name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToAttributeNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int no;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlTextReaderMoveToAttributeNo", &pyobj_reader, &no))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToAttributeNo(reader, no);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToAttributeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * localName;
+ xmlChar * namespaceURI;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlTextReaderMoveToAttributeNs", &pyobj_reader, &localName, &namespaceURI))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToAttributeNs(reader, localName, namespaceURI);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderMoveToElement", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToElement(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToFirstAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderMoveToFirstAttribute", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToFirstAttribute(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToNextAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderMoveToNextAttribute", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToNextAttribute(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderNext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderNext", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderNext(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderNextSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderNextSibling", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderNextSibling(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderNodeType(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderNodeType", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderNodeType(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderNormalization(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderNormalization", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderNormalization(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderPreserve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderPreserve", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderPreserve(reader);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderQuoteChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderQuoteChar", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderQuoteChar(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderRead(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderRead", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderRead(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadAttributeValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadAttributeValue", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadAttributeValue(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadInnerXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadInnerXml", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadInnerXml(reader);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadOuterXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadOuterXml", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadOuterXml(reader);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadState(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadState", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadState(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadString", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadString(reader);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderRelaxNGSetSchema(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlTextReaderRelaxNGSetSchema", &pyobj_reader, &pyobj_schema))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ c_retval = xmlTextReaderRelaxNGSetSchema(reader, schema);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderRelaxNGValidate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ char * rng;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderRelaxNGValidate", &pyobj_reader, &rng))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderRelaxNGValidate(reader, rng);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderRelaxNGValidateCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlTextReaderRelaxNGValidateCtxt", &pyobj_reader, &pyobj_ctxt, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlTextReaderRelaxNGValidateCtxt(reader, ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderSchemaValidate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ char * xsd;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderSchemaValidate", &pyobj_reader, &xsd))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderSchemaValidate(reader, xsd);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderSchemaValidateCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlTextReaderSchemaValidateCtxt", &pyobj_reader, &pyobj_ctxt, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderSetParserProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int prop;
+ int value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oii:xmlTextReaderSetParserProp", &pyobj_reader, &prop, &value))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderSetParserProp(reader, prop, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderSetSchema(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlSchemaPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlTextReaderSetSchema", &pyobj_reader, &pyobj_schema))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ schema = (xmlSchemaPtr) PySchema_Get(pyobj_schema);
+
+ c_retval = xmlTextReaderSetSchema(reader, schema);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderSetup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlParserInputBufferPtr input;
+ PyObject *pyobj_input;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzzi:xmlTextReaderSetup", &pyobj_reader, &pyobj_input, &URL, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ input = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_input);
+
+ c_retval = xmlTextReaderSetup(reader, input, URL, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderStandalone(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderStandalone", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderStandalone(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+PyObject *
+libxml_xmlThrDefDefaultBufferSize(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefDefaultBufferSize", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefDefaultBufferSize(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefDoValidityCheckingDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefDoValidityCheckingDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefDoValidityCheckingDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefGetWarningsDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefGetWarningsDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefGetWarningsDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefIndentTreeOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefIndentTreeOutput", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefIndentTreeOutput(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefKeepBlanksDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefKeepBlanksDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefKeepBlanksDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefLineNumbersDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefLineNumbersDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefLineNumbersDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefLoadExtDtdDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefLoadExtDtdDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefLoadExtDtdDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefParserDebugEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefParserDebugEntities", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefParserDebugEntities(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefPedanticParserDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefPedanticParserDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefPedanticParserDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefSaveNoEmptyTags(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefSaveNoEmptyTags", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefSaveNoEmptyTags(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefSubstituteEntitiesDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefSubstituteEntitiesDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefSubstituteEntitiesDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefTreeIndentString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ char * v;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlThrDefTreeIndentString", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefTreeIndentString(v);
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsAegeanNumbers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsAegeanNumbers", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsAegeanNumbers(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsAlphabeticPresentationForms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsAlphabeticPresentationForms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsAlphabeticPresentationForms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArabic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArabic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArabic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArabicPresentationFormsA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArabicPresentationFormsA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArabicPresentationFormsA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArabicPresentationFormsB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArabicPresentationFormsB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArabicPresentationFormsB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArmenian(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArmenian", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArmenian(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArrows(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArrows", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArrows(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBasicLatin(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBasicLatin", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBasicLatin(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBengali(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBengali", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBengali(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBlock(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+ char * block;
+
+ if (!PyArg_ParseTuple(args, (char *)"iz:xmlUCSIsBlock", &code, &block))
+ return(NULL);
+
+ c_retval = xmlUCSIsBlock(code, block);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBlockElements(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBlockElements", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBlockElements(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBopomofo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBopomofo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBopomofo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBopomofoExtended(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBopomofoExtended", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBopomofoExtended(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBoxDrawing(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBoxDrawing", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBoxDrawing(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBraillePatterns(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBraillePatterns", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBraillePatterns(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBuhid(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBuhid", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBuhid(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsByzantineMusicalSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsByzantineMusicalSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsByzantineMusicalSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKCompatibility(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKCompatibility", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKCompatibility(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKCompatibilityForms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKCompatibilityForms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKCompatibilityForms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKCompatibilityIdeographs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKCompatibilityIdeographs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKCompatibilityIdeographs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKCompatibilityIdeographsSupplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKCompatibilityIdeographsSupplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKCompatibilityIdeographsSupplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKRadicalsSupplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKRadicalsSupplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKRadicalsSupplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKSymbolsandPunctuation(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKSymbolsandPunctuation", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKSymbolsandPunctuation(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKUnifiedIdeographs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKUnifiedIdeographs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKUnifiedIdeographs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKUnifiedIdeographsExtensionA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKUnifiedIdeographsExtensionA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKUnifiedIdeographsExtensionA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKUnifiedIdeographsExtensionB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKUnifiedIdeographsExtensionB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+ char * cat;
+
+ if (!PyArg_ParseTuple(args, (char *)"iz:xmlUCSIsCat", &code, &cat))
+ return(NULL);
+
+ c_retval = xmlUCSIsCat(code, cat);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatC(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatC", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatC(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatCc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatCc", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatCc(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatCf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatCf", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatCf(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatCo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatCo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatCo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatCs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatCs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatCs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatL(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatL", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatL(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLl", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLl(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLm(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLm", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLm(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLt", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLt(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLu(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLu", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLu(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatM(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatM", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatM(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatMc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatMc", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatMc(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatMe(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatMe", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatMe(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatMn(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatMn", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatMn(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatN(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatN", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatN(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatNd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatNd", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatNd(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatNl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatNl", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatNl(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatNo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatNo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatP(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatP", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatP(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPc", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPc(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPd", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPd(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPe(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPe", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPe(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPf", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPf(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPi(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPi", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPi(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatS(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatS", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatS(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatSc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatSc", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatSc(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatSk(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatSk", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatSk(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatSm(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatSm", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatSm(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatSo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatSo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatSo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatZ(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatZ", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatZ(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatZl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatZl", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatZl(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatZp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatZp", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatZp(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatZs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatZs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatZs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCherokee(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCherokee", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCherokee(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCombiningDiacriticalMarks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCombiningDiacriticalMarks", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCombiningDiacriticalMarks(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCombiningDiacriticalMarksforSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCombiningDiacriticalMarksforSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCombiningDiacriticalMarksforSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCombiningHalfMarks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCombiningHalfMarks", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCombiningHalfMarks(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCombiningMarksforSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCombiningMarksforSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCombiningMarksforSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsControlPictures(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsControlPictures", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsControlPictures(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCurrencySymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCurrencySymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCurrencySymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCypriotSyllabary(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCypriotSyllabary", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCypriotSyllabary(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCyrillic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCyrillic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCyrillic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCyrillicSupplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCyrillicSupplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCyrillicSupplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsDeseret(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsDeseret", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsDeseret(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsDevanagari(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsDevanagari", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsDevanagari(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsDingbats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsDingbats", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsDingbats(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsEnclosedAlphanumerics(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsEnclosedAlphanumerics", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsEnclosedAlphanumerics(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsEnclosedCJKLettersandMonths(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsEnclosedCJKLettersandMonths", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsEnclosedCJKLettersandMonths(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsEthiopic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsEthiopic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsEthiopic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGeneralPunctuation(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGeneralPunctuation", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGeneralPunctuation(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGeometricShapes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGeometricShapes", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGeometricShapes(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGeorgian(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGeorgian", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGeorgian(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGothic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGothic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGothic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGreek(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGreek", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGreek(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGreekExtended(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGreekExtended", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGreekExtended(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGreekandCoptic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGreekandCoptic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGreekandCoptic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGujarati(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGujarati", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGujarati(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGurmukhi(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGurmukhi", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGurmukhi(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHalfwidthandFullwidthForms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHalfwidthandFullwidthForms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHalfwidthandFullwidthForms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHangulCompatibilityJamo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHangulCompatibilityJamo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHangulCompatibilityJamo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHangulJamo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHangulJamo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHangulJamo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHangulSyllables(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHangulSyllables", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHangulSyllables(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHanunoo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHanunoo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHanunoo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHebrew(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHebrew", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHebrew(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHighPrivateUseSurrogates(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHighPrivateUseSurrogates", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHighPrivateUseSurrogates(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHighSurrogates(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHighSurrogates", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHighSurrogates(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHiragana(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHiragana", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHiragana(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsIPAExtensions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsIPAExtensions", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsIPAExtensions(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsIdeographicDescriptionCharacters(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsIdeographicDescriptionCharacters", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsIdeographicDescriptionCharacters(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKanbun(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKanbun", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKanbun(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKangxiRadicals(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKangxiRadicals", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKangxiRadicals(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKannada(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKannada", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKannada(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKatakana(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKatakana", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKatakana(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKatakanaPhoneticExtensions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKatakanaPhoneticExtensions", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKatakanaPhoneticExtensions(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKhmer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKhmer", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKhmer(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKhmerSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKhmerSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKhmerSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLao(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLao", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLao(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatin1Supplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatin1Supplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatin1Supplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatinExtendedA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatinExtendedA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatinExtendedA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatinExtendedAdditional(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatinExtendedAdditional", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatinExtendedAdditional(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatinExtendedB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatinExtendedB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatinExtendedB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLetterlikeSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLetterlikeSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLetterlikeSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLimbu(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLimbu", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLimbu(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLinearBIdeograms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLinearBIdeograms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLinearBIdeograms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLinearBSyllabary(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLinearBSyllabary", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLinearBSyllabary(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLowSurrogates(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLowSurrogates", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLowSurrogates(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMalayalam(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMalayalam", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMalayalam(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMathematicalAlphanumericSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMathematicalAlphanumericSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMathematicalAlphanumericSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMathematicalOperators(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMathematicalOperators", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMathematicalOperators(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousMathematicalSymbolsA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousMathematicalSymbolsA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousMathematicalSymbolsA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousMathematicalSymbolsB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousMathematicalSymbolsB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousMathematicalSymbolsB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousSymbolsandArrows(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousSymbolsandArrows", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousSymbolsandArrows(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousTechnical(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousTechnical", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousTechnical(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMongolian(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMongolian", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMongolian(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMusicalSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMusicalSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMusicalSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMyanmar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMyanmar", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMyanmar(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsNumberForms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsNumberForms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsNumberForms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOgham(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOgham", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOgham(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOldItalic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOldItalic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOldItalic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOpticalCharacterRecognition(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOpticalCharacterRecognition", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOpticalCharacterRecognition(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOriya(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOriya", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOriya(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOsmanya(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOsmanya", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOsmanya(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsPhoneticExtensions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsPhoneticExtensions", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsPhoneticExtensions(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsPrivateUse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsPrivateUse", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsPrivateUse(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsPrivateUseArea(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsPrivateUseArea", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsPrivateUseArea(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsRunic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsRunic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsRunic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsShavian(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsShavian", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsShavian(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSinhala(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSinhala", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSinhala(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSmallFormVariants(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSmallFormVariants", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSmallFormVariants(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSpacingModifierLetters(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSpacingModifierLetters", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSpacingModifierLetters(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSpecials(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSpecials", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSpecials(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSuperscriptsandSubscripts(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSuperscriptsandSubscripts", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSuperscriptsandSubscripts(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementalArrowsA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementalArrowsA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementalArrowsA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementalArrowsB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementalArrowsB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementalArrowsB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementalMathematicalOperators(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementalMathematicalOperators", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementalMathematicalOperators(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementaryPrivateUseAreaA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementaryPrivateUseAreaA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementaryPrivateUseAreaA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementaryPrivateUseAreaB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementaryPrivateUseAreaB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementaryPrivateUseAreaB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSyriac(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSyriac", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSyriac(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTagalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTagalog", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTagalog(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTagbanwa(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTagbanwa", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTagbanwa(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTags(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTags", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTags(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTaiLe(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTaiLe", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTaiLe(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTaiXuanJingSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTaiXuanJingSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTaiXuanJingSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTamil(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTamil", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTamil(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTelugu(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTelugu", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTelugu(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsThaana(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsThaana", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsThaana(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsThai(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsThai", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsThai(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTibetan(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTibetan", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTibetan(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsUgaritic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsUgaritic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsUgaritic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsUnifiedCanadianAboriginalSyllabics", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsUnifiedCanadianAboriginalSyllabics(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsVariationSelectors(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsVariationSelectors", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsVariationSelectors(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsVariationSelectorsSupplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsVariationSelectorsSupplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsVariationSelectorsSupplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsYiRadicals(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsYiRadicals", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsYiRadicals(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsYiSyllables(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsYiSyllables", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsYiSyllables(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsYijingHexagramSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsYijingHexagramSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsYijingHexagramSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+PyObject *
+libxml_xmlURIEscape(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlURIEscape", &str))
+ return(NULL);
+
+ c_retval = xmlURIEscape(str);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIEscapeStr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * str;
+ xmlChar * list;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlURIEscapeStr", &str, &list))
+ return(NULL);
+
+ c_retval = xmlURIEscapeStr(str, list);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetAuthority(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetAuthority", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->authority;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetFragment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetFragment", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->fragment;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetOpaque(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetOpaque", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->opaque;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetPath", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->path;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetPort(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetPort", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->port;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetQuery(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetQuery", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->query;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetQueryRaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetQueryRaw", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->query_raw;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetScheme(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetScheme", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->scheme;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetServer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetServer", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->server;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetUser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetUser", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->user;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURISetAuthority(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * authority;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetAuthority", &pyobj_URI, &authority))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->authority != NULL) xmlFree(URI->authority);
+ URI->authority = (char *)xmlStrdup((const xmlChar *)authority);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetFragment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * fragment;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetFragment", &pyobj_URI, &fragment))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->fragment != NULL) xmlFree(URI->fragment);
+ URI->fragment = (char *)xmlStrdup((const xmlChar *)fragment);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetOpaque(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * opaque;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetOpaque", &pyobj_URI, &opaque))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->opaque != NULL) xmlFree(URI->opaque);
+ URI->opaque = (char *)xmlStrdup((const xmlChar *)opaque);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetPath", &pyobj_URI, &path))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->path != NULL) xmlFree(URI->path);
+ URI->path = (char *)xmlStrdup((const xmlChar *)path);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetPort(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ int port;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlURISetPort", &pyobj_URI, &port))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ URI->port = port;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetQuery(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * query;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetQuery", &pyobj_URI, &query))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->query != NULL) xmlFree(URI->query);
+ URI->query = (char *)xmlStrdup((const xmlChar *)query);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetQueryRaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * query_raw;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetQueryRaw", &pyobj_URI, &query_raw))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->query_raw != NULL) xmlFree(URI->query_raw);
+ URI->query_raw = (char *)xmlStrdup((const xmlChar *)query_raw);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetScheme(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * scheme;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetScheme", &pyobj_URI, &scheme))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->scheme != NULL) xmlFree(URI->scheme);
+ URI->scheme = (char *)xmlStrdup((const xmlChar *)scheme);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetServer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * server;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetServer", &pyobj_URI, &server))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->server != NULL) xmlFree(URI->server);
+ URI->server = (char *)xmlStrdup((const xmlChar *)server);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetUser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * user;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetUser", &pyobj_URI, &user))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->user != NULL) xmlFree(URI->user);
+ URI->user = (char *)xmlStrdup((const xmlChar *)user);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURIUnescapeString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ char * c_retval;
+ char * str;
+ int len;
+ char * target;
+
+ if (!PyArg_ParseTuple(args, (char *)"ziz:xmlURIUnescapeString", &str, &len, &target))
+ return(NULL);
+
+ c_retval = xmlURIUnescapeString(str, len, target);
+ py_retval = libxml_charPtrWrap((char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Charcmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf1;
+ xmlChar * utf2;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlUTF8Charcmp", &utf1, &utf2))
+ return(NULL);
+
+ c_retval = xmlUTF8Charcmp(utf1, utf2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Size(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlUTF8Size", &utf))
+ return(NULL);
+
+ c_retval = xmlUTF8Size(utf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strlen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlUTF8Strlen", &utf))
+ return(NULL);
+
+ c_retval = xmlUTF8Strlen(utf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strloc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf;
+ xmlChar * utfchar;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlUTF8Strloc", &utf, &utfchar))
+ return(NULL);
+
+ c_retval = xmlUTF8Strloc(utf, utfchar);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * utf;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strndup", &utf, &len))
+ return(NULL);
+
+ c_retval = xmlUTF8Strndup(utf, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strpos(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * utf;
+ int pos;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strpos", &utf, &pos))
+ return(NULL);
+
+ c_retval = xmlUTF8Strpos(utf, pos);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strsize(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strsize", &utf, &len))
+ return(NULL);
+
+ c_retval = xmlUTF8Strsize(utf, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strsub(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * utf;
+ int start;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zii:xmlUTF8Strsub", &utf, &start, &len))
+ return(NULL);
+
+ c_retval = xmlUTF8Strsub(utf, start, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUnlinkNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlUnlinkNode", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlUnlinkNode(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlUnsetNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlUnsetNsProp", &pyobj_node, &pyobj_ns, &name))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlUnsetNsProp(node, ns, name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlUnsetProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlUnsetProp", &pyobj_node, &name))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlUnsetProp(node, name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidCtxtNormalizeAttributeValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOzz:xmlValidCtxtNormalizeAttributeValue", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &name, &value))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidCtxtNormalizeAttributeValue(ctxt, doc, elem, name, value);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidNormalizeAttributeValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlValidNormalizeAttributeValue", &pyobj_doc, &pyobj_elem, &name, &value))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidNormalizeAttributeValue(doc, elem, name, value);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlValidateDocument", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateDocument(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateDocumentFinal(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlValidateDocumentFinal", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateDocumentFinal(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlValidateDtd", &pyobj_ctxt, &pyobj_doc, &pyobj_dtd))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlValidateDtd(ctxt, doc, dtd);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateDtdFinal(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlValidateDtdFinal", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateDtdFinal(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlValidateElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidateElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlValidateNCName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+ int space;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlValidateNCName", &value, &space))
+ return(NULL);
+
+ c_retval = xmlValidateNCName(value, space);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlValidateNMToken(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+ int space;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlValidateNMToken", &value, &space))
+ return(NULL);
+
+ c_retval = xmlValidateNMToken(value, space);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlValidateName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+ int space;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlValidateName", &value, &space))
+ return(NULL);
+
+ c_retval = xmlValidateName(value, space);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateNameValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlValidateNameValue", &value))
+ return(NULL);
+
+ c_retval = xmlValidateNameValue(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateNamesValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlValidateNamesValue", &value))
+ return(NULL);
+
+ c_retval = xmlValidateNamesValue(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateNmtokenValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlValidateNmtokenValue", &value))
+ return(NULL);
+
+ c_retval = xmlValidateNmtokenValue(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateNmtokensValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlValidateNmtokensValue", &value))
+ return(NULL);
+
+ c_retval = xmlValidateNmtokensValue(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlValidateNotationUse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * notationName;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlValidateNotationUse", &pyobj_ctxt, &pyobj_doc, &notationName))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateNotationUse(ctxt, doc, notationName);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateOneAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOOz:xmlValidateOneAttribute", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &pyobj_attr, &value))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateOneElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlValidateOneElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidateOneElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateOneNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * prefix;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOzOz:xmlValidateOneNamespace", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &prefix, &pyobj_ns, &value))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlValidateOneNamespace(ctxt, doc, elem, prefix, ns, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlValidatePopElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * qname;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOz:xmlValidatePopElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &qname))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidatePopElement(ctxt, doc, elem, qname);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlValidatePushCData(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * data;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlValidatePushCData", &pyobj_ctxt, &data, &len))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlValidatePushCData(ctxt, data, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlValidatePushElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * qname;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOz:xmlValidatePushElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &qname))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidatePushElement(ctxt, doc, elem, qname);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlValidateQName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+ int space;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlValidateQName", &value, &space))
+ return(NULL);
+
+ c_retval = xmlValidateQName(value, space);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateRoot(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlValidateRoot", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateRoot(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlXIncludeProcess(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXIncludeProcess", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlXIncludeProcess(doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlXIncludeProcessFlags(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ int flags;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXIncludeProcessFlags", &pyobj_doc, &flags))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlXIncludeProcessFlags(doc, flags);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlXIncludeProcessTree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr tree;
+ PyObject *pyobj_tree;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXIncludeProcessTree", &pyobj_tree))
+ return(NULL);
+ tree = (xmlNodePtr) PyxmlNode_Get(pyobj_tree);
+
+ c_retval = xmlXIncludeProcessTree(tree);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlXIncludeProcessTreeFlags(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr tree;
+ PyObject *pyobj_tree;
+ int flags;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXIncludeProcessTreeFlags", &pyobj_tree, &flags))
+ return(NULL);
+ tree = (xmlNodePtr) PyxmlNode_Get(pyobj_tree);
+
+ c_retval = xmlXIncludeProcessTreeFlags(tree, flags);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathAddValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathAddValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathAddValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathBooleanFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathBooleanFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathBooleanFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastBooleanToNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlXPathCastBooleanToNumber", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastBooleanToNumber(val);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastBooleanToString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlXPathCastBooleanToString", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastBooleanToString(val);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastNodeToNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathCastNodeToNumber", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlXPathCastNodeToNumber(node);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastNodeToString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathCastNodeToString", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlXPathCastNodeToString(node);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastNumberToBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathCastNumberToBoolean", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastNumberToBoolean(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastNumberToString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathCastNumberToString", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastNumberToString(val);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastStringToBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathCastStringToBoolean", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastStringToBoolean(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastStringToNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathCastStringToNumber", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastStringToNumber(val);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCeilingFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathCeilingFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathCeilingFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCmpNodes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node1;
+ PyObject *pyobj_node1;
+ xmlNodePtr node2;
+ PyObject *pyobj_node2;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathCmpNodes", &pyobj_node1, &pyobj_node2))
+ return(NULL);
+ node1 = (xmlNodePtr) PyxmlNode_Get(pyobj_node1);
+ node2 = (xmlNodePtr) PyxmlNode_Get(pyobj_node2);
+
+ c_retval = xmlXPathCmpNodes(node1, node2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCompareValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int inf;
+ int strict;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oii:xmlXPathCompareValues", &pyobj_ctxt, &inf, &strict))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathCompareValues(ctxt, inf, strict);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathConcatFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathConcatFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathConcatFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathContainsFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathContainsFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathContainsFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathContextSetCache(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int active;
+ int value;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oiii:xmlXPathContextSetCache", &pyobj_ctxt, &active, &value, &options))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathContextSetCache(ctxt, active, value, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCountFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathCountFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathCountFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathDivValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathDivValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathDivValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathEqualValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathEqualValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathEqualValues(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathErr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int error;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathErr", &pyobj_ctxt, &error))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathErr(ctxt, error);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathEval(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlChar * str;
+ xmlXPathContextPtr ctx;
+ PyObject *pyobj_ctx;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlXPathEval", &str, &pyobj_ctx))
+ return(NULL);
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+
+ c_retval = xmlXPathEval(str, ctx);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathEvalExpr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathEvalExpr", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathEvalExpr(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathEvalExpression(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlChar * str;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlXPathEvalExpression", &str, &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathEvalExpression(str, ctxt);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathFalseFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathFalseFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathFalseFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathFloorFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathFloorFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathFloorFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathFreeContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathFreeContext", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathFreeContext(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathFreeParserContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathFreeParserContext", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathFreeParserContext(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetContextDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetContextDoc", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->doc;
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetContextNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetContextNode", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->node;
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetContextPosition(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetContextPosition", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->proximityPosition;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetContextSize(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetContextSize", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->contextSize;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetFunction", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->function;
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetFunctionURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetFunctionURI", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->functionURI;
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathIdFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathIdFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathIdFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlXPathInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlXPathInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlXPathIsInf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathIsInf", &val))
+ return(NULL);
+
+ c_retval = xmlXPathIsInf(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlXPathIsNaN(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathIsNaN", &val))
+ return(NULL);
+
+ c_retval = xmlXPathIsNaN(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathIsNodeType(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathIsNodeType", &name))
+ return(NULL);
+
+ c_retval = xmlXPathIsNodeType(name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathLangFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathLangFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathLangFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathLastFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathLastFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathLastFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathLocalNameFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathLocalNameFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathLocalNameFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathModValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathModValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathModValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathMultValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathMultValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathMultValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNamespaceURIFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathNamespaceURIFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathNamespaceURIFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlXPathNewBoolean", &val))
+ return(NULL);
+
+ c_retval = xmlXPathNewBoolean(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewCString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ char * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathNewCString", &val))
+ return(NULL);
+
+ c_retval = xmlXPathNewCString(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathContextPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNewContext", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlXPathNewContext(doc);
+ py_retval = libxml_xmlXPathContextPtrWrap((xmlXPathContextPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewFloat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathNewFloat", &val))
+ return(NULL);
+
+ c_retval = xmlXPathNewFloat(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewNodeSet(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr val;
+ PyObject *pyobj_val;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNewNodeSet", &pyobj_val))
+ return(NULL);
+ val = (xmlNodePtr) PyxmlNode_Get(pyobj_val);
+
+ c_retval = xmlXPathNewNodeSet(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewParserContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathParserContextPtr c_retval;
+ xmlChar * str;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlXPathNewParserContext", &str, &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathNewParserContext(str, ctxt);
+ py_retval = libxml_xmlXPathParserContextPtrWrap((xmlXPathParserContextPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathNewString", &val))
+ return(NULL);
+
+ c_retval = xmlXPathNewString(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewValueTree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr val;
+ PyObject *pyobj_val;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNewValueTree", &pyobj_val))
+ return(NULL);
+ val = (xmlNodePtr) PyxmlNode_Get(pyobj_val);
+
+ c_retval = xmlXPathNewValueTree(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextAncestor(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextAncestor", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextAncestor(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextAncestorOrSelf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextAncestorOrSelf", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextAncestorOrSelf(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextAttribute", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextAttribute(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextChild", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextChild(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextDescendant(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextDescendant", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextDescendant(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextDescendantOrSelf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextDescendantOrSelf", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextDescendantOrSelf(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextFollowing(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextFollowing", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextFollowing(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextFollowingSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextFollowingSibling", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextFollowingSibling(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextNamespace", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextNamespace(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextParent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextParent", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextParent(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextPreceding(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextPreceding", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextPreceding(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextPrecedingSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextPrecedingSibling", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextPrecedingSibling(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextSelf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextSelf", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextSelf(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNodeEval(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * str;
+ xmlXPathContextPtr ctx;
+ PyObject *pyobj_ctx;
+
+ if (!PyArg_ParseTuple(args, (char *)"OzO:xmlXPathNodeEval", &pyobj_node, &str, &pyobj_ctx))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+
+ c_retval = xmlXPathNodeEval(node, str, ctx);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNodeSetFreeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNodeSetFreeNs", &pyobj_ns))
+ return(NULL);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ xmlXPathNodeSetFreeNs(ns);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNormalizeFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathNormalizeFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathNormalizeFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNotEqualValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNotEqualValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathNotEqualValues(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNotFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathNotFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathNotFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNsLookup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlXPathNsLookup", &pyobj_ctxt, &prefix))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathNsLookup(ctxt, prefix);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNumberFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathNumberFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathNumberFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathOrderDocElems(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ long c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathOrderDocElems", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlXPathOrderDocElems(doc);
+ py_retval = libxml_longWrap((long) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathParseNCName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathParseNCName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathParseNCName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathParseName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathParseName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathParseName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathParserGetContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathContextPtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathParserGetContext", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->context;
+ py_retval = libxml_xmlXPathContextPtrWrap((xmlXPathContextPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathPopBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathPopBoolean", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathPopBoolean(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathPopNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathPopNumber", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathPopNumber(ctxt);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathPopString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathPopString", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathPopString(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathPositionFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathPositionFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathPositionFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisterAllFunctions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRegisterAllFunctions", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathRegisterAllFunctions(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisterNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * prefix;
+ xmlChar * ns_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlXPathRegisterNs", &pyobj_ctxt, &prefix, &ns_uri))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathRegisterNs(ctxt, prefix, ns_uri);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+#endif
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisteredFuncsCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRegisteredFuncsCleanup", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathRegisteredFuncsCleanup(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisteredNsCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRegisteredNsCleanup", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathRegisteredNsCleanup(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisteredVariablesCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRegisteredVariablesCleanup", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathRegisteredVariablesCleanup(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRoot(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRoot", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathRoot(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRoundFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathRoundFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathRoundFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSetContextDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathSetContextDoc", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ ctxt->doc = doc;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSetContextNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathSetContextNode", &pyobj_ctxt, &pyobj_node))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ ctxt->node = node;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathStartsWithFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathStartsWithFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathStartsWithFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathStringEvalNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathStringEvalNumber", &str))
+ return(NULL);
+
+ c_retval = xmlXPathStringEvalNumber(str);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathStringFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathStringFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathStringFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathStringLengthFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathStringLengthFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathStringLengthFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSubValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathSubValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSubValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSubstringAfterFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathSubstringAfterFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSubstringAfterFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSubstringBeforeFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathSubstringBeforeFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSubstringBeforeFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSubstringFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathSubstringFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSubstringFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSumFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathSumFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSumFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathTranslateFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathTranslateFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathTranslateFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathTrueFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathTrueFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathTrueFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathValueFlipSign(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathValueFlipSign", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathValueFlipSign(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathVariableLookup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlXPathVariableLookup", &pyobj_ctxt, &name))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathVariableLookup(ctxt, name);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathVariableLookupNS(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * name;
+ xmlChar * ns_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlXPathVariableLookupNS", &pyobj_ctxt, &name, &ns_uri))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathVariableLookupNS(ctxt, name, ns_uri);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPatherror(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * file;
+ int line;
+ int no;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozii:xmlXPatherror", &pyobj_ctxt, &file, &line, &no))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPatherror(ctxt, file, line, no);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrEval(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlChar * str;
+ xmlXPathContextPtr ctx;
+ PyObject *pyobj_ctx;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlXPtrEval", &str, &pyobj_ctx))
+ return(NULL);
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+
+ c_retval = xmlXPtrEval(str, ctx);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrEvalRangePredicate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPtrEvalRangePredicate", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPtrEvalRangePredicate(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewCollapsedRange(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr start;
+ PyObject *pyobj_start;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPtrNewCollapsedRange", &pyobj_start))
+ return(NULL);
+ start = (xmlNodePtr) PyxmlNode_Get(pyobj_start);
+
+ c_retval = xmlXPtrNewCollapsedRange(start);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathContextPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr here;
+ PyObject *pyobj_here;
+ xmlNodePtr origin;
+ PyObject *pyobj_origin;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlXPtrNewContext", &pyobj_doc, &pyobj_here, &pyobj_origin))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ here = (xmlNodePtr) PyxmlNode_Get(pyobj_here);
+ origin = (xmlNodePtr) PyxmlNode_Get(pyobj_origin);
+
+ c_retval = xmlXPtrNewContext(doc, here, origin);
+ py_retval = libxml_xmlXPathContextPtrWrap((xmlXPathContextPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewLocationSetNodes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr start;
+ PyObject *pyobj_start;
+ xmlNodePtr end;
+ PyObject *pyobj_end;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPtrNewLocationSetNodes", &pyobj_start, &pyobj_end))
+ return(NULL);
+ start = (xmlNodePtr) PyxmlNode_Get(pyobj_start);
+ end = (xmlNodePtr) PyxmlNode_Get(pyobj_end);
+
+ c_retval = xmlXPtrNewLocationSetNodes(start, end);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewRange(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr start;
+ PyObject *pyobj_start;
+ int startindex;
+ xmlNodePtr end;
+ PyObject *pyobj_end;
+ int endindex;
+
+ if (!PyArg_ParseTuple(args, (char *)"OiOi:xmlXPtrNewRange", &pyobj_start, &startindex, &pyobj_end, &endindex))
+ return(NULL);
+ start = (xmlNodePtr) PyxmlNode_Get(pyobj_start);
+ end = (xmlNodePtr) PyxmlNode_Get(pyobj_end);
+
+ c_retval = xmlXPtrNewRange(start, startindex, end, endindex);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewRangeNodes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr start;
+ PyObject *pyobj_start;
+ xmlNodePtr end;
+ PyObject *pyobj_end;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPtrNewRangeNodes", &pyobj_start, &pyobj_end))
+ return(NULL);
+ start = (xmlNodePtr) PyxmlNode_Get(pyobj_start);
+ end = (xmlNodePtr) PyxmlNode_Get(pyobj_end);
+
+ c_retval = xmlXPtrNewRangeNodes(start, end);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrRangeToFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPtrRangeToFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPtrRangeToFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
diff --git a/libxml2-2.9.10/python/libxml2-py.h b/libxml2-2.9.10/python/libxml2-py.h
new file mode 100644
index 0000000..9787b0d
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml2-py.h
@@ -0,0 +1,2063 @@
+/* Generated */
+
+#if defined(LIBXML_DOCB_ENABLED)
+PyObject * libxml_docbDefaultSAXHandlerInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DOCB_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlAutoCloseTag(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCreateFileParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCreateMemoryParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCreatePushParser(PyObject *self, PyObject *args);
+#endif
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReadDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReadFd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReadFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReadMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReset(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtUseOptions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlDefaultSAXHandlerInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlDocContentDumpFormatOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlDocContentDumpOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlDocDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlFreeParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlGetMetaEncoding(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlHandleOmittedElem(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlInitAutoClose(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlIsAutoClosed(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlIsBooleanAttr(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlIsScriptAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlNewDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlNewDocNoDtD(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlNewParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlNodeDumpFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlNodeDumpFileFormat(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlNodeDumpFormatOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlNodeDumpOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseCharRef(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+PyObject * libxml_htmlParseChunk(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseDocument(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlReadDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlReadFd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlReadFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlReadMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlSAXParseFile(PyObject *self, PyObject *args);
+#endif
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlSaveFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlSaveFileEnc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlSaveFileFormat(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlSetMetaEncoding(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+PyObject * libxml_namePop(PyObject *self, PyObject *args);
+PyObject * libxml_namePush(PyObject *self, PyObject *args);
+PyObject * libxml_nodePop(PyObject *self, PyObject *args);
+PyObject * libxml_nodePush(PyObject *self, PyObject *args);
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_valuePop(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogAdd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlACatalogDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogRemove(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogResolve(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogResolvePublic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogResolveSystem(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogResolveURI(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlAddChild(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddChildList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddDocEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddDtdEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddEncodingAlias(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddNextSibling(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlAddPrevSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+PyObject * libxml_xmlAddSibling(PyObject *self, PyObject *args);
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlBoolToText(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+PyObject * libxml_xmlBuildQName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlBuildRelativeURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlBuildURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlByteConsumed(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCanonicPath(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogAdd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogConvert(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlCatalogDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogGetPublic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogGetSystem(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogIsEmpty(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogRemove(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogResolve(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogResolvePublic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogResolveSystem(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogResolveURI(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogSetDebug(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlCharStrdup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCharStrndup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCheckFilename(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCheckLanguageID(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCheckUTF8(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCheckVersion(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCleanupCharEncodingHandlers(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCleanupEncodingAliases(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCleanupGlobals(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCleanupInputCallbacks(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlCleanupOutputCallbacks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlCleanupPredefinedEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlClearParserCtxt(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlConvertSGMLCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlCopyChar(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyCharMultiByte(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlCopyDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlCopyDtd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlCopyError(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyNamespace(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyNamespaceList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyNodeList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyPropList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateDocParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateEntityParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateFileParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateInputBuffer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateIntSubset(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateMemoryParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateOutputBuffer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreatePushParser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateURLParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReadDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReadFd(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReadFile(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReadMemory(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReset(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtResetPush(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtUseOptions(PyObject *self, PyObject *args);
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugCheckDocument(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpAttr(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpAttrList(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpDTD(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpDocument(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpDocumentHead(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpNodeList(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpOneNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+PyObject * libxml_xmlDebugMemory(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlDecodeEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlDefaultSAXHandlerInit(PyObject *self, PyObject *args);
+PyObject * libxml_xmlDelEncodingAlias(PyObject *self, PyObject *args);
+PyObject * libxml_xmlDictCleanup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlDocCopyNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlDocCopyNodeList(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlDocDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlDocFormatDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject * libxml_xmlDocGetRootElement(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+PyObject * libxml_xmlDocSetRootElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+PyObject * libxml_xmlDumpMemory(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlElemDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlEncodeEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlEncodeEntitiesReentrant(PyObject *self, PyObject *args);
+PyObject * libxml_xmlEncodeSpecialChars(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetCode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetDomain(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetFile(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetLevel(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetLine(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetMessage(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFileMatch(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlFirstElementChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlFreeCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlFreeDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeDtd(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeNodeList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeNs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeNsList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeParserInputBuffer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreePropList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetCompressMode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDocCompressMode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDocEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdAttrDesc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdElementDesc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdQAttrDesc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdQElementDesc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetEncodingAlias(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetID(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetIntSubset(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetLastChild(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetLastError(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetLineNo(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetNoNsProp(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlGetNodePath(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+PyObject * libxml_xmlGetNsProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetParameterEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetPredefinedEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetProp(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlHandleEntity(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlHasNsProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlHasProp(PyObject *self, PyObject *args);
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlIOFTPMatch(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlIOHTTPMatch(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+PyObject * libxml_xmlInitCharEncodingHandlers(PyObject *self, PyObject *args);
+PyObject * libxml_xmlInitGlobals(PyObject *self, PyObject *args);
+PyObject * libxml_xmlInitParser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlInitParserCtxt(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlInitializeCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlInitializeDict(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlInitializePredefinedEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlIsBaseChar(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsBlank(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsBlankNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsChar(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsCombining(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsDigit(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsExtender(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsID(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsIdeographic(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsLetter(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsMixedElement(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsPubidChar(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsRef(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsXHTML(PyObject *self, PyObject *args);
+PyObject * libxml_xmlKeepBlanksDefault(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlLastElementChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlLineNumbersDefault(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlLoadACatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlLoadCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlLoadCatalogs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlLoadSGMLSuperCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlLsCountNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlLsOneNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+PyObject * libxml_xmlMemoryUsed(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlNamespaceParseNCName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlNamespaceParseNSDef(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlNanoFTPCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlNanoFTPInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlNanoFTPProxy(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlNanoFTPScanProxy(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlNanoHTTPCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlNanoHTTPInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlNanoHTTPScanProxy(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+PyObject * libxml_xmlNewCDataBlock(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlNewCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlNewCharRef(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlNewChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject * libxml_xmlNewComment(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocComment(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNewDocFragment(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNewDocNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocNodeEatName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocPI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocProp(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNewDocRawNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNewDocText(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocTextLen(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDtd(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewEntity(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlNewGlobalNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlNewNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewNodeEatName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewNs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewNsProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewNsPropEatName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewPI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewParserCtxt(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlNewProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject * libxml_xmlNewReference(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewText(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNewTextChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNewTextLen(PyObject *self, PyObject *args);
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlNewTextReader(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlNewTextReaderFilename(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlNewValidCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+PyObject * libxml_xmlNextChar(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNextElementSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNodeAddContent(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeAddContentLen(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlNodeDumpOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject * libxml_xmlNodeGetBase(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetContent(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetLang(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetNs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetNsDefs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetSpacePreserve(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeIsText(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeListGetRawString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNodeListGetString(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlNodeSetBase(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+PyObject * libxml_xmlNodeSetContent(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeSetContentLen(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeSetLang(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeSetName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeSetSpacePreserve(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNormalizeURIPath(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNormalizeWindowsPath(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlOutputBufferGetContent(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlOutputBufferWrite(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlOutputBufferWriteString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject * libxml_xmlParseAttValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseAttributeListDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseCDSect(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlParseCatalogFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlParseCharData(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseCharRef(PyObject *self, PyObject *args);
+#if defined(LIBXML_PUSH_ENABLED)
+PyObject * libxml_xmlParseChunk(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_PUSH_ENABLED) */
+PyObject * libxml_xmlParseComment(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseContent(PyObject *self, PyObject *args);
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlParseDTD(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseDocTypeDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseDocument(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseElement(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseElementDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseEncName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseEncodingDecl(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseEndTag(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseEntity(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseEntityDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseEntityRef(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseExtParsedEnt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseExternalSubset(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseMarkupDecl(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseMisc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseName(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlParseNamespace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlParseNmtoken(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseNotationDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParsePEReference(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParsePI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParsePITarget(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParsePubidLiteral(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlParseQuotedString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlParseReference(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseSDDecl(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseStartTag(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseSystemLiteral(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseTextDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseURIRaw(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseURIReference(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseVersionInfo(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseVersionNum(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseXMLDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserGetDirectory(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserGetDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserGetIsValid(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserGetWellFormed(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserHandlePEReference(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlParserHandleReference(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlParserInputBufferGrow(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserInputBufferPush(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserInputBufferRead(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetLineNumbers(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetLoadSubset(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetPedantic(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetReplaceEntities(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetValidate(PyObject *self, PyObject *args);
+PyObject * libxml_xmlPathToURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlPedanticParserDefault(PyObject *self, PyObject *args);
+PyObject * libxml_xmlPopInput(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlPreviousElementSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlPrintURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlPythonCleanupParser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlReadDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlReadFd(PyObject *self, PyObject *args);
+PyObject * libxml_xmlReadFile(PyObject *self, PyObject *args);
+PyObject * libxml_xmlReadMemory(PyObject *self, PyObject *args);
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderForDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderForFd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderForFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderForMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewFd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewWalker(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderWalker(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlReconciliateNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlRecoverDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlRecoverFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlRecoverMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegFreeRegexp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegexpCompile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegexpExec(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegexpIsDeterminist(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegexpPrint(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+PyObject * libxml_xmlRegisterDefaultInputCallbacks(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlRegisterDefaultOutputCallbacks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlRegisterHTTPPostCallbacks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlRegisterXPathFunction(PyObject *self, PyObject *args);
+#endif
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGCleanupTypes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlRelaxNGDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlRelaxNGDumpTree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGFree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGFreeParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGInitTypes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGNewDocParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGNewMemParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGNewParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGNewValidCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGParse(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidateDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidateFullElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidatePopElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidatePushCData(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidatePushElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxParserSetFlag(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject * libxml_xmlRemoveID(PyObject *self, PyObject *args);
+PyObject * libxml_xmlRemoveProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlRemoveRef(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+PyObject * libxml_xmlReplaceNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+PyObject * libxml_xmlResetError(PyObject *self, PyObject *args);
+PyObject * libxml_xmlResetLastError(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlSAXDefaultVersion(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlSAXParseFile(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSaveFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSaveFileEnc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSaveFormatFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSaveFormatFileEnc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject * libxml_xmlSaveUri(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlScanName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaCleanupTypes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaCollapseString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSchemaDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaFree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaFreeParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaInitTypes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaIsValid(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaNewDocParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaNewMemParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaNewParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaNewValidCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaParse(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaSetValidOptions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidCtxtGetOptions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidCtxtGetParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidateDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidateFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidateOneElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidateSetFilename(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaWhiteSpaceReplace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject * libxml_xmlSearchNs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSearchNsByHref(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetCompressMode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetDocCompressMode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetEntityLoader(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetListDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetNs(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_xmlSetNsProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_xmlSetProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+PyObject * libxml_xmlSetTreeDoc(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlSetupParserForBuffer(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlShellPrintNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlShellPrintXPathError(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) */
+PyObject * libxml_xmlSkipBlankChars(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStopParser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrEqual(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrQEqual(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrcasecmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrcasestr(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrcat(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrchr(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrcmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrdup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStringDecodeEntities(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStringGetNodeList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStringLenDecodeEntities(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStringLenGetNodeList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrlen(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrncasecmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrncat(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrncatNew(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrncmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrndup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrstr(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrsub(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSubstituteEntitiesDefault(PyObject *self, PyObject *args);
+PyObject * libxml_xmlTextConcat(PyObject *self, PyObject *args);
+PyObject * libxml_xmlTextMerge(PyObject *self, PyObject *args);
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderAttributeCount(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderByteConsumed(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderClose(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstBaseUri(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstEncoding(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstLocalName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstNamespaceUri(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstPrefix(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstXmlLang(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstXmlVersion(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderCurrentDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderCurrentNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderDepth(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderExpand(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetAttributeNo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetAttributeNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetParserColumnNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetParserLineNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetParserProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetRemainder(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderHasAttributes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderHasValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderIsDefault(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderIsEmptyElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderIsNamespaceDecl(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderIsValid(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderLocatorBaseURI(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderLocatorLineNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderLookupNamespace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToAttributeNo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToAttributeNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToFirstAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToNextAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderNext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderNextSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderNodeType(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderNormalization(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderPreserve(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderQuoteChar(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderRead(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderReadAttributeValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+PyObject * libxml_xmlTextReaderReadInnerXml(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+PyObject * libxml_xmlTextReaderReadOuterXml(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderReadState(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderReadString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderRelaxNGSetSchema(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderRelaxNGValidate(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderRelaxNGValidateCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderSchemaValidate(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderSchemaValidateCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderSetParserProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderSetSchema(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderSetup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderStandalone(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+PyObject * libxml_xmlThrDefDefaultBufferSize(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefDoValidityCheckingDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefGetWarningsDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefIndentTreeOutput(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefKeepBlanksDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefLineNumbersDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefLoadExtDtdDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefParserDebugEntities(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefPedanticParserDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefSaveNoEmptyTags(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefSubstituteEntitiesDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefTreeIndentString(PyObject *self, PyObject *args);
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsAegeanNumbers(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsAlphabeticPresentationForms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArabic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArabicPresentationFormsA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArabicPresentationFormsB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArmenian(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArrows(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBasicLatin(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBengali(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBlock(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBlockElements(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBopomofo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBopomofoExtended(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBoxDrawing(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBraillePatterns(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBuhid(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsByzantineMusicalSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKCompatibility(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKCompatibilityForms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKCompatibilityIdeographs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKCompatibilityIdeographsSupplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKRadicalsSupplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKSymbolsandPunctuation(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKUnifiedIdeographs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKUnifiedIdeographsExtensionA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCat(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatC(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatCc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatCf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatCo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatCs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatL(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLl(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLm(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLu(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatM(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatMc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatMe(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatMn(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatN(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatNd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatNl(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatNo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatP(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPe(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPi(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatS(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatSc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatSk(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatSm(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatSo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatZ(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatZl(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatZp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatZs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCherokee(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCombiningDiacriticalMarks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCombiningDiacriticalMarksforSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCombiningHalfMarks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCombiningMarksforSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsControlPictures(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCurrencySymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCypriotSyllabary(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCyrillic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCyrillicSupplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsDeseret(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsDevanagari(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsDingbats(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsEnclosedAlphanumerics(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsEnclosedCJKLettersandMonths(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsEthiopic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGeneralPunctuation(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGeometricShapes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGeorgian(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGothic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGreek(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGreekExtended(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGreekandCoptic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGujarati(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGurmukhi(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHalfwidthandFullwidthForms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHangulCompatibilityJamo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHangulJamo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHangulSyllables(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHanunoo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHebrew(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHighPrivateUseSurrogates(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHighSurrogates(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHiragana(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsIPAExtensions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsIdeographicDescriptionCharacters(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKanbun(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKangxiRadicals(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKannada(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKatakana(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKatakanaPhoneticExtensions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKhmer(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKhmerSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLao(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLatin1Supplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLatinExtendedA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLatinExtendedAdditional(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLatinExtendedB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLetterlikeSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLimbu(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLinearBIdeograms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLinearBSyllabary(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLowSurrogates(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMalayalam(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMathematicalAlphanumericSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMathematicalOperators(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousMathematicalSymbolsA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousMathematicalSymbolsB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousSymbolsandArrows(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousTechnical(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMongolian(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMusicalSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMyanmar(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsNumberForms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOgham(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOldItalic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOpticalCharacterRecognition(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOriya(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOsmanya(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsPhoneticExtensions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsPrivateUse(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsPrivateUseArea(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsRunic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsShavian(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSinhala(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSmallFormVariants(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSpacingModifierLetters(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSpecials(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSuperscriptsandSubscripts(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementalArrowsA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementalArrowsB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementalMathematicalOperators(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementaryPrivateUseAreaA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementaryPrivateUseAreaB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSyriac(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTagalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTagbanwa(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTags(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTaiLe(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTaiXuanJingSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTamil(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTelugu(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsThaana(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsThai(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTibetan(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsUgaritic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsVariationSelectors(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsVariationSelectorsSupplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsYiRadicals(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsYiSyllables(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsYijingHexagramSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+PyObject * libxml_xmlURIEscape(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIEscapeStr(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetAuthority(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetFragment(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetOpaque(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetPath(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetPort(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetQuery(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetQueryRaw(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetScheme(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetServer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetUser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetAuthority(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetFragment(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetOpaque(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetPath(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetPort(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetQuery(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetQueryRaw(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetScheme(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetServer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetUser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIUnescapeString(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Charcmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Size(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strlen(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strloc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strndup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strpos(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strsize(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strsub(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUnlinkNode(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlUnsetNsProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlUnsetProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidCtxtNormalizeAttributeValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidNormalizeAttributeValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateDocument(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateDocumentFinal(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateDtd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateDtdFinal(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlValidateNCName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlValidateNMToken(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlValidateName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateNameValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateNamesValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateNmtokenValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateNmtokensValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlValidateNotationUse(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateOneAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateOneElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateOneNamespace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlValidatePopElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlValidatePushCData(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlValidatePushElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlValidateQName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateRoot(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlXIncludeProcess(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlXIncludeProcessFlags(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlXIncludeProcessTree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlXIncludeProcessTreeFlags(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathAddValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathBooleanFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastBooleanToNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastBooleanToString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastNodeToNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastNodeToString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastNumberToBoolean(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastNumberToString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastStringToBoolean(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastStringToNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCeilingFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCmpNodes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCompareValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathConcatFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathContainsFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathContextSetCache(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCountFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathDivValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathEqualValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathErr(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathEval(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathEvalExpr(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathEvalExpression(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathFalseFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathFloorFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathFreeContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathFreeParserContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetContextDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetContextNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetContextPosition(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetContextSize(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetFunctionURI(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathIdFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlXPathInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlXPathIsInf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlXPathIsNaN(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathIsNodeType(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathLangFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathLastFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathLocalNameFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathModValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathMultValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNamespaceURIFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewBoolean(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewCString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewFloat(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewNodeSet(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewParserContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewValueTree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextAncestor(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextAncestorOrSelf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextDescendant(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextDescendantOrSelf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextFollowing(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextFollowingSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextNamespace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextParent(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextPreceding(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextPrecedingSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextSelf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNodeEval(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNodeSetFreeNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNormalizeFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNotEqualValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNotFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNsLookup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNumberFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathOrderDocElems(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathParseNCName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathParseName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathParserGetContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathPopBoolean(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathPopNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathPopString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathPositionFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisterAllFunctions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisterNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisterVariable(PyObject *self, PyObject *args);
+#endif
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisteredFuncsCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisteredNsCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisteredVariablesCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRoot(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRoundFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSetContextDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSetContextNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathStartsWithFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathStringEvalNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathStringFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathStringLengthFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSubValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSubstringAfterFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSubstringBeforeFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSubstringFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSumFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathTranslateFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathTrueFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathValueFlipSign(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathVariableLookup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathVariableLookupNS(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPatherror(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrEval(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrEvalRangePredicate(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewCollapsedRange(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewLocationSetNodes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewRange(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewRangeNodes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrRangeToFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
diff --git a/libxml2-2.9.10/python/libxml2-python-api.xml b/libxml2-2.9.10/python/libxml2-python-api.xml
new file mode 100644
index 0000000..032b44b
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml2-python-api.xml
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<api name='libxml2-python'>
+ <symbols>
+ <function name='xmlRegisterXPathFunction' file='python'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a Python written function to the XPath interpreter</info>
+ <return type='int' info="1 in case of success, 0 or -1 in case of error"/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the xpathContext'/>
+ <arg name='name' type='xmlChar *' info='the function name'/>
+ <arg name='ns_uri' type='xmlChar *' info='the namespace or NULL'/>
+ <arg name='f' type='pythonObject' info='the python function'/>
+ </function>
+ <function name='xmlXPathRegisterVariable' file='python'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a variable with the XPath context</info>
+ <return type='int' info="1 in case of success, 0 or -1 in case of error"/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the xpathContext'/>
+ <arg name='name' type='xmlChar *' info='the variable name'/>
+ <arg name='ns_uri' type='xmlChar *' info='the namespace or NULL'/>
+ <arg name='value' type='pythonObject' info='the value'/>
+ </function>
+ <function name='xmlNewNode' file='python'>
+ <info>Create a new Node</info>
+ <return type='xmlNodePtr' info="A new element node"/>
+ <arg name='name' type='xmlChar *' info='the node name'/>
+ </function>
+ <function name='xmlCreatePushParser' file='python'>
+ <info>Create a progressive XML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.</info>
+ <return type='xmlParserCtxtPtr' info="the parser context or None in case of error"/>
+ <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
+ <arg name='chunk' type='xmlChar *' info='the initial data'/>
+ <arg name='size' type='int' info='the size of the initial data'/>
+ <arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
+ </function>
+ <function name='htmlCreatePushParser' file='python'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Create a progressive HTML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.</info>
+ <return type='xmlParserCtxtPtr' info="the parser context or None in case of error"/>
+ <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
+ <arg name='chunk' type='xmlChar *' info='the initial data'/>
+ <arg name='size' type='int' info='the size of the initial data'/>
+ <arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
+ </function>
+ <function name='xmlSAXParseFile' file='python'>
+ <info>Interface to parse an XML file or resource pointed by an URI to build an event flow to the SAX object</info>
+ <return type='void'/>
+ <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
+ <arg name='URI' type='xmlChar *' info='The URI of the resource'/>
+ <arg name='recover' type='int' info='allow recovery in case of error'/>
+ </function>
+ <function name='htmlSAXParseFile' file='python'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Interface to parse an HTML file or resource pointed by an URI to build an event flow to the SAX object</info>
+ <return type='void'/>
+ <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
+ <arg name='URI' type='xmlChar *' info='The URI of the resource'/>
+ <arg name='encoding' type='const char *' info='encoding or None'/>
+ </function>
+ <function name='xmlCreateOutputBuffer' file='python'>
+ <info>Create a libxml2 output buffer from a Python file</info>
+ <return type='xmlOutputBufferPtr' info="the output buffer"/>
+ <arg name='file' type='pythonObject' info='the Python file'/>
+ <arg name='encoding' type='xmlChar *' info='an optionnal encoding'/>
+ </function>
+ <function name='xmlCreateInputBuffer' file='python'>
+ <info>Create a libxml2 input buffer from a Python file</info>
+ <return type='xmlParserInputBufferPtr' info="the input buffer"/>
+ <arg name='file' type='pythonObject' info='the Python file'/>
+ <arg name='encoding' type='xmlChar *' info='an optionnal encoding'/>
+ </function>
+ <function name='xmlSetEntityLoader' file='python'>
+ <info>Set the entity resolver as a python function</info>
+ <return type='int' info="0 in case of success, -1 for error"/>
+ <arg name='resolver' type='pythonObject' info='the Python function'/>
+ </function>
+ <!-- xmlParserCtxtPtr accessors -->
+ <function name='xmlParserGetDoc' file='python_accessor'>
+ <info>Get the document tree from a parser context.</info>
+ <return type='xmlDocPtr' info="the document tree" field="myDoc"/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ </function>
+ <function name='xmlParserGetWellFormed' file='python_accessor'>
+ <info>Get the well formed information from a parser context.</info>
+ <return type='int' info="the wellFormed field" field="wellFormed"/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ </function>
+ <function name='xmlParserGetIsValid' file='python_accessor'>
+ <info>Get the validity information from a parser context.</info>
+ <return type='int' info="the valid field" field="valid"/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ </function>
+ <function name='xmlParserSetValidate' file='python_accessor'>
+ <info>Switch the parser to validation mode.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='validate' type='int' info='1 to activate validation'/>
+ </function>
+ <function name='xmlParserSetReplaceEntities' file='python_accessor'>
+ <info>Switch the parser to replace entities.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='replaceEntities' type='int' info='1 to replace entities'/>
+ </function>
+ <function name='xmlParserSetPedantic' file='python_accessor'>
+ <info>Switch the parser to be pedantic.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='pedantic' type='int' info='1 to run in pedantic mode'/>
+ </function>
+ <function name='xmlParserSetLoadSubset' file='python_accessor'>
+ <info>Switch the parser to load the DTD without validating.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='loadsubset' type='int' info='1 to load the DTD'/>
+ </function>
+ <function name='xmlParserSetLineNumbers' file='python_accessor'>
+ <info>Switch on the generation of line number for elements nodes.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='linenumbers' type='int' info='1 to save line numbers'/>
+ </function>
+ <function name='xmlDebugMemory' file='python'>
+ <info>Switch on the generation of line number for elements nodes. Also returns the number of bytes allocated and not freed by libxml2 since memory debugging was switched on.</info>
+ <return type='int' info="returns the number of bytes allocated and not freed"/>
+ <arg name='activate' type='int' info='1 switch on memory debugging 0 switch it off'/>
+ </function>
+ <function name='xmlDumpMemory' file='python'>
+ <info>dump the memory allocated in the file .memdump</info>
+ <return type='void'/>
+ </function>
+ <!-- xmlNsPtr accessors -->
+ <function name='xmlNodeGetNs' file='python_accessor'>
+ <info>Get the namespace of a node</info>
+ <return type='xmlNsPtr' info="The namespace or None"/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ </function>
+ <function name='xmlNodeGetNsDefs' file='python_accessor'>
+ <info>Get the namespace of a node</info>
+ <return type='xmlNsPtr' info="The namespace or None"/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ </function>
+ <!-- xmlXPathContextPtr accessors -->
+ <function name='xmlXPathParserGetContext' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the xpathContext from an xpathParserContext</info>
+ <return type='xmlXPathContextPtr' info="The XPath context" field="context"/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath parser context'/>
+ </function>
+ <function name='xmlXPathGetContextDoc' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the doc from an xpathContext</info>
+ <return type='xmlDocPtr' info="The doc context" field="doc"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathGetContextNode' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current node from an xpathContext</info>
+ <return type='xmlNodePtr' info="The node context" field="node"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathSetContextDoc' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Set the doc of an xpathContext</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name="doc" type='xmlDocPtr' info="The doc context"/>
+ </function>
+ <function name='xmlXPathSetContextNode' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Set the current node of an xpathContext</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name="node" type='xmlNodePtr' info="The node context"/>
+ </function>
+ <function name='xmlXPathGetContextPosition' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current node from an xpathContext</info>
+ <return type='int' info="The node context" field="proximityPosition"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathGetContextSize' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current node from an xpathContext</info>
+ <return type='int' info="The node context" field="contextSize"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathGetFunction' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current function name xpathContext</info>
+ <return type='const xmlChar *' info="The function name" field="function"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathGetFunctionURI' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current function name URI xpathContext</info>
+ <return type='const xmlChar *' info="The function name URI" field="functionURI"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <!-- xmlURIPtr accessors -->
+ <function name='xmlURIGetScheme' file='python_accessor'>
+ <info>Get the scheme part from an URI</info>
+ <return type='const char *' info="The URI scheme" field="scheme"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetScheme' file='python_accessor'>
+ <info>Set the scheme part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='scheme' type='char *' info='The URI scheme part'/>
+ </function>
+ <function name='xmlURIGetOpaque' file='python_accessor'>
+ <info>Get the opaque part from an URI</info>
+ <return type='const char *' info="The URI opaque" field="opaque"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetOpaque' file='python_accessor'>
+ <info>Set the opaque part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='opaque' type='char *' info='The URI opaque part'/>
+ </function>
+ <function name='xmlURIGetAuthority' file='python_accessor'>
+ <info>Get the authority part from an URI</info>
+ <return type='const char *' info="The URI authority" field="authority"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetAuthority' file='python_accessor'>
+ <info>Set the authority part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='authority' type='char *' info='The URI authority part'/>
+ </function>
+ <function name='xmlURIGetServer' file='python_accessor'>
+ <info>Get the server part from an URI</info>
+ <return type='const char *' info="The URI server" field="server"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetServer' file='python_accessor'>
+ <info>Set the server part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='server' type='char *' info='The URI server part'/>
+ </function>
+ <function name='xmlURIGetUser' file='python_accessor'>
+ <info>Get the user part from an URI</info>
+ <return type='const char *' info="The URI user" field="user"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetUser' file='python_accessor'>
+ <info>Set the user part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='user' type='char *' info='The URI user part'/>
+ </function>
+ <function name='xmlURIGetPath' file='python_accessor'>
+ <info>Get the path part from an URI</info>
+ <return type='const char *' info="The URI path" field="path"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetPath' file='python_accessor'>
+ <info>Set the path part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='path' type='char *' info='The URI path part'/>
+ </function>
+ <function name='xmlURIGetQuery' file='python_accessor'>
+ <info>Get the query part from an URI</info>
+ <return type='const char *' info="The URI query" field="query"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetQuery' file='python_accessor'>
+ <info>Set the query part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='query' type='char *' info='The URI query part'/>
+ </function>
+ <function name='xmlURIGetQueryRaw' file='python_accessor'>
+ <info>Get the raw query part from an URI (i.e. the unescaped form).</info>
+ <return type='const char *' info="The URI query" field="query_raw"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetQueryRaw' file='python_accessor'>
+ <info>Set the raw query part of an URI (i.e. the unescaped form).</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='query_raw' type='char *' info='The raw URI query part'/>
+ </function>
+ <function name='xmlURIGetFragment' file='python_accessor'>
+ <info>Get the fragment part from an URI</info>
+ <return type='const char *' info="The URI fragment" field="fragment"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetFragment' file='python_accessor'>
+ <info>Set the fragment part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='fragment' type='char *' info='The URI fragment part'/>
+ </function>
+ <function name='xmlURIGetPort' file='python_accessor'>
+ <info>Get the port part from an URI</info>
+ <return type='int' info="The URI port" field="port"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetPort' file='python_accessor'>
+ <info>Set the port part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='port' type='int' info='The URI port part'/>
+ </function>
+ <!-- xmlErrorPtr accessors -->
+ <function name='xmlErrorGetDomain' file='python_accessor'>
+ <info>What part of the library raised this error</info>
+ <return type='int' info="The error domain" field="domain"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetCode' file='python_accessor'>
+ <info>The error code, e.g. an xmlParserError</info>
+ <return type='int' info="The error code" field="code"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetMessage' file='python_accessor'>
+ <info>human-readable informative error message</info>
+ <return type='const char *' info="The error message" field="message"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetLevel' file='python_accessor'>
+ <info>how consequent is the error</info>
+ <return type='int' info="The error level" field="level"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetFile' file='python_accessor'>
+ <info>the filename</info>
+ <return type='const char *' info="The error file" field="file"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetLine' file='python_accessor'>
+ <info>the line number if available</info>
+ <return type='int' info="The error line" field="line"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlPythonCleanupParser' file='python'>
+ <info>Cleanup function for the XML library. It tries to reclaim all parsing related global memory allocated for the library processing. It doesn't deallocate any document related memory. Calling this function should not prevent reusing the library but one should call xmlCleanupParser() only when the process has finished using the library or XML document built with it.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlMemoryUsed' file='python'>
+ <info>Returns the total amount of memory allocated by libxml2</info>
+ <return type='int' info='number of bytes allocated'/>
+ </function>
+ </symbols>
+</api>
diff --git a/libxml2-2.9.10/python/libxml2.py b/libxml2-2.9.10/python/libxml2.py
new file mode 100644
index 0000000..081a892
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml2.py
@@ -0,0 +1,9327 @@
+import libxml2mod
+import types
+import sys
+
+# The root of all libxml2 errors.
+class libxmlError(Exception): pass
+
+# Type of the wrapper class for the C objects wrappers
+def checkWrapper(obj):
+ try:
+ n = type(_obj).__name__
+ if n != 'PyCObject' and n != 'PyCapsule':
+ return 1
+ except:
+ return 0
+ return 0
+
+#
+# id() is sometimes negative ...
+#
+def pos_id(o):
+ i = id(o)
+ if (i < 0):
+ return (sys.maxsize - i)
+ return i
+
+#
+# Errors raised by the wrappers when some tree handling failed.
+#
+class treeError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class parserError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class uriError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class xpathError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class ioWrapper:
+ def __init__(self, _obj):
+ self.__io = _obj
+ self._o = None
+
+ def io_close(self):
+ if self.__io == None:
+ return(-1)
+ self.__io.close()
+ self.__io = None
+ return(0)
+
+ def io_flush(self):
+ if self.__io == None:
+ return(-1)
+ self.__io.flush()
+ return(0)
+
+ def io_read(self, len = -1):
+ if self.__io == None:
+ return(-1)
+ try:
+ if len < 0:
+ ret = self.__io.read()
+ else:
+ ret = self.__io.read(len)
+ except Exception:
+ import sys
+ e = sys.exc_info()[1]
+ print("failed to read from Python:", type(e))
+ print("on IO:", self.__io)
+ self.__io == None
+ return(-1)
+
+ return(ret)
+
+ def io_write(self, str, len = -1):
+ if self.__io == None:
+ return(-1)
+ if len < 0:
+ return(self.__io.write(str))
+ return(self.__io.write(str, len))
+
+class ioReadWrapper(ioWrapper):
+ def __init__(self, _obj, enc = ""):
+ ioWrapper.__init__(self, _obj)
+ self._o = libxml2mod.xmlCreateInputBuffer(self, enc)
+
+ def __del__(self):
+ print("__del__")
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+ def close(self):
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+class ioWriteWrapper(ioWrapper):
+ def __init__(self, _obj, enc = ""):
+# print "ioWriteWrapper.__init__", _obj
+ if type(_obj) == type(''):
+ print("write io from a string")
+ self.o = None
+ elif type(_obj).__name__ == 'PyCapsule':
+ file = libxml2mod.outputBufferGetPythonFile(_obj)
+ if file != None:
+ ioWrapper.__init__(self, file)
+ else:
+ ioWrapper.__init__(self, _obj)
+ self._o = _obj
+# elif type(_obj) == types.InstanceType:
+# print(("write io from instance of %s" % (_obj.__class__)))
+# ioWrapper.__init__(self, _obj)
+# self._o = libxml2mod.xmlCreateOutputBuffer(self, enc)
+ else:
+ file = libxml2mod.outputBufferGetPythonFile(_obj)
+ if file != None:
+ ioWrapper.__init__(self, file)
+ else:
+ ioWrapper.__init__(self, _obj)
+ self._o = _obj
+
+ def __del__(self):
+# print "__del__"
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+ def flush(self):
+ self.io_flush()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+ def close(self):
+ self.io_flush()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+#
+# Example of a class to handle SAX events
+#
+class SAXCallback:
+ """Base class for SAX handlers"""
+ def startDocument(self):
+ """called at the start of the document"""
+ pass
+
+ def endDocument(self):
+ """called at the end of the document"""
+ pass
+
+ def startElement(self, tag, attrs):
+ """called at the start of every element, tag is the name of
+ the element, attrs is a dictionary of the element's attributes"""
+ pass
+
+ def endElement(self, tag):
+ """called at the start of every element, tag is the name of
+ the element"""
+ pass
+
+ def characters(self, data):
+ """called when character data have been read, data is the string
+ containing the data, multiple consecutive characters() callback
+ are possible."""
+ pass
+
+ def cdataBlock(self, data):
+ """called when CDATA section have been read, data is the string
+ containing the data, multiple consecutive cdataBlock() callback
+ are possible."""
+ pass
+
+ def reference(self, name):
+ """called when an entity reference has been found"""
+ pass
+
+ def ignorableWhitespace(self, data):
+ """called when potentially ignorable white spaces have been found"""
+ pass
+
+ def processingInstruction(self, target, data):
+ """called when a PI has been found, target contains the PI name and
+ data is the associated data in the PI"""
+ pass
+
+ def comment(self, content):
+ """called when a comment has been found, content contains the comment"""
+ pass
+
+ def externalSubset(self, name, externalID, systemID):
+ """called when a DOCTYPE declaration has been found, name is the
+ DTD name and externalID, systemID are the DTD public and system
+ identifier for that DTd if available"""
+ pass
+
+ def internalSubset(self, name, externalID, systemID):
+ """called when a DOCTYPE declaration has been found, name is the
+ DTD name and externalID, systemID are the DTD public and system
+ identifier for that DTD if available"""
+ pass
+
+ def entityDecl(self, name, type, externalID, systemID, content):
+ """called when an ENTITY declaration has been found, name is the
+ entity name and externalID, systemID are the entity public and
+ system identifier for that entity if available, type indicates
+ the entity type, and content reports it's string content"""
+ pass
+
+ def notationDecl(self, name, externalID, systemID):
+ """called when an NOTATION declaration has been found, name is the
+ notation name and externalID, systemID are the notation public and
+ system identifier for that notation if available"""
+ pass
+
+ def attributeDecl(self, elem, name, type, defi, defaultValue, nameList):
+ """called when an ATTRIBUTE definition has been found"""
+ pass
+
+ def elementDecl(self, name, type, content):
+ """called when an ELEMENT definition has been found"""
+ pass
+
+ def entityDecl(self, name, publicId, systemID, notationName):
+ """called when an unparsed ENTITY declaration has been found,
+ name is the entity name and publicId,, systemID are the entity
+ public and system identifier for that entity if available,
+ and notationName indicate the associated NOTATION"""
+ pass
+
+ def warning(self, msg):
+ #print msg
+ pass
+
+ def error(self, msg):
+ raise parserError(msg)
+
+ def fatalError(self, msg):
+ raise parserError(msg)
+
+#
+# This class is the ancestor of all the Node classes. It provides
+# the basic functionalities shared by all nodes (and handle
+# gracefylly the exception), like name, navigation in the tree,
+# doc reference, content access and serializing to a string or URI
+#
+class xmlCore:
+ def __init__(self, _obj=None):
+ if _obj != None:
+ self._o = _obj;
+ return
+ self._o = None
+
+ def __eq__(self, other):
+ if other == None:
+ return False
+ ret = libxml2mod.compareNodesEqual(self._o, other._o)
+ if ret == None:
+ return False
+ return ret == True
+ def __ne__(self, other):
+ if other == None:
+ return True
+ ret = libxml2mod.compareNodesEqual(self._o, other._o)
+ return not ret
+ def __hash__(self):
+ ret = libxml2mod.nodeHash(self._o)
+ return ret
+
+ def __str__(self):
+ return self.serialize()
+ def get_parent(self):
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_children(self):
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_last(self):
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_next(self):
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_properties(self):
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ def get_prev(self):
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_content(self):
+ return libxml2mod.xmlNodeGetContent(self._o)
+ getContent = get_content # why is this duplicate naming needed ?
+ def get_name(self):
+ return libxml2mod.name(self._o)
+ def get_type(self):
+ return libxml2mod.type(self._o)
+ def get_doc(self):
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ if self.type in ["document_xml", "document_html"]:
+ return xmlDoc(_obj=self._o)
+ else:
+ return None
+ return xmlDoc(_obj=ret)
+ #
+ # Those are common attributes to nearly all type of nodes
+ # defined as python2 properties
+ #
+ import sys
+ if float(sys.version[0:3]) < 2.2:
+ def __getattr__(self, attr):
+ if attr == "parent":
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "properties":
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ elif attr == "children":
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "last":
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "next":
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "prev":
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "content":
+ return libxml2mod.xmlNodeGetContent(self._o)
+ elif attr == "name":
+ return libxml2mod.name(self._o)
+ elif attr == "type":
+ return libxml2mod.type(self._o)
+ elif attr == "doc":
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ if self.type == "document_xml" or self.type == "document_html":
+ return xmlDoc(_obj=self._o)
+ else:
+ return None
+ return xmlDoc(_obj=ret)
+ raise AttributeError(attr)
+ else:
+ parent = property(get_parent, None, None, "Parent node")
+ children = property(get_children, None, None, "First child node")
+ last = property(get_last, None, None, "Last sibling node")
+ next = property(get_next, None, None, "Next sibling node")
+ prev = property(get_prev, None, None, "Previous sibling node")
+ properties = property(get_properties, None, None, "List of properies")
+ content = property(get_content, None, None, "Content of this node")
+ name = property(get_name, None, None, "Node name")
+ type = property(get_type, None, None, "Node type")
+ doc = property(get_doc, None, None, "The document this node belongs to")
+
+ #
+ # Serialization routines, the optional arguments have the following
+ # meaning:
+ # encoding: string to ask saving in a specific encoding
+ # indent: if 1 the serializer is asked to indent the output
+ #
+ def serialize(self, encoding = None, format = 0):
+ return libxml2mod.serializeNode(self._o, encoding, format)
+ def saveTo(self, file, encoding = None, format = 0):
+ return libxml2mod.saveNodeTo(self._o, file, encoding, format)
+
+ #
+ # Canonicalization routines:
+ #
+ # nodes: the node set (tuple or list) to be included in the
+ # canonized image or None if all document nodes should be
+ # included.
+ # exclusive: the exclusive flag (0 - non-exclusive
+ # canonicalization; otherwise - exclusive canonicalization)
+ # prefixes: the list of inclusive namespace prefixes (strings),
+ # or None if there is no inclusive namespaces (only for
+ # exclusive canonicalization, ignored otherwise)
+ # with_comments: include comments in the result (!=0) or not
+ # (==0)
+ def c14nMemory(self,
+ nodes=None,
+ exclusive=0,
+ prefixes=None,
+ with_comments=0):
+ if nodes:
+ nodes = [n._o for n in nodes]
+ return libxml2mod.xmlC14NDocDumpMemory(
+ self.get_doc()._o,
+ nodes,
+ exclusive != 0,
+ prefixes,
+ with_comments != 0)
+ def c14nSaveTo(self,
+ file,
+ nodes=None,
+ exclusive=0,
+ prefixes=None,
+ with_comments=0):
+ if nodes:
+ nodes = [n._o for n in nodes]
+ return libxml2mod.xmlC14NDocSaveTo(
+ self.get_doc()._o,
+ nodes,
+ exclusive != 0,
+ prefixes,
+ with_comments != 0,
+ file)
+
+ #
+ # Selecting nodes using XPath, a bit slow because the context
+ # is allocated/freed every time but convenient.
+ #
+ def xpathEval(self, expr):
+ doc = self.doc
+ if doc == None:
+ return None
+ ctxt = doc.xpathNewContext()
+ ctxt.setContextNode(self)
+ res = ctxt.xpathEval(expr)
+ ctxt.xpathFreeContext()
+ return res
+
+# #
+# # Selecting nodes using XPath, faster because the context
+# # is allocated just once per xmlDoc.
+# #
+# # Removed: DV memleaks c.f. #126735
+# #
+# def xpathEval2(self, expr):
+# doc = self.doc
+# if doc == None:
+# return None
+# try:
+# doc._ctxt.setContextNode(self)
+# except:
+# doc._ctxt = doc.xpathNewContext()
+# doc._ctxt.setContextNode(self)
+# res = doc._ctxt.xpathEval(expr)
+# return res
+ def xpathEval2(self, expr):
+ return self.xpathEval(expr)
+
+ # Remove namespaces
+ def removeNsDef(self, href):
+ """
+ Remove a namespace definition from a node. If href is None,
+ remove all of the ns definitions on that node. The removed
+ namespaces are returned as a linked list.
+
+ Note: If any child nodes referred to the removed namespaces,
+ they will be left with dangling links. You should call
+ renconciliateNs() to fix those pointers.
+
+ Note: This method does not free memory taken by the ns
+ definitions. You will need to free it manually with the
+ freeNsList() method on the returns xmlNs object.
+ """
+
+ ret = libxml2mod.xmlNodeRemoveNsDef(self._o, href)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ # support for python2 iterators
+ def walk_depth_first(self):
+ return xmlCoreDepthFirstItertor(self)
+ def walk_breadth_first(self):
+ return xmlCoreBreadthFirstItertor(self)
+ __iter__ = walk_depth_first
+
+ def free(self):
+ try:
+ self.doc._ctxt.xpathFreeContext()
+ except:
+ pass
+ libxml2mod.xmlFreeDoc(self._o)
+
+
+#
+# implements the depth-first iterator for libxml2 DOM tree
+#
+class xmlCoreDepthFirstItertor:
+ def __init__(self, node):
+ self.node = node
+ self.parents = []
+ def __iter__(self):
+ return self
+ def __next__(self):
+ while 1:
+ if self.node:
+ ret = self.node
+ self.parents.append(self.node)
+ self.node = self.node.children
+ return ret
+ try:
+ parent = self.parents.pop()
+ except IndexError:
+ raise StopIteration
+ self.node = parent.next
+ next = __next__
+
+#
+# implements the breadth-first iterator for libxml2 DOM tree
+#
+class xmlCoreBreadthFirstItertor:
+ def __init__(self, node):
+ self.node = node
+ self.parents = []
+ def __iter__(self):
+ return self
+ def __next__(self):
+ while 1:
+ if self.node:
+ ret = self.node
+ self.parents.append(self.node)
+ self.node = self.node.next
+ return ret
+ try:
+ parent = self.parents.pop()
+ except IndexError:
+ raise StopIteration
+ self.node = parent.children
+ next = __next__
+
+#
+# converters to present a nicer view of the XPath returns
+#
+def nodeWrap(o):
+ # TODO try to cast to the most appropriate node class
+ name = libxml2mod.type(o)
+ if name == "element" or name == "text":
+ return xmlNode(_obj=o)
+ if name == "attribute":
+ return xmlAttr(_obj=o)
+ if name[0:8] == "document":
+ return xmlDoc(_obj=o)
+ if name == "namespace":
+ return xmlNs(_obj=o)
+ if name == "elem_decl":
+ return xmlElement(_obj=o)
+ if name == "attribute_decl":
+ return xmlAttribute(_obj=o)
+ if name == "entity_decl":
+ return xmlEntity(_obj=o)
+ if name == "dtd":
+ return xmlDtd(_obj=o)
+ return xmlNode(_obj=o)
+
+def xpathObjectRet(o):
+ otype = type(o)
+ if otype == type([]):
+ ret = list(map(xpathObjectRet, o))
+ return ret
+ elif otype == type(()):
+ ret = list(map(xpathObjectRet, o))
+ return tuple(ret)
+ elif otype == type('') or otype == type(0) or otype == type(0.0):
+ return o
+ else:
+ return nodeWrap(o)
+
+#
+# register an XPath function
+#
+def registerXPathFunction(ctxt, name, ns_uri, f):
+ ret = libxml2mod.xmlRegisterXPathFunction(ctxt, name, ns_uri, f)
+
+#
+# For the xmlTextReader parser configuration
+#
+PARSER_LOADDTD=1
+PARSER_DEFAULTATTRS=2
+PARSER_VALIDATE=3
+PARSER_SUBST_ENTITIES=4
+
+#
+# For the error callback severities
+#
+PARSER_SEVERITY_VALIDITY_WARNING=1
+PARSER_SEVERITY_VALIDITY_ERROR=2
+PARSER_SEVERITY_WARNING=3
+PARSER_SEVERITY_ERROR=4
+
+#
+# register the libxml2 error handler
+#
+def registerErrorHandler(f, ctx):
+ """Register a Python written function to for error reporting.
+ The function is called back as f(ctx, error). """
+ import sys
+ if 'libxslt' not in sys.modules:
+ # normal behaviour when libxslt is not imported
+ ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)
+ else:
+ # when libxslt is already imported, one must
+ # use libxst's error handler instead
+ import libxslt
+ ret = libxslt.registerErrorHandler(f,ctx)
+ return ret
+
+class parserCtxtCore:
+
+ def __init__(self, _obj=None):
+ if _obj != None:
+ self._o = _obj;
+ return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserCtxt(self._o)
+ self._o = None
+
+ def setErrorHandler(self,f,arg):
+ """Register an error handler that will be called back as
+ f(arg,msg,severity,reserved).
+
+ @reserved is currently always None."""
+ libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg)
+
+ def getErrorHandler(self):
+ """Return (f,arg) as previously registered with setErrorHandler
+ or (None,None)."""
+ return libxml2mod.xmlParserCtxtGetErrorHandler(self._o)
+
+ def addLocalCatalog(self, uri):
+ """Register a local catalog with the parser"""
+ return libxml2mod.addLocalCatalog(self._o, uri)
+
+
+class ValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for DTD validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+class SchemaValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for Schema validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlSchemaSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+class relaxNgValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for RelaxNG validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+def _xmlTextReaderErrorFunc(xxx_todo_changeme,msg,severity,locator):
+ """Intermediate callback to wrap the locator"""
+ (f,arg) = xxx_todo_changeme
+ return f(arg,msg,severity,xmlTextReaderLocator(locator))
+
+class xmlTextReaderCore:
+
+ def __init__(self, _obj=None):
+ self.input = None
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeTextReader(self._o)
+ self._o = None
+
+ def SetErrorHandler(self,f,arg):
+ """Register an error handler that will be called back as
+ f(arg,msg,severity,locator)."""
+ if f is None:
+ libxml2mod.xmlTextReaderSetErrorHandler(\
+ self._o,None,None)
+ else:
+ libxml2mod.xmlTextReaderSetErrorHandler(\
+ self._o,_xmlTextReaderErrorFunc,(f,arg))
+
+ def GetErrorHandler(self):
+ """Return (f,arg) as previously registered with setErrorHandler
+ or (None,None)."""
+ f,arg = libxml2mod.xmlTextReaderGetErrorHandler(self._o)
+ if f is None:
+ return None,None
+ else:
+ # assert f is _xmlTextReaderErrorFunc
+ return arg
+
+#
+# The cleanup now goes though a wrapper in libxml.c
+#
+def cleanupParser():
+ libxml2mod.xmlPythonCleanupParser()
+
+#
+# The interface to xmlRegisterInputCallbacks.
+# Since this API does not allow to pass a data object along with
+# match/open callbacks, it is necessary to maintain a list of all
+# Python callbacks.
+#
+__input_callbacks = []
+def registerInputCallback(func):
+ def findOpenCallback(URI):
+ for cb in reversed(__input_callbacks):
+ o = cb(URI)
+ if o is not None:
+ return o
+ libxml2mod.xmlRegisterInputCallback(findOpenCallback)
+ __input_callbacks.append(func)
+
+def popInputCallbacks():
+ # First pop python-level callbacks, when no more available - start
+ # popping built-in ones.
+ if len(__input_callbacks) > 0:
+ __input_callbacks.pop()
+ if len(__input_callbacks) == 0:
+ libxml2mod.xmlUnregisterInputCallback()
+
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+#
+# Everything before this line comes from libxml.py
+# Everything after this line is automatically generated
+#
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
+#
+# Functions from module HTMLparser
+#
+
+def htmlCreateMemoryParserCtxt(buffer, size):
+ """Create a parser context for an HTML in-memory document. """
+ ret = libxml2mod.htmlCreateMemoryParserCtxt(buffer, size)
+ if ret is None:raise parserError('htmlCreateMemoryParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlHandleOmittedElem(val):
+ """Set and return the previous value for handling HTML omitted
+ tags. """
+ ret = libxml2mod.htmlHandleOmittedElem(val)
+ return ret
+
+def htmlIsScriptAttribute(name):
+ """Check if an attribute is of content type Script """
+ ret = libxml2mod.htmlIsScriptAttribute(name)
+ return ret
+
+def htmlNewParserCtxt():
+ """Allocate and initialize a new parser context. """
+ ret = libxml2mod.htmlNewParserCtxt()
+ if ret is None:raise parserError('htmlNewParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlParseDoc(cur, encoding):
+ """parse an HTML in-memory document and build a tree. """
+ ret = libxml2mod.htmlParseDoc(cur, encoding)
+ if ret is None:raise parserError('htmlParseDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlParseFile(filename, encoding):
+ """parse an HTML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. """
+ ret = libxml2mod.htmlParseFile(filename, encoding)
+ if ret is None:raise parserError('htmlParseFile() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadDoc(cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.htmlReadDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadFd(fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. """
+ ret = libxml2mod.htmlReadFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadFd() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. """
+ ret = libxml2mod.htmlReadFile(filename, encoding, options)
+ if ret is None:raise treeError('htmlReadFile() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadMemory(buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.htmlReadMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadMemory() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module HTMLtree
+#
+
+def htmlIsBooleanAttr(name):
+ """Determine if a given attribute is a boolean attribute. """
+ ret = libxml2mod.htmlIsBooleanAttr(name)
+ return ret
+
+def htmlNewDoc(URI, ExternalID):
+ """Creates a new HTML document """
+ ret = libxml2mod.htmlNewDoc(URI, ExternalID)
+ if ret is None:raise treeError('htmlNewDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlNewDocNoDtD(URI, ExternalID):
+ """Creates a new HTML document without a DTD node if @URI and
+ @ExternalID are None """
+ ret = libxml2mod.htmlNewDocNoDtD(URI, ExternalID)
+ if ret is None:raise treeError('htmlNewDocNoDtD() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module SAX2
+#
+
+def SAXDefaultVersion(version):
+ """Set the default version of SAX used globally by the
+ library. By default, during initialization the default is
+ set to 2. Note that it is generally a better coding style
+ to use xmlSAXVersion() to set up the version explicitly for
+ a given parsing context. """
+ ret = libxml2mod.xmlSAXDefaultVersion(version)
+ return ret
+
+def defaultSAXHandlerInit():
+ """Initialize the default SAX2 handler """
+ libxml2mod.xmlDefaultSAXHandlerInit()
+
+def docbDefaultSAXHandlerInit():
+ """Initialize the default SAX handler """
+ libxml2mod.docbDefaultSAXHandlerInit()
+
+def htmlDefaultSAXHandlerInit():
+ """Initialize the default SAX handler """
+ libxml2mod.htmlDefaultSAXHandlerInit()
+
+#
+# Functions from module catalog
+#
+
+def catalogAdd(type, orig, replace):
+ """Add an entry in the catalog, it may overwrite existing but
+ different entries. If called before any other catalog
+ routine, allows to override the default shared catalog put
+ in place by xmlInitializeCatalog(); """
+ ret = libxml2mod.xmlCatalogAdd(type, orig, replace)
+ return ret
+
+def catalogCleanup():
+ """Free up all the memory associated with catalogs """
+ libxml2mod.xmlCatalogCleanup()
+
+def catalogConvert():
+ """Convert all the SGML catalog entries as XML ones """
+ ret = libxml2mod.xmlCatalogConvert()
+ return ret
+
+def catalogDump(out):
+ """Dump all the global catalog content to the given file. """
+ if out is not None: out.flush()
+ libxml2mod.xmlCatalogDump(out)
+
+def catalogGetPublic(pubID):
+ """Try to lookup the catalog reference associated to a public
+ ID DEPRECATED, use xmlCatalogResolvePublic() """
+ ret = libxml2mod.xmlCatalogGetPublic(pubID)
+ return ret
+
+def catalogGetSystem(sysID):
+ """Try to lookup the catalog reference associated to a system
+ ID DEPRECATED, use xmlCatalogResolveSystem() """
+ ret = libxml2mod.xmlCatalogGetSystem(sysID)
+ return ret
+
+def catalogRemove(value):
+ """Remove an entry from the catalog """
+ ret = libxml2mod.xmlCatalogRemove(value)
+ return ret
+
+def catalogResolve(pubID, sysID):
+ """Do a complete resolution lookup of an External Identifier """
+ ret = libxml2mod.xmlCatalogResolve(pubID, sysID)
+ return ret
+
+def catalogResolvePublic(pubID):
+ """Try to lookup the catalog reference associated to a public
+ ID """
+ ret = libxml2mod.xmlCatalogResolvePublic(pubID)
+ return ret
+
+def catalogResolveSystem(sysID):
+ """Try to lookup the catalog resource for a system ID """
+ ret = libxml2mod.xmlCatalogResolveSystem(sysID)
+ return ret
+
+def catalogResolveURI(URI):
+ """Do a complete resolution lookup of an URI """
+ ret = libxml2mod.xmlCatalogResolveURI(URI)
+ return ret
+
+def catalogSetDebug(level):
+ """Used to set the debug level for catalog operation, 0
+ disable debugging, 1 enable it """
+ ret = libxml2mod.xmlCatalogSetDebug(level)
+ return ret
+
+def initializeCatalog():
+ """Do the catalog initialization. this function is not thread
+ safe, catalog initialization should preferably be done once
+ at startup """
+ libxml2mod.xmlInitializeCatalog()
+
+def loadACatalog(filename):
+ """Load the catalog and build the associated data structures.
+ This can be either an XML Catalog or an SGML Catalog It
+ will recurse in SGML CATALOG entries. On the other hand XML
+ Catalogs are not handled recursively. """
+ ret = libxml2mod.xmlLoadACatalog(filename)
+ if ret is None:raise treeError('xmlLoadACatalog() failed')
+ return catalog(_obj=ret)
+
+def loadCatalog(filename):
+ """Load the catalog and makes its definitions effective for
+ the default external entity loader. It will recurse in SGML
+ CATALOG entries. this function is not thread safe, catalog
+ initialization should preferably be done once at startup """
+ ret = libxml2mod.xmlLoadCatalog(filename)
+ return ret
+
+def loadCatalogs(pathss):
+ """Load the catalogs and makes their definitions effective for
+ the default external entity loader. this function is not
+ thread safe, catalog initialization should preferably be
+ done once at startup """
+ libxml2mod.xmlLoadCatalogs(pathss)
+
+def loadSGMLSuperCatalog(filename):
+ """Load an SGML super catalog. It won't expand CATALOG or
+ DELEGATE references. This is only needed for manipulating
+ SGML Super Catalogs like adding and removing CATALOG or
+ DELEGATE entries. """
+ ret = libxml2mod.xmlLoadSGMLSuperCatalog(filename)
+ if ret is None:raise treeError('xmlLoadSGMLSuperCatalog() failed')
+ return catalog(_obj=ret)
+
+def newCatalog(sgml):
+ """create a new Catalog. """
+ ret = libxml2mod.xmlNewCatalog(sgml)
+ if ret is None:raise treeError('xmlNewCatalog() failed')
+ return catalog(_obj=ret)
+
+def parseCatalogFile(filename):
+ """parse an XML file and build a tree. It's like
+ xmlParseFile() except it bypass all catalog lookups. """
+ ret = libxml2mod.xmlParseCatalogFile(filename)
+ if ret is None:raise parserError('xmlParseCatalogFile() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module chvalid
+#
+
+def isBaseChar(ch):
+ """This function is DEPRECATED. Use xmlIsBaseChar_ch or
+ xmlIsBaseCharQ instead """
+ ret = libxml2mod.xmlIsBaseChar(ch)
+ return ret
+
+def isBlank(ch):
+ """This function is DEPRECATED. Use xmlIsBlank_ch or
+ xmlIsBlankQ instead """
+ ret = libxml2mod.xmlIsBlank(ch)
+ return ret
+
+def isChar(ch):
+ """This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ
+ instead """
+ ret = libxml2mod.xmlIsChar(ch)
+ return ret
+
+def isCombining(ch):
+ """This function is DEPRECATED. Use xmlIsCombiningQ instead """
+ ret = libxml2mod.xmlIsCombining(ch)
+ return ret
+
+def isDigit(ch):
+ """This function is DEPRECATED. Use xmlIsDigit_ch or
+ xmlIsDigitQ instead """
+ ret = libxml2mod.xmlIsDigit(ch)
+ return ret
+
+def isExtender(ch):
+ """This function is DEPRECATED. Use xmlIsExtender_ch or
+ xmlIsExtenderQ instead """
+ ret = libxml2mod.xmlIsExtender(ch)
+ return ret
+
+def isIdeographic(ch):
+ """This function is DEPRECATED. Use xmlIsIdeographicQ instead """
+ ret = libxml2mod.xmlIsIdeographic(ch)
+ return ret
+
+def isPubidChar(ch):
+ """This function is DEPRECATED. Use xmlIsPubidChar_ch or
+ xmlIsPubidCharQ instead """
+ ret = libxml2mod.xmlIsPubidChar(ch)
+ return ret
+
+#
+# Functions from module debugXML
+#
+
+def boolToText(boolval):
+ """Convenient way to turn bool into text """
+ ret = libxml2mod.xmlBoolToText(boolval)
+ return ret
+
+def debugDumpString(output, str):
+ """Dumps informations about the string, shorten it if necessary """
+ if output is not None: output.flush()
+ libxml2mod.xmlDebugDumpString(output, str)
+
+def shellPrintXPathError(errorType, arg):
+ """Print the xpath error to libxml default error channel """
+ libxml2mod.xmlShellPrintXPathError(errorType, arg)
+
+#
+# Functions from module dict
+#
+
+def dictCleanup():
+ """Free the dictionary mutex. Do not call unless sure the
+ library is not in use anymore ! """
+ libxml2mod.xmlDictCleanup()
+
+def initializeDict():
+ """Do the dictionary mutex initialization. this function is
+ deprecated """
+ ret = libxml2mod.xmlInitializeDict()
+ return ret
+
+#
+# Functions from module encoding
+#
+
+def addEncodingAlias(name, alias):
+ """Registers an alias @alias for an encoding named @name.
+ Existing alias will be overwritten. """
+ ret = libxml2mod.xmlAddEncodingAlias(name, alias)
+ return ret
+
+def cleanupCharEncodingHandlers():
+ """Cleanup the memory allocated for the char encoding support,
+ it unregisters all the encoding handlers and the aliases. """
+ libxml2mod.xmlCleanupCharEncodingHandlers()
+
+def cleanupEncodingAliases():
+ """Unregisters all aliases """
+ libxml2mod.xmlCleanupEncodingAliases()
+
+def delEncodingAlias(alias):
+ """Unregisters an encoding alias @alias """
+ ret = libxml2mod.xmlDelEncodingAlias(alias)
+ return ret
+
+def encodingAlias(alias):
+ """Lookup an encoding name for the given alias. """
+ ret = libxml2mod.xmlGetEncodingAlias(alias)
+ return ret
+
+def initCharEncodingHandlers():
+ """Initialize the char encoding support, it registers the
+ default encoding supported. NOTE: while public, this
+ function usually doesn't need to be called in normal
+ processing. """
+ libxml2mod.xmlInitCharEncodingHandlers()
+
+#
+# Functions from module entities
+#
+
+def cleanupPredefinedEntities():
+ """Cleanup up the predefined entities table. Deprecated call """
+ libxml2mod.xmlCleanupPredefinedEntities()
+
+def initializePredefinedEntities():
+ """Set up the predefined entities. Deprecated call """
+ libxml2mod.xmlInitializePredefinedEntities()
+
+def predefinedEntity(name):
+ """Check whether this name is an predefined entity. """
+ ret = libxml2mod.xmlGetPredefinedEntity(name)
+ if ret is None:raise treeError('xmlGetPredefinedEntity() failed')
+ return xmlEntity(_obj=ret)
+
+#
+# Functions from module globals
+#
+
+def cleanupGlobals():
+ """Additional cleanup for multi-threading """
+ libxml2mod.xmlCleanupGlobals()
+
+def initGlobals():
+ """Additional initialisation for multi-threading """
+ libxml2mod.xmlInitGlobals()
+
+def thrDefDefaultBufferSize(v):
+ ret = libxml2mod.xmlThrDefDefaultBufferSize(v)
+ return ret
+
+def thrDefDoValidityCheckingDefaultValue(v):
+ ret = libxml2mod.xmlThrDefDoValidityCheckingDefaultValue(v)
+ return ret
+
+def thrDefGetWarningsDefaultValue(v):
+ ret = libxml2mod.xmlThrDefGetWarningsDefaultValue(v)
+ return ret
+
+def thrDefIndentTreeOutput(v):
+ ret = libxml2mod.xmlThrDefIndentTreeOutput(v)
+ return ret
+
+def thrDefKeepBlanksDefaultValue(v):
+ ret = libxml2mod.xmlThrDefKeepBlanksDefaultValue(v)
+ return ret
+
+def thrDefLineNumbersDefaultValue(v):
+ ret = libxml2mod.xmlThrDefLineNumbersDefaultValue(v)
+ return ret
+
+def thrDefLoadExtDtdDefaultValue(v):
+ ret = libxml2mod.xmlThrDefLoadExtDtdDefaultValue(v)
+ return ret
+
+def thrDefParserDebugEntities(v):
+ ret = libxml2mod.xmlThrDefParserDebugEntities(v)
+ return ret
+
+def thrDefPedanticParserDefaultValue(v):
+ ret = libxml2mod.xmlThrDefPedanticParserDefaultValue(v)
+ return ret
+
+def thrDefSaveNoEmptyTags(v):
+ ret = libxml2mod.xmlThrDefSaveNoEmptyTags(v)
+ return ret
+
+def thrDefSubstituteEntitiesDefaultValue(v):
+ ret = libxml2mod.xmlThrDefSubstituteEntitiesDefaultValue(v)
+ return ret
+
+def thrDefTreeIndentString(v):
+ ret = libxml2mod.xmlThrDefTreeIndentString(v)
+ return ret
+
+#
+# Functions from module nanoftp
+#
+
+def nanoFTPCleanup():
+ """Cleanup the FTP protocol layer. This cleanup proxy
+ informations. """
+ libxml2mod.xmlNanoFTPCleanup()
+
+def nanoFTPInit():
+ """Initialize the FTP protocol layer. Currently it just checks
+ for proxy informations, and get the hostname """
+ libxml2mod.xmlNanoFTPInit()
+
+def nanoFTPProxy(host, port, user, passwd, type):
+ """Setup the FTP proxy informations. This can also be done by
+ using ftp_proxy ftp_proxy_user and ftp_proxy_password
+ environment variables. """
+ libxml2mod.xmlNanoFTPProxy(host, port, user, passwd, type)
+
+def nanoFTPScanProxy(URL):
+ """(Re)Initialize the FTP Proxy context by parsing the URL and
+ finding the protocol host port it indicates. Should be like
+ ftp://myproxy/ or ftp://myproxy:3128/ A None URL cleans up
+ proxy informations. """
+ libxml2mod.xmlNanoFTPScanProxy(URL)
+
+#
+# Functions from module nanohttp
+#
+
+def nanoHTTPCleanup():
+ """Cleanup the HTTP protocol layer. """
+ libxml2mod.xmlNanoHTTPCleanup()
+
+def nanoHTTPInit():
+ """Initialize the HTTP protocol layer. Currently it just
+ checks for proxy informations """
+ libxml2mod.xmlNanoHTTPInit()
+
+def nanoHTTPScanProxy(URL):
+ """(Re)Initialize the HTTP Proxy context by parsing the URL
+ and finding the protocol host port it indicates. Should be
+ like http://myproxy/ or http://myproxy:3128/ A None URL
+ cleans up proxy informations. """
+ libxml2mod.xmlNanoHTTPScanProxy(URL)
+
+#
+# Functions from module parser
+#
+
+def createDocParserCtxt(cur):
+ """Creates a parser context for an XML in-memory document. """
+ ret = libxml2mod.xmlCreateDocParserCtxt(cur)
+ if ret is None:raise parserError('xmlCreateDocParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def initParser():
+ """Initialization function for the XML parser. This is not
+ reentrant. Call once before processing in case of use in
+ multithreaded programs. """
+ libxml2mod.xmlInitParser()
+
+def keepBlanksDefault(val):
+ """Set and return the previous value for default blanks text
+ nodes support. The 1.x version of the parser used an
+ heuristic to try to detect ignorable white spaces. As a
+ result the SAX callback was generating
+ xmlSAX2IgnorableWhitespace() callbacks instead of
+ characters() one, and when using the DOM output text nodes
+ containing those blanks were not generated. The 2.x and
+ later version will switch to the XML standard way and
+ ignorableWhitespace() are only generated when running the
+ parser in validating mode and when the current element
+ doesn't allow CDATA or mixed content. This function is
+ provided as a way to force the standard behavior on 1.X
+ libs and to switch back to the old mode for compatibility
+ when running 1.X client code on 2.X . Upgrade of 1.X code
+ should be done by using xmlIsBlankNode() commodity function
+ to detect the "empty" nodes generated. This value also
+ affect autogeneration of indentation when saving code if
+ blanks sections are kept, indentation is not generated. """
+ ret = libxml2mod.xmlKeepBlanksDefault(val)
+ return ret
+
+def lineNumbersDefault(val):
+ """Set and return the previous value for enabling line numbers
+ in elements contents. This may break on old application and
+ is turned off by default. """
+ ret = libxml2mod.xmlLineNumbersDefault(val)
+ return ret
+
+def newParserCtxt():
+ """Allocate and initialize a new parser context. """
+ ret = libxml2mod.xmlNewParserCtxt()
+ if ret is None:raise parserError('xmlNewParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def parseDTD(ExternalID, SystemID):
+ """Load and parse an external subset. """
+ ret = libxml2mod.xmlParseDTD(ExternalID, SystemID)
+ if ret is None:raise parserError('xmlParseDTD() failed')
+ return xmlDtd(_obj=ret)
+
+def parseDoc(cur):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlParseDoc(cur)
+ if ret is None:raise parserError('xmlParseDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def parseEntity(filename):
+ """parse an XML external entity out of context and build a
+ tree. [78] extParsedEnt ::= TextDecl? content This
+ correspond to a "Well Balanced" chunk """
+ ret = libxml2mod.xmlParseEntity(filename)
+ if ret is None:raise parserError('xmlParseEntity() failed')
+ return xmlDoc(_obj=ret)
+
+def parseFile(filename):
+ """parse an XML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. """
+ ret = libxml2mod.xmlParseFile(filename)
+ if ret is None:raise parserError('xmlParseFile() failed')
+ return xmlDoc(_obj=ret)
+
+def parseMemory(buffer, size):
+ """parse an XML in-memory block and build a tree. """
+ ret = libxml2mod.xmlParseMemory(buffer, size)
+ if ret is None:raise parserError('xmlParseMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def pedanticParserDefault(val):
+ """Set and return the previous value for enabling pedantic
+ warnings. """
+ ret = libxml2mod.xmlPedanticParserDefault(val)
+ return ret
+
+def readDoc(cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlReadDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def readFd(fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. NOTE
+ that the file descriptor will not be closed when the reader
+ is closed or reset. """
+ ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadFd() failed')
+ return xmlDoc(_obj=ret)
+
+def readFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. """
+ ret = libxml2mod.xmlReadFile(filename, encoding, options)
+ if ret is None:raise treeError('xmlReadFile() failed')
+ return xmlDoc(_obj=ret)
+
+def readMemory(buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverDoc(cur):
+ """parse an XML in-memory document and build a tree. In the
+ case the document is not Well Formed, a attempt to build a
+ tree is tried anyway """
+ ret = libxml2mod.xmlRecoverDoc(cur)
+ if ret is None:raise treeError('xmlRecoverDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverFile(filename):
+ """parse an XML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. In the case the document is not Well
+ Formed, it attempts to build a tree anyway """
+ ret = libxml2mod.xmlRecoverFile(filename)
+ if ret is None:raise treeError('xmlRecoverFile() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverMemory(buffer, size):
+ """parse an XML in-memory block and build a tree. In the case
+ the document is not Well Formed, an attempt to build a tree
+ is tried anyway """
+ ret = libxml2mod.xmlRecoverMemory(buffer, size)
+ if ret is None:raise treeError('xmlRecoverMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def substituteEntitiesDefault(val):
+ """Set and return the previous value for default entity
+ support. Initially the parser always keep entity references
+ instead of substituting entity values in the output. This
+ function has to be used to change the default parser
+ behavior SAX::substituteEntities() has to be used for
+ changing that on a file by file basis. """
+ ret = libxml2mod.xmlSubstituteEntitiesDefault(val)
+ return ret
+
+#
+# Functions from module parserInternals
+#
+
+def checkLanguageID(lang):
+ """Checks that the value conforms to the LanguageID
+ production: NOTE: this is somewhat deprecated, those
+ productions were removed from the XML Second edition. [33]
+ LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::=
+ ISO639Code | IanaCode | UserCode [35] ISO639Code ::=
+ ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' |
+ 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-'
+ ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The
+ current REC reference the successors of RFC 1766, currently
+ 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag
+ = language ["-" script] ["-" region] *("-" variant) *("-"
+ extension) ["-" privateuse] language = 2*3ALPHA
+ ; shortest ISO 639 code ["-" extlang] ; sometimes
+ followed by ; extended language subtags / 4ALPHA
+ ; or reserved for future use / 5*8ALPHA ; or
+ registered language subtag extlang = 3ALPHA
+ ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently
+ reserved script = 4ALPHA ; ISO 15924
+ code region = 2ALPHA ; ISO 3166-1 code
+ / 3DIGIT ; UN M.49 code variant =
+ 5*8alphanum ; registered variants / (DIGIT
+ 3alphanum) extension = singleton 1*("-" (2*8alphanum))
+ ; Single alphanumerics ; "x" reserved for private use
+ singleton = DIGIT ; 0 - 9 / %x41-57
+ ; A - W / %x59-5A ; Y - Z / %x61-77
+ ; a - w / %x79-7A ; y - z it sounds right to
+ still allow Irregular i-xxx IANA and user codes too The
+ parser below doesn't try to cope with extension or
+ privateuse that could be added but that's not interoperable
+ anyway """
+ ret = libxml2mod.xmlCheckLanguageID(lang)
+ return ret
+
+def copyChar(len, out, val):
+ """append the char value in the array """
+ ret = libxml2mod.xmlCopyChar(len, out, val)
+ return ret
+
+def copyCharMultiByte(out, val):
+ """append the char value in the array """
+ ret = libxml2mod.xmlCopyCharMultiByte(out, val)
+ return ret
+
+def createEntityParserCtxt(URL, ID, base):
+ """Create a parser context for an external entity Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base)
+ if ret is None:raise parserError('xmlCreateEntityParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createFileParserCtxt(filename):
+ """Create a parser context for a file content. Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.xmlCreateFileParserCtxt(filename)
+ if ret is None:raise parserError('xmlCreateFileParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createMemoryParserCtxt(buffer, size):
+ """Create a parser context for an XML in-memory document. """
+ ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createURLParserCtxt(filename, options):
+ """Create a parser context for a file or URL content.
+ Automatic support for ZLIB/Compress compressed document is
+ provided by default if found at compile-time and for file
+ accesses """
+ ret = libxml2mod.xmlCreateURLParserCtxt(filename, options)
+ if ret is None:raise parserError('xmlCreateURLParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlCreateFileParserCtxt(filename, encoding):
+ """Create a parser context for a file content. Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding)
+ if ret is None:raise parserError('htmlCreateFileParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlInitAutoClose():
+ """Initialize the htmlStartCloseIndex for fast lookup of
+ closing tags names. This is not reentrant. Call
+ xmlInitParser() once before processing in case of use in
+ multithreaded programs. """
+ libxml2mod.htmlInitAutoClose()
+
+def isLetter(c):
+ """Check whether the character is allowed by the production
+ [84] Letter ::= BaseChar | Ideographic """
+ ret = libxml2mod.xmlIsLetter(c)
+ return ret
+
+def namePop(ctxt):
+ """Pops the top element name from the name stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.namePop(ctxt__o)
+ return ret
+
+def namePush(ctxt, value):
+ """Pushes a new element name on top of the name stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.namePush(ctxt__o, value)
+ return ret
+
+def nodePop(ctxt):
+ """Pops the top element node from the node stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.nodePop(ctxt__o)
+ if ret is None:raise treeError('nodePop() failed')
+ return xmlNode(_obj=ret)
+
+def nodePush(ctxt, value):
+ """Pushes a new element node on top of the node stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if value is None: value__o = None
+ else: value__o = value._o
+ ret = libxml2mod.nodePush(ctxt__o, value__o)
+ return ret
+
+#
+# Functions from module python
+#
+
+def SAXParseFile(SAX, URI, recover):
+ """Interface to parse an XML file or resource pointed by an
+ URI to build an event flow to the SAX object """
+ libxml2mod.xmlSAXParseFile(SAX, URI, recover)
+
+def createInputBuffer(file, encoding):
+ """Create a libxml2 input buffer from a Python file """
+ ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
+ if ret is None:raise treeError('xmlCreateInputBuffer() failed')
+ return inputBuffer(_obj=ret)
+
+def createOutputBuffer(file, encoding):
+ """Create a libxml2 output buffer from a Python file """
+ ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
+ if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
+ return outputBuffer(_obj=ret)
+
+def createPushParser(SAX, chunk, size, URI):
+ """Create a progressive XML parser context to build either an
+ event flow if the SAX object is not None, or a DOM tree
+ otherwise. """
+ ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
+ if ret is None:raise parserError('xmlCreatePushParser() failed')
+ return parserCtxt(_obj=ret)
+
+def debugMemory(activate):
+ """Switch on the generation of line number for elements nodes.
+ Also returns the number of bytes allocated and not freed by
+ libxml2 since memory debugging was switched on. """
+ ret = libxml2mod.xmlDebugMemory(activate)
+ return ret
+
+def dumpMemory():
+ """dump the memory allocated in the file .memdump """
+ libxml2mod.xmlDumpMemory()
+
+def htmlCreatePushParser(SAX, chunk, size, URI):
+ """Create a progressive HTML parser context to build either an
+ event flow if the SAX object is not None, or a DOM tree
+ otherwise. """
+ ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
+ if ret is None:raise parserError('htmlCreatePushParser() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlSAXParseFile(SAX, URI, encoding):
+ """Interface to parse an HTML file or resource pointed by an
+ URI to build an event flow to the SAX object """
+ libxml2mod.htmlSAXParseFile(SAX, URI, encoding)
+
+def memoryUsed():
+ """Returns the total amount of memory allocated by libxml2 """
+ ret = libxml2mod.xmlMemoryUsed()
+ return ret
+
+def newNode(name):
+ """Create a new Node """
+ ret = libxml2mod.xmlNewNode(name)
+ if ret is None:raise treeError('xmlNewNode() failed')
+ return xmlNode(_obj=ret)
+
+def pythonCleanupParser():
+ """Cleanup function for the XML library. It tries to reclaim
+ all parsing related global memory allocated for the library
+ processing. It doesn't deallocate any document related
+ memory. Calling this function should not prevent reusing
+ the library but one should call xmlCleanupParser() only
+ when the process has finished using the library or XML
+ document built with it. """
+ libxml2mod.xmlPythonCleanupParser()
+
+def setEntityLoader(resolver):
+ """Set the entity resolver as a python function """
+ ret = libxml2mod.xmlSetEntityLoader(resolver)
+ return ret
+
+#
+# Functions from module relaxng
+#
+
+def relaxNGCleanupTypes():
+ """Cleanup the default Schemas type library associated to
+ RelaxNG """
+ libxml2mod.xmlRelaxNGCleanupTypes()
+
+def relaxNGInitTypes():
+ """Initialize the default type libraries. """
+ ret = libxml2mod.xmlRelaxNGInitTypes()
+ return ret
+
+def relaxNGNewMemParserCtxt(buffer, size):
+ """Create an XML RelaxNGs parse context for that memory buffer
+ expected to contain an XML RelaxNGs file. """
+ ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
+ return relaxNgParserCtxt(_obj=ret)
+
+def relaxNGNewParserCtxt(URL):
+ """Create an XML RelaxNGs parse context for that file/resource
+ expected to contain an XML RelaxNGs file. """
+ ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL)
+ if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed')
+ return relaxNgParserCtxt(_obj=ret)
+
+#
+# Functions from module tree
+#
+
+def buildQName(ncname, prefix, memory, len):
+ """Builds the QName @prefix:@ncname in @memory if there is
+ enough space and prefix is not None nor empty, otherwise
+ allocate a new string. If prefix is None or empty it
+ returns ncname. """
+ ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
+ return ret
+
+def compressMode():
+ """get the default compression mode used, ZLIB based. """
+ ret = libxml2mod.xmlGetCompressMode()
+ return ret
+
+def isXHTML(systemID, publicID):
+ """Try to find if the document correspond to an XHTML DTD """
+ ret = libxml2mod.xmlIsXHTML(systemID, publicID)
+ return ret
+
+def newComment(content):
+ """Creation of a new node containing a comment. """
+ ret = libxml2mod.xmlNewComment(content)
+ if ret is None:raise treeError('xmlNewComment() failed')
+ return xmlNode(_obj=ret)
+
+def newDoc(version):
+ """Creates a new XML document """
+ ret = libxml2mod.xmlNewDoc(version)
+ if ret is None:raise treeError('xmlNewDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def newPI(name, content):
+ """Creation of a processing instruction element. Use
+ xmlDocNewPI preferably to get string interning """
+ ret = libxml2mod.xmlNewPI(name, content)
+ if ret is None:raise treeError('xmlNewPI() failed')
+ return xmlNode(_obj=ret)
+
+def newText(content):
+ """Creation of a new text node. """
+ ret = libxml2mod.xmlNewText(content)
+ if ret is None:raise treeError('xmlNewText() failed')
+ return xmlNode(_obj=ret)
+
+def newTextLen(content, len):
+ """Creation of a new text node with an extra parameter for the
+ content's length """
+ ret = libxml2mod.xmlNewTextLen(content, len)
+ if ret is None:raise treeError('xmlNewTextLen() failed')
+ return xmlNode(_obj=ret)
+
+def setCompressMode(mode):
+ """set the default compression mode used, ZLIB based Correct
+ values: 0 (uncompressed) to 9 (max compression) """
+ libxml2mod.xmlSetCompressMode(mode)
+
+def validateNCName(value, space):
+ """Check that a value conforms to the lexical space of NCName """
+ ret = libxml2mod.xmlValidateNCName(value, space)
+ return ret
+
+def validateNMToken(value, space):
+ """Check that a value conforms to the lexical space of NMToken """
+ ret = libxml2mod.xmlValidateNMToken(value, space)
+ return ret
+
+def validateName(value, space):
+ """Check that a value conforms to the lexical space of Name """
+ ret = libxml2mod.xmlValidateName(value, space)
+ return ret
+
+def validateQName(value, space):
+ """Check that a value conforms to the lexical space of QName """
+ ret = libxml2mod.xmlValidateQName(value, space)
+ return ret
+
+#
+# Functions from module uri
+#
+
+def URIEscape(str):
+ """Escaping routine, does not do validity checks ! It will try
+ to escape the chars needing this, but this is heuristic
+ based it's impossible to be sure. """
+ ret = libxml2mod.xmlURIEscape(str)
+ return ret
+
+def URIEscapeStr(str, list):
+ """This routine escapes a string to hex, ignoring reserved
+ characters (a-z) and the characters in the exception list. """
+ ret = libxml2mod.xmlURIEscapeStr(str, list)
+ return ret
+
+def URIUnescapeString(str, len, target):
+ """Unescaping routine, but does not check that the string is
+ an URI. The output is a direct unsigned char translation of
+ %XX values (no encoding) Note that the length of the result
+ can only be smaller or same size as the input string. """
+ ret = libxml2mod.xmlURIUnescapeString(str, len, target)
+ return ret
+
+def buildRelativeURI(URI, base):
+ """Expresses the URI of the reference in terms relative to the
+ base. Some examples of this operation include: base =
+ "http://site1.com/docs/book1.html" URI input
+ URI returned docs/pic1.gif pic1.gif
+ docs/img/pic1.gif img/pic1.gif img/pic1.gif
+ ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif
+ http://site2.com/docs/pic1.gif
+ http://site2.com/docs/pic1.gif base = "docs/book1.html"
+ URI input URI returned docs/pic1.gif
+ pic1.gif docs/img/pic1.gif img/pic1.gif
+ img/pic1.gif ../img/pic1.gif
+ http://site1.com/docs/pic1.gif
+ http://site1.com/docs/pic1.gif Note: if the URI reference
+ is really weird or complicated, it may be worthwhile to
+ first convert it into a "nice" one by calling xmlBuildURI
+ (using 'base') before calling this routine, since this
+ routine (for reasonable efficiency) assumes URI has already
+ been through some validation. """
+ ret = libxml2mod.xmlBuildRelativeURI(URI, base)
+ return ret
+
+def buildURI(URI, base):
+ """Computes he final URI of the reference done by checking
+ that the given URI is valid, and building the final URI
+ using the base URI. This is processed according to section
+ 5.2 of the RFC 2396 5.2. Resolving Relative References to
+ Absolute Form """
+ ret = libxml2mod.xmlBuildURI(URI, base)
+ return ret
+
+def canonicPath(path):
+ """Constructs a canonic path from the specified path. """
+ ret = libxml2mod.xmlCanonicPath(path)
+ return ret
+
+def createURI():
+ """Simply creates an empty xmlURI """
+ ret = libxml2mod.xmlCreateURI()
+ if ret is None:raise uriError('xmlCreateURI() failed')
+ return URI(_obj=ret)
+
+def normalizeURIPath(path):
+ """Applies the 5 normalization steps to a path string--that
+ is, RFC 2396 Section 5.2, steps 6.c through 6.g.
+ Normalization occurs directly on the string, no new
+ allocation is done """
+ ret = libxml2mod.xmlNormalizeURIPath(path)
+ return ret
+
+def parseURI(str):
+ """Parse an URI based on RFC 3986 URI-reference = [
+ absoluteURI | relativeURI ] [ "#" fragment ] """
+ ret = libxml2mod.xmlParseURI(str)
+ if ret is None:raise uriError('xmlParseURI() failed')
+ return URI(_obj=ret)
+
+def parseURIRaw(str, raw):
+ """Parse an URI but allows to keep intact the original
+ fragments. URI-reference = URI / relative-ref """
+ ret = libxml2mod.xmlParseURIRaw(str, raw)
+ if ret is None:raise uriError('xmlParseURIRaw() failed')
+ return URI(_obj=ret)
+
+def pathToURI(path):
+ """Constructs an URI expressing the existing path """
+ ret = libxml2mod.xmlPathToURI(path)
+ return ret
+
+#
+# Functions from module valid
+#
+
+def newValidCtxt():
+ """Allocate a validation context structure. """
+ ret = libxml2mod.xmlNewValidCtxt()
+ if ret is None:raise treeError('xmlNewValidCtxt() failed')
+ return ValidCtxt(_obj=ret)
+
+def validateNameValue(value):
+ """Validate that the given value match Name production """
+ ret = libxml2mod.xmlValidateNameValue(value)
+ return ret
+
+def validateNamesValue(value):
+ """Validate that the given value match Names production """
+ ret = libxml2mod.xmlValidateNamesValue(value)
+ return ret
+
+def validateNmtokenValue(value):
+ """Validate that the given value match Nmtoken production [
+ VC: Name Token ] """
+ ret = libxml2mod.xmlValidateNmtokenValue(value)
+ return ret
+
+def validateNmtokensValue(value):
+ """Validate that the given value match Nmtokens production [
+ VC: Name Token ] """
+ ret = libxml2mod.xmlValidateNmtokensValue(value)
+ return ret
+
+#
+# Functions from module xmlIO
+#
+
+def checkFilename(path):
+ """function checks to see if @path is a valid source (file,
+ socket...) for XML. if stat is not available on the target
+ machine, """
+ ret = libxml2mod.xmlCheckFilename(path)
+ return ret
+
+def cleanupInputCallbacks():
+ """clears the entire input callback table. this includes the
+ compiled-in I/O. """
+ libxml2mod.xmlCleanupInputCallbacks()
+
+def cleanupOutputCallbacks():
+ """clears the entire output callback table. this includes the
+ compiled-in I/O callbacks. """
+ libxml2mod.xmlCleanupOutputCallbacks()
+
+def fileMatch(filename):
+ """input from FILE * """
+ ret = libxml2mod.xmlFileMatch(filename)
+ return ret
+
+def iOFTPMatch(filename):
+ """check if the URI matches an FTP one """
+ ret = libxml2mod.xmlIOFTPMatch(filename)
+ return ret
+
+def iOHTTPMatch(filename):
+ """check if the URI matches an HTTP one """
+ ret = libxml2mod.xmlIOHTTPMatch(filename)
+ return ret
+
+def normalizeWindowsPath(path):
+ """This function is obsolete. Please see xmlURIFromPath in
+ uri.c for a better solution. """
+ ret = libxml2mod.xmlNormalizeWindowsPath(path)
+ return ret
+
+def parserGetDirectory(filename):
+ """lookup the directory for that file """
+ ret = libxml2mod.xmlParserGetDirectory(filename)
+ return ret
+
+def registerDefaultInputCallbacks():
+ """Registers the default compiled-in I/O handlers. """
+ libxml2mod.xmlRegisterDefaultInputCallbacks()
+
+def registerDefaultOutputCallbacks():
+ """Registers the default compiled-in I/O handlers. """
+ libxml2mod.xmlRegisterDefaultOutputCallbacks()
+
+def registerHTTPPostCallbacks():
+ """By default, libxml submits HTTP output requests using the
+ "PUT" method. Calling this method changes the HTTP output
+ method to use the "POST" method instead. """
+ libxml2mod.xmlRegisterHTTPPostCallbacks()
+
+#
+# Functions from module xmlerror
+#
+
+def lastError():
+ """Get the last global error registered. This is per thread if
+ compiled with thread support. """
+ ret = libxml2mod.xmlGetLastError()
+ if ret is None:raise treeError('xmlGetLastError() failed')
+ return Error(_obj=ret)
+
+def resetLastError():
+ """Cleanup the last global error registered. For parsing error
+ this does not change the well-formedness result. """
+ libxml2mod.xmlResetLastError()
+
+#
+# Functions from module xmlreader
+#
+
+def newTextReaderFilename(URI):
+ """Create an xmlTextReader structure fed with the resource at
+ @URI """
+ ret = libxml2mod.xmlNewTextReaderFilename(URI)
+ if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForDoc(cur, URL, encoding, options):
+ """Create an xmltextReader for an XML in-memory document. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForDoc() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForFd(fd, URL, encoding, options):
+ """Create an xmltextReader for an XML from a file descriptor.
+ The parsing flags @options are a combination of
+ xmlParserOption. NOTE that the file descriptor will not be
+ closed when the reader is closed or reset. """
+ ret = libxml2mod.xmlReaderForFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForFd() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForFile(filename, encoding, options)
+ if ret is None:raise treeError('xmlReaderForFile() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForMemory(buffer, size, URL, encoding, options):
+ """Create an xmltextReader for an XML in-memory document. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForMemory() failed')
+ return xmlTextReader(_obj=ret)
+
+#
+# Functions from module xmlregexp
+#
+
+def regexpCompile(regexp):
+ """Parses a regular expression conforming to XML Schemas Part
+ 2 Datatype Appendix F and builds an automata suitable for
+ testing strings against that regular expression """
+ ret = libxml2mod.xmlRegexpCompile(regexp)
+ if ret is None:raise treeError('xmlRegexpCompile() failed')
+ return xmlReg(_obj=ret)
+
+#
+# Functions from module xmlschemas
+#
+
+def schemaNewMemParserCtxt(buffer, size):
+ """Create an XML Schemas parse context for that memory buffer
+ expected to contain an XML Schemas file. """
+ ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
+ return SchemaParserCtxt(_obj=ret)
+
+def schemaNewParserCtxt(URL):
+ """Create an XML Schemas parse context for that file/resource
+ expected to contain an XML Schemas file. """
+ ret = libxml2mod.xmlSchemaNewParserCtxt(URL)
+ if ret is None:raise parserError('xmlSchemaNewParserCtxt() failed')
+ return SchemaParserCtxt(_obj=ret)
+
+#
+# Functions from module xmlschemastypes
+#
+
+def schemaCleanupTypes():
+ """Cleanup the default XML Schemas type library """
+ libxml2mod.xmlSchemaCleanupTypes()
+
+def schemaCollapseString(value):
+ """Removes and normalize white spaces in the string """
+ ret = libxml2mod.xmlSchemaCollapseString(value)
+ return ret
+
+def schemaInitTypes():
+ """Initialize the default XML Schemas type library """
+ libxml2mod.xmlSchemaInitTypes()
+
+def schemaWhiteSpaceReplace(value):
+ """Replaces 0xd, 0x9 and 0xa with a space. """
+ ret = libxml2mod.xmlSchemaWhiteSpaceReplace(value)
+ return ret
+
+#
+# Functions from module xmlstring
+#
+
+def UTF8Charcmp(utf1, utf2):
+ """compares the two UCS4 values """
+ ret = libxml2mod.xmlUTF8Charcmp(utf1, utf2)
+ return ret
+
+def UTF8Size(utf):
+ """calculates the internal size of a UTF8 character """
+ ret = libxml2mod.xmlUTF8Size(utf)
+ return ret
+
+def UTF8Strlen(utf):
+ """compute the length of an UTF8 string, it doesn't do a full
+ UTF8 checking of the content of the string. """
+ ret = libxml2mod.xmlUTF8Strlen(utf)
+ return ret
+
+def UTF8Strloc(utf, utfchar):
+ """a function to provide the relative location of a UTF8 char """
+ ret = libxml2mod.xmlUTF8Strloc(utf, utfchar)
+ return ret
+
+def UTF8Strndup(utf, len):
+ """a strndup for array of UTF8's """
+ ret = libxml2mod.xmlUTF8Strndup(utf, len)
+ return ret
+
+def UTF8Strpos(utf, pos):
+ """a function to provide the equivalent of fetching a
+ character from a string array """
+ ret = libxml2mod.xmlUTF8Strpos(utf, pos)
+ return ret
+
+def UTF8Strsize(utf, len):
+ """storage size of an UTF8 string the behaviour is not
+ guaranteed if the input string is not UTF-8 """
+ ret = libxml2mod.xmlUTF8Strsize(utf, len)
+ return ret
+
+def UTF8Strsub(utf, start, len):
+ """Create a substring from a given UTF-8 string Note:
+ positions are given in units of UTF-8 chars """
+ ret = libxml2mod.xmlUTF8Strsub(utf, start, len)
+ return ret
+
+def checkUTF8(utf):
+ """Checks @utf for being valid UTF-8. @utf is assumed to be
+ null-terminated. This function is not super-strict, as it
+ will allow longer UTF-8 sequences than necessary. Note that
+ Java is capable of producing these sequences if provoked.
+ Also note, this routine checks for the 4-byte maximum size,
+ but does not check for 0x10ffff maximum value. """
+ ret = libxml2mod.xmlCheckUTF8(utf)
+ return ret
+
+#
+# Functions from module xmlunicode
+#
+
+def uCSIsAegeanNumbers(code):
+ """Check whether the character is part of AegeanNumbers UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsAegeanNumbers(code)
+ return ret
+
+def uCSIsAlphabeticPresentationForms(code):
+ """Check whether the character is part of
+ AlphabeticPresentationForms UCS Block """
+ ret = libxml2mod.xmlUCSIsAlphabeticPresentationForms(code)
+ return ret
+
+def uCSIsArabic(code):
+ """Check whether the character is part of Arabic UCS Block """
+ ret = libxml2mod.xmlUCSIsArabic(code)
+ return ret
+
+def uCSIsArabicPresentationFormsA(code):
+ """Check whether the character is part of
+ ArabicPresentationForms-A UCS Block """
+ ret = libxml2mod.xmlUCSIsArabicPresentationFormsA(code)
+ return ret
+
+def uCSIsArabicPresentationFormsB(code):
+ """Check whether the character is part of
+ ArabicPresentationForms-B UCS Block """
+ ret = libxml2mod.xmlUCSIsArabicPresentationFormsB(code)
+ return ret
+
+def uCSIsArmenian(code):
+ """Check whether the character is part of Armenian UCS Block """
+ ret = libxml2mod.xmlUCSIsArmenian(code)
+ return ret
+
+def uCSIsArrows(code):
+ """Check whether the character is part of Arrows UCS Block """
+ ret = libxml2mod.xmlUCSIsArrows(code)
+ return ret
+
+def uCSIsBasicLatin(code):
+ """Check whether the character is part of BasicLatin UCS Block """
+ ret = libxml2mod.xmlUCSIsBasicLatin(code)
+ return ret
+
+def uCSIsBengali(code):
+ """Check whether the character is part of Bengali UCS Block """
+ ret = libxml2mod.xmlUCSIsBengali(code)
+ return ret
+
+def uCSIsBlock(code, block):
+ """Check whether the character is part of the UCS Block """
+ ret = libxml2mod.xmlUCSIsBlock(code, block)
+ return ret
+
+def uCSIsBlockElements(code):
+ """Check whether the character is part of BlockElements UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBlockElements(code)
+ return ret
+
+def uCSIsBopomofo(code):
+ """Check whether the character is part of Bopomofo UCS Block """
+ ret = libxml2mod.xmlUCSIsBopomofo(code)
+ return ret
+
+def uCSIsBopomofoExtended(code):
+ """Check whether the character is part of BopomofoExtended UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBopomofoExtended(code)
+ return ret
+
+def uCSIsBoxDrawing(code):
+ """Check whether the character is part of BoxDrawing UCS Block """
+ ret = libxml2mod.xmlUCSIsBoxDrawing(code)
+ return ret
+
+def uCSIsBraillePatterns(code):
+ """Check whether the character is part of BraillePatterns UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBraillePatterns(code)
+ return ret
+
+def uCSIsBuhid(code):
+ """Check whether the character is part of Buhid UCS Block """
+ ret = libxml2mod.xmlUCSIsBuhid(code)
+ return ret
+
+def uCSIsByzantineMusicalSymbols(code):
+ """Check whether the character is part of
+ ByzantineMusicalSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsByzantineMusicalSymbols(code)
+ return ret
+
+def uCSIsCJKCompatibility(code):
+ """Check whether the character is part of CJKCompatibility UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibility(code)
+ return ret
+
+def uCSIsCJKCompatibilityForms(code):
+ """Check whether the character is part of
+ CJKCompatibilityForms UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityForms(code)
+ return ret
+
+def uCSIsCJKCompatibilityIdeographs(code):
+ """Check whether the character is part of
+ CJKCompatibilityIdeographs UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographs(code)
+ return ret
+
+def uCSIsCJKCompatibilityIdeographsSupplement(code):
+ """Check whether the character is part of
+ CJKCompatibilityIdeographsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographsSupplement(code)
+ return ret
+
+def uCSIsCJKRadicalsSupplement(code):
+ """Check whether the character is part of
+ CJKRadicalsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKRadicalsSupplement(code)
+ return ret
+
+def uCSIsCJKSymbolsandPunctuation(code):
+ """Check whether the character is part of
+ CJKSymbolsandPunctuation UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKSymbolsandPunctuation(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographs(code):
+ """Check whether the character is part of CJKUnifiedIdeographs
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographs(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographsExtensionA(code):
+ """Check whether the character is part of
+ CJKUnifiedIdeographsExtensionA UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionA(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographsExtensionB(code):
+ """Check whether the character is part of
+ CJKUnifiedIdeographsExtensionB UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionB(code)
+ return ret
+
+def uCSIsCat(code, cat):
+ """Check whether the character is part of the UCS Category """
+ ret = libxml2mod.xmlUCSIsCat(code, cat)
+ return ret
+
+def uCSIsCatC(code):
+ """Check whether the character is part of C UCS Category """
+ ret = libxml2mod.xmlUCSIsCatC(code)
+ return ret
+
+def uCSIsCatCc(code):
+ """Check whether the character is part of Cc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCc(code)
+ return ret
+
+def uCSIsCatCf(code):
+ """Check whether the character is part of Cf UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCf(code)
+ return ret
+
+def uCSIsCatCo(code):
+ """Check whether the character is part of Co UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCo(code)
+ return ret
+
+def uCSIsCatCs(code):
+ """Check whether the character is part of Cs UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCs(code)
+ return ret
+
+def uCSIsCatL(code):
+ """Check whether the character is part of L UCS Category """
+ ret = libxml2mod.xmlUCSIsCatL(code)
+ return ret
+
+def uCSIsCatLl(code):
+ """Check whether the character is part of Ll UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLl(code)
+ return ret
+
+def uCSIsCatLm(code):
+ """Check whether the character is part of Lm UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLm(code)
+ return ret
+
+def uCSIsCatLo(code):
+ """Check whether the character is part of Lo UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLo(code)
+ return ret
+
+def uCSIsCatLt(code):
+ """Check whether the character is part of Lt UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLt(code)
+ return ret
+
+def uCSIsCatLu(code):
+ """Check whether the character is part of Lu UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLu(code)
+ return ret
+
+def uCSIsCatM(code):
+ """Check whether the character is part of M UCS Category """
+ ret = libxml2mod.xmlUCSIsCatM(code)
+ return ret
+
+def uCSIsCatMc(code):
+ """Check whether the character is part of Mc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMc(code)
+ return ret
+
+def uCSIsCatMe(code):
+ """Check whether the character is part of Me UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMe(code)
+ return ret
+
+def uCSIsCatMn(code):
+ """Check whether the character is part of Mn UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMn(code)
+ return ret
+
+def uCSIsCatN(code):
+ """Check whether the character is part of N UCS Category """
+ ret = libxml2mod.xmlUCSIsCatN(code)
+ return ret
+
+def uCSIsCatNd(code):
+ """Check whether the character is part of Nd UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNd(code)
+ return ret
+
+def uCSIsCatNl(code):
+ """Check whether the character is part of Nl UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNl(code)
+ return ret
+
+def uCSIsCatNo(code):
+ """Check whether the character is part of No UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNo(code)
+ return ret
+
+def uCSIsCatP(code):
+ """Check whether the character is part of P UCS Category """
+ ret = libxml2mod.xmlUCSIsCatP(code)
+ return ret
+
+def uCSIsCatPc(code):
+ """Check whether the character is part of Pc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPc(code)
+ return ret
+
+def uCSIsCatPd(code):
+ """Check whether the character is part of Pd UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPd(code)
+ return ret
+
+def uCSIsCatPe(code):
+ """Check whether the character is part of Pe UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPe(code)
+ return ret
+
+def uCSIsCatPf(code):
+ """Check whether the character is part of Pf UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPf(code)
+ return ret
+
+def uCSIsCatPi(code):
+ """Check whether the character is part of Pi UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPi(code)
+ return ret
+
+def uCSIsCatPo(code):
+ """Check whether the character is part of Po UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPo(code)
+ return ret
+
+def uCSIsCatPs(code):
+ """Check whether the character is part of Ps UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPs(code)
+ return ret
+
+def uCSIsCatS(code):
+ """Check whether the character is part of S UCS Category """
+ ret = libxml2mod.xmlUCSIsCatS(code)
+ return ret
+
+def uCSIsCatSc(code):
+ """Check whether the character is part of Sc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSc(code)
+ return ret
+
+def uCSIsCatSk(code):
+ """Check whether the character is part of Sk UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSk(code)
+ return ret
+
+def uCSIsCatSm(code):
+ """Check whether the character is part of Sm UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSm(code)
+ return ret
+
+def uCSIsCatSo(code):
+ """Check whether the character is part of So UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSo(code)
+ return ret
+
+def uCSIsCatZ(code):
+ """Check whether the character is part of Z UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZ(code)
+ return ret
+
+def uCSIsCatZl(code):
+ """Check whether the character is part of Zl UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZl(code)
+ return ret
+
+def uCSIsCatZp(code):
+ """Check whether the character is part of Zp UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZp(code)
+ return ret
+
+def uCSIsCatZs(code):
+ """Check whether the character is part of Zs UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZs(code)
+ return ret
+
+def uCSIsCherokee(code):
+ """Check whether the character is part of Cherokee UCS Block """
+ ret = libxml2mod.xmlUCSIsCherokee(code)
+ return ret
+
+def uCSIsCombiningDiacriticalMarks(code):
+ """Check whether the character is part of
+ CombiningDiacriticalMarks UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarks(code)
+ return ret
+
+def uCSIsCombiningDiacriticalMarksforSymbols(code):
+ """Check whether the character is part of
+ CombiningDiacriticalMarksforSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarksforSymbols(code)
+ return ret
+
+def uCSIsCombiningHalfMarks(code):
+ """Check whether the character is part of CombiningHalfMarks
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningHalfMarks(code)
+ return ret
+
+def uCSIsCombiningMarksforSymbols(code):
+ """Check whether the character is part of
+ CombiningMarksforSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningMarksforSymbols(code)
+ return ret
+
+def uCSIsControlPictures(code):
+ """Check whether the character is part of ControlPictures UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsControlPictures(code)
+ return ret
+
+def uCSIsCurrencySymbols(code):
+ """Check whether the character is part of CurrencySymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCurrencySymbols(code)
+ return ret
+
+def uCSIsCypriotSyllabary(code):
+ """Check whether the character is part of CypriotSyllabary UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCypriotSyllabary(code)
+ return ret
+
+def uCSIsCyrillic(code):
+ """Check whether the character is part of Cyrillic UCS Block """
+ ret = libxml2mod.xmlUCSIsCyrillic(code)
+ return ret
+
+def uCSIsCyrillicSupplement(code):
+ """Check whether the character is part of CyrillicSupplement
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCyrillicSupplement(code)
+ return ret
+
+def uCSIsDeseret(code):
+ """Check whether the character is part of Deseret UCS Block """
+ ret = libxml2mod.xmlUCSIsDeseret(code)
+ return ret
+
+def uCSIsDevanagari(code):
+ """Check whether the character is part of Devanagari UCS Block """
+ ret = libxml2mod.xmlUCSIsDevanagari(code)
+ return ret
+
+def uCSIsDingbats(code):
+ """Check whether the character is part of Dingbats UCS Block """
+ ret = libxml2mod.xmlUCSIsDingbats(code)
+ return ret
+
+def uCSIsEnclosedAlphanumerics(code):
+ """Check whether the character is part of
+ EnclosedAlphanumerics UCS Block """
+ ret = libxml2mod.xmlUCSIsEnclosedAlphanumerics(code)
+ return ret
+
+def uCSIsEnclosedCJKLettersandMonths(code):
+ """Check whether the character is part of
+ EnclosedCJKLettersandMonths UCS Block """
+ ret = libxml2mod.xmlUCSIsEnclosedCJKLettersandMonths(code)
+ return ret
+
+def uCSIsEthiopic(code):
+ """Check whether the character is part of Ethiopic UCS Block """
+ ret = libxml2mod.xmlUCSIsEthiopic(code)
+ return ret
+
+def uCSIsGeneralPunctuation(code):
+ """Check whether the character is part of GeneralPunctuation
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsGeneralPunctuation(code)
+ return ret
+
+def uCSIsGeometricShapes(code):
+ """Check whether the character is part of GeometricShapes UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGeometricShapes(code)
+ return ret
+
+def uCSIsGeorgian(code):
+ """Check whether the character is part of Georgian UCS Block """
+ ret = libxml2mod.xmlUCSIsGeorgian(code)
+ return ret
+
+def uCSIsGothic(code):
+ """Check whether the character is part of Gothic UCS Block """
+ ret = libxml2mod.xmlUCSIsGothic(code)
+ return ret
+
+def uCSIsGreek(code):
+ """Check whether the character is part of Greek UCS Block """
+ ret = libxml2mod.xmlUCSIsGreek(code)
+ return ret
+
+def uCSIsGreekExtended(code):
+ """Check whether the character is part of GreekExtended UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGreekExtended(code)
+ return ret
+
+def uCSIsGreekandCoptic(code):
+ """Check whether the character is part of GreekandCoptic UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGreekandCoptic(code)
+ return ret
+
+def uCSIsGujarati(code):
+ """Check whether the character is part of Gujarati UCS Block """
+ ret = libxml2mod.xmlUCSIsGujarati(code)
+ return ret
+
+def uCSIsGurmukhi(code):
+ """Check whether the character is part of Gurmukhi UCS Block """
+ ret = libxml2mod.xmlUCSIsGurmukhi(code)
+ return ret
+
+def uCSIsHalfwidthandFullwidthForms(code):
+ """Check whether the character is part of
+ HalfwidthandFullwidthForms UCS Block """
+ ret = libxml2mod.xmlUCSIsHalfwidthandFullwidthForms(code)
+ return ret
+
+def uCSIsHangulCompatibilityJamo(code):
+ """Check whether the character is part of
+ HangulCompatibilityJamo UCS Block """
+ ret = libxml2mod.xmlUCSIsHangulCompatibilityJamo(code)
+ return ret
+
+def uCSIsHangulJamo(code):
+ """Check whether the character is part of HangulJamo UCS Block """
+ ret = libxml2mod.xmlUCSIsHangulJamo(code)
+ return ret
+
+def uCSIsHangulSyllables(code):
+ """Check whether the character is part of HangulSyllables UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsHangulSyllables(code)
+ return ret
+
+def uCSIsHanunoo(code):
+ """Check whether the character is part of Hanunoo UCS Block """
+ ret = libxml2mod.xmlUCSIsHanunoo(code)
+ return ret
+
+def uCSIsHebrew(code):
+ """Check whether the character is part of Hebrew UCS Block """
+ ret = libxml2mod.xmlUCSIsHebrew(code)
+ return ret
+
+def uCSIsHighPrivateUseSurrogates(code):
+ """Check whether the character is part of
+ HighPrivateUseSurrogates UCS Block """
+ ret = libxml2mod.xmlUCSIsHighPrivateUseSurrogates(code)
+ return ret
+
+def uCSIsHighSurrogates(code):
+ """Check whether the character is part of HighSurrogates UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsHighSurrogates(code)
+ return ret
+
+def uCSIsHiragana(code):
+ """Check whether the character is part of Hiragana UCS Block """
+ ret = libxml2mod.xmlUCSIsHiragana(code)
+ return ret
+
+def uCSIsIPAExtensions(code):
+ """Check whether the character is part of IPAExtensions UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsIPAExtensions(code)
+ return ret
+
+def uCSIsIdeographicDescriptionCharacters(code):
+ """Check whether the character is part of
+ IdeographicDescriptionCharacters UCS Block """
+ ret = libxml2mod.xmlUCSIsIdeographicDescriptionCharacters(code)
+ return ret
+
+def uCSIsKanbun(code):
+ """Check whether the character is part of Kanbun UCS Block """
+ ret = libxml2mod.xmlUCSIsKanbun(code)
+ return ret
+
+def uCSIsKangxiRadicals(code):
+ """Check whether the character is part of KangxiRadicals UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsKangxiRadicals(code)
+ return ret
+
+def uCSIsKannada(code):
+ """Check whether the character is part of Kannada UCS Block """
+ ret = libxml2mod.xmlUCSIsKannada(code)
+ return ret
+
+def uCSIsKatakana(code):
+ """Check whether the character is part of Katakana UCS Block """
+ ret = libxml2mod.xmlUCSIsKatakana(code)
+ return ret
+
+def uCSIsKatakanaPhoneticExtensions(code):
+ """Check whether the character is part of
+ KatakanaPhoneticExtensions UCS Block """
+ ret = libxml2mod.xmlUCSIsKatakanaPhoneticExtensions(code)
+ return ret
+
+def uCSIsKhmer(code):
+ """Check whether the character is part of Khmer UCS Block """
+ ret = libxml2mod.xmlUCSIsKhmer(code)
+ return ret
+
+def uCSIsKhmerSymbols(code):
+ """Check whether the character is part of KhmerSymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsKhmerSymbols(code)
+ return ret
+
+def uCSIsLao(code):
+ """Check whether the character is part of Lao UCS Block """
+ ret = libxml2mod.xmlUCSIsLao(code)
+ return ret
+
+def uCSIsLatin1Supplement(code):
+ """Check whether the character is part of Latin-1Supplement
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsLatin1Supplement(code)
+ return ret
+
+def uCSIsLatinExtendedA(code):
+ """Check whether the character is part of LatinExtended-A UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedA(code)
+ return ret
+
+def uCSIsLatinExtendedAdditional(code):
+ """Check whether the character is part of
+ LatinExtendedAdditional UCS Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedAdditional(code)
+ return ret
+
+def uCSIsLatinExtendedB(code):
+ """Check whether the character is part of LatinExtended-B UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedB(code)
+ return ret
+
+def uCSIsLetterlikeSymbols(code):
+ """Check whether the character is part of LetterlikeSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsLetterlikeSymbols(code)
+ return ret
+
+def uCSIsLimbu(code):
+ """Check whether the character is part of Limbu UCS Block """
+ ret = libxml2mod.xmlUCSIsLimbu(code)
+ return ret
+
+def uCSIsLinearBIdeograms(code):
+ """Check whether the character is part of LinearBIdeograms UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLinearBIdeograms(code)
+ return ret
+
+def uCSIsLinearBSyllabary(code):
+ """Check whether the character is part of LinearBSyllabary UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLinearBSyllabary(code)
+ return ret
+
+def uCSIsLowSurrogates(code):
+ """Check whether the character is part of LowSurrogates UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLowSurrogates(code)
+ return ret
+
+def uCSIsMalayalam(code):
+ """Check whether the character is part of Malayalam UCS Block """
+ ret = libxml2mod.xmlUCSIsMalayalam(code)
+ return ret
+
+def uCSIsMathematicalAlphanumericSymbols(code):
+ """Check whether the character is part of
+ MathematicalAlphanumericSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsMathematicalAlphanumericSymbols(code)
+ return ret
+
+def uCSIsMathematicalOperators(code):
+ """Check whether the character is part of
+ MathematicalOperators UCS Block """
+ ret = libxml2mod.xmlUCSIsMathematicalOperators(code)
+ return ret
+
+def uCSIsMiscellaneousMathematicalSymbolsA(code):
+ """Check whether the character is part of
+ MiscellaneousMathematicalSymbols-A UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsA(code)
+ return ret
+
+def uCSIsMiscellaneousMathematicalSymbolsB(code):
+ """Check whether the character is part of
+ MiscellaneousMathematicalSymbols-B UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsB(code)
+ return ret
+
+def uCSIsMiscellaneousSymbols(code):
+ """Check whether the character is part of MiscellaneousSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousSymbols(code)
+ return ret
+
+def uCSIsMiscellaneousSymbolsandArrows(code):
+ """Check whether the character is part of
+ MiscellaneousSymbolsandArrows UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousSymbolsandArrows(code)
+ return ret
+
+def uCSIsMiscellaneousTechnical(code):
+ """Check whether the character is part of
+ MiscellaneousTechnical UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousTechnical(code)
+ return ret
+
+def uCSIsMongolian(code):
+ """Check whether the character is part of Mongolian UCS Block """
+ ret = libxml2mod.xmlUCSIsMongolian(code)
+ return ret
+
+def uCSIsMusicalSymbols(code):
+ """Check whether the character is part of MusicalSymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsMusicalSymbols(code)
+ return ret
+
+def uCSIsMyanmar(code):
+ """Check whether the character is part of Myanmar UCS Block """
+ ret = libxml2mod.xmlUCSIsMyanmar(code)
+ return ret
+
+def uCSIsNumberForms(code):
+ """Check whether the character is part of NumberForms UCS Block """
+ ret = libxml2mod.xmlUCSIsNumberForms(code)
+ return ret
+
+def uCSIsOgham(code):
+ """Check whether the character is part of Ogham UCS Block """
+ ret = libxml2mod.xmlUCSIsOgham(code)
+ return ret
+
+def uCSIsOldItalic(code):
+ """Check whether the character is part of OldItalic UCS Block """
+ ret = libxml2mod.xmlUCSIsOldItalic(code)
+ return ret
+
+def uCSIsOpticalCharacterRecognition(code):
+ """Check whether the character is part of
+ OpticalCharacterRecognition UCS Block """
+ ret = libxml2mod.xmlUCSIsOpticalCharacterRecognition(code)
+ return ret
+
+def uCSIsOriya(code):
+ """Check whether the character is part of Oriya UCS Block """
+ ret = libxml2mod.xmlUCSIsOriya(code)
+ return ret
+
+def uCSIsOsmanya(code):
+ """Check whether the character is part of Osmanya UCS Block """
+ ret = libxml2mod.xmlUCSIsOsmanya(code)
+ return ret
+
+def uCSIsPhoneticExtensions(code):
+ """Check whether the character is part of PhoneticExtensions
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsPhoneticExtensions(code)
+ return ret
+
+def uCSIsPrivateUse(code):
+ """Check whether the character is part of PrivateUse UCS Block """
+ ret = libxml2mod.xmlUCSIsPrivateUse(code)
+ return ret
+
+def uCSIsPrivateUseArea(code):
+ """Check whether the character is part of PrivateUseArea UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsPrivateUseArea(code)
+ return ret
+
+def uCSIsRunic(code):
+ """Check whether the character is part of Runic UCS Block """
+ ret = libxml2mod.xmlUCSIsRunic(code)
+ return ret
+
+def uCSIsShavian(code):
+ """Check whether the character is part of Shavian UCS Block """
+ ret = libxml2mod.xmlUCSIsShavian(code)
+ return ret
+
+def uCSIsSinhala(code):
+ """Check whether the character is part of Sinhala UCS Block """
+ ret = libxml2mod.xmlUCSIsSinhala(code)
+ return ret
+
+def uCSIsSmallFormVariants(code):
+ """Check whether the character is part of SmallFormVariants
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSmallFormVariants(code)
+ return ret
+
+def uCSIsSpacingModifierLetters(code):
+ """Check whether the character is part of
+ SpacingModifierLetters UCS Block """
+ ret = libxml2mod.xmlUCSIsSpacingModifierLetters(code)
+ return ret
+
+def uCSIsSpecials(code):
+ """Check whether the character is part of Specials UCS Block """
+ ret = libxml2mod.xmlUCSIsSpecials(code)
+ return ret
+
+def uCSIsSuperscriptsandSubscripts(code):
+ """Check whether the character is part of
+ SuperscriptsandSubscripts UCS Block """
+ ret = libxml2mod.xmlUCSIsSuperscriptsandSubscripts(code)
+ return ret
+
+def uCSIsSupplementalArrowsA(code):
+ """Check whether the character is part of SupplementalArrows-A
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalArrowsA(code)
+ return ret
+
+def uCSIsSupplementalArrowsB(code):
+ """Check whether the character is part of SupplementalArrows-B
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalArrowsB(code)
+ return ret
+
+def uCSIsSupplementalMathematicalOperators(code):
+ """Check whether the character is part of
+ SupplementalMathematicalOperators UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalMathematicalOperators(code)
+ return ret
+
+def uCSIsSupplementaryPrivateUseAreaA(code):
+ """Check whether the character is part of
+ SupplementaryPrivateUseArea-A UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaA(code)
+ return ret
+
+def uCSIsSupplementaryPrivateUseAreaB(code):
+ """Check whether the character is part of
+ SupplementaryPrivateUseArea-B UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaB(code)
+ return ret
+
+def uCSIsSyriac(code):
+ """Check whether the character is part of Syriac UCS Block """
+ ret = libxml2mod.xmlUCSIsSyriac(code)
+ return ret
+
+def uCSIsTagalog(code):
+ """Check whether the character is part of Tagalog UCS Block """
+ ret = libxml2mod.xmlUCSIsTagalog(code)
+ return ret
+
+def uCSIsTagbanwa(code):
+ """Check whether the character is part of Tagbanwa UCS Block """
+ ret = libxml2mod.xmlUCSIsTagbanwa(code)
+ return ret
+
+def uCSIsTags(code):
+ """Check whether the character is part of Tags UCS Block """
+ ret = libxml2mod.xmlUCSIsTags(code)
+ return ret
+
+def uCSIsTaiLe(code):
+ """Check whether the character is part of TaiLe UCS Block """
+ ret = libxml2mod.xmlUCSIsTaiLe(code)
+ return ret
+
+def uCSIsTaiXuanJingSymbols(code):
+ """Check whether the character is part of TaiXuanJingSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsTaiXuanJingSymbols(code)
+ return ret
+
+def uCSIsTamil(code):
+ """Check whether the character is part of Tamil UCS Block """
+ ret = libxml2mod.xmlUCSIsTamil(code)
+ return ret
+
+def uCSIsTelugu(code):
+ """Check whether the character is part of Telugu UCS Block """
+ ret = libxml2mod.xmlUCSIsTelugu(code)
+ return ret
+
+def uCSIsThaana(code):
+ """Check whether the character is part of Thaana UCS Block """
+ ret = libxml2mod.xmlUCSIsThaana(code)
+ return ret
+
+def uCSIsThai(code):
+ """Check whether the character is part of Thai UCS Block """
+ ret = libxml2mod.xmlUCSIsThai(code)
+ return ret
+
+def uCSIsTibetan(code):
+ """Check whether the character is part of Tibetan UCS Block """
+ ret = libxml2mod.xmlUCSIsTibetan(code)
+ return ret
+
+def uCSIsUgaritic(code):
+ """Check whether the character is part of Ugaritic UCS Block """
+ ret = libxml2mod.xmlUCSIsUgaritic(code)
+ return ret
+
+def uCSIsUnifiedCanadianAboriginalSyllabics(code):
+ """Check whether the character is part of
+ UnifiedCanadianAboriginalSyllabics UCS Block """
+ ret = libxml2mod.xmlUCSIsUnifiedCanadianAboriginalSyllabics(code)
+ return ret
+
+def uCSIsVariationSelectors(code):
+ """Check whether the character is part of VariationSelectors
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsVariationSelectors(code)
+ return ret
+
+def uCSIsVariationSelectorsSupplement(code):
+ """Check whether the character is part of
+ VariationSelectorsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsVariationSelectorsSupplement(code)
+ return ret
+
+def uCSIsYiRadicals(code):
+ """Check whether the character is part of YiRadicals UCS Block """
+ ret = libxml2mod.xmlUCSIsYiRadicals(code)
+ return ret
+
+def uCSIsYiSyllables(code):
+ """Check whether the character is part of YiSyllables UCS Block """
+ ret = libxml2mod.xmlUCSIsYiSyllables(code)
+ return ret
+
+def uCSIsYijingHexagramSymbols(code):
+ """Check whether the character is part of
+ YijingHexagramSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsYijingHexagramSymbols(code)
+ return ret
+
+#
+# Functions from module xmlversion
+#
+
+def checkVersion(version):
+ """check the compiled lib version against the include one.
+ This can warn or immediately kill the application """
+ libxml2mod.xmlCheckVersion(version)
+
+#
+# Functions from module xpathInternals
+#
+
+def valuePop(ctxt):
+ """Pops the top XPath object from the value stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.valuePop(ctxt__o)
+ return ret
+
+class xmlNode(xmlCore):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlNode got a wrong wrapper object type')
+ self._o = _obj
+ xmlCore.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlNode (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ # accessors for xmlNode
+ def ns(self):
+ """Get the namespace of a node """
+ ret = libxml2mod.xmlNodeGetNs(self._o)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def nsDefs(self):
+ """Get the namespace of a node """
+ ret = libxml2mod.xmlNodeGetNsDefs(self._o)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ #
+ # xmlNode functions from module debugXML
+ #
+
+ def debugDumpNode(self, output, depth):
+ """Dumps debug information for the element node, it is
+ recursive """
+ libxml2mod.xmlDebugDumpNode(output, self._o, depth)
+
+ def debugDumpNodeList(self, output, depth):
+ """Dumps debug information for the list of element node, it is
+ recursive """
+ libxml2mod.xmlDebugDumpNodeList(output, self._o, depth)
+
+ def debugDumpOneNode(self, output, depth):
+ """Dumps debug information for the element node, it is not
+ recursive """
+ libxml2mod.xmlDebugDumpOneNode(output, self._o, depth)
+
+ def lsCountNode(self):
+ """Count the children of @node. """
+ ret = libxml2mod.xmlLsCountNode(self._o)
+ return ret
+
+ def lsOneNode(self, output):
+ """Dump to @output the type and name of @node. """
+ libxml2mod.xmlLsOneNode(output, self._o)
+
+ def shellPrintNode(self):
+ """Print node to the output FILE """
+ libxml2mod.xmlShellPrintNode(self._o)
+
+ #
+ # xmlNode functions from module tree
+ #
+
+ def addChild(self, cur):
+ """Add a new node to @parent, at the end of the child (or
+ property) list merging adjacent TEXT nodes (in which case
+ @cur is freed) If the new node is ATTRIBUTE, it is added
+ into properties instead of children. If there is an
+ attribute with equal name, it is first destroyed. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlAddChild(self._o, cur__o)
+ if ret is None:raise treeError('xmlAddChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addChildList(self, cur):
+ """Add a list of node at the end of the child list of the
+ parent merging adjacent TEXT nodes (@cur may be freed) """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlAddChildList(self._o, cur__o)
+ if ret is None:raise treeError('xmlAddChildList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addContent(self, content):
+ """Append the extra substring to the node content. NOTE: In
+ contrast to xmlNodeSetContent(), @content is supposed to be
+ raw text, so unescaped XML special chars are allowed,
+ entity references are not supported. """
+ libxml2mod.xmlNodeAddContent(self._o, content)
+
+ def addContentLen(self, content, len):
+ """Append the extra substring to the node content. NOTE: In
+ contrast to xmlNodeSetContentLen(), @content is supposed to
+ be raw text, so unescaped XML special chars are allowed,
+ entity references are not supported. """
+ libxml2mod.xmlNodeAddContentLen(self._o, content, len)
+
+ def addNextSibling(self, elem):
+ """Add a new node @elem as the next sibling of @cur If the new
+ node was already inserted in a document it is first
+ unlinked from its existing context. As a result of text
+ merging @elem may be freed. If the new node is ATTRIBUTE,
+ it is added into properties instead of children. If there
+ is an attribute with equal name, it is first destroyed. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddNextSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddNextSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addPrevSibling(self, elem):
+ """Add a new node @elem as the previous sibling of @cur
+ merging adjacent TEXT nodes (@elem may be freed) If the new
+ node was already inserted in a document it is first
+ unlinked from its existing context. If the new node is
+ ATTRIBUTE, it is added into properties instead of children.
+ If there is an attribute with equal name, it is first
+ destroyed. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddPrevSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddPrevSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addSibling(self, elem):
+ """Add a new element @elem to the list of siblings of @cur
+ merging adjacent TEXT nodes (@elem may be freed) If the new
+ element was already inserted in a document it is first
+ unlinked from its existing context. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNode(self, extended):
+ """Do a copy of the node. """
+ ret = libxml2mod.xmlCopyNode(self._o, extended)
+ if ret is None:raise treeError('xmlCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNodeList(self):
+ """Do a recursive copy of the node list. Use
+ xmlDocCopyNodeList() if possible to ensure string interning. """
+ ret = libxml2mod.xmlCopyNodeList(self._o)
+ if ret is None:raise treeError('xmlCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyProp(self, cur):
+ """Do a copy of the attribute. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlCopyProp(self._o, cur__o)
+ if ret is None:raise treeError('xmlCopyProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def copyPropList(self, cur):
+ """Do a copy of an attribute list. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlCopyPropList(self._o, cur__o)
+ if ret is None:raise treeError('xmlCopyPropList() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def docCopyNode(self, doc, extended):
+ """Do a copy of the node to a given document. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocCopyNode(self._o, doc__o, extended)
+ if ret is None:raise treeError('xmlDocCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def docCopyNodeList(self, doc):
+ """Do a recursive copy of the node list. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocCopyNodeList(doc__o, self._o)
+ if ret is None:raise treeError('xmlDocCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def docSetRootElement(self, doc):
+ """Set the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocSetRootElement(doc__o, self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def firstElementChild(self):
+ """Finds the first child node of that element which is a
+ Element node Note the handling of entities references is
+ different than in the W3C DOM element traversal spec since
+ we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlFirstElementChild(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def freeNode(self):
+ """Free a node, this is a recursive behaviour, all the
+ children are freed too. This doesn't unlink the child from
+ the list, use xmlUnlinkNode() first. """
+ libxml2mod.xmlFreeNode(self._o)
+
+ def freeNodeList(self):
+ """Free a node and all its siblings, this is a recursive
+ behaviour, all the children are freed too. """
+ libxml2mod.xmlFreeNodeList(self._o)
+
+ def getBase(self, doc):
+ """Searches for the BASE URL. The code should work on both XML
+ and HTML document even if base mechanisms are completely
+ different. It returns the base as defined in RFC 2396
+ sections 5.1.1. Base URI within Document Content and 5.1.2.
+ Base URI from the Encapsulating Entity However it does not
+ return the document base (5.1.3), use doc->URL in this case """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeGetBase(doc__o, self._o)
+ return ret
+
+ def getContent(self):
+ """Read the value of a node, this can be either the text
+ carried directly by this node if it's a TEXT node or the
+ aggregate string of the values carried by this node child's
+ (TEXT and ENTITY_REF). Entity references are substituted. """
+ ret = libxml2mod.xmlNodeGetContent(self._o)
+ return ret
+
+ def getLang(self):
+ """Searches the language of a node, i.e. the values of the
+ xml:lang attribute or the one carried by the nearest
+ ancestor. """
+ ret = libxml2mod.xmlNodeGetLang(self._o)
+ return ret
+
+ def getSpacePreserve(self):
+ """Searches the space preserving behaviour of a node, i.e. the
+ values of the xml:space attribute or the one carried by the
+ nearest ancestor. """
+ ret = libxml2mod.xmlNodeGetSpacePreserve(self._o)
+ return ret
+
+ def hasNsProp(self, name, nameSpace):
+ """Search for an attribute associated to a node This attribute
+ has to be anchored in the namespace specified. This does
+ the entity substitution. This function looks in DTD
+ attribute declaration for #FIXED or default declaration
+ values unless DTD use has been turned off. Note that a
+ namespace of None indicates to use the default namespace. """
+ ret = libxml2mod.xmlHasNsProp(self._o, name, nameSpace)
+ if ret is None:return None
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def hasProp(self, name):
+ """Search an attribute associated to a node This function also
+ looks in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. """
+ ret = libxml2mod.xmlHasProp(self._o, name)
+ if ret is None:return None
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def isBlankNode(self):
+ """Checks whether this node is an empty or whitespace only
+ (and possibly ignorable) text-node. """
+ ret = libxml2mod.xmlIsBlankNode(self._o)
+ return ret
+
+ def isText(self):
+ """Is this node a Text node ? """
+ ret = libxml2mod.xmlNodeIsText(self._o)
+ return ret
+
+ def lastChild(self):
+ """Search the last child of a node. """
+ ret = libxml2mod.xmlGetLastChild(self._o)
+ if ret is None:raise treeError('xmlGetLastChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def lastElementChild(self):
+ """Finds the last child node of that element which is a
+ Element node Note the handling of entities references is
+ different than in the W3C DOM element traversal spec since
+ we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlLastElementChild(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def lineNo(self):
+ """Get line number of @node. Try to override the limitation of
+ lines being store in 16 bits ints if XML_PARSE_BIG_LINES
+ parser option was used """
+ ret = libxml2mod.xmlGetLineNo(self._o)
+ return ret
+
+ def listGetRawString(self, doc, inLine):
+ """Builds the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs, contrary to
+ xmlNodeListGetString() this function doesn't do any
+ character encoding handling. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeListGetRawString(doc__o, self._o, inLine)
+ return ret
+
+ def listGetString(self, doc, inLine):
+ """Build the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeListGetString(doc__o, self._o, inLine)
+ return ret
+
+ def newChild(self, ns, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child list containing the TEXTs and ENTITY_REFs node will
+ be created. NOTE: @content is supposed to be a piece of XML
+ CDATA, so it allows entity references. XML special chars
+ must be escaped first by using
+ xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
+ be used. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewChild(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNs(self, href, prefix):
+ """Creation of a new Namespace. This function will refuse to
+ create a namespace with a similar prefix than an existing
+ one present on this node. Note that for a default
+ namespace, @prefix should be None. We use href==None in
+ the case of an element creation where the namespace was not
+ defined. """
+ ret = libxml2mod.xmlNewNs(self._o, href, prefix)
+ if ret is None:raise treeError('xmlNewNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def newNsProp(self, ns, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewNsProp(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlNewNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newNsPropEatName(self, ns, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewNsPropEatName(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlNewNsPropEatName() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newProp(self, name, value):
+ """Create a new property carried by a node. """
+ ret = libxml2mod.xmlNewProp(self._o, name, value)
+ if ret is None:raise treeError('xmlNewProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newTextChild(self, ns, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child TEXT node will be created containing the string
+ @content. NOTE: Use xmlNewChild() if @content will contain
+ entities that need to be preserved. Use this function,
+ xmlNewTextChild(), if you need to ensure that reserved XML
+ chars that might appear in @content, such as the ampersand,
+ greater-than or less-than signs, are automatically replaced
+ by their XML escaped entity representations. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewTextChild(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewTextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def nextElementSibling(self):
+ """Finds the first closest next sibling of the node which is
+ an element node. Note the handling of entities references
+ is different than in the W3C DOM element traversal spec
+ since we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlNextElementSibling(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def noNsProp(self, name):
+ """Search and get the value of an attribute associated to a
+ node This does the entity substitution. This function looks
+ in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. This
+ function is similar to xmlGetProp except it will accept
+ only an attribute in no namespace. """
+ ret = libxml2mod.xmlGetNoNsProp(self._o, name)
+ return ret
+
+ def nodePath(self):
+ """Build a structure based Path for the given node """
+ ret = libxml2mod.xmlGetNodePath(self._o)
+ return ret
+
+ def nsProp(self, name, nameSpace):
+ """Search and get the value of an attribute associated to a
+ node This attribute has to be anchored in the namespace
+ specified. This does the entity substitution. This function
+ looks in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. """
+ ret = libxml2mod.xmlGetNsProp(self._o, name, nameSpace)
+ return ret
+
+ def previousElementSibling(self):
+ """Finds the first closest previous sibling of the node which
+ is an element node. Note the handling of entities
+ references is different than in the W3C DOM element
+ traversal spec since we don't have back reference from
+ entities content to entities references. """
+ ret = libxml2mod.xmlPreviousElementSibling(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def prop(self, name):
+ """Search and get the value of an attribute associated to a
+ node This does the entity substitution. This function looks
+ in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off.
+ NOTE: this function acts independently of namespaces
+ associated to the attribute. Use xmlGetNsProp() or
+ xmlGetNoNsProp() for namespace aware processing. """
+ ret = libxml2mod.xmlGetProp(self._o, name)
+ return ret
+
+ def reconciliateNs(self, doc):
+ """This function checks that all the namespaces declared
+ within the given tree are properly declared. This is needed
+ for example after Copy or Cut and then paste operations.
+ The subtree may still hold pointers to namespace
+ declarations outside the subtree or invalid/masked. As much
+ as possible the function try to reuse the existing
+ namespaces found in the new environment. If not possible
+ the new namespaces are redeclared on @tree at the top of
+ the given subtree. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlReconciliateNs(doc__o, self._o)
+ return ret
+
+ def replaceNode(self, cur):
+ """Unlink the old node from its current context, prune the new
+ one at the same place. If @cur was already inserted in a
+ document it is first unlinked from its existing context. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlReplaceNode(self._o, cur__o)
+ if ret is None:raise treeError('xmlReplaceNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def searchNs(self, doc, nameSpace):
+ """Search a Ns registered under a given name space for a
+ document. recurse on the parents until it finds the defined
+ namespace or return None otherwise. @nameSpace can be None,
+ this is a search for the default namespace. We don't allow
+ to cross entities boundaries. If you don't declare the
+ namespace within those you will be in troubles !!! A
+ warning is generated to cover this case. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSearchNs(doc__o, self._o, nameSpace)
+ if ret is None:raise treeError('xmlSearchNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def searchNsByHref(self, doc, href):
+ """Search a Ns aliasing a given URI. Recurse on the parents
+ until it finds the defined namespace or return None
+ otherwise. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSearchNsByHref(doc__o, self._o, href)
+ if ret is None:raise treeError('xmlSearchNsByHref() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def setBase(self, uri):
+ """Set (or reset) the base URI of a node, i.e. the value of
+ the xml:base attribute. """
+ libxml2mod.xmlNodeSetBase(self._o, uri)
+
+ def setContent(self, content):
+ """Replace the content of a node. NOTE: @content is supposed
+ to be a piece of XML CDATA, so it allows entity references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
+ libxml2mod.xmlNodeSetContent(self._o, content)
+
+ def setContentLen(self, content, len):
+ """Replace the content of a node. NOTE: @content is supposed
+ to be a piece of XML CDATA, so it allows entity references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
+ libxml2mod.xmlNodeSetContentLen(self._o, content, len)
+
+ def setLang(self, lang):
+ """Set the language of a node, i.e. the values of the xml:lang
+ attribute. """
+ libxml2mod.xmlNodeSetLang(self._o, lang)
+
+ def setListDoc(self, doc):
+ """update all nodes in the list to point to the right document """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlSetListDoc(self._o, doc__o)
+
+ def setName(self, name):
+ """Set (or reset) the name of a node. """
+ libxml2mod.xmlNodeSetName(self._o, name)
+
+ def setNs(self, ns):
+ """Associate a namespace to a node, a posteriori. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ libxml2mod.xmlSetNs(self._o, ns__o)
+
+ def setNsProp(self, ns, name, value):
+ """Set (or reset) an attribute carried by a node. The ns
+ structure must be in scope, this is not checked """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlSetNsProp(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlSetNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def setProp(self, name, value):
+ """Set (or reset) an attribute carried by a node. If @name has
+ a prefix, then the corresponding namespace-binding will be
+ used, if in scope; it is an error it there's no such
+ ns-binding for the prefix in scope. """
+ ret = libxml2mod.xmlSetProp(self._o, name, value)
+ if ret is None:raise treeError('xmlSetProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def setSpacePreserve(self, val):
+ """Set (or reset) the space preserving behaviour of a node,
+ i.e. the value of the xml:space attribute. """
+ libxml2mod.xmlNodeSetSpacePreserve(self._o, val)
+
+ def setTreeDoc(self, doc):
+ """update all nodes under the tree to point to the right
+ document """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlSetTreeDoc(self._o, doc__o)
+
+ def textConcat(self, content, len):
+ """Concat the given string at the end of the existing node
+ content """
+ ret = libxml2mod.xmlTextConcat(self._o, content, len)
+ return ret
+
+ def textMerge(self, second):
+ """Merge two text nodes into one """
+ if second is None: second__o = None
+ else: second__o = second._o
+ ret = libxml2mod.xmlTextMerge(self._o, second__o)
+ if ret is None:raise treeError('xmlTextMerge() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def unlinkNode(self):
+ """Unlink a node from it's current context, the node is not
+ freed If one need to free the node, use xmlFreeNode()
+ routine after the unlink to discard it. Note that namespace
+ nodes can't be unlinked as they do not have pointer to
+ their parent. """
+ libxml2mod.xmlUnlinkNode(self._o)
+
+ def unsetNsProp(self, ns, name):
+ """Remove an attribute carried by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlUnsetNsProp(self._o, ns__o, name)
+ return ret
+
+ def unsetProp(self, name):
+ """Remove an attribute carried by a node. This handles only
+ attributes in no namespace. """
+ ret = libxml2mod.xmlUnsetProp(self._o, name)
+ return ret
+
+ #
+ # xmlNode functions from module valid
+ #
+
+ def isID(self, doc, attr):
+ """Determine whether an attribute is of type ID. In case we
+ have DTD(s) then this is done if DTD loading has been
+ requested. In the case of HTML documents parsed with the
+ HTML parser, then ID detection is done systematically. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsID(doc__o, self._o, attr__o)
+ return ret
+
+ def isRef(self, doc, attr):
+ """Determine whether an attribute is of type Ref. In case we
+ have DTD(s) then this is simple, otherwise we use an
+ heuristic: name Ref (upper or lowercase). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsRef(doc__o, self._o, attr__o)
+ return ret
+
+ def validNormalizeAttributeValue(self, doc, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidNormalizeAttributeValue(doc__o, self._o, name, value)
+ return ret
+
+ #
+ # xmlNode functions from module xinclude
+ #
+
+ def xincludeProcessTree(self):
+ """Implement the XInclude substitution for the given subtree """
+ ret = libxml2mod.xmlXIncludeProcessTree(self._o)
+ return ret
+
+ def xincludeProcessTreeFlags(self, flags):
+ """Implement the XInclude substitution for the given subtree """
+ ret = libxml2mod.xmlXIncludeProcessTreeFlags(self._o, flags)
+ return ret
+
+ #
+ # xmlNode functions from module xmlschemas
+ #
+
+ def schemaValidateOneElement(self, ctxt):
+ """Validate a branch of a tree, starting with the given @elem. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlSchemaValidateOneElement(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlNode functions from module xpath
+ #
+
+ def xpathCastNodeToNumber(self):
+ """Converts a node to its number value """
+ ret = libxml2mod.xmlXPathCastNodeToNumber(self._o)
+ return ret
+
+ def xpathCastNodeToString(self):
+ """Converts a node to its string value. """
+ ret = libxml2mod.xmlXPathCastNodeToString(self._o)
+ return ret
+
+ def xpathCmpNodes(self, node2):
+ """Compare two nodes w.r.t document order """
+ if node2 is None: node2__o = None
+ else: node2__o = node2._o
+ ret = libxml2mod.xmlXPathCmpNodes(self._o, node2__o)
+ return ret
+
+ def xpathNodeEval(self, str, ctx):
+ """Evaluate the XPath Location Path in the given context. The
+ node 'node' is set as the context node. The context node is
+ not restored. """
+ if ctx is None: ctx__o = None
+ else: ctx__o = ctx._o
+ ret = libxml2mod.xmlXPathNodeEval(self._o, str, ctx__o)
+ if ret is None:raise xpathError('xmlXPathNodeEval() failed')
+ return xpathObjectRet(ret)
+
+ #
+ # xmlNode functions from module xpathInternals
+ #
+
+ def xpathNewNodeSet(self):
+ """Create a new xmlXPathObjectPtr of type NodeSet and
+ initialize it with the single Node @val """
+ ret = libxml2mod.xmlXPathNewNodeSet(self._o)
+ if ret is None:raise xpathError('xmlXPathNewNodeSet() failed')
+ return xpathObjectRet(ret)
+
+ def xpathNewValueTree(self):
+ """Create a new xmlXPathObjectPtr of type Value Tree (XSLT)
+ and initialize it with the tree root @val """
+ ret = libxml2mod.xmlXPathNewValueTree(self._o)
+ if ret is None:raise xpathError('xmlXPathNewValueTree() failed')
+ return xpathObjectRet(ret)
+
+ def xpathNextAncestor(self, ctxt):
+ """Traversal function for the "ancestor" direction the
+ ancestor axis contains the ancestors of the context node;
+ the ancestors of the context node consist of the parent of
+ context node and the parent's parent and so on; the nodes
+ are ordered in reverse document order; thus the parent is
+ the first node on the axis, and the parent's parent is the
+ second node on the axis """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAncestor(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAncestorOrSelf(self, ctxt):
+ """Traversal function for the "ancestor-or-self" direction he
+ ancestor-or-self axis contains the context node and
+ ancestors of the context node in reverse document order;
+ thus the context node is the first node on the axis, and
+ the context node's parent the second; parent here is
+ defined the same as with the parent axis. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAncestorOrSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAttribute(self, ctxt):
+ """Traversal function for the "attribute" direction TODO:
+ support DTD inherited default attributes """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAttribute(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextChild(self, ctxt):
+ """Traversal function for the "child" direction The child axis
+ contains the children of the context node in document order. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextChild(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendant(self, ctxt):
+ """Traversal function for the "descendant" direction the
+ descendant axis contains the descendants of the context
+ node in document order; a descendant is a child or a child
+ of a child and so on. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendantOrSelf(self, ctxt):
+ """Traversal function for the "descendant-or-self" direction
+ the descendant-or-self axis contains the context node and
+ the descendants of the context node in document order; thus
+ the context node is the first node on the axis, and the
+ first child of the context node is the second node on the
+ axis """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextDescendantOrSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowing(self, ctxt):
+ """Traversal function for the "following" direction The
+ following axis contains all nodes in the same document as
+ the context node that are after the context node in
+ document order, excluding any descendants and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in document order """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextFollowing(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowingSibling(self, ctxt):
+ """Traversal function for the "following-sibling" direction
+ The following-sibling axis contains the following siblings
+ of the context node in document order. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextFollowingSibling(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextNamespace(self, ctxt):
+ """Traversal function for the "namespace" direction the
+ namespace axis contains the namespace nodes of the context
+ node; the order of nodes on this axis is
+ implementation-defined; the axis will be empty unless the
+ context node is an element We keep the XML namespace node
+ at the end of the list. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextNamespace(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextParent(self, ctxt):
+ """Traversal function for the "parent" direction The parent
+ axis contains the parent of the context node, if there is
+ one. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextParent(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextParent() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPreceding(self, ctxt):
+ """Traversal function for the "preceding" direction the
+ preceding axis contains all nodes in the same document as
+ the context node that are before the context node in
+ document order, excluding any ancestors and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in reverse document order """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextPreceding(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPrecedingSibling(self, ctxt):
+ """Traversal function for the "preceding-sibling" direction
+ The preceding-sibling axis contains the preceding siblings
+ of the context node in reverse document order; the first
+ preceding sibling is first on the axis; the sibling
+ preceding that node is the second on the axis and so on. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextPrecedingSibling(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextSelf(self, ctxt):
+ """Traversal function for the "self" direction The self axis
+ contains just the context node itself """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ #
+ # xmlNode functions from module xpointer
+ #
+
+ def xpointerNewCollapsedRange(self):
+ """Create a new xmlXPathObjectPtr of type range using a single
+ nodes """
+ ret = libxml2mod.xmlXPtrNewCollapsedRange(self._o)
+ if ret is None:raise treeError('xmlXPtrNewCollapsedRange() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewContext(self, doc, origin):
+ """Create a new XPointer context """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if origin is None: origin__o = None
+ else: origin__o = origin._o
+ ret = libxml2mod.xmlXPtrNewContext(doc__o, self._o, origin__o)
+ if ret is None:raise treeError('xmlXPtrNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ def xpointerNewLocationSetNodes(self, end):
+ """Create a new xmlXPathObjectPtr of type LocationSet and
+ initialize it with the single range made of the two nodes
+ @start and @end """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewLocationSetNodes(self._o, end__o)
+ if ret is None:raise treeError('xmlXPtrNewLocationSetNodes() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewRange(self, startindex, end, endindex):
+ """Create a new xmlXPathObjectPtr of type range """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewRange(self._o, startindex, end__o, endindex)
+ if ret is None:raise treeError('xmlXPtrNewRange() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewRangeNodes(self, end):
+ """Create a new xmlXPathObjectPtr of type range using 2 nodes """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewRangeNodes(self._o, end__o)
+ if ret is None:raise treeError('xmlXPtrNewRangeNodes() failed')
+ return xpathObjectRet(ret)
+
+class xmlDoc(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlDoc got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlDoc (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlDoc functions from module HTMLparser
+ #
+
+ def htmlAutoCloseTag(self, name, elem):
+ """The HTML DTD allows a tag to implicitly close other tags.
+ The list is kept in htmlStartClose array. This function
+ checks if the element or one of it's children would
+ autoclose the given tag. """
+ ret = libxml2mod.htmlAutoCloseTag(self._o, name, elem)
+ return ret
+
+ def htmlIsAutoClosed(self, elem):
+ """The HTML DTD allows a tag to implicitly close other tags.
+ The list is kept in htmlStartClose array. This function
+ checks if a tag is autoclosed by one of it's child """
+ ret = libxml2mod.htmlIsAutoClosed(self._o, elem)
+ return ret
+
+ #
+ # xmlDoc functions from module HTMLtree
+ #
+
+ def htmlDocContentDumpFormatOutput(self, buf, encoding, format):
+ """Dump an HTML document. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ libxml2mod.htmlDocContentDumpFormatOutput(buf__o, self._o, encoding, format)
+
+ def htmlDocContentDumpOutput(self, buf, encoding):
+ """Dump an HTML document. Formatting return/spaces are added. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ libxml2mod.htmlDocContentDumpOutput(buf__o, self._o, encoding)
+
+ def htmlDocDump(self, f):
+ """Dump an HTML document to an open FILE. """
+ ret = libxml2mod.htmlDocDump(f, self._o)
+ return ret
+
+ def htmlGetMetaEncoding(self):
+ """Encoding definition lookup in the Meta tags """
+ ret = libxml2mod.htmlGetMetaEncoding(self._o)
+ return ret
+
+ def htmlNodeDumpFile(self, out, cur):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns are added. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFile(out, self._o, cur__o)
+
+ def htmlNodeDumpFileFormat(self, out, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. TODO: if encoding == None try to save in the doc
+ encoding """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.htmlNodeDumpFileFormat(out, self._o, cur__o, encoding, format)
+ return ret
+
+ def htmlNodeDumpFormatOutput(self, buf, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFormatOutput(buf__o, self._o, cur__o, encoding, format)
+
+ def htmlNodeDumpOutput(self, buf, cur, encoding):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns/spaces are added. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpOutput(buf__o, self._o, cur__o, encoding)
+
+ def htmlSaveFile(self, filename):
+ """Dump an HTML document to a file. If @filename is "-" the
+ stdout file is used. """
+ ret = libxml2mod.htmlSaveFile(filename, self._o)
+ return ret
+
+ def htmlSaveFileEnc(self, filename, encoding):
+ """Dump an HTML document to a file using a given encoding and
+ formatting returns/spaces are added. """
+ ret = libxml2mod.htmlSaveFileEnc(filename, self._o, encoding)
+ return ret
+
+ def htmlSaveFileFormat(self, filename, encoding, format):
+ """Dump an HTML document to a file using a given encoding. """
+ ret = libxml2mod.htmlSaveFileFormat(filename, self._o, encoding, format)
+ return ret
+
+ def htmlSetMetaEncoding(self, encoding):
+ """Sets the current encoding in the Meta tags NOTE: this will
+ not change the document content encoding, just the META
+ flag associated. """
+ ret = libxml2mod.htmlSetMetaEncoding(self._o, encoding)
+ return ret
+
+ #
+ # xmlDoc functions from module debugXML
+ #
+
+ def debugCheckDocument(self, output):
+ """Check the document for potential content problems, and
+ output the errors to @output """
+ ret = libxml2mod.xmlDebugCheckDocument(output, self._o)
+ return ret
+
+ def debugDumpDocument(self, output):
+ """Dumps debug information for the document, it's recursive """
+ libxml2mod.xmlDebugDumpDocument(output, self._o)
+
+ def debugDumpDocumentHead(self, output):
+ """Dumps debug information concerning the document, not
+ recursive """
+ libxml2mod.xmlDebugDumpDocumentHead(output, self._o)
+
+ def debugDumpEntities(self, output):
+ """Dumps debug information for all the entities in use by the
+ document """
+ libxml2mod.xmlDebugDumpEntities(output, self._o)
+
+ #
+ # xmlDoc functions from module entities
+ #
+
+ def addDocEntity(self, name, type, ExternalID, SystemID, content):
+ """Register a new entity for this document. """
+ ret = libxml2mod.xmlAddDocEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlAddDocEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def addDtdEntity(self, name, type, ExternalID, SystemID, content):
+ """Register a new entity for this document DTD external subset. """
+ ret = libxml2mod.xmlAddDtdEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlAddDtdEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def docEntity(self, name):
+ """Do an entity lookup in the document entity hash table and """
+ ret = libxml2mod.xmlGetDocEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetDocEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def dtdEntity(self, name):
+ """Do an entity lookup in the DTD entity hash table and """
+ ret = libxml2mod.xmlGetDtdEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetDtdEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def encodeEntities(self, input):
+ """TODO: remove xmlEncodeEntities, once we are not afraid of
+ breaking binary compatibility People must migrate their
+ code to xmlEncodeEntitiesReentrant ! This routine will
+ issue a warning when encountered. """
+ ret = libxml2mod.xmlEncodeEntities(self._o, input)
+ return ret
+
+ def encodeEntitiesReentrant(self, input):
+ """Do a global encoding of a string, replacing the predefined
+ entities and non ASCII values with their entities and
+ CharRef counterparts. Contrary to xmlEncodeEntities, this
+ routine is reentrant, and result must be deallocated. """
+ ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
+ return ret
+
+ def encodeSpecialChars(self, input):
+ """Do a global encoding of a string, replacing the predefined
+ entities this routine is reentrant, and result must be
+ deallocated. """
+ ret = libxml2mod.xmlEncodeSpecialChars(self._o, input)
+ return ret
+
+ def newEntity(self, name, type, ExternalID, SystemID, content):
+ """Create a new entity, this differs from xmlAddDocEntity()
+ that if the document is None or has no internal subset
+ defined, then an unlinked entity structure will be
+ returned, it is then the responsibility of the caller to
+ link it to the document later or free it when not needed
+ anymore. """
+ ret = libxml2mod.xmlNewEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlNewEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def parameterEntity(self, name):
+ """Do an entity lookup in the internal and external subsets and """
+ ret = libxml2mod.xmlGetParameterEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetParameterEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module relaxng
+ #
+
+ def relaxNGNewDocParserCtxt(self):
+ """Create an XML RelaxNGs parser context for that document.
+ Note: since the process of compiling a RelaxNG schemas
+ modifies the document, the @doc parameter is duplicated
+ internally. """
+ ret = libxml2mod.xmlRelaxNGNewDocParserCtxt(self._o)
+ if ret is None:raise parserError('xmlRelaxNGNewDocParserCtxt() failed')
+ __tmp = relaxNgParserCtxt(_obj=ret)
+ return __tmp
+
+ def relaxNGValidateDoc(self, ctxt):
+ """Validate a document tree in memory. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlRelaxNGValidateDoc(ctxt__o, self._o)
+ return ret
+
+ def relaxNGValidateFullElement(self, ctxt, elem):
+ """Validate a full subtree when
+ xmlRelaxNGValidatePushElement() returned 0 and the content
+ of the node has been expanded. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidateFullElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def relaxNGValidatePopElement(self, ctxt, elem):
+ """Pop the element end from the RelaxNG validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePopElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def relaxNGValidatePushElement(self, ctxt, elem):
+ """Push a new element start on the RelaxNG validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePushElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ #
+ # xmlDoc functions from module tree
+ #
+
+ def copyDoc(self, recursive):
+ """Do a copy of the document info. If recursive, the content
+ tree will be copied too as well as DTD, namespaces and
+ entities. """
+ ret = libxml2mod.xmlCopyDoc(self._o, recursive)
+ if ret is None:raise treeError('xmlCopyDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def copyNode(self, node, extended):
+ """Do a copy of the node to a given document. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlDocCopyNode(node__o, self._o, extended)
+ if ret is None:raise treeError('xmlDocCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNodeList(self, node):
+ """Do a recursive copy of the node list. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlDocCopyNodeList(self._o, node__o)
+ if ret is None:raise treeError('xmlDocCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def createIntSubset(self, name, ExternalID, SystemID):
+ """Create the internal subset of a document """
+ ret = libxml2mod.xmlCreateIntSubset(self._o, name, ExternalID, SystemID)
+ if ret is None:raise treeError('xmlCreateIntSubset() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def docCompressMode(self):
+ """get the compression ratio for a document, ZLIB based """
+ ret = libxml2mod.xmlGetDocCompressMode(self._o)
+ return ret
+
+ def dump(self, f):
+ """Dump an XML document to an open FILE. """
+ ret = libxml2mod.xmlDocDump(f, self._o)
+ return ret
+
+ def elemDump(self, f, cur):
+ """Dump an XML/HTML node, recursive behaviour, children are
+ printed too. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlElemDump(f, self._o, cur__o)
+
+ def formatDump(self, f, format):
+ """Dump an XML document to an open FILE. """
+ ret = libxml2mod.xmlDocFormatDump(f, self._o, format)
+ return ret
+
+ def freeDoc(self):
+ """Free up all the structures used by a document, tree
+ included. """
+ libxml2mod.xmlFreeDoc(self._o)
+
+ def getRootElement(self):
+ """Get the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ ret = libxml2mod.xmlDocGetRootElement(self._o)
+ if ret is None:raise treeError('xmlDocGetRootElement() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def intSubset(self):
+ """Get the internal subset of a document """
+ ret = libxml2mod.xmlGetIntSubset(self._o)
+ if ret is None:raise treeError('xmlGetIntSubset() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def newCDataBlock(self, content, len):
+ """Creation of a new node containing a CDATA block. """
+ ret = libxml2mod.xmlNewCDataBlock(self._o, content, len)
+ if ret is None:raise treeError('xmlNewCDataBlock() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newCharRef(self, name):
+ """Creation of a new character reference node. """
+ ret = libxml2mod.xmlNewCharRef(self._o, name)
+ if ret is None:raise treeError('xmlNewCharRef() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocComment(self, content):
+ """Creation of a new node containing a comment within a
+ document. """
+ ret = libxml2mod.xmlNewDocComment(self._o, content)
+ if ret is None:raise treeError('xmlNewDocComment() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocFragment(self):
+ """Creation of a new Fragment node. """
+ ret = libxml2mod.xmlNewDocFragment(self._o)
+ if ret is None:raise treeError('xmlNewDocFragment() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNode(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocNode(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNodeEatName(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocNodeEatName(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocPI(self, name, content):
+ """Creation of a processing instruction element. """
+ ret = libxml2mod.xmlNewDocPI(self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocPI() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocProp(self, name, value):
+ """Create a new property carried by a document. """
+ ret = libxml2mod.xmlNewDocProp(self._o, name, value)
+ if ret is None:raise treeError('xmlNewDocProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newDocRawNode(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocRawNode(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocRawNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocText(self, content):
+ """Creation of a new text node within a document. """
+ ret = libxml2mod.xmlNewDocText(self._o, content)
+ if ret is None:raise treeError('xmlNewDocText() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocTextLen(self, content, len):
+ """Creation of a new text node with an extra content length
+ parameter. The text node pertain to a given document. """
+ ret = libxml2mod.xmlNewDocTextLen(self._o, content, len)
+ if ret is None:raise treeError('xmlNewDocTextLen() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDtd(self, name, ExternalID, SystemID):
+ """Creation of a new DTD for the external subset. To create an
+ internal subset, use xmlCreateIntSubset(). """
+ ret = libxml2mod.xmlNewDtd(self._o, name, ExternalID, SystemID)
+ if ret is None:raise treeError('xmlNewDtd() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def newGlobalNs(self, href, prefix):
+ """Creation of a Namespace, the old way using PI and without
+ scoping DEPRECATED !!! """
+ ret = libxml2mod.xmlNewGlobalNs(self._o, href, prefix)
+ if ret is None:raise treeError('xmlNewGlobalNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def newReference(self, name):
+ """Creation of a new reference node. """
+ ret = libxml2mod.xmlNewReference(self._o, name)
+ if ret is None:raise treeError('xmlNewReference() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def nodeDumpOutput(self, buf, cur, level, format, encoding):
+ """Dump an XML node, recursive behaviour, children are printed
+ too. Note that @format = 1 provide node indenting only if
+ xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
+ called """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlNodeDumpOutput(buf__o, self._o, cur__o, level, format, encoding)
+
+ def nodeGetBase(self, cur):
+ """Searches for the BASE URL. The code should work on both XML
+ and HTML document even if base mechanisms are completely
+ different. It returns the base as defined in RFC 2396
+ sections 5.1.1. Base URI within Document Content and 5.1.2.
+ Base URI from the Encapsulating Entity However it does not
+ return the document base (5.1.3), use doc->URL in this case """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlNodeGetBase(self._o, cur__o)
+ return ret
+
+ def nodeListGetRawString(self, list, inLine):
+ """Builds the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs, contrary to
+ xmlNodeListGetString() this function doesn't do any
+ character encoding handling. """
+ if list is None: list__o = None
+ else: list__o = list._o
+ ret = libxml2mod.xmlNodeListGetRawString(self._o, list__o, inLine)
+ return ret
+
+ def nodeListGetString(self, list, inLine):
+ """Build the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs """
+ if list is None: list__o = None
+ else: list__o = list._o
+ ret = libxml2mod.xmlNodeListGetString(self._o, list__o, inLine)
+ return ret
+
+ def reconciliateNs(self, tree):
+ """This function checks that all the namespaces declared
+ within the given tree are properly declared. This is needed
+ for example after Copy or Cut and then paste operations.
+ The subtree may still hold pointers to namespace
+ declarations outside the subtree or invalid/masked. As much
+ as possible the function try to reuse the existing
+ namespaces found in the new environment. If not possible
+ the new namespaces are redeclared on @tree at the top of
+ the given subtree. """
+ if tree is None: tree__o = None
+ else: tree__o = tree._o
+ ret = libxml2mod.xmlReconciliateNs(self._o, tree__o)
+ return ret
+
+ def saveFile(self, filename):
+ """Dump an XML document to a file. Will use compression if
+ compiled in and enabled. If @filename is "-" the stdout
+ file is used. """
+ ret = libxml2mod.xmlSaveFile(filename, self._o)
+ return ret
+
+ def saveFileEnc(self, filename, encoding):
+ """Dump an XML document, converting it to the given encoding """
+ ret = libxml2mod.xmlSaveFileEnc(filename, self._o, encoding)
+ return ret
+
+ def saveFileTo(self, buf, encoding):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ ret = libxml2mod.xmlSaveFileTo(buf__o, self._o, encoding)
+ return ret
+
+ def saveFormatFile(self, filename, format):
+ """Dump an XML document to a file. Will use compression if
+ compiled in and enabled. If @filename is "-" the stdout
+ file is used. If @format is set then the document will be
+ indented on output. Note that @format = 1 provide node
+ indenting only if xmlIndentTreeOutput = 1 or
+ xmlKeepBlanksDefault(0) was called """
+ ret = libxml2mod.xmlSaveFormatFile(filename, self._o, format)
+ return ret
+
+ def saveFormatFileEnc(self, filename, encoding, format):
+ """Dump an XML document to a file or an URL. """
+ ret = libxml2mod.xmlSaveFormatFileEnc(filename, self._o, encoding, format)
+ return ret
+
+ def saveFormatFileTo(self, buf, encoding, format):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ ret = libxml2mod.xmlSaveFormatFileTo(buf__o, self._o, encoding, format)
+ return ret
+
+ def searchNs(self, node, nameSpace):
+ """Search a Ns registered under a given name space for a
+ document. recurse on the parents until it finds the defined
+ namespace or return None otherwise. @nameSpace can be None,
+ this is a search for the default namespace. We don't allow
+ to cross entities boundaries. If you don't declare the
+ namespace within those you will be in troubles !!! A
+ warning is generated to cover this case. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSearchNs(self._o, node__o, nameSpace)
+ if ret is None:raise treeError('xmlSearchNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def searchNsByHref(self, node, href):
+ """Search a Ns aliasing a given URI. Recurse on the parents
+ until it finds the defined namespace or return None
+ otherwise. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSearchNsByHref(self._o, node__o, href)
+ if ret is None:raise treeError('xmlSearchNsByHref() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def setDocCompressMode(self, mode):
+ """set the compression ratio for a document, ZLIB based
+ Correct values: 0 (uncompressed) to 9 (max compression) """
+ libxml2mod.xmlSetDocCompressMode(self._o, mode)
+
+ def setListDoc(self, list):
+ """update all nodes in the list to point to the right document """
+ if list is None: list__o = None
+ else: list__o = list._o
+ libxml2mod.xmlSetListDoc(list__o, self._o)
+
+ def setRootElement(self, root):
+ """Set the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ if root is None: root__o = None
+ else: root__o = root._o
+ ret = libxml2mod.xmlDocSetRootElement(self._o, root__o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def setTreeDoc(self, tree):
+ """update all nodes under the tree to point to the right
+ document """
+ if tree is None: tree__o = None
+ else: tree__o = tree._o
+ libxml2mod.xmlSetTreeDoc(tree__o, self._o)
+
+ def stringGetNodeList(self, value):
+ """Parse the value string and build the node list associated.
+ Should produce a flat tree with only TEXTs and ENTITY_REFs. """
+ ret = libxml2mod.xmlStringGetNodeList(self._o, value)
+ if ret is None:raise treeError('xmlStringGetNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def stringLenGetNodeList(self, value, len):
+ """Parse the value string and build the node list associated.
+ Should produce a flat tree with only TEXTs and ENTITY_REFs. """
+ ret = libxml2mod.xmlStringLenGetNodeList(self._o, value, len)
+ if ret is None:raise treeError('xmlStringLenGetNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module valid
+ #
+
+ def ID(self, ID):
+ """Search the attribute declaring the given ID """
+ ret = libxml2mod.xmlGetID(self._o, ID)
+ if ret is None:raise treeError('xmlGetID() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def isID(self, elem, attr):
+ """Determine whether an attribute is of type ID. In case we
+ have DTD(s) then this is done if DTD loading has been
+ requested. In the case of HTML documents parsed with the
+ HTML parser, then ID detection is done systematically. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsID(self._o, elem__o, attr__o)
+ return ret
+
+ def isMixedElement(self, name):
+ """Search in the DtDs whether an element accept Mixed content
+ (or ANY) basically if it is supposed to accept text childs """
+ ret = libxml2mod.xmlIsMixedElement(self._o, name)
+ return ret
+
+ def isRef(self, elem, attr):
+ """Determine whether an attribute is of type Ref. In case we
+ have DTD(s) then this is simple, otherwise we use an
+ heuristic: name Ref (upper or lowercase). """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsRef(self._o, elem__o, attr__o)
+ return ret
+
+ def removeID(self, attr):
+ """Remove the given attribute from the ID table maintained
+ internally. """
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlRemoveID(self._o, attr__o)
+ return ret
+
+ def removeRef(self, attr):
+ """Remove the given attribute from the Ref table maintained
+ internally. """
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlRemoveRef(self._o, attr__o)
+ return ret
+
+ def validCtxtNormalizeAttributeValue(self, ctxt, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character.
+ Also check VC: Standalone Document Declaration in P32, and
+ update ctxt->valid accordingly """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(ctxt__o, self._o, elem__o, name, value)
+ return ret
+
+ def validNormalizeAttributeValue(self, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidNormalizeAttributeValue(self._o, elem__o, name, value)
+ return ret
+
+ def validateDocument(self, ctxt):
+ """Try to validate the document instance basically it does
+ the all the checks described by the XML Rec i.e. validates
+ the internal and external subset (if present) and validate
+ the document tree. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDocument(ctxt__o, self._o)
+ return ret
+
+ def validateDocumentFinal(self, ctxt):
+ """Does the final step for the document validation once all
+ the incremental validation steps have been completed
+ basically it does the following checks described by the XML
+ Rec Check all the IDREF/IDREFS attributes definition for
+ validity """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDocumentFinal(ctxt__o, self._o)
+ return ret
+
+ def validateDtd(self, ctxt, dtd):
+ """Try to validate the document against the dtd instance
+ Basically it does check all the definitions in the DtD.
+ Note the the internal subset (if present) is de-coupled
+ (i.e. not used), which could give problems if ID or IDREF
+ is present. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if dtd is None: dtd__o = None
+ else: dtd__o = dtd._o
+ ret = libxml2mod.xmlValidateDtd(ctxt__o, self._o, dtd__o)
+ return ret
+
+ def validateDtdFinal(self, ctxt):
+ """Does the final step for the dtds validation once all the
+ subsets have been parsed basically it does the following
+ checks described by the XML Rec - check that ENTITY and
+ ENTITIES type attributes default or possible values matches
+ one of the defined entities. - check that NOTATION type
+ attributes default or possible values matches one of the
+ defined notations. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDtdFinal(ctxt__o, self._o)
+ return ret
+
+ def validateElement(self, ctxt, elem):
+ """Try to validate the subtree under an element """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def validateNotationUse(self, ctxt, notationName):
+ """Validate that the given name match a notation declaration.
+ - [ VC: Notation Declared ] """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateNotationUse(ctxt__o, self._o, notationName)
+ return ret
+
+ def validateOneAttribute(self, ctxt, elem, attr, value):
+ """Try to validate a single attribute for an element basically
+ it does the following checks as described by the XML-1.0
+ recommendation: - [ VC: Attribute Value Type ] - [ VC:
+ Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
+ Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
+ Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlValidateOneAttribute(ctxt__o, self._o, elem__o, attr__o, value)
+ return ret
+
+ def validateOneElement(self, ctxt, elem):
+ """Try to validate a single element and it's attributes,
+ basically it does the following checks as described by the
+ XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
+ Required Attribute ] Then call xmlValidateOneAttribute()
+ for each attribute present. The ID/IDREF checkings are
+ done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateOneElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def validateOneNamespace(self, ctxt, elem, prefix, ns, value):
+ """Try to validate a single namespace declaration for an
+ element basically it does the following checks as described
+ by the XML-1.0 recommendation: - [ VC: Attribute Value Type
+ ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
+ [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
+ Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlValidateOneNamespace(ctxt__o, self._o, elem__o, prefix, ns__o, value)
+ return ret
+
+ def validatePopElement(self, ctxt, elem, qname):
+ """Pop the element end from the validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePopElement(ctxt__o, self._o, elem__o, qname)
+ return ret
+
+ def validatePushElement(self, ctxt, elem, qname):
+ """Push a new element start on the validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePushElement(ctxt__o, self._o, elem__o, qname)
+ return ret
+
+ def validateRoot(self, ctxt):
+ """Try to validate a the root element basically it does the
+ following check as described by the XML-1.0 recommendation:
+ - [ VC: Root Element Type ] it doesn't try to recurse or
+ apply other check to the element """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateRoot(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xinclude
+ #
+
+ def xincludeProcess(self):
+ """Implement the XInclude substitution on the XML document @doc """
+ ret = libxml2mod.xmlXIncludeProcess(self._o)
+ return ret
+
+ def xincludeProcessFlags(self, flags):
+ """Implement the XInclude substitution on the XML document @doc """
+ ret = libxml2mod.xmlXIncludeProcessFlags(self._o, flags)
+ return ret
+
+ #
+ # xmlDoc functions from module xmlreader
+ #
+
+ def NewWalker(self, reader):
+ """Setup an xmltextReader to parse a preparsed XML document.
+ This reuses the existing @reader xmlTextReader. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlReaderNewWalker(reader__o, self._o)
+ return ret
+
+ def readerWalker(self):
+ """Create an xmltextReader for a preparsed document. """
+ ret = libxml2mod.xmlReaderWalker(self._o)
+ if ret is None:raise treeError('xmlReaderWalker() failed')
+ __tmp = xmlTextReader(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module xmlschemas
+ #
+
+ def schemaNewDocParserCtxt(self):
+ """Create an XML Schemas parse context for that document. NB.
+ The document may be modified during the parsing process. """
+ ret = libxml2mod.xmlSchemaNewDocParserCtxt(self._o)
+ if ret is None:raise parserError('xmlSchemaNewDocParserCtxt() failed')
+ __tmp = SchemaParserCtxt(_obj=ret)
+ return __tmp
+
+ def schemaValidateDoc(self, ctxt):
+ """Validate a document tree in memory. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlSchemaValidateDoc(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xpath
+ #
+
+ def xpathNewContext(self):
+ """Create a new xmlXPathContext """
+ ret = libxml2mod.xmlXPathNewContext(self._o)
+ if ret is None:raise xpathError('xmlXPathNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ def xpathOrderDocElems(self):
+ """Call this routine to speed up XPath computation on static
+ documents. This stamps all the element nodes with the
+ document order Like for line information, the order is kept
+ in the element->content field, the value stored is actually
+ - the node number (starting at -1) to be able to
+ differentiate from line numbers. """
+ ret = libxml2mod.xmlXPathOrderDocElems(self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xpointer
+ #
+
+ def xpointerNewContext(self, here, origin):
+ """Create a new XPointer context """
+ if here is None: here__o = None
+ else: here__o = here._o
+ if origin is None: origin__o = None
+ else: origin__o = origin._o
+ ret = libxml2mod.xmlXPtrNewContext(self._o, here__o, origin__o)
+ if ret is None:raise treeError('xmlXPtrNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+class parserCtxt(parserCtxtCore):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ parserCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserCtxt(self._o)
+ self._o = None
+
+ # accessors for parserCtxt
+ def doc(self):
+ """Get the document tree from a parser context. """
+ ret = libxml2mod.xmlParserGetDoc(self._o)
+ if ret is None:raise parserError('xmlParserGetDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def isValid(self):
+ """Get the validity information from a parser context. """
+ ret = libxml2mod.xmlParserGetIsValid(self._o)
+ return ret
+
+ def lineNumbers(self, linenumbers):
+ """Switch on the generation of line number for elements nodes. """
+ libxml2mod.xmlParserSetLineNumbers(self._o, linenumbers)
+
+ def loadSubset(self, loadsubset):
+ """Switch the parser to load the DTD without validating. """
+ libxml2mod.xmlParserSetLoadSubset(self._o, loadsubset)
+
+ def pedantic(self, pedantic):
+ """Switch the parser to be pedantic. """
+ libxml2mod.xmlParserSetPedantic(self._o, pedantic)
+
+ def replaceEntities(self, replaceEntities):
+ """Switch the parser to replace entities. """
+ libxml2mod.xmlParserSetReplaceEntities(self._o, replaceEntities)
+
+ def validate(self, validate):
+ """Switch the parser to validation mode. """
+ libxml2mod.xmlParserSetValidate(self._o, validate)
+
+ def wellFormed(self):
+ """Get the well formed information from a parser context. """
+ ret = libxml2mod.xmlParserGetWellFormed(self._o)
+ return ret
+
+ #
+ # parserCtxt functions from module HTMLparser
+ #
+
+ def htmlCtxtReadDoc(self, cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadDoc(self._o, cur, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadFd(self, fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadFd(self._o, fd, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadFd() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadFile(self._o, filename, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadFile() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadMemory(self, buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadMemory() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReset(self):
+ """Reset a parser context """
+ libxml2mod.htmlCtxtReset(self._o)
+
+ def htmlCtxtUseOptions(self, options):
+ """Applies the options to the parser context """
+ ret = libxml2mod.htmlCtxtUseOptions(self._o, options)
+ return ret
+
+ def htmlFreeParserCtxt(self):
+ """Free all the memory used by a parser context. However the
+ parsed document in ctxt->myDoc is not freed. """
+ libxml2mod.htmlFreeParserCtxt(self._o)
+
+ def htmlParseCharRef(self):
+ """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
+ ';' | '&#x' [0-9a-fA-F]+ ';' """
+ ret = libxml2mod.htmlParseCharRef(self._o)
+ return ret
+
+ def htmlParseChunk(self, chunk, size, terminate):
+ """Parse a Chunk of memory """
+ ret = libxml2mod.htmlParseChunk(self._o, chunk, size, terminate)
+ return ret
+
+ def htmlParseDocument(self):
+ """parse an HTML document (and build a tree if using the
+ standard SAX interface). """
+ ret = libxml2mod.htmlParseDocument(self._o)
+ return ret
+
+ def htmlParseElement(self):
+ """parse an HTML element, this is highly recursive this is
+ kept for compatibility with previous code versions [39]
+ element ::= EmptyElemTag | STag content ETag [41]
+ Attribute ::= Name Eq AttValue """
+ libxml2mod.htmlParseElement(self._o)
+
+ #
+ # parserCtxt functions from module parser
+ #
+
+ def byteConsumed(self):
+ """This function provides the current index of the parser
+ relative to the start of the current entity. This function
+ is computed in bytes from the beginning starting at zero
+ and finishing at the size in byte of the file if parsing a
+ file. The function is of constant cost if the input is
+ UTF-8 but can be costly if run on non-UTF-8 input. """
+ ret = libxml2mod.xmlByteConsumed(self._o)
+ return ret
+
+ def clearParserCtxt(self):
+ """Clear (release owned resources) and reinitialize a parser
+ context """
+ libxml2mod.xmlClearParserCtxt(self._o)
+
+ def ctxtReadDoc(self, cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadDoc(self._o, cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadFd(self, fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. This
+ reuses the existing @ctxt parser context NOTE that the file
+ descriptor will not be closed when the reader is closed or
+ reset. """
+ ret = libxml2mod.xmlCtxtReadFd(self._o, fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadFd() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadFile(self._o, filename, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadFile() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadMemory(self, buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadMemory() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReset(self):
+ """Reset a parser context """
+ libxml2mod.xmlCtxtReset(self._o)
+
+ def ctxtResetPush(self, chunk, size, filename, encoding):
+ """Reset a push parser context """
+ ret = libxml2mod.xmlCtxtResetPush(self._o, chunk, size, filename, encoding)
+ return ret
+
+ def ctxtUseOptions(self, options):
+ """Applies the options to the parser context """
+ ret = libxml2mod.xmlCtxtUseOptions(self._o, options)
+ return ret
+
+ def initParserCtxt(self):
+ """Initialize a parser context """
+ ret = libxml2mod.xmlInitParserCtxt(self._o)
+ return ret
+
+ def parseChunk(self, chunk, size, terminate):
+ """Parse a Chunk of memory """
+ ret = libxml2mod.xmlParseChunk(self._o, chunk, size, terminate)
+ return ret
+
+ def parseDocument(self):
+ """parse an XML document (and build a tree if using the
+ standard SAX interface). [1] document ::= prolog element
+ Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? """
+ ret = libxml2mod.xmlParseDocument(self._o)
+ return ret
+
+ def parseExtParsedEnt(self):
+ """parse a general parsed entity An external general parsed
+ entity is well-formed if it matches the production labeled
+ extParsedEnt. [78] extParsedEnt ::= TextDecl? content """
+ ret = libxml2mod.xmlParseExtParsedEnt(self._o)
+ return ret
+
+ def setupParserForBuffer(self, buffer, filename):
+ """Setup the parser context to parse a new buffer; Clears any
+ prior contents from the parser context. The buffer
+ parameter must not be None, but the filename parameter can
+ be """
+ libxml2mod.xmlSetupParserForBuffer(self._o, buffer, filename)
+
+ def stopParser(self):
+ """Blocks further parser processing """
+ libxml2mod.xmlStopParser(self._o)
+
+ #
+ # parserCtxt functions from module parserInternals
+ #
+
+ def decodeEntities(self, len, what, end, end2, end3):
+ """This function is deprecated, we now always process entities
+ content through xmlStringDecodeEntities TODO: remove it in
+ next major release. [67] Reference ::= EntityRef | CharRef
+ [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlDecodeEntities(self._o, len, what, end, end2, end3)
+ return ret
+
+ def handleEntity(self, entity):
+ """Default handling of defined entities, when should we define
+ a new input stream ? When do we just handle that as a set
+ of chars ? OBSOLETE: to be removed at some point. """
+ if entity is None: entity__o = None
+ else: entity__o = entity._o
+ libxml2mod.xmlHandleEntity(self._o, entity__o)
+
+ def namespaceParseNCName(self):
+ """parse an XML namespace name. TODO: this seems not in use
+ anymore, the namespace handling is done on top of the SAX
+ interfaces, i.e. not on raw input. [NS 3] NCName ::=
+ (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter
+ | Digit | '.' | '-' | '_' | CombiningChar | Extender """
+ ret = libxml2mod.xmlNamespaceParseNCName(self._o)
+ return ret
+
+ def namespaceParseNSDef(self):
+ """parse a namespace prefix declaration TODO: this seems not
+ in use anymore, the namespace handling is done on top of
+ the SAX interfaces, i.e. not on raw input. [NS 1] NSDef
+ ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::=
+ 'xmlns' (':' NCName)? """
+ ret = libxml2mod.xmlNamespaceParseNSDef(self._o)
+ return ret
+
+ def nextChar(self):
+ """Skip to the next char input char. """
+ libxml2mod.xmlNextChar(self._o)
+
+ def parseAttValue(self):
+ """parse a value for an attribute Note: the parser won't do
+ substitution of entities here, this will be handled later
+ in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] |
+ Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3
+ Attribute-Value Normalization: Before the value of an
+ attribute is passed to the application or checked for
+ validity, the XML processor must normalize it as follows: -
+ a character reference is processed by appending the
+ referenced character to the attribute value - an entity
+ reference is processed by recursively processing the
+ replacement text of the entity - a whitespace character
+ (#x20, #xD, #xA, #x9) is processed by appending #x20 to the
+ normalized value, except that only a single #x20 is
+ appended for a "#xD#xA" sequence that is part of an
+ external parsed entity or the literal entity value of an
+ internal parsed entity - other characters are processed by
+ appending them to the normalized value If the declared
+ value is not CDATA, then the XML processor must further
+ process the normalized attribute value by discarding any
+ leading and trailing space (#x20) characters, and by
+ replacing sequences of space (#x20) characters by a single
+ space (#x20) character. All attributes for which no
+ declaration has been read should be treated by a
+ non-validating parser as if declared CDATA. """
+ ret = libxml2mod.xmlParseAttValue(self._o)
+ return ret
+
+ def parseAttributeListDecl(self):
+ """: parse the Attribute list def for an element [52]
+ AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53]
+ AttDef ::= S Name S AttType S DefaultDecl """
+ libxml2mod.xmlParseAttributeListDecl(self._o)
+
+ def parseCDSect(self):
+ """Parse escaped pure raw content. [18] CDSect ::= CDStart
+ CData CDEnd [19] CDStart ::= '<![CDATA[' [20] Data ::=
+ (Char* - (Char* ']]>' Char*)) [21] CDEnd ::= ']]>' """
+ libxml2mod.xmlParseCDSect(self._o)
+
+ def parseCharData(self, cdata):
+ """parse a CharData section. if we are within a CDATA section
+ ']]>' marks an end of section. The right angle bracket (>)
+ may be represented using the string "&gt;", and must, for
+ compatibility, be escaped using "&gt;" or a character
+ reference when it appears in the string "]]>" in content,
+ when that string is not marking the end of a CDATA section.
+ [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) """
+ libxml2mod.xmlParseCharData(self._o, cdata)
+
+ def parseCharRef(self):
+ """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
+ ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ]
+ Characters referred to using character references must
+ match the production for Char. """
+ ret = libxml2mod.xmlParseCharRef(self._o)
+ return ret
+
+ def parseComment(self):
+ """Skip an XML (SGML) comment <!-- .... --> The spec says that
+ "For compatibility, the string "--" (double-hyphen) must
+ not occur within comments. " [15] Comment ::= '<!--'
+ ((Char - '-') | ('-' (Char - '-')))* '-->' """
+ libxml2mod.xmlParseComment(self._o)
+
+ def parseContent(self):
+ """Parse a content: [43] content ::= (element | CharData |
+ Reference | CDSect | PI | Comment)* """
+ libxml2mod.xmlParseContent(self._o)
+
+ def parseDocTypeDecl(self):
+ """parse a DOCTYPE declaration [28] doctypedecl ::=
+ '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl |
+ PEReference | S)* ']' S?)? '>' [ VC: Root Element Type ]
+ The Name in the document type declaration must match the
+ element type of the root element. """
+ libxml2mod.xmlParseDocTypeDecl(self._o)
+
+ def parseElement(self):
+ """parse an XML element [39] element ::= EmptyElemTag | STag
+ content ETag [ WFC: Element Type Match ] The Name in an
+ element's end-tag must match the element type in the
+ start-tag. """
+ libxml2mod.xmlParseElement(self._o)
+
+ def parseElementDecl(self):
+ """parse an Element declaration. [45] elementdecl ::=
+ '<!ELEMENT' S Name S contentspec S? '>' [ VC: Unique
+ Element Type Declaration ] No element type may be declared
+ more than once """
+ ret = libxml2mod.xmlParseElementDecl(self._o)
+ return ret
+
+ def parseEncName(self):
+ """parse the XML encoding name [81] EncName ::= [A-Za-z]
+ ([A-Za-z0-9._] | '-')* """
+ ret = libxml2mod.xmlParseEncName(self._o)
+ return ret
+
+ def parseEncodingDecl(self):
+ """parse the XML encoding declaration [80] EncodingDecl ::= S
+ 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this
+ setups the conversion filters. """
+ ret = libxml2mod.xmlParseEncodingDecl(self._o)
+ return ret
+
+ def parseEndTag(self):
+ """parse an end of tag [42] ETag ::= '</' Name S? '>' With
+ namespace [NS 9] ETag ::= '</' QName S? '>' """
+ libxml2mod.xmlParseEndTag(self._o)
+
+ def parseEntityDecl(self):
+ """parse <!ENTITY declarations [70] EntityDecl ::= GEDecl |
+ PEDecl [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S?
+ '>' [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
+ [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
+ [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::=
+ S 'NDATA' S Name [ VC: Notation Declared ] The Name must
+ match the declared name of a notation. """
+ libxml2mod.xmlParseEntityDecl(self._o)
+
+ def parseEntityRef(self):
+ """parse ENTITY references declarations [68] EntityRef ::=
+ '&' Name ';' [ WFC: Entity Declared ] In a document
+ without any DTD, a document with only an internal DTD
+ subset which contains no parameter entity references, or a
+ document with "standalone='yes'", the Name given in the
+ entity reference must match that in an entity declaration,
+ except that well-formed documents need not declare any of
+ the following entities: amp, lt, gt, apos, quot. The
+ declaration of a parameter entity must precede any
+ reference to it. Similarly, the declaration of a general
+ entity must precede any reference to it which appears in a
+ default value in an attribute-list declaration. Note that
+ if entities are declared in the external subset or in
+ external parameter entities, a non-validating processor is
+ not obligated to read and process their declarations; for
+ such documents, the rule that an entity must be declared is
+ a well-formedness constraint only if standalone='yes'. [
+ WFC: Parsed Entity ] An entity reference must not contain
+ the name of an unparsed entity """
+ ret = libxml2mod.xmlParseEntityRef(self._o)
+ if ret is None:raise parserError('xmlParseEntityRef() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def parseExternalSubset(self, ExternalID, SystemID):
+ """parse Markup declarations from an external subset [30]
+ extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl
+ ::= (markupdecl | conditionalSect | PEReference | S) * """
+ libxml2mod.xmlParseExternalSubset(self._o, ExternalID, SystemID)
+
+ def parseMarkupDecl(self):
+ """parse Markup declarations [29] markupdecl ::= elementdecl
+ | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [
+ VC: Proper Declaration/PE Nesting ] Parameter-entity
+ replacement text must be properly nested with markup
+ declarations. That is to say, if either the first character
+ or the last character of a markup declaration (markupdecl
+ above) is contained in the replacement text for a
+ parameter-entity reference, both must be contained in the
+ same replacement text. [ WFC: PEs in Internal Subset ] In
+ the internal DTD subset, parameter-entity references can
+ occur only where markup declarations can occur, not within
+ markup declarations. (This does not apply to references
+ that occur in external parameter entities or to the
+ external subset.) """
+ libxml2mod.xmlParseMarkupDecl(self._o)
+
+ def parseMisc(self):
+ """parse an XML Misc* optional field. [27] Misc ::= Comment |
+ PI | S """
+ libxml2mod.xmlParseMisc(self._o)
+
+ def parseName(self):
+ """parse an XML name. [4] NameChar ::= Letter | Digit | '.' |
+ '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
+ (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20
+ Name)* """
+ ret = libxml2mod.xmlParseName(self._o)
+ return ret
+
+ def parseNamespace(self):
+ """xmlParseNamespace: parse specific PI '<?namespace ...'
+ constructs. This is what the older xml-name Working Draft
+ specified, a bunch of other stuff may still rely on it, so
+ support is still here as if it was declared on the root of
+ the Tree:-( TODO: remove from library To be removed at
+ next drop of binary compatibility """
+ libxml2mod.xmlParseNamespace(self._o)
+
+ def parseNmtoken(self):
+ """parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8]
+ Nmtokens ::= Nmtoken (#x20 Nmtoken)* """
+ ret = libxml2mod.xmlParseNmtoken(self._o)
+ return ret
+
+ def parseNotationDecl(self):
+ """parse a notation declaration [82] NotationDecl ::=
+ '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'
+ Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral
+ 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S
+ SystemLiteral See the NOTE on xmlParseExternalID(). """
+ libxml2mod.xmlParseNotationDecl(self._o)
+
+ def parsePEReference(self):
+ """parse PEReference declarations The entity content is
+ handled directly by pushing it's content as a new input
+ stream. [69] PEReference ::= '%' Name ';' [ WFC: No
+ Recursion ] A parsed entity must not contain a recursive
+ reference to itself, either directly or indirectly. [ WFC:
+ Entity Declared ] In a document without any DTD, a document
+ with only an internal DTD subset which contains no
+ parameter entity references, or a document with
+ "standalone='yes'", ... ... The declaration of a parameter
+ entity must precede any reference to it... [ VC: Entity
+ Declared ] In a document with an external subset or
+ external parameter entities with "standalone='no'", ...
+ ... The declaration of a parameter entity must precede any
+ reference to it... [ WFC: In DTD ] Parameter-entity
+ references may only appear in the DTD. NOTE: misleading but
+ this is handled. """
+ libxml2mod.xmlParsePEReference(self._o)
+
+ def parsePI(self):
+ """parse an XML Processing Instruction. [16] PI ::= '<?'
+ PITarget (S (Char* - (Char* '?>' Char*)))? '?>' The
+ processing is transferred to SAX once parsed. """
+ libxml2mod.xmlParsePI(self._o)
+
+ def parsePITarget(self):
+ """parse the name of a PI [17] PITarget ::= Name - (('X' |
+ 'x') ('M' | 'm') ('L' | 'l')) """
+ ret = libxml2mod.xmlParsePITarget(self._o)
+ return ret
+
+ def parsePubidLiteral(self):
+ """parse an XML public literal [12] PubidLiteral ::= '"'
+ PubidChar* '"' | "'" (PubidChar - "'")* "'" """
+ ret = libxml2mod.xmlParsePubidLiteral(self._o)
+ return ret
+
+ def parseQuotedString(self):
+ """Parse and return a string between quotes or doublequotes
+ TODO: Deprecated, to be removed at next drop of binary
+ compatibility """
+ ret = libxml2mod.xmlParseQuotedString(self._o)
+ return ret
+
+ def parseReference(self):
+ """parse and handle entity references in content, depending on
+ the SAX interface, this may end-up in a call to character()
+ if this is a CharRef, a predefined entity, if there is no
+ reference() callback. or if the parser was asked to switch
+ to that mode. [67] Reference ::= EntityRef | CharRef """
+ libxml2mod.xmlParseReference(self._o)
+
+ def parseSDDecl(self):
+ """parse the XML standalone declaration [32] SDDecl ::= S
+ 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' |
+ 'no')'"')) [ VC: Standalone Document Declaration ] TODO
+ The standalone document declaration must have the value
+ "no" if any external markup declarations contain
+ declarations of: - attributes with default values, if
+ elements to which these attributes apply appear in the
+ document without specifications of values for these
+ attributes, or - entities (other than amp, lt, gt, apos,
+ quot), if references to those entities appear in the
+ document, or - attributes with values subject to
+ normalization, where the attribute appears in the document
+ with a value which will change as a result of
+ normalization, or - element types with element content, if
+ white space occurs directly within any instance of those
+ types. """
+ ret = libxml2mod.xmlParseSDDecl(self._o)
+ return ret
+
+ def parseStartTag(self):
+ """parse a start of tag either for rule element or
+ EmptyElement. In both case we don't parse the tag closing
+ chars. [40] STag ::= '<' Name (S Attribute)* S? '>' [
+ WFC: Unique Att Spec ] No attribute name may appear more
+ than once in the same start-tag or empty-element tag. [44]
+ EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC:
+ Unique Att Spec ] No attribute name may appear more than
+ once in the same start-tag or empty-element tag. With
+ namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>'
+ [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>' """
+ ret = libxml2mod.xmlParseStartTag(self._o)
+ return ret
+
+ def parseSystemLiteral(self):
+ """parse an XML Literal [11] SystemLiteral ::= ('"' [^"]*
+ '"') | ("'" [^']* "'") """
+ ret = libxml2mod.xmlParseSystemLiteral(self._o)
+ return ret
+
+ def parseTextDecl(self):
+ """parse an XML declaration header for external entities [77]
+ TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' """
+ libxml2mod.xmlParseTextDecl(self._o)
+
+ def parseVersionInfo(self):
+ """parse the XML version. [24] VersionInfo ::= S 'version' Eq
+ (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? """
+ ret = libxml2mod.xmlParseVersionInfo(self._o)
+ return ret
+
+ def parseVersionNum(self):
+ """parse the XML version value. [26] VersionNum ::= '1.'
+ [0-9]+ In practice allow [0-9].[0-9]+ at that level """
+ ret = libxml2mod.xmlParseVersionNum(self._o)
+ return ret
+
+ def parseXMLDecl(self):
+ """parse an XML declaration header [23] XMLDecl ::= '<?xml'
+ VersionInfo EncodingDecl? SDDecl? S? '?>' """
+ libxml2mod.xmlParseXMLDecl(self._o)
+
+ def parserHandlePEReference(self):
+ """[69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A
+ parsed entity must not contain a recursive reference to
+ itself, either directly or indirectly. [ WFC: Entity
+ Declared ] In a document without any DTD, a document with
+ only an internal DTD subset which contains no parameter
+ entity references, or a document with "standalone='yes'",
+ ... ... The declaration of a parameter entity must precede
+ any reference to it... [ VC: Entity Declared ] In a
+ document with an external subset or external parameter
+ entities with "standalone='no'", ... ... The declaration
+ of a parameter entity must precede any reference to it...
+ [ WFC: In DTD ] Parameter-entity references may only appear
+ in the DTD. NOTE: misleading but this is handled. A
+ PEReference may have been detected in the current input
+ stream the handling is done accordingly to
+ http://www.w3.org/TR/REC-xml#entproc i.e. - Included in
+ literal in entity values - Included as Parameter Entity
+ reference within DTDs """
+ libxml2mod.xmlParserHandlePEReference(self._o)
+
+ def parserHandleReference(self):
+ """TODO: Remove, now deprecated ... the test is done directly
+ in the content parsing routines. [67] Reference ::=
+ EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [
+ WFC: Entity Declared ] the Name given in the entity
+ reference must match that in an entity declaration, except
+ that well-formed documents need not declare any of the
+ following entities: amp, lt, gt, apos, quot. [ WFC: Parsed
+ Entity ] An entity reference must not contain the name of
+ an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' |
+ '&#x' [0-9a-fA-F]+ ';' A PEReference may have been
+ detected in the current input stream the handling is done
+ accordingly to http://www.w3.org/TR/REC-xml#entproc """
+ libxml2mod.xmlParserHandleReference(self._o)
+
+ def popInput(self):
+ """xmlPopInput: the current input pointed by ctxt->input came
+ to an end pop it and return the next char. """
+ ret = libxml2mod.xmlPopInput(self._o)
+ return ret
+
+ def scanName(self):
+ """Trickery: parse an XML name but without consuming the input
+ flow Needed for rollback cases. Used only when parsing
+ entities references. TODO: seems deprecated now, only used
+ in the default part of xmlParserHandleReference [4]
+ NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ CombiningChar | Extender [5] Name ::= (Letter | '_' | ':')
+ (NameChar)* [6] Names ::= Name (S Name)* """
+ ret = libxml2mod.xmlScanName(self._o)
+ return ret
+
+ def skipBlankChars(self):
+ """skip all blanks character found at that point in the input
+ streams. It pops up finished entities in the process if
+ allowable at that point. """
+ ret = libxml2mod.xmlSkipBlankChars(self._o)
+ return ret
+
+ def stringDecodeEntities(self, str, what, end, end2, end3):
+ """Takes a entity string content and process to do the
+ adequate substitutions. [67] Reference ::= EntityRef |
+ CharRef [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlStringDecodeEntities(self._o, str, what, end, end2, end3)
+ return ret
+
+ def stringLenDecodeEntities(self, str, len, what, end, end2, end3):
+ """Takes a entity string content and process to do the
+ adequate substitutions. [67] Reference ::= EntityRef |
+ CharRef [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlStringLenDecodeEntities(self._o, str, len, what, end, end2, end3)
+ return ret
+
+class xmlAttr(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlAttr got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlAttr (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlAttr functions from module debugXML
+ #
+
+ def debugDumpAttr(self, output, depth):
+ """Dumps debug information for the attribute """
+ libxml2mod.xmlDebugDumpAttr(output, self._o, depth)
+
+ def debugDumpAttrList(self, output, depth):
+ """Dumps debug information for the attribute list """
+ libxml2mod.xmlDebugDumpAttrList(output, self._o, depth)
+
+ #
+ # xmlAttr functions from module tree
+ #
+
+ def copyProp(self, target):
+ """Do a copy of the attribute. """
+ if target is None: target__o = None
+ else: target__o = target._o
+ ret = libxml2mod.xmlCopyProp(target__o, self._o)
+ if ret is None:raise treeError('xmlCopyProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def copyPropList(self, target):
+ """Do a copy of an attribute list. """
+ if target is None: target__o = None
+ else: target__o = target._o
+ ret = libxml2mod.xmlCopyPropList(target__o, self._o)
+ if ret is None:raise treeError('xmlCopyPropList() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def freeProp(self):
+ """Free one attribute, all the content is freed too """
+ libxml2mod.xmlFreeProp(self._o)
+
+ def freePropList(self):
+ """Free a property and all its siblings, all the children are
+ freed too. """
+ libxml2mod.xmlFreePropList(self._o)
+
+ def removeProp(self):
+ """Unlink and free one attribute, all the content is freed too
+ Note this doesn't work for namespace definition attributes """
+ ret = libxml2mod.xmlRemoveProp(self._o)
+ return ret
+
+ #
+ # xmlAttr functions from module valid
+ #
+
+ def removeID(self, doc):
+ """Remove the given attribute from the ID table maintained
+ internally. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRemoveID(doc__o, self._o)
+ return ret
+
+ def removeRef(self, doc):
+ """Remove the given attribute from the Ref table maintained
+ internally. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRemoveRef(doc__o, self._o)
+ return ret
+
+class xmlAttribute(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlAttribute got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlAttribute (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+class catalog:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeCatalog(self._o)
+ self._o = None
+
+ #
+ # catalog functions from module catalog
+ #
+
+ def add(self, type, orig, replace):
+ """Add an entry in the catalog, it may overwrite existing but
+ different entries. """
+ ret = libxml2mod.xmlACatalogAdd(self._o, type, orig, replace)
+ return ret
+
+ def catalogIsEmpty(self):
+ """Check is a catalog is empty """
+ ret = libxml2mod.xmlCatalogIsEmpty(self._o)
+ return ret
+
+ def convertSGMLCatalog(self):
+ """Convert all the SGML catalog entries as XML ones """
+ ret = libxml2mod.xmlConvertSGMLCatalog(self._o)
+ return ret
+
+ def dump(self, out):
+ """Dump the given catalog to the given file. """
+ libxml2mod.xmlACatalogDump(self._o, out)
+
+ def remove(self, value):
+ """Remove an entry from the catalog """
+ ret = libxml2mod.xmlACatalogRemove(self._o, value)
+ return ret
+
+ def resolve(self, pubID, sysID):
+ """Do a complete resolution lookup of an External Identifier """
+ ret = libxml2mod.xmlACatalogResolve(self._o, pubID, sysID)
+ return ret
+
+ def resolvePublic(self, pubID):
+ """Try to lookup the catalog local reference associated to a
+ public ID in that catalog """
+ ret = libxml2mod.xmlACatalogResolvePublic(self._o, pubID)
+ return ret
+
+ def resolveSystem(self, sysID):
+ """Try to lookup the catalog resource for a system ID """
+ ret = libxml2mod.xmlACatalogResolveSystem(self._o, sysID)
+ return ret
+
+ def resolveURI(self, URI):
+ """Do a complete resolution lookup of an URI """
+ ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
+ return ret
+
+class xmlDtd(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlDtd got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlDtd (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlDtd functions from module debugXML
+ #
+
+ def debugDumpDTD(self, output):
+ """Dumps debug information for the DTD """
+ libxml2mod.xmlDebugDumpDTD(output, self._o)
+
+ #
+ # xmlDtd functions from module tree
+ #
+
+ def copyDtd(self):
+ """Do a copy of the dtd. """
+ ret = libxml2mod.xmlCopyDtd(self._o)
+ if ret is None:raise treeError('xmlCopyDtd() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def freeDtd(self):
+ """Free a DTD structure. """
+ libxml2mod.xmlFreeDtd(self._o)
+
+ #
+ # xmlDtd functions from module valid
+ #
+
+ def dtdAttrDesc(self, elem, name):
+ """Search the DTD for the description of this attribute on
+ this element. """
+ ret = libxml2mod.xmlGetDtdAttrDesc(self._o, elem, name)
+ if ret is None:raise treeError('xmlGetDtdAttrDesc() failed')
+ __tmp = xmlAttribute(_obj=ret)
+ return __tmp
+
+ def dtdElementDesc(self, name):
+ """Search the DTD for the description of this element """
+ ret = libxml2mod.xmlGetDtdElementDesc(self._o, name)
+ if ret is None:raise treeError('xmlGetDtdElementDesc() failed')
+ __tmp = xmlElement(_obj=ret)
+ return __tmp
+
+ def dtdQAttrDesc(self, elem, name, prefix):
+ """Search the DTD for the description of this qualified
+ attribute on this element. """
+ ret = libxml2mod.xmlGetDtdQAttrDesc(self._o, elem, name, prefix)
+ if ret is None:raise treeError('xmlGetDtdQAttrDesc() failed')
+ __tmp = xmlAttribute(_obj=ret)
+ return __tmp
+
+ def dtdQElementDesc(self, name, prefix):
+ """Search the DTD for the description of this element """
+ ret = libxml2mod.xmlGetDtdQElementDesc(self._o, name, prefix)
+ if ret is None:raise treeError('xmlGetDtdQElementDesc() failed')
+ __tmp = xmlElement(_obj=ret)
+ return __tmp
+
+class xmlElement(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlElement got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlElement (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+class xmlEntity(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlEntity got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlEntity (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlEntity functions from module parserInternals
+ #
+
+ def handleEntity(self, ctxt):
+ """Default handling of defined entities, when should we define
+ a new input stream ? When do we just handle that as a set
+ of chars ? OBSOLETE: to be removed at some point. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ libxml2mod.xmlHandleEntity(ctxt__o, self._o)
+
+class Error:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for Error
+ def code(self):
+ """The error code, e.g. an xmlParserError """
+ ret = libxml2mod.xmlErrorGetCode(self._o)
+ return ret
+
+ def domain(self):
+ """What part of the library raised this error """
+ ret = libxml2mod.xmlErrorGetDomain(self._o)
+ return ret
+
+ def file(self):
+ """the filename """
+ ret = libxml2mod.xmlErrorGetFile(self._o)
+ return ret
+
+ def level(self):
+ """how consequent is the error """
+ ret = libxml2mod.xmlErrorGetLevel(self._o)
+ return ret
+
+ def line(self):
+ """the line number if available """
+ ret = libxml2mod.xmlErrorGetLine(self._o)
+ return ret
+
+ def message(self):
+ """human-readable informative error message """
+ ret = libxml2mod.xmlErrorGetMessage(self._o)
+ return ret
+
+ #
+ # Error functions from module xmlerror
+ #
+
+ def copyError(self, to):
+ """Save the original error to the new place. """
+ if to is None: to__o = None
+ else: to__o = to._o
+ ret = libxml2mod.xmlCopyError(self._o, to__o)
+ return ret
+
+ def resetError(self):
+ """Cleanup the error. """
+ libxml2mod.xmlResetError(self._o)
+
+class xmlNs(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlNs got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlNs (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlNs functions from module tree
+ #
+
+ def copyNamespace(self):
+ """Do a copy of the namespace. """
+ ret = libxml2mod.xmlCopyNamespace(self._o)
+ if ret is None:raise treeError('xmlCopyNamespace() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def copyNamespaceList(self):
+ """Do a copy of an namespace list. """
+ ret = libxml2mod.xmlCopyNamespaceList(self._o)
+ if ret is None:raise treeError('xmlCopyNamespaceList() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def freeNs(self):
+ """Free up the structures associated to a namespace """
+ libxml2mod.xmlFreeNs(self._o)
+
+ def freeNsList(self):
+ """Free up all the structures associated to the chained
+ namespaces. """
+ libxml2mod.xmlFreeNsList(self._o)
+
+ def newChild(self, parent, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child list containing the TEXTs and ENTITY_REFs node will
+ be created. NOTE: @content is supposed to be a piece of XML
+ CDATA, so it allows entity references. XML special chars
+ must be escaped first by using
+ xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
+ be used. """
+ if parent is None: parent__o = None
+ else: parent__o = parent._o
+ ret = libxml2mod.xmlNewChild(parent__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNode(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocNode(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNodeEatName(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocNodeEatName(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocRawNode(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocRawNode(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocRawNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNodeEatName(self, name):
+ """Creation of a new node element. @ns is optional (None). """
+ ret = libxml2mod.xmlNewNodeEatName(self._o, name)
+ if ret is None:raise treeError('xmlNewNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNsProp(self, node, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlNewNsProp(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlNewNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newNsPropEatName(self, node, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlNewNsPropEatName(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlNewNsPropEatName() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newTextChild(self, parent, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child TEXT node will be created containing the string
+ @content. NOTE: Use xmlNewChild() if @content will contain
+ entities that need to be preserved. Use this function,
+ xmlNewTextChild(), if you need to ensure that reserved XML
+ chars that might appear in @content, such as the ampersand,
+ greater-than or less-than signs, are automatically replaced
+ by their XML escaped entity representations. """
+ if parent is None: parent__o = None
+ else: parent__o = parent._o
+ ret = libxml2mod.xmlNewTextChild(parent__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewTextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def setNs(self, node):
+ """Associate a namespace to a node, a posteriori. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ libxml2mod.xmlSetNs(node__o, self._o)
+
+ def setNsProp(self, node, name, value):
+ """Set (or reset) an attribute carried by a node. The ns
+ structure must be in scope, this is not checked """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSetNsProp(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlSetNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def unsetNsProp(self, node, name):
+ """Remove an attribute carried by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlUnsetNsProp(node__o, self._o, name)
+ return ret
+
+ #
+ # xmlNs functions from module xpathInternals
+ #
+
+ def xpathNodeSetFreeNs(self):
+ """Namespace nodes in libxml don't match the XPath semantic.
+ In a node set the namespace nodes are duplicated and the
+ next pointer is set to the parent node in the XPath
+ semantic. Check if such a node needs to be freed """
+ libxml2mod.xmlXPathNodeSetFreeNs(self._o)
+
+class outputBuffer(ioWriteWrapper):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ioWriteWrapper.__init__(self, _obj=_obj)
+
+ #
+ # outputBuffer functions from module HTMLtree
+ #
+
+ def htmlDocContentDumpFormatOutput(self, cur, encoding, format):
+ """Dump an HTML document. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlDocContentDumpFormatOutput(self._o, cur__o, encoding, format)
+
+ def htmlDocContentDumpOutput(self, cur, encoding):
+ """Dump an HTML document. Formatting return/spaces are added. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlDocContentDumpOutput(self._o, cur__o, encoding)
+
+ def htmlNodeDumpFormatOutput(self, doc, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFormatOutput(self._o, doc__o, cur__o, encoding, format)
+
+ def htmlNodeDumpOutput(self, doc, cur, encoding):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns/spaces are added. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpOutput(self._o, doc__o, cur__o, encoding)
+
+ #
+ # outputBuffer functions from module tree
+ #
+
+ def nodeDumpOutput(self, doc, cur, level, format, encoding):
+ """Dump an XML node, recursive behaviour, children are printed
+ too. Note that @format = 1 provide node indenting only if
+ xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
+ called """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlNodeDumpOutput(self._o, doc__o, cur__o, level, format, encoding)
+
+ def saveFileTo(self, cur, encoding):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlSaveFileTo(self._o, cur__o, encoding)
+ return ret
+
+ def saveFormatFileTo(self, cur, encoding, format):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlSaveFormatFileTo(self._o, cur__o, encoding, format)
+ return ret
+
+ #
+ # outputBuffer functions from module xmlIO
+ #
+
+ def getContent(self):
+ """Gives a pointer to the data currently held in the output
+ buffer """
+ ret = libxml2mod.xmlOutputBufferGetContent(self._o)
+ return ret
+
+ def write(self, len, buf):
+ """Write the content of the array in the output I/O buffer
+ This routine handle the I18N transcoding from internal
+ UTF-8 The buffer is lossless, i.e. will store in case of
+ partial or delayed writes. """
+ ret = libxml2mod.xmlOutputBufferWrite(self._o, len, buf)
+ return ret
+
+ def writeString(self, str):
+ """Write the content of the string in the output I/O buffer
+ This routine handle the I18N transcoding from internal
+ UTF-8 The buffer is lossless, i.e. will store in case of
+ partial or delayed writes. """
+ ret = libxml2mod.xmlOutputBufferWriteString(self._o, str)
+ return ret
+
+class inputBuffer(ioReadWrapper):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ioReadWrapper.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+ #
+ # inputBuffer functions from module xmlIO
+ #
+
+ def grow(self, len):
+ """Grow up the content of the input buffer, the old data are
+ preserved This routine handle the I18N transcoding to
+ internal UTF-8 This routine is used when operating the
+ parser in normal (pull) mode TODO: one should be able to
+ remove one extra copy by copying directly onto in->buffer
+ or in->raw """
+ ret = libxml2mod.xmlParserInputBufferGrow(self._o, len)
+ return ret
+
+ def push(self, len, buf):
+ """Push the content of the arry in the input buffer This
+ routine handle the I18N transcoding to internal UTF-8 This
+ is used when operating the parser in progressive (push)
+ mode. """
+ ret = libxml2mod.xmlParserInputBufferPush(self._o, len, buf)
+ return ret
+
+ def read(self, len):
+ """Refresh the content of the input buffer, the old data are
+ considered consumed This routine handle the I18N
+ transcoding to internal UTF-8 """
+ ret = libxml2mod.xmlParserInputBufferRead(self._o, len)
+ return ret
+
+ #
+ # inputBuffer functions from module xmlreader
+ #
+
+ def Setup(self, reader, URL, encoding, options):
+ """Setup an XML reader with new options """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSetup(reader__o, self._o, URL, encoding, options)
+ return ret
+
+ def newTextReader(self, URI):
+ """Create an xmlTextReader structure fed with @input """
+ ret = libxml2mod.xmlNewTextReader(self._o, URI)
+ if ret is None:raise treeError('xmlNewTextReader() failed')
+ __tmp = xmlTextReader(_obj=ret)
+ __tmp.input = self
+ return __tmp
+
+class xmlReg:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRegFreeRegexp(self._o)
+ self._o = None
+
+ #
+ # xmlReg functions from module xmlregexp
+ #
+
+ def regexpExec(self, content):
+ """Check if the regular expression generates the value """
+ ret = libxml2mod.xmlRegexpExec(self._o, content)
+ return ret
+
+ def regexpIsDeterminist(self):
+ """Check if the regular expression is determinist """
+ ret = libxml2mod.xmlRegexpIsDeterminist(self._o)
+ return ret
+
+ def regexpPrint(self, output):
+ """Print the content of the compiled regular expression """
+ libxml2mod.xmlRegexpPrint(output, self._o)
+
+class relaxNgParserCtxt:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFreeParserCtxt(self._o)
+ self._o = None
+
+ #
+ # relaxNgParserCtxt functions from module relaxng
+ #
+
+ def relaxNGParse(self):
+ """parse a schema definition resource and build an internal
+ XML Schema structure which can be used to validate
+ instances. """
+ ret = libxml2mod.xmlRelaxNGParse(self._o)
+ if ret is None:raise parserError('xmlRelaxNGParse() failed')
+ __tmp = relaxNgSchema(_obj=ret)
+ return __tmp
+
+ def relaxParserSetFlag(self, flags):
+ """Semi private function used to pass informations to a parser
+ context which are a combination of xmlRelaxNGParserFlag . """
+ ret = libxml2mod.xmlRelaxParserSetFlag(self._o, flags)
+ return ret
+
+class relaxNgSchema:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFree(self._o)
+ self._o = None
+
+ #
+ # relaxNgSchema functions from module relaxng
+ #
+
+ def relaxNGDump(self, output):
+ """Dump a RelaxNG structure back """
+ libxml2mod.xmlRelaxNGDump(output, self._o)
+
+ def relaxNGDumpTree(self, output):
+ """Dump the transformed RelaxNG tree. """
+ libxml2mod.xmlRelaxNGDumpTree(output, self._o)
+
+ def relaxNGNewValidCtxt(self):
+ """Create an XML RelaxNGs validation context based on the
+ given schema """
+ ret = libxml2mod.xmlRelaxNGNewValidCtxt(self._o)
+ if ret is None:raise treeError('xmlRelaxNGNewValidCtxt() failed')
+ __tmp = relaxNgValidCtxt(_obj=ret)
+ __tmp.schema = self
+ return __tmp
+
+ #
+ # relaxNgSchema functions from module xmlreader
+ #
+
+ def RelaxNGSetSchema(self, reader):
+ """Use RelaxNG to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then RelaxNG validation is deactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(reader__o, self._o)
+ return ret
+
+class relaxNgValidCtxt(relaxNgValidCtxtCore):
+ def __init__(self, _obj=None):
+ self.schema = None
+ self._o = _obj
+ relaxNgValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # relaxNgValidCtxt functions from module relaxng
+ #
+
+ def relaxNGValidateDoc(self, doc):
+ """Validate a document tree in memory. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRelaxNGValidateDoc(self._o, doc__o)
+ return ret
+
+ def relaxNGValidateFullElement(self, doc, elem):
+ """Validate a full subtree when
+ xmlRelaxNGValidatePushElement() returned 0 and the content
+ of the node has been expanded. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidateFullElement(self._o, doc__o, elem__o)
+ return ret
+
+ def relaxNGValidatePopElement(self, doc, elem):
+ """Pop the element end from the RelaxNG validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePopElement(self._o, doc__o, elem__o)
+ return ret
+
+ def relaxNGValidatePushCData(self, data, len):
+ """check the CData parsed for validation in the current stack """
+ ret = libxml2mod.xmlRelaxNGValidatePushCData(self._o, data, len)
+ return ret
+
+ def relaxNGValidatePushElement(self, doc, elem):
+ """Push a new element start on the RelaxNG validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePushElement(self._o, doc__o, elem__o)
+ return ret
+
+ #
+ # relaxNgValidCtxt functions from module xmlreader
+ #
+
+ def RelaxNGValidateCtxt(self, reader, options):
+ """Use RelaxNG schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then RelaxNG schema validation is
+ deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(reader__o, self._o, options)
+ return ret
+
+class SchemaParserCtxt:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFreeParserCtxt(self._o)
+ self._o = None
+
+ #
+ # SchemaParserCtxt functions from module xmlschemas
+ #
+
+ def schemaParse(self):
+ """parse a schema definition resource and build an internal
+ XML Schema structure which can be used to validate
+ instances. """
+ ret = libxml2mod.xmlSchemaParse(self._o)
+ if ret is None:raise parserError('xmlSchemaParse() failed')
+ __tmp = Schema(_obj=ret)
+ return __tmp
+
+class Schema:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFree(self._o)
+ self._o = None
+
+ #
+ # Schema functions from module xmlreader
+ #
+
+ def SetSchema(self, reader):
+ """Use XSD Schema to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then Schema validation is deactivated. The
+ @schema should not be freed until the reader is deallocated
+ or its use has been deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSetSchema(reader__o, self._o)
+ return ret
+
+ #
+ # Schema functions from module xmlschemas
+ #
+
+ def schemaDump(self, output):
+ """Dump a Schema structure. """
+ libxml2mod.xmlSchemaDump(output, self._o)
+
+ def schemaNewValidCtxt(self):
+ """Create an XML Schemas validation context based on the given
+ schema. """
+ ret = libxml2mod.xmlSchemaNewValidCtxt(self._o)
+ if ret is None:raise treeError('xmlSchemaNewValidCtxt() failed')
+ __tmp = SchemaValidCtxt(_obj=ret)
+ __tmp.schema = self
+ return __tmp
+
+class SchemaValidCtxt(SchemaValidCtxtCore):
+ def __init__(self, _obj=None):
+ self.schema = None
+ self._o = _obj
+ SchemaValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # SchemaValidCtxt functions from module xmlreader
+ #
+
+ def SchemaValidateCtxt(self, reader, options):
+ """Use W3C XSD schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then XML Schema validation is
+ deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(reader__o, self._o, options)
+ return ret
+
+ #
+ # SchemaValidCtxt functions from module xmlschemas
+ #
+
+ def schemaIsValid(self):
+ """Check if any error was detected during validation. """
+ ret = libxml2mod.xmlSchemaIsValid(self._o)
+ return ret
+
+ def schemaSetValidOptions(self, options):
+ """Sets the options to be used during the validation. """
+ ret = libxml2mod.xmlSchemaSetValidOptions(self._o, options)
+ return ret
+
+ def schemaValidCtxtGetOptions(self):
+ """Get the validation context options. """
+ ret = libxml2mod.xmlSchemaValidCtxtGetOptions(self._o)
+ return ret
+
+ def schemaValidCtxtGetParserCtxt(self):
+ """allow access to the parser context of the schema validation
+ context """
+ ret = libxml2mod.xmlSchemaValidCtxtGetParserCtxt(self._o)
+ if ret is None:raise parserError('xmlSchemaValidCtxtGetParserCtxt() failed')
+ __tmp = parserCtxt(_obj=ret)
+ return __tmp
+
+ def schemaValidateDoc(self, doc):
+ """Validate a document tree in memory. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSchemaValidateDoc(self._o, doc__o)
+ return ret
+
+ def schemaValidateFile(self, filename, options):
+ """Do a schemas validation of the given resource, it will use
+ the SAX streamable validation internally. """
+ ret = libxml2mod.xmlSchemaValidateFile(self._o, filename, options)
+ return ret
+
+ def schemaValidateOneElement(self, elem):
+ """Validate a branch of a tree, starting with the given @elem. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlSchemaValidateOneElement(self._o, elem__o)
+ return ret
+
+ def schemaValidateSetFilename(self, filename):
+ """Workaround to provide file error reporting information when
+ this is not provided by current APIs """
+ libxml2mod.xmlSchemaValidateSetFilename(self._o, filename)
+
+class xmlTextReaderLocator:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ #
+ # xmlTextReaderLocator functions from module xmlreader
+ #
+
+ def BaseURI(self):
+ """Obtain the base URI for the given locator. """
+ ret = libxml2mod.xmlTextReaderLocatorBaseURI(self._o)
+ return ret
+
+ def LineNumber(self):
+ """Obtain the line number for the given locator. """
+ ret = libxml2mod.xmlTextReaderLocatorLineNumber(self._o)
+ return ret
+
+class xmlTextReader(xmlTextReaderCore):
+ def __init__(self, _obj=None):
+ self.input = None
+ self._o = _obj
+ xmlTextReaderCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeTextReader(self._o)
+ self._o = None
+
+ #
+ # xmlTextReader functions from module xmlreader
+ #
+
+ def AttributeCount(self):
+ """Provides the number of attributes of the current node """
+ ret = libxml2mod.xmlTextReaderAttributeCount(self._o)
+ return ret
+
+ def BaseUri(self):
+ """The base URI of the node. """
+ ret = libxml2mod.xmlTextReaderConstBaseUri(self._o)
+ return ret
+
+ def ByteConsumed(self):
+ """This function provides the current index of the parser used
+ by the reader, relative to the start of the current entity.
+ This function actually just wraps a call to
+ xmlBytesConsumed() for the parser context associated with
+ the reader. See xmlBytesConsumed() for more information. """
+ ret = libxml2mod.xmlTextReaderByteConsumed(self._o)
+ return ret
+
+ def Close(self):
+ """This method releases any resources allocated by the current
+ instance changes the state to Closed and close any
+ underlying input. """
+ ret = libxml2mod.xmlTextReaderClose(self._o)
+ return ret
+
+ def CurrentDoc(self):
+ """Hacking interface allowing to get the xmlDocPtr
+ corresponding to the current document being accessed by the
+ xmlTextReader. NOTE: as a result of this call, the reader
+ will not destroy the associated XML document and calling
+ xmlFreeDoc() on the result is needed once the reader
+ parsing has finished. """
+ ret = libxml2mod.xmlTextReaderCurrentDoc(self._o)
+ if ret is None:raise treeError('xmlTextReaderCurrentDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def CurrentNode(self):
+ """Hacking interface allowing to get the xmlNodePtr
+ corresponding to the current node being accessed by the
+ xmlTextReader. This is dangerous because the underlying
+ node may be destroyed on the next Reads. """
+ ret = libxml2mod.xmlTextReaderCurrentNode(self._o)
+ if ret is None:raise treeError('xmlTextReaderCurrentNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def Depth(self):
+ """The depth of the node in the tree. """
+ ret = libxml2mod.xmlTextReaderDepth(self._o)
+ return ret
+
+ def Encoding(self):
+ """Determine the encoding of the document being read. """
+ ret = libxml2mod.xmlTextReaderConstEncoding(self._o)
+ return ret
+
+ def Expand(self):
+ """Reads the contents of the current node and the full
+ subtree. It then makes the subtree available until the next
+ xmlTextReaderRead() call """
+ ret = libxml2mod.xmlTextReaderExpand(self._o)
+ if ret is None:raise treeError('xmlTextReaderExpand() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def GetAttribute(self, name):
+ """Provides the value of the attribute with the specified
+ qualified name. """
+ ret = libxml2mod.xmlTextReaderGetAttribute(self._o, name)
+ return ret
+
+ def GetAttributeNo(self, no):
+ """Provides the value of the attribute with the specified
+ index relative to the containing element. """
+ ret = libxml2mod.xmlTextReaderGetAttributeNo(self._o, no)
+ return ret
+
+ def GetAttributeNs(self, localName, namespaceURI):
+ """Provides the value of the specified attribute """
+ ret = libxml2mod.xmlTextReaderGetAttributeNs(self._o, localName, namespaceURI)
+ return ret
+
+ def GetParserColumnNumber(self):
+ """Provide the column number of the current parsing point. """
+ ret = libxml2mod.xmlTextReaderGetParserColumnNumber(self._o)
+ return ret
+
+ def GetParserLineNumber(self):
+ """Provide the line number of the current parsing point. """
+ ret = libxml2mod.xmlTextReaderGetParserLineNumber(self._o)
+ return ret
+
+ def GetParserProp(self, prop):
+ """Read the parser internal property. """
+ ret = libxml2mod.xmlTextReaderGetParserProp(self._o, prop)
+ return ret
+
+ def GetRemainder(self):
+ """Method to get the remainder of the buffered XML. this
+ method stops the parser, set its state to End Of File and
+ return the input stream with what is left that the parser
+ did not use. The implementation is not good, the parser
+ certainly progressed past what's left in reader->input, and
+ there is an allocation problem. Best would be to rewrite it
+ differently. """
+ ret = libxml2mod.xmlTextReaderGetRemainder(self._o)
+ if ret is None:raise treeError('xmlTextReaderGetRemainder() failed')
+ __tmp = inputBuffer(_obj=ret)
+ return __tmp
+
+ def HasAttributes(self):
+ """Whether the node has attributes. """
+ ret = libxml2mod.xmlTextReaderHasAttributes(self._o)
+ return ret
+
+ def HasValue(self):
+ """Whether the node can have a text value. """
+ ret = libxml2mod.xmlTextReaderHasValue(self._o)
+ return ret
+
+ def IsDefault(self):
+ """Whether an Attribute node was generated from the default
+ value defined in the DTD or schema. """
+ ret = libxml2mod.xmlTextReaderIsDefault(self._o)
+ return ret
+
+ def IsEmptyElement(self):
+ """Check if the current node is empty """
+ ret = libxml2mod.xmlTextReaderIsEmptyElement(self._o)
+ return ret
+
+ def IsNamespaceDecl(self):
+ """Determine whether the current node is a namespace
+ declaration rather than a regular attribute. """
+ ret = libxml2mod.xmlTextReaderIsNamespaceDecl(self._o)
+ return ret
+
+ def IsValid(self):
+ """Retrieve the validity status from the parser context """
+ ret = libxml2mod.xmlTextReaderIsValid(self._o)
+ return ret
+
+ def LocalName(self):
+ """The local name of the node. """
+ ret = libxml2mod.xmlTextReaderConstLocalName(self._o)
+ return ret
+
+ def LookupNamespace(self, prefix):
+ """Resolves a namespace prefix in the scope of the current
+ element. """
+ ret = libxml2mod.xmlTextReaderLookupNamespace(self._o, prefix)
+ return ret
+
+ def MoveToAttribute(self, name):
+ """Moves the position of the current instance to the attribute
+ with the specified qualified name. """
+ ret = libxml2mod.xmlTextReaderMoveToAttribute(self._o, name)
+ return ret
+
+ def MoveToAttributeNo(self, no):
+ """Moves the position of the current instance to the attribute
+ with the specified index relative to the containing element. """
+ ret = libxml2mod.xmlTextReaderMoveToAttributeNo(self._o, no)
+ return ret
+
+ def MoveToAttributeNs(self, localName, namespaceURI):
+ """Moves the position of the current instance to the attribute
+ with the specified local name and namespace URI. """
+ ret = libxml2mod.xmlTextReaderMoveToAttributeNs(self._o, localName, namespaceURI)
+ return ret
+
+ def MoveToElement(self):
+ """Moves the position of the current instance to the node that
+ contains the current Attribute node. """
+ ret = libxml2mod.xmlTextReaderMoveToElement(self._o)
+ return ret
+
+ def MoveToFirstAttribute(self):
+ """Moves the position of the current instance to the first
+ attribute associated with the current node. """
+ ret = libxml2mod.xmlTextReaderMoveToFirstAttribute(self._o)
+ return ret
+
+ def MoveToNextAttribute(self):
+ """Moves the position of the current instance to the next
+ attribute associated with the current node. """
+ ret = libxml2mod.xmlTextReaderMoveToNextAttribute(self._o)
+ return ret
+
+ def Name(self):
+ """The qualified name of the node, equal to Prefix :LocalName. """
+ ret = libxml2mod.xmlTextReaderConstName(self._o)
+ return ret
+
+ def NamespaceUri(self):
+ """The URI defining the namespace associated with the node. """
+ ret = libxml2mod.xmlTextReaderConstNamespaceUri(self._o)
+ return ret
+
+ def NewDoc(self, cur, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML in-memory document.
+ The parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewDoc(self._o, cur, URL, encoding, options)
+ return ret
+
+ def NewFd(self, fd, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML from a file
+ descriptor. NOTE that the file descriptor will not be
+ closed when the reader is closed or reset. The parsing
+ flags @options are a combination of xmlParserOption. This
+ reuses the existing @reader xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewFd(self._o, fd, URL, encoding, options)
+ return ret
+
+ def NewFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. The
+ parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewFile(self._o, filename, encoding, options)
+ return ret
+
+ def NewMemory(self, buffer, size, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML in-memory document.
+ The parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewMemory(self._o, buffer, size, URL, encoding, options)
+ return ret
+
+ def NewWalker(self, doc):
+ """Setup an xmltextReader to parse a preparsed XML document.
+ This reuses the existing @reader xmlTextReader. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlReaderNewWalker(self._o, doc__o)
+ return ret
+
+ def Next(self):
+ """Skip to the node following the current one in document
+ order while avoiding the subtree if any. """
+ ret = libxml2mod.xmlTextReaderNext(self._o)
+ return ret
+
+ def NextSibling(self):
+ """Skip to the node following the current one in document
+ order while avoiding the subtree if any. Currently
+ implemented only for Readers built on a document """
+ ret = libxml2mod.xmlTextReaderNextSibling(self._o)
+ return ret
+
+ def NodeType(self):
+ """Get the node type of the current node Reference:
+ http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/Xm
+ lNodeType.html """
+ ret = libxml2mod.xmlTextReaderNodeType(self._o)
+ return ret
+
+ def Normalization(self):
+ """The value indicating whether to normalize white space and
+ attribute values. Since attribute value and end of line
+ normalizations are a MUST in the XML specification only the
+ value true is accepted. The broken bahaviour of accepting
+ out of range character entities like &#0; is of course not
+ supported either. """
+ ret = libxml2mod.xmlTextReaderNormalization(self._o)
+ return ret
+
+ def Prefix(self):
+ """A shorthand reference to the namespace associated with the
+ node. """
+ ret = libxml2mod.xmlTextReaderConstPrefix(self._o)
+ return ret
+
+ def Preserve(self):
+ """This tells the XML Reader to preserve the current node. The
+ caller must also use xmlTextReaderCurrentDoc() to keep an
+ handle on the resulting document once parsing has finished """
+ ret = libxml2mod.xmlTextReaderPreserve(self._o)
+ if ret is None:raise treeError('xmlTextReaderPreserve() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def QuoteChar(self):
+ """The quotation mark character used to enclose the value of
+ an attribute. """
+ ret = libxml2mod.xmlTextReaderQuoteChar(self._o)
+ return ret
+
+ def Read(self):
+ """Moves the position of the current instance to the next node
+ in the stream, exposing its properties. """
+ ret = libxml2mod.xmlTextReaderRead(self._o)
+ return ret
+
+ def ReadAttributeValue(self):
+ """Parses an attribute value into one or more Text and
+ EntityReference nodes. """
+ ret = libxml2mod.xmlTextReaderReadAttributeValue(self._o)
+ return ret
+
+ def ReadInnerXml(self):
+ """Reads the contents of the current node, including child
+ nodes and markup. """
+ ret = libxml2mod.xmlTextReaderReadInnerXml(self._o)
+ return ret
+
+ def ReadOuterXml(self):
+ """Reads the contents of the current node, including child
+ nodes and markup. """
+ ret = libxml2mod.xmlTextReaderReadOuterXml(self._o)
+ return ret
+
+ def ReadState(self):
+ """Gets the read state of the reader. """
+ ret = libxml2mod.xmlTextReaderReadState(self._o)
+ return ret
+
+ def ReadString(self):
+ """Reads the contents of an element or a text node as a string. """
+ ret = libxml2mod.xmlTextReaderReadString(self._o)
+ return ret
+
+ def RelaxNGSetSchema(self, schema):
+ """Use RelaxNG to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then RelaxNG validation is deactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if schema is None: schema__o = None
+ else: schema__o = schema._o
+ ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(self._o, schema__o)
+ return ret
+
+ def RelaxNGValidate(self, rng):
+ """Use RelaxNG schema to validate the document as it is
+ processed. Activation is only possible before the first
+ Read(). If @rng is None, then RelaxNG schema validation is
+ deactivated. """
+ ret = libxml2mod.xmlTextReaderRelaxNGValidate(self._o, rng)
+ return ret
+
+ def RelaxNGValidateCtxt(self, ctxt, options):
+ """Use RelaxNG schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then RelaxNG schema validation is
+ deactivated. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(self._o, ctxt__o, options)
+ return ret
+
+ def SchemaValidate(self, xsd):
+ """Use W3C XSD schema to validate the document as it is
+ processed. Activation is only possible before the first
+ Read(). If @xsd is None, then XML Schema validation is
+ deactivated. """
+ ret = libxml2mod.xmlTextReaderSchemaValidate(self._o, xsd)
+ return ret
+
+ def SchemaValidateCtxt(self, ctxt, options):
+ """Use W3C XSD schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then XML Schema validation is
+ deactivated. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(self._o, ctxt__o, options)
+ return ret
+
+ def SetParserProp(self, prop, value):
+ """Change the parser processing behaviour by changing some of
+ its internal properties. Note that some properties can only
+ be changed before any read has been done. """
+ ret = libxml2mod.xmlTextReaderSetParserProp(self._o, prop, value)
+ return ret
+
+ def SetSchema(self, schema):
+ """Use XSD Schema to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then Schema validation is deactivated. The
+ @schema should not be freed until the reader is deallocated
+ or its use has been deactivated. """
+ if schema is None: schema__o = None
+ else: schema__o = schema._o
+ ret = libxml2mod.xmlTextReaderSetSchema(self._o, schema__o)
+ return ret
+
+ def Setup(self, input, URL, encoding, options):
+ """Setup an XML reader with new options """
+ if input is None: input__o = None
+ else: input__o = input._o
+ ret = libxml2mod.xmlTextReaderSetup(self._o, input__o, URL, encoding, options)
+ return ret
+
+ def Standalone(self):
+ """Determine the standalone status of the document being read. """
+ ret = libxml2mod.xmlTextReaderStandalone(self._o)
+ return ret
+
+ def String(self, str):
+ """Get an interned string from the reader, allows for example
+ to speedup string name comparisons """
+ ret = libxml2mod.xmlTextReaderConstString(self._o, str)
+ return ret
+
+ def Value(self):
+ """Provides the text value of the node if present """
+ ret = libxml2mod.xmlTextReaderConstValue(self._o)
+ return ret
+
+ def XmlLang(self):
+ """The xml:lang scope within which the node resides. """
+ ret = libxml2mod.xmlTextReaderConstXmlLang(self._o)
+ return ret
+
+ def XmlVersion(self):
+ """Determine the XML version of the document being read. """
+ ret = libxml2mod.xmlTextReaderConstXmlVersion(self._o)
+ return ret
+
+class URI:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeURI(self._o)
+ self._o = None
+
+ # accessors for URI
+ def authority(self):
+ """Get the authority part from an URI """
+ ret = libxml2mod.xmlURIGetAuthority(self._o)
+ return ret
+
+ def fragment(self):
+ """Get the fragment part from an URI """
+ ret = libxml2mod.xmlURIGetFragment(self._o)
+ return ret
+
+ def opaque(self):
+ """Get the opaque part from an URI """
+ ret = libxml2mod.xmlURIGetOpaque(self._o)
+ return ret
+
+ def path(self):
+ """Get the path part from an URI """
+ ret = libxml2mod.xmlURIGetPath(self._o)
+ return ret
+
+ def port(self):
+ """Get the port part from an URI """
+ ret = libxml2mod.xmlURIGetPort(self._o)
+ return ret
+
+ def query(self):
+ """Get the query part from an URI """
+ ret = libxml2mod.xmlURIGetQuery(self._o)
+ return ret
+
+ def queryRaw(self):
+ """Get the raw query part from an URI (i.e. the unescaped
+ form). """
+ ret = libxml2mod.xmlURIGetQueryRaw(self._o)
+ return ret
+
+ def scheme(self):
+ """Get the scheme part from an URI """
+ ret = libxml2mod.xmlURIGetScheme(self._o)
+ return ret
+
+ def server(self):
+ """Get the server part from an URI """
+ ret = libxml2mod.xmlURIGetServer(self._o)
+ return ret
+
+ def setAuthority(self, authority):
+ """Set the authority part of an URI. """
+ libxml2mod.xmlURISetAuthority(self._o, authority)
+
+ def setFragment(self, fragment):
+ """Set the fragment part of an URI. """
+ libxml2mod.xmlURISetFragment(self._o, fragment)
+
+ def setOpaque(self, opaque):
+ """Set the opaque part of an URI. """
+ libxml2mod.xmlURISetOpaque(self._o, opaque)
+
+ def setPath(self, path):
+ """Set the path part of an URI. """
+ libxml2mod.xmlURISetPath(self._o, path)
+
+ def setPort(self, port):
+ """Set the port part of an URI. """
+ libxml2mod.xmlURISetPort(self._o, port)
+
+ def setQuery(self, query):
+ """Set the query part of an URI. """
+ libxml2mod.xmlURISetQuery(self._o, query)
+
+ def setQueryRaw(self, query_raw):
+ """Set the raw query part of an URI (i.e. the unescaped form). """
+ libxml2mod.xmlURISetQueryRaw(self._o, query_raw)
+
+ def setScheme(self, scheme):
+ """Set the scheme part of an URI. """
+ libxml2mod.xmlURISetScheme(self._o, scheme)
+
+ def setServer(self, server):
+ """Set the server part of an URI. """
+ libxml2mod.xmlURISetServer(self._o, server)
+
+ def setUser(self, user):
+ """Set the user part of an URI. """
+ libxml2mod.xmlURISetUser(self._o, user)
+
+ def user(self):
+ """Get the user part from an URI """
+ ret = libxml2mod.xmlURIGetUser(self._o)
+ return ret
+
+ #
+ # URI functions from module uri
+ #
+
+ def parseURIReference(self, str):
+ """Parse an URI reference string based on RFC 3986 and fills
+ in the appropriate fields of the @uri structure
+ URI-reference = URI / relative-ref """
+ ret = libxml2mod.xmlParseURIReference(self._o, str)
+ return ret
+
+ def printURI(self, stream):
+ """Prints the URI in the stream @stream. """
+ libxml2mod.xmlPrintURI(stream, self._o)
+
+ def saveUri(self):
+ """Save the URI as an escaped string """
+ ret = libxml2mod.xmlSaveUri(self._o)
+ return ret
+
+class ValidCtxt(ValidCtxtCore):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # ValidCtxt functions from module valid
+ #
+
+ def validCtxtNormalizeAttributeValue(self, doc, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character.
+ Also check VC: Standalone Document Declaration in P32, and
+ update ctxt->valid accordingly """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(self._o, doc__o, elem__o, name, value)
+ return ret
+
+ def validateDocument(self, doc):
+ """Try to validate the document instance basically it does
+ the all the checks described by the XML Rec i.e. validates
+ the internal and external subset (if present) and validate
+ the document tree. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDocument(self._o, doc__o)
+ return ret
+
+ def validateDocumentFinal(self, doc):
+ """Does the final step for the document validation once all
+ the incremental validation steps have been completed
+ basically it does the following checks described by the XML
+ Rec Check all the IDREF/IDREFS attributes definition for
+ validity """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDocumentFinal(self._o, doc__o)
+ return ret
+
+ def validateDtd(self, doc, dtd):
+ """Try to validate the document against the dtd instance
+ Basically it does check all the definitions in the DtD.
+ Note the the internal subset (if present) is de-coupled
+ (i.e. not used), which could give problems if ID or IDREF
+ is present. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if dtd is None: dtd__o = None
+ else: dtd__o = dtd._o
+ ret = libxml2mod.xmlValidateDtd(self._o, doc__o, dtd__o)
+ return ret
+
+ def validateDtdFinal(self, doc):
+ """Does the final step for the dtds validation once all the
+ subsets have been parsed basically it does the following
+ checks described by the XML Rec - check that ENTITY and
+ ENTITIES type attributes default or possible values matches
+ one of the defined entities. - check that NOTATION type
+ attributes default or possible values matches one of the
+ defined notations. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDtdFinal(self._o, doc__o)
+ return ret
+
+ def validateElement(self, doc, elem):
+ """Try to validate the subtree under an element """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateElement(self._o, doc__o, elem__o)
+ return ret
+
+ def validateNotationUse(self, doc, notationName):
+ """Validate that the given name match a notation declaration.
+ - [ VC: Notation Declared ] """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateNotationUse(self._o, doc__o, notationName)
+ return ret
+
+ def validateOneAttribute(self, doc, elem, attr, value):
+ """Try to validate a single attribute for an element basically
+ it does the following checks as described by the XML-1.0
+ recommendation: - [ VC: Attribute Value Type ] - [ VC:
+ Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
+ Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
+ Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlValidateOneAttribute(self._o, doc__o, elem__o, attr__o, value)
+ return ret
+
+ def validateOneElement(self, doc, elem):
+ """Try to validate a single element and it's attributes,
+ basically it does the following checks as described by the
+ XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
+ Required Attribute ] Then call xmlValidateOneAttribute()
+ for each attribute present. The ID/IDREF checkings are
+ done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateOneElement(self._o, doc__o, elem__o)
+ return ret
+
+ def validateOneNamespace(self, doc, elem, prefix, ns, value):
+ """Try to validate a single namespace declaration for an
+ element basically it does the following checks as described
+ by the XML-1.0 recommendation: - [ VC: Attribute Value Type
+ ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
+ [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
+ Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlValidateOneNamespace(self._o, doc__o, elem__o, prefix, ns__o, value)
+ return ret
+
+ def validatePopElement(self, doc, elem, qname):
+ """Pop the element end from the validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePopElement(self._o, doc__o, elem__o, qname)
+ return ret
+
+ def validatePushCData(self, data, len):
+ """check the CData parsed for validation in the current stack """
+ ret = libxml2mod.xmlValidatePushCData(self._o, data, len)
+ return ret
+
+ def validatePushElement(self, doc, elem, qname):
+ """Push a new element start on the validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePushElement(self._o, doc__o, elem__o, qname)
+ return ret
+
+ def validateRoot(self, doc):
+ """Try to validate a the root element basically it does the
+ following check as described by the XML-1.0 recommendation:
+ - [ VC: Root Element Type ] it doesn't try to recurse or
+ apply other check to the element """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateRoot(self._o, doc__o)
+ return ret
+
+class xpathContext:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for xpathContext
+ def contextDoc(self):
+ """Get the doc from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextDoc(self._o)
+ if ret is None:raise xpathError('xmlXPathGetContextDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def contextNode(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextNode(self._o)
+ if ret is None:raise xpathError('xmlXPathGetContextNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def contextPosition(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextPosition(self._o)
+ return ret
+
+ def contextSize(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextSize(self._o)
+ return ret
+
+ def function(self):
+ """Get the current function name xpathContext """
+ ret = libxml2mod.xmlXPathGetFunction(self._o)
+ return ret
+
+ def functionURI(self):
+ """Get the current function name URI xpathContext """
+ ret = libxml2mod.xmlXPathGetFunctionURI(self._o)
+ return ret
+
+ def setContextDoc(self, doc):
+ """Set the doc of an xpathContext """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlXPathSetContextDoc(self._o, doc__o)
+
+ def setContextNode(self, node):
+ """Set the current node of an xpathContext """
+ if node is None: node__o = None
+ else: node__o = node._o
+ libxml2mod.xmlXPathSetContextNode(self._o, node__o)
+
+ #
+ # xpathContext functions from module python
+ #
+
+ def registerXPathFunction(self, name, ns_uri, f):
+ """Register a Python written function to the XPath interpreter """
+ ret = libxml2mod.xmlRegisterXPathFunction(self._o, name, ns_uri, f)
+ return ret
+
+ def xpathRegisterVariable(self, name, ns_uri, value):
+ """Register a variable with the XPath context """
+ ret = libxml2mod.xmlXPathRegisterVariable(self._o, name, ns_uri, value)
+ return ret
+
+ #
+ # xpathContext functions from module xpath
+ #
+
+ def xpathContextSetCache(self, active, value, options):
+ """Creates/frees an object cache on the XPath context. If
+ activates XPath objects (xmlXPathObject) will be cached
+ internally to be reused. @options: 0: This will set the
+ XPath object caching: @value: This will set the maximum
+ number of XPath objects to be cached per slot There are 5
+ slots for: node-set, string, number, boolean, and misc
+ objects. Use <0 for the default number (100). Other values
+ for @options have currently no effect. """
+ ret = libxml2mod.xmlXPathContextSetCache(self._o, active, value, options)
+ return ret
+
+ def xpathEval(self, str):
+ """Evaluate the XPath Location Path in the given context. """
+ ret = libxml2mod.xmlXPathEval(str, self._o)
+ if ret is None:raise xpathError('xmlXPathEval() failed')
+ return xpathObjectRet(ret)
+
+ def xpathEvalExpression(self, str):
+ """Alias for xmlXPathEval(). """
+ ret = libxml2mod.xmlXPathEvalExpression(str, self._o)
+ if ret is None:raise xpathError('xmlXPathEvalExpression() failed')
+ return xpathObjectRet(ret)
+
+ def xpathFreeContext(self):
+ """Free up an xmlXPathContext """
+ libxml2mod.xmlXPathFreeContext(self._o)
+
+ #
+ # xpathContext functions from module xpathInternals
+ #
+
+ def xpathNewParserContext(self, str):
+ """Create a new xmlXPathParserContext """
+ ret = libxml2mod.xmlXPathNewParserContext(str, self._o)
+ if ret is None:raise xpathError('xmlXPathNewParserContext() failed')
+ __tmp = xpathParserContext(_obj=ret)
+ return __tmp
+
+ def xpathNsLookup(self, prefix):
+ """Search in the namespace declaration array of the context
+ for the given namespace name associated to the given prefix """
+ ret = libxml2mod.xmlXPathNsLookup(self._o, prefix)
+ return ret
+
+ def xpathRegisterAllFunctions(self):
+ """Registers all default XPath functions in this context """
+ libxml2mod.xmlXPathRegisterAllFunctions(self._o)
+
+ def xpathRegisterNs(self, prefix, ns_uri):
+ """Register a new namespace. If @ns_uri is None it unregisters
+ the namespace """
+ ret = libxml2mod.xmlXPathRegisterNs(self._o, prefix, ns_uri)
+ return ret
+
+ def xpathRegisteredFuncsCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ functions """
+ libxml2mod.xmlXPathRegisteredFuncsCleanup(self._o)
+
+ def xpathRegisteredNsCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ variables """
+ libxml2mod.xmlXPathRegisteredNsCleanup(self._o)
+
+ def xpathRegisteredVariablesCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ variables """
+ libxml2mod.xmlXPathRegisteredVariablesCleanup(self._o)
+
+ def xpathVariableLookup(self, name):
+ """Search in the Variable array of the context for the given
+ variable value. """
+ ret = libxml2mod.xmlXPathVariableLookup(self._o, name)
+ if ret is None:raise xpathError('xmlXPathVariableLookup() failed')
+ return xpathObjectRet(ret)
+
+ def xpathVariableLookupNS(self, name, ns_uri):
+ """Search in the Variable array of the context for the given
+ variable value. """
+ ret = libxml2mod.xmlXPathVariableLookupNS(self._o, name, ns_uri)
+ if ret is None:raise xpathError('xmlXPathVariableLookupNS() failed')
+ return xpathObjectRet(ret)
+
+ #
+ # xpathContext functions from module xpointer
+ #
+
+ def xpointerEval(self, str):
+ """Evaluate the XPath Location Path in the given context. """
+ ret = libxml2mod.xmlXPtrEval(str, self._o)
+ if ret is None:raise treeError('xmlXPtrEval() failed')
+ return xpathObjectRet(ret)
+
+class xpathParserContext:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for xpathParserContext
+ def context(self):
+ """Get the xpathContext from an xpathParserContext """
+ ret = libxml2mod.xmlXPathParserGetContext(self._o)
+ if ret is None:raise xpathError('xmlXPathParserGetContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ #
+ # xpathParserContext functions from module xpathInternals
+ #
+
+ def xpathAddValues(self):
+ """Implement the add operation on XPath objects: The numeric
+ operators convert their operands to numbers as if by
+ calling the number function. """
+ libxml2mod.xmlXPathAddValues(self._o)
+
+ def xpathBooleanFunction(self, nargs):
+ """Implement the boolean() XPath function boolean
+ boolean(object) The boolean function converts its argument
+ to a boolean as follows: - a number is true if and only if
+ it is neither positive or negative zero nor NaN - a
+ node-set is true if and only if it is non-empty - a string
+ is true if and only if its length is non-zero """
+ libxml2mod.xmlXPathBooleanFunction(self._o, nargs)
+
+ def xpathCeilingFunction(self, nargs):
+ """Implement the ceiling() XPath function number
+ ceiling(number) The ceiling function returns the smallest
+ (closest to negative infinity) number that is not less than
+ the argument and that is an integer. """
+ libxml2mod.xmlXPathCeilingFunction(self._o, nargs)
+
+ def xpathCompareValues(self, inf, strict):
+ """Implement the compare operation on XPath objects: @arg1 <
+ @arg2 (1, 1, ... @arg1 <= @arg2 (1, 0, ... @arg1 >
+ @arg2 (0, 1, ... @arg1 >= @arg2 (0, 0, ... When
+ neither object to be compared is a node-set and the
+ operator is <=, <, >=, >, then the objects are compared by
+ converted both objects to numbers and comparing the numbers
+ according to IEEE 754. The < comparison will be true if and
+ only if the first number is less than the second number.
+ The <= comparison will be true if and only if the first
+ number is less than or equal to the second number. The >
+ comparison will be true if and only if the first number is
+ greater than the second number. The >= comparison will be
+ true if and only if the first number is greater than or
+ equal to the second number. """
+ ret = libxml2mod.xmlXPathCompareValues(self._o, inf, strict)
+ return ret
+
+ def xpathConcatFunction(self, nargs):
+ """Implement the concat() XPath function string concat(string,
+ string, string*) The concat function returns the
+ concatenation of its arguments. """
+ libxml2mod.xmlXPathConcatFunction(self._o, nargs)
+
+ def xpathContainsFunction(self, nargs):
+ """Implement the contains() XPath function boolean
+ contains(string, string) The contains function returns true
+ if the first argument string contains the second argument
+ string, and otherwise returns false. """
+ libxml2mod.xmlXPathContainsFunction(self._o, nargs)
+
+ def xpathCountFunction(self, nargs):
+ """Implement the count() XPath function number count(node-set) """
+ libxml2mod.xmlXPathCountFunction(self._o, nargs)
+
+ def xpathDivValues(self):
+ """Implement the div operation on XPath objects @arg1 / @arg2:
+ The numeric operators convert their operands to numbers as
+ if by calling the number function. """
+ libxml2mod.xmlXPathDivValues(self._o)
+
+ def xpathEqualValues(self):
+ """Implement the equal operation on XPath objects content:
+ @arg1 == @arg2 """
+ ret = libxml2mod.xmlXPathEqualValues(self._o)
+ return ret
+
+ def xpathErr(self, error):
+ """Handle an XPath error """
+ libxml2mod.xmlXPathErr(self._o, error)
+
+ def xpathEvalExpr(self):
+ """Parse and evaluate an XPath expression in the given
+ context, then push the result on the context stack """
+ libxml2mod.xmlXPathEvalExpr(self._o)
+
+ def xpathFalseFunction(self, nargs):
+ """Implement the false() XPath function boolean false() """
+ libxml2mod.xmlXPathFalseFunction(self._o, nargs)
+
+ def xpathFloorFunction(self, nargs):
+ """Implement the floor() XPath function number floor(number)
+ The floor function returns the largest (closest to positive
+ infinity) number that is not greater than the argument and
+ that is an integer. """
+ libxml2mod.xmlXPathFloorFunction(self._o, nargs)
+
+ def xpathFreeParserContext(self):
+ """Free up an xmlXPathParserContext """
+ libxml2mod.xmlXPathFreeParserContext(self._o)
+
+ def xpathIdFunction(self, nargs):
+ """Implement the id() XPath function node-set id(object) The
+ id function selects elements by their unique ID (see [5.2.1
+ Unique IDs]). When the argument to id is of type node-set,
+ then the result is the union of the result of applying id
+ to the string value of each of the nodes in the argument
+ node-set. When the argument to id is of any other type, the
+ argument is converted to a string as if by a call to the
+ string function; the string is split into a
+ whitespace-separated list of tokens (whitespace is any
+ sequence of characters matching the production S); the
+ result is a node-set containing the elements in the same
+ document as the context node that have a unique ID equal to
+ any of the tokens in the list. """
+ libxml2mod.xmlXPathIdFunction(self._o, nargs)
+
+ def xpathLangFunction(self, nargs):
+ """Implement the lang() XPath function boolean lang(string)
+ The lang function returns true or false depending on
+ whether the language of the context node as specified by
+ xml:lang attributes is the same as or is a sublanguage of
+ the language specified by the argument string. The language
+ of the context node is determined by the value of the
+ xml:lang attribute on the context node, or, if the context
+ node has no xml:lang attribute, by the value of the
+ xml:lang attribute on the nearest ancestor of the context
+ node that has an xml:lang attribute. If there is no such
+ attribute, then lang """
+ libxml2mod.xmlXPathLangFunction(self._o, nargs)
+
+ def xpathLastFunction(self, nargs):
+ """Implement the last() XPath function number last() The last
+ function returns the number of nodes in the context node
+ list. """
+ libxml2mod.xmlXPathLastFunction(self._o, nargs)
+
+ def xpathLocalNameFunction(self, nargs):
+ """Implement the local-name() XPath function string
+ local-name(node-set?) The local-name function returns a
+ string containing the local part of the name of the node in
+ the argument node-set that is first in document order. If
+ the node-set is empty or the first node has no name, an
+ empty string is returned. If the argument is omitted it
+ defaults to the context node. """
+ libxml2mod.xmlXPathLocalNameFunction(self._o, nargs)
+
+ def xpathModValues(self):
+ """Implement the mod operation on XPath objects: @arg1 / @arg2
+ The numeric operators convert their operands to numbers as
+ if by calling the number function. """
+ libxml2mod.xmlXPathModValues(self._o)
+
+ def xpathMultValues(self):
+ """Implement the multiply operation on XPath objects: The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathMultValues(self._o)
+
+ def xpathNamespaceURIFunction(self, nargs):
+ """Implement the namespace-uri() XPath function string
+ namespace-uri(node-set?) The namespace-uri function returns
+ a string containing the namespace URI of the expanded name
+ of the node in the argument node-set that is first in
+ document order. If the node-set is empty, the first node
+ has no name, or the expanded name has no namespace URI, an
+ empty string is returned. If the argument is omitted it
+ defaults to the context node. """
+ libxml2mod.xmlXPathNamespaceURIFunction(self._o, nargs)
+
+ def xpathNextAncestor(self, cur):
+ """Traversal function for the "ancestor" direction the
+ ancestor axis contains the ancestors of the context node;
+ the ancestors of the context node consist of the parent of
+ context node and the parent's parent and so on; the nodes
+ are ordered in reverse document order; thus the parent is
+ the first node on the axis, and the parent's parent is the
+ second node on the axis """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAncestor(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAncestorOrSelf(self, cur):
+ """Traversal function for the "ancestor-or-self" direction he
+ ancestor-or-self axis contains the context node and
+ ancestors of the context node in reverse document order;
+ thus the context node is the first node on the axis, and
+ the context node's parent the second; parent here is
+ defined the same as with the parent axis. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAncestorOrSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAttribute(self, cur):
+ """Traversal function for the "attribute" direction TODO:
+ support DTD inherited default attributes """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAttribute(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextChild(self, cur):
+ """Traversal function for the "child" direction The child axis
+ contains the children of the context node in document order. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextChild(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendant(self, cur):
+ """Traversal function for the "descendant" direction the
+ descendant axis contains the descendants of the context
+ node in document order; a descendant is a child or a child
+ of a child and so on. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextDescendant(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendantOrSelf(self, cur):
+ """Traversal function for the "descendant-or-self" direction
+ the descendant-or-self axis contains the context node and
+ the descendants of the context node in document order; thus
+ the context node is the first node on the axis, and the
+ first child of the context node is the second node on the
+ axis """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextDescendantOrSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowing(self, cur):
+ """Traversal function for the "following" direction The
+ following axis contains all nodes in the same document as
+ the context node that are after the context node in
+ document order, excluding any descendants and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in document order """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextFollowing(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowingSibling(self, cur):
+ """Traversal function for the "following-sibling" direction
+ The following-sibling axis contains the following siblings
+ of the context node in document order. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextFollowingSibling(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextNamespace(self, cur):
+ """Traversal function for the "namespace" direction the
+ namespace axis contains the namespace nodes of the context
+ node; the order of nodes on this axis is
+ implementation-defined; the axis will be empty unless the
+ context node is an element We keep the XML namespace node
+ at the end of the list. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextNamespace(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextParent(self, cur):
+ """Traversal function for the "parent" direction The parent
+ axis contains the parent of the context node, if there is
+ one. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextParent(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextParent() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPreceding(self, cur):
+ """Traversal function for the "preceding" direction the
+ preceding axis contains all nodes in the same document as
+ the context node that are before the context node in
+ document order, excluding any ancestors and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in reverse document order """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextPreceding(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPrecedingSibling(self, cur):
+ """Traversal function for the "preceding-sibling" direction
+ The preceding-sibling axis contains the preceding siblings
+ of the context node in reverse document order; the first
+ preceding sibling is first on the axis; the sibling
+ preceding that node is the second on the axis and so on. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextPrecedingSibling(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextSelf(self, cur):
+ """Traversal function for the "self" direction The self axis
+ contains just the context node itself """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNormalizeFunction(self, nargs):
+ """Implement the normalize-space() XPath function string
+ normalize-space(string?) The normalize-space function
+ returns the argument string with white space normalized by
+ stripping leading and trailing whitespace and replacing
+ sequences of whitespace characters by a single space.
+ Whitespace characters are the same allowed by the S
+ production in XML. If the argument is omitted, it defaults
+ to the context node converted to a string, in other words
+ the value of the context node. """
+ libxml2mod.xmlXPathNormalizeFunction(self._o, nargs)
+
+ def xpathNotEqualValues(self):
+ """Implement the equal operation on XPath objects content:
+ @arg1 == @arg2 """
+ ret = libxml2mod.xmlXPathNotEqualValues(self._o)
+ return ret
+
+ def xpathNotFunction(self, nargs):
+ """Implement the not() XPath function boolean not(boolean) The
+ not function returns true if its argument is false, and
+ false otherwise. """
+ libxml2mod.xmlXPathNotFunction(self._o, nargs)
+
+ def xpathNumberFunction(self, nargs):
+ """Implement the number() XPath function number number(object?) """
+ libxml2mod.xmlXPathNumberFunction(self._o, nargs)
+
+ def xpathParseNCName(self):
+ """parse an XML namespace non qualified name. [NS 3] NCName
+ ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::=
+ Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender """
+ ret = libxml2mod.xmlXPathParseNCName(self._o)
+ return ret
+
+ def xpathParseName(self):
+ """parse an XML name [4] NameChar ::= Letter | Digit | '.' |
+ '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
+ (Letter | '_' | ':') (NameChar)* """
+ ret = libxml2mod.xmlXPathParseName(self._o)
+ return ret
+
+ def xpathPopBoolean(self):
+ """Pops a boolean from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopBoolean(self._o)
+ return ret
+
+ def xpathPopNumber(self):
+ """Pops a number from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopNumber(self._o)
+ return ret
+
+ def xpathPopString(self):
+ """Pops a string from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopString(self._o)
+ return ret
+
+ def xpathPositionFunction(self, nargs):
+ """Implement the position() XPath function number position()
+ The position function returns the position of the context
+ node in the context node list. The first position is 1, and
+ so the last position will be equal to last(). """
+ libxml2mod.xmlXPathPositionFunction(self._o, nargs)
+
+ def xpathRoot(self):
+ """Initialize the context to the root of the document """
+ libxml2mod.xmlXPathRoot(self._o)
+
+ def xpathRoundFunction(self, nargs):
+ """Implement the round() XPath function number round(number)
+ The round function returns the number that is closest to
+ the argument and that is an integer. If there are two such
+ numbers, then the one that is closest to positive infinity
+ is returned. """
+ libxml2mod.xmlXPathRoundFunction(self._o, nargs)
+
+ def xpathStartsWithFunction(self, nargs):
+ """Implement the starts-with() XPath function boolean
+ starts-with(string, string) The starts-with function
+ returns true if the first argument string starts with the
+ second argument string, and otherwise returns false. """
+ libxml2mod.xmlXPathStartsWithFunction(self._o, nargs)
+
+ def xpathStringFunction(self, nargs):
+ """Implement the string() XPath function string
+ string(object?) The string function converts an object to a
+ string as follows: - A node-set is converted to a string by
+ returning the value of the node in the node-set that is
+ first in document order. If the node-set is empty, an empty
+ string is returned. - A number is converted to a string as
+ follows + NaN is converted to the string NaN + positive
+ zero is converted to the string 0 + negative zero is
+ converted to the string 0 + positive infinity is converted
+ to the string Infinity + negative infinity is converted to
+ the string -Infinity + if the number is an integer, the
+ number is represented in decimal form as a Number with no
+ decimal point and no leading zeros, preceded by a minus
+ sign (-) if the number is negative + otherwise, the number
+ is represented in decimal form as a Number including a
+ decimal point with at least one digit before the decimal
+ point and at least one digit after the decimal point,
+ preceded by a minus sign (-) if the number is negative;
+ there must be no leading zeros before the decimal point
+ apart possibly from the one required digit immediately
+ before the decimal point; beyond the one required digit
+ after the decimal point there must be as many, but only as
+ many, more digits as are needed to uniquely distinguish the
+ number from all other IEEE 754 numeric values. - The
+ boolean false value is converted to the string false. The
+ boolean true value is converted to the string true. If the
+ argument is omitted, it defaults to a node-set with the
+ context node as its only member. """
+ libxml2mod.xmlXPathStringFunction(self._o, nargs)
+
+ def xpathStringLengthFunction(self, nargs):
+ """Implement the string-length() XPath function number
+ string-length(string?) The string-length returns the number
+ of characters in the string (see [3.6 Strings]). If the
+ argument is omitted, it defaults to the context node
+ converted to a string, in other words the value of the
+ context node. """
+ libxml2mod.xmlXPathStringLengthFunction(self._o, nargs)
+
+ def xpathSubValues(self):
+ """Implement the subtraction operation on XPath objects: The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathSubValues(self._o)
+
+ def xpathSubstringAfterFunction(self, nargs):
+ """Implement the substring-after() XPath function string
+ substring-after(string, string) The substring-after
+ function returns the substring of the first argument string
+ that follows the first occurrence of the second argument
+ string in the first argument string, or the empty stringi
+ if the first argument string does not contain the second
+ argument string. For example,
+ substring-after("1999/04/01","/") returns 04/01, and
+ substring-after("1999/04/01","19") returns 99/04/01. """
+ libxml2mod.xmlXPathSubstringAfterFunction(self._o, nargs)
+
+ def xpathSubstringBeforeFunction(self, nargs):
+ """Implement the substring-before() XPath function string
+ substring-before(string, string) The substring-before
+ function returns the substring of the first argument string
+ that precedes the first occurrence of the second argument
+ string in the first argument string, or the empty string if
+ the first argument string does not contain the second
+ argument string. For example,
+ substring-before("1999/04/01","/") returns 1999. """
+ libxml2mod.xmlXPathSubstringBeforeFunction(self._o, nargs)
+
+ def xpathSubstringFunction(self, nargs):
+ """Implement the substring() XPath function string
+ substring(string, number, number?) The substring function
+ returns the substring of the first argument starting at the
+ position specified in the second argument with length
+ specified in the third argument. For example,
+ substring("12345",2,3) returns "234". If the third argument
+ is not specified, it returns the substring starting at the
+ position specified in the second argument and continuing to
+ the end of the string. For example, substring("12345",2)
+ returns "2345". More precisely, each character in the
+ string (see [3.6 Strings]) is considered to have a numeric
+ position: the position of the first character is 1, the
+ position of the second character is 2 and so on. The
+ returned substring contains those characters for which the
+ position of the character is greater than or equal to the
+ second argument and, if the third argument is specified,
+ less than the sum of the second and third arguments; the
+ comparisons and addition used for the above follow the
+ standard IEEE 754 rules. Thus: - substring("12345", 1.5,
+ 2.6) returns "234" - substring("12345", 0, 3) returns "12"
+ - substring("12345", 0 div 0, 3) returns "" -
+ substring("12345", 1, 0 div 0) returns "" -
+ substring("12345", -42, 1 div 0) returns "12345" -
+ substring("12345", -1 div 0, 1 div 0) returns "" """
+ libxml2mod.xmlXPathSubstringFunction(self._o, nargs)
+
+ def xpathSumFunction(self, nargs):
+ """Implement the sum() XPath function number sum(node-set) The
+ sum function returns the sum of the values of the nodes in
+ the argument node-set. """
+ libxml2mod.xmlXPathSumFunction(self._o, nargs)
+
+ def xpathTranslateFunction(self, nargs):
+ """Implement the translate() XPath function string
+ translate(string, string, string) The translate function
+ returns the first argument string with occurrences of
+ characters in the second argument string replaced by the
+ character at the corresponding position in the third
+ argument string. For example, translate("bar","abc","ABC")
+ returns the string BAr. If there is a character in the
+ second argument string with no character at a corresponding
+ position in the third argument string (because the second
+ argument string is longer than the third argument string),
+ then occurrences of that character in the first argument
+ string are removed. For example,
+ translate("--aaa--","abc-","ABC") """
+ libxml2mod.xmlXPathTranslateFunction(self._o, nargs)
+
+ def xpathTrueFunction(self, nargs):
+ """Implement the true() XPath function boolean true() """
+ libxml2mod.xmlXPathTrueFunction(self._o, nargs)
+
+ def xpathValueFlipSign(self):
+ """Implement the unary - operation on an XPath object The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathValueFlipSign(self._o)
+
+ def xpatherror(self, file, line, no):
+ """Formats an error message. """
+ libxml2mod.xmlXPatherror(self._o, file, line, no)
+
+ #
+ # xpathParserContext functions from module xpointer
+ #
+
+ def xpointerEvalRangePredicate(self):
+ """[8] Predicate ::= '[' PredicateExpr ']' [9]
+ PredicateExpr ::= Expr Evaluate a predicate as in
+ xmlXPathEvalPredicate() but for a Location Set instead of a
+ node set """
+ libxml2mod.xmlXPtrEvalRangePredicate(self._o)
+
+ def xpointerRangeToFunction(self, nargs):
+ """Implement the range-to() XPointer function Obsolete.
+ range-to is not a real function but a special type of
+ location step which is handled in xpath.c. """
+ libxml2mod.xmlXPtrRangeToFunction(self._o, nargs)
+
+# xlinkShow
+XLINK_SHOW_NONE = 0
+XLINK_SHOW_NEW = 1
+XLINK_SHOW_EMBED = 2
+XLINK_SHOW_REPLACE = 3
+
+# xmlRelaxNGParserFlag
+XML_RELAXNGP_NONE = 0
+XML_RELAXNGP_FREE_DOC = 1
+XML_RELAXNGP_CRNG = 2
+
+# xmlBufferAllocationScheme
+XML_BUFFER_ALLOC_DOUBLEIT = 1
+XML_BUFFER_ALLOC_EXACT = 2
+XML_BUFFER_ALLOC_IMMUTABLE = 3
+XML_BUFFER_ALLOC_IO = 4
+XML_BUFFER_ALLOC_HYBRID = 5
+XML_BUFFER_ALLOC_BOUNDED = 6
+
+# xmlParserSeverities
+XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
+XML_PARSER_SEVERITY_VALIDITY_ERROR = 2
+XML_PARSER_SEVERITY_WARNING = 3
+XML_PARSER_SEVERITY_ERROR = 4
+
+# xmlAttributeDefault
+XML_ATTRIBUTE_NONE = 1
+XML_ATTRIBUTE_REQUIRED = 2
+XML_ATTRIBUTE_IMPLIED = 3
+XML_ATTRIBUTE_FIXED = 4
+
+# xmlSchemaValType
+XML_SCHEMAS_UNKNOWN = 0
+XML_SCHEMAS_STRING = 1
+XML_SCHEMAS_NORMSTRING = 2
+XML_SCHEMAS_DECIMAL = 3
+XML_SCHEMAS_TIME = 4
+XML_SCHEMAS_GDAY = 5
+XML_SCHEMAS_GMONTH = 6
+XML_SCHEMAS_GMONTHDAY = 7
+XML_SCHEMAS_GYEAR = 8
+XML_SCHEMAS_GYEARMONTH = 9
+XML_SCHEMAS_DATE = 10
+XML_SCHEMAS_DATETIME = 11
+XML_SCHEMAS_DURATION = 12
+XML_SCHEMAS_FLOAT = 13
+XML_SCHEMAS_DOUBLE = 14
+XML_SCHEMAS_BOOLEAN = 15
+XML_SCHEMAS_TOKEN = 16
+XML_SCHEMAS_LANGUAGE = 17
+XML_SCHEMAS_NMTOKEN = 18
+XML_SCHEMAS_NMTOKENS = 19
+XML_SCHEMAS_NAME = 20
+XML_SCHEMAS_QNAME = 21
+XML_SCHEMAS_NCNAME = 22
+XML_SCHEMAS_ID = 23
+XML_SCHEMAS_IDREF = 24
+XML_SCHEMAS_IDREFS = 25
+XML_SCHEMAS_ENTITY = 26
+XML_SCHEMAS_ENTITIES = 27
+XML_SCHEMAS_NOTATION = 28
+XML_SCHEMAS_ANYURI = 29
+XML_SCHEMAS_INTEGER = 30
+XML_SCHEMAS_NPINTEGER = 31
+XML_SCHEMAS_NINTEGER = 32
+XML_SCHEMAS_NNINTEGER = 33
+XML_SCHEMAS_PINTEGER = 34
+XML_SCHEMAS_INT = 35
+XML_SCHEMAS_UINT = 36
+XML_SCHEMAS_LONG = 37
+XML_SCHEMAS_ULONG = 38
+XML_SCHEMAS_SHORT = 39
+XML_SCHEMAS_USHORT = 40
+XML_SCHEMAS_BYTE = 41
+XML_SCHEMAS_UBYTE = 42
+XML_SCHEMAS_HEXBINARY = 43
+XML_SCHEMAS_BASE64BINARY = 44
+XML_SCHEMAS_ANYTYPE = 45
+XML_SCHEMAS_ANYSIMPLETYPE = 46
+
+# xmlParserInputState
+XML_PARSER_EOF = -1
+XML_PARSER_START = 0
+XML_PARSER_MISC = 1
+XML_PARSER_PI = 2
+XML_PARSER_DTD = 3
+XML_PARSER_PROLOG = 4
+XML_PARSER_COMMENT = 5
+XML_PARSER_START_TAG = 6
+XML_PARSER_CONTENT = 7
+XML_PARSER_CDATA_SECTION = 8
+XML_PARSER_END_TAG = 9
+XML_PARSER_ENTITY_DECL = 10
+XML_PARSER_ENTITY_VALUE = 11
+XML_PARSER_ATTRIBUTE_VALUE = 12
+XML_PARSER_SYSTEM_LITERAL = 13
+XML_PARSER_EPILOG = 14
+XML_PARSER_IGNORE = 15
+XML_PARSER_PUBLIC_LITERAL = 16
+
+# xmlEntityType
+XML_INTERNAL_GENERAL_ENTITY = 1
+XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2
+XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3
+XML_INTERNAL_PARAMETER_ENTITY = 4
+XML_EXTERNAL_PARAMETER_ENTITY = 5
+XML_INTERNAL_PREDEFINED_ENTITY = 6
+
+# xmlSaveOption
+XML_SAVE_FORMAT = 1
+XML_SAVE_NO_DECL = 2
+XML_SAVE_NO_EMPTY = 4
+XML_SAVE_NO_XHTML = 8
+XML_SAVE_XHTML = 16
+XML_SAVE_AS_XML = 32
+XML_SAVE_AS_HTML = 64
+XML_SAVE_WSNONSIG = 128
+
+# xmlPatternFlags
+XML_PATTERN_DEFAULT = 0
+XML_PATTERN_XPATH = 1
+XML_PATTERN_XSSEL = 2
+XML_PATTERN_XSFIELD = 4
+
+# xmlParserErrors
+XML_ERR_OK = 0
+XML_ERR_INTERNAL_ERROR = 1
+XML_ERR_NO_MEMORY = 2
+XML_ERR_DOCUMENT_START = 3
+XML_ERR_DOCUMENT_EMPTY = 4
+XML_ERR_DOCUMENT_END = 5
+XML_ERR_INVALID_HEX_CHARREF = 6
+XML_ERR_INVALID_DEC_CHARREF = 7
+XML_ERR_INVALID_CHARREF = 8
+XML_ERR_INVALID_CHAR = 9
+XML_ERR_CHARREF_AT_EOF = 10
+XML_ERR_CHARREF_IN_PROLOG = 11
+XML_ERR_CHARREF_IN_EPILOG = 12
+XML_ERR_CHARREF_IN_DTD = 13
+XML_ERR_ENTITYREF_AT_EOF = 14
+XML_ERR_ENTITYREF_IN_PROLOG = 15
+XML_ERR_ENTITYREF_IN_EPILOG = 16
+XML_ERR_ENTITYREF_IN_DTD = 17
+XML_ERR_PEREF_AT_EOF = 18
+XML_ERR_PEREF_IN_PROLOG = 19
+XML_ERR_PEREF_IN_EPILOG = 20
+XML_ERR_PEREF_IN_INT_SUBSET = 21
+XML_ERR_ENTITYREF_NO_NAME = 22
+XML_ERR_ENTITYREF_SEMICOL_MISSING = 23
+XML_ERR_PEREF_NO_NAME = 24
+XML_ERR_PEREF_SEMICOL_MISSING = 25
+XML_ERR_UNDECLARED_ENTITY = 26
+XML_WAR_UNDECLARED_ENTITY = 27
+XML_ERR_UNPARSED_ENTITY = 28
+XML_ERR_ENTITY_IS_EXTERNAL = 29
+XML_ERR_ENTITY_IS_PARAMETER = 30
+XML_ERR_UNKNOWN_ENCODING = 31
+XML_ERR_UNSUPPORTED_ENCODING = 32
+XML_ERR_STRING_NOT_STARTED = 33
+XML_ERR_STRING_NOT_CLOSED = 34
+XML_ERR_NS_DECL_ERROR = 35
+XML_ERR_ENTITY_NOT_STARTED = 36
+XML_ERR_ENTITY_NOT_FINISHED = 37
+XML_ERR_LT_IN_ATTRIBUTE = 38
+XML_ERR_ATTRIBUTE_NOT_STARTED = 39
+XML_ERR_ATTRIBUTE_NOT_FINISHED = 40
+XML_ERR_ATTRIBUTE_WITHOUT_VALUE = 41
+XML_ERR_ATTRIBUTE_REDEFINED = 42
+XML_ERR_LITERAL_NOT_STARTED = 43
+XML_ERR_LITERAL_NOT_FINISHED = 44
+XML_ERR_COMMENT_NOT_FINISHED = 45
+XML_ERR_PI_NOT_STARTED = 46
+XML_ERR_PI_NOT_FINISHED = 47
+XML_ERR_NOTATION_NOT_STARTED = 48
+XML_ERR_NOTATION_NOT_FINISHED = 49
+XML_ERR_ATTLIST_NOT_STARTED = 50
+XML_ERR_ATTLIST_NOT_FINISHED = 51
+XML_ERR_MIXED_NOT_STARTED = 52
+XML_ERR_MIXED_NOT_FINISHED = 53
+XML_ERR_ELEMCONTENT_NOT_STARTED = 54
+XML_ERR_ELEMCONTENT_NOT_FINISHED = 55
+XML_ERR_XMLDECL_NOT_STARTED = 56
+XML_ERR_XMLDECL_NOT_FINISHED = 57
+XML_ERR_CONDSEC_NOT_STARTED = 58
+XML_ERR_CONDSEC_NOT_FINISHED = 59
+XML_ERR_EXT_SUBSET_NOT_FINISHED = 60
+XML_ERR_DOCTYPE_NOT_FINISHED = 61
+XML_ERR_MISPLACED_CDATA_END = 62
+XML_ERR_CDATA_NOT_FINISHED = 63
+XML_ERR_RESERVED_XML_NAME = 64
+XML_ERR_SPACE_REQUIRED = 65
+XML_ERR_SEPARATOR_REQUIRED = 66
+XML_ERR_NMTOKEN_REQUIRED = 67
+XML_ERR_NAME_REQUIRED = 68
+XML_ERR_PCDATA_REQUIRED = 69
+XML_ERR_URI_REQUIRED = 70
+XML_ERR_PUBID_REQUIRED = 71
+XML_ERR_LT_REQUIRED = 72
+XML_ERR_GT_REQUIRED = 73
+XML_ERR_LTSLASH_REQUIRED = 74
+XML_ERR_EQUAL_REQUIRED = 75
+XML_ERR_TAG_NAME_MISMATCH = 76
+XML_ERR_TAG_NOT_FINISHED = 77
+XML_ERR_STANDALONE_VALUE = 78
+XML_ERR_ENCODING_NAME = 79
+XML_ERR_HYPHEN_IN_COMMENT = 80
+XML_ERR_INVALID_ENCODING = 81
+XML_ERR_EXT_ENTITY_STANDALONE = 82
+XML_ERR_CONDSEC_INVALID = 83
+XML_ERR_VALUE_REQUIRED = 84
+XML_ERR_NOT_WELL_BALANCED = 85
+XML_ERR_EXTRA_CONTENT = 86
+XML_ERR_ENTITY_CHAR_ERROR = 87
+XML_ERR_ENTITY_PE_INTERNAL = 88
+XML_ERR_ENTITY_LOOP = 89
+XML_ERR_ENTITY_BOUNDARY = 90
+XML_ERR_INVALID_URI = 91
+XML_ERR_URI_FRAGMENT = 92
+XML_WAR_CATALOG_PI = 93
+XML_ERR_NO_DTD = 94
+XML_ERR_CONDSEC_INVALID_KEYWORD = 95
+XML_ERR_VERSION_MISSING = 96
+XML_WAR_UNKNOWN_VERSION = 97
+XML_WAR_LANG_VALUE = 98
+XML_WAR_NS_URI = 99
+XML_WAR_NS_URI_RELATIVE = 100
+XML_ERR_MISSING_ENCODING = 101
+XML_WAR_SPACE_VALUE = 102
+XML_ERR_NOT_STANDALONE = 103
+XML_ERR_ENTITY_PROCESSING = 104
+XML_ERR_NOTATION_PROCESSING = 105
+XML_WAR_NS_COLUMN = 106
+XML_WAR_ENTITY_REDEFINED = 107
+XML_ERR_UNKNOWN_VERSION = 108
+XML_ERR_VERSION_MISMATCH = 109
+XML_ERR_NAME_TOO_LONG = 110
+XML_ERR_USER_STOP = 111
+XML_NS_ERR_XML_NAMESPACE = 200
+XML_NS_ERR_UNDEFINED_NAMESPACE = 201
+XML_NS_ERR_QNAME = 202
+XML_NS_ERR_ATTRIBUTE_REDEFINED = 203
+XML_NS_ERR_EMPTY = 204
+XML_NS_ERR_COLON = 205
+XML_DTD_ATTRIBUTE_DEFAULT = 500
+XML_DTD_ATTRIBUTE_REDEFINED = 501
+XML_DTD_ATTRIBUTE_VALUE = 502
+XML_DTD_CONTENT_ERROR = 503
+XML_DTD_CONTENT_MODEL = 504
+XML_DTD_CONTENT_NOT_DETERMINIST = 505
+XML_DTD_DIFFERENT_PREFIX = 506
+XML_DTD_ELEM_DEFAULT_NAMESPACE = 507
+XML_DTD_ELEM_NAMESPACE = 508
+XML_DTD_ELEM_REDEFINED = 509
+XML_DTD_EMPTY_NOTATION = 510
+XML_DTD_ENTITY_TYPE = 511
+XML_DTD_ID_FIXED = 512
+XML_DTD_ID_REDEFINED = 513
+XML_DTD_ID_SUBSET = 514
+XML_DTD_INVALID_CHILD = 515
+XML_DTD_INVALID_DEFAULT = 516
+XML_DTD_LOAD_ERROR = 517
+XML_DTD_MISSING_ATTRIBUTE = 518
+XML_DTD_MIXED_CORRUPT = 519
+XML_DTD_MULTIPLE_ID = 520
+XML_DTD_NO_DOC = 521
+XML_DTD_NO_DTD = 522
+XML_DTD_NO_ELEM_NAME = 523
+XML_DTD_NO_PREFIX = 524
+XML_DTD_NO_ROOT = 525
+XML_DTD_NOTATION_REDEFINED = 526
+XML_DTD_NOTATION_VALUE = 527
+XML_DTD_NOT_EMPTY = 528
+XML_DTD_NOT_PCDATA = 529
+XML_DTD_NOT_STANDALONE = 530
+XML_DTD_ROOT_NAME = 531
+XML_DTD_STANDALONE_WHITE_SPACE = 532
+XML_DTD_UNKNOWN_ATTRIBUTE = 533
+XML_DTD_UNKNOWN_ELEM = 534
+XML_DTD_UNKNOWN_ENTITY = 535
+XML_DTD_UNKNOWN_ID = 536
+XML_DTD_UNKNOWN_NOTATION = 537
+XML_DTD_STANDALONE_DEFAULTED = 538
+XML_DTD_XMLID_VALUE = 539
+XML_DTD_XMLID_TYPE = 540
+XML_DTD_DUP_TOKEN = 541
+XML_HTML_STRUCURE_ERROR = 800
+XML_HTML_UNKNOWN_TAG = 801
+XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000
+XML_RNGP_ATTR_CONFLICT = 1001
+XML_RNGP_ATTRIBUTE_CHILDREN = 1002
+XML_RNGP_ATTRIBUTE_CONTENT = 1003
+XML_RNGP_ATTRIBUTE_EMPTY = 1004
+XML_RNGP_ATTRIBUTE_NOOP = 1005
+XML_RNGP_CHOICE_CONTENT = 1006
+XML_RNGP_CHOICE_EMPTY = 1007
+XML_RNGP_CREATE_FAILURE = 1008
+XML_RNGP_DATA_CONTENT = 1009
+XML_RNGP_DEF_CHOICE_AND_INTERLEAVE = 1010
+XML_RNGP_DEFINE_CREATE_FAILED = 1011
+XML_RNGP_DEFINE_EMPTY = 1012
+XML_RNGP_DEFINE_MISSING = 1013
+XML_RNGP_DEFINE_NAME_MISSING = 1014
+XML_RNGP_ELEM_CONTENT_EMPTY = 1015
+XML_RNGP_ELEM_CONTENT_ERROR = 1016
+XML_RNGP_ELEMENT_EMPTY = 1017
+XML_RNGP_ELEMENT_CONTENT = 1018
+XML_RNGP_ELEMENT_NAME = 1019
+XML_RNGP_ELEMENT_NO_CONTENT = 1020
+XML_RNGP_ELEM_TEXT_CONFLICT = 1021
+XML_RNGP_EMPTY = 1022
+XML_RNGP_EMPTY_CONSTRUCT = 1023
+XML_RNGP_EMPTY_CONTENT = 1024
+XML_RNGP_EMPTY_NOT_EMPTY = 1025
+XML_RNGP_ERROR_TYPE_LIB = 1026
+XML_RNGP_EXCEPT_EMPTY = 1027
+XML_RNGP_EXCEPT_MISSING = 1028
+XML_RNGP_EXCEPT_MULTIPLE = 1029
+XML_RNGP_EXCEPT_NO_CONTENT = 1030
+XML_RNGP_EXTERNALREF_EMTPY = 1031
+XML_RNGP_EXTERNAL_REF_FAILURE = 1032
+XML_RNGP_EXTERNALREF_RECURSE = 1033
+XML_RNGP_FORBIDDEN_ATTRIBUTE = 1034
+XML_RNGP_FOREIGN_ELEMENT = 1035
+XML_RNGP_GRAMMAR_CONTENT = 1036
+XML_RNGP_GRAMMAR_EMPTY = 1037
+XML_RNGP_GRAMMAR_MISSING = 1038
+XML_RNGP_GRAMMAR_NO_START = 1039
+XML_RNGP_GROUP_ATTR_CONFLICT = 1040
+XML_RNGP_HREF_ERROR = 1041
+XML_RNGP_INCLUDE_EMPTY = 1042
+XML_RNGP_INCLUDE_FAILURE = 1043
+XML_RNGP_INCLUDE_RECURSE = 1044
+XML_RNGP_INTERLEAVE_ADD = 1045
+XML_RNGP_INTERLEAVE_CREATE_FAILED = 1046
+XML_RNGP_INTERLEAVE_EMPTY = 1047
+XML_RNGP_INTERLEAVE_NO_CONTENT = 1048
+XML_RNGP_INVALID_DEFINE_NAME = 1049
+XML_RNGP_INVALID_URI = 1050
+XML_RNGP_INVALID_VALUE = 1051
+XML_RNGP_MISSING_HREF = 1052
+XML_RNGP_NAME_MISSING = 1053
+XML_RNGP_NEED_COMBINE = 1054
+XML_RNGP_NOTALLOWED_NOT_EMPTY = 1055
+XML_RNGP_NSNAME_ATTR_ANCESTOR = 1056
+XML_RNGP_NSNAME_NO_NS = 1057
+XML_RNGP_PARAM_FORBIDDEN = 1058
+XML_RNGP_PARAM_NAME_MISSING = 1059
+XML_RNGP_PARENTREF_CREATE_FAILED = 1060
+XML_RNGP_PARENTREF_NAME_INVALID = 1061
+XML_RNGP_PARENTREF_NO_NAME = 1062
+XML_RNGP_PARENTREF_NO_PARENT = 1063
+XML_RNGP_PARENTREF_NOT_EMPTY = 1064
+XML_RNGP_PARSE_ERROR = 1065
+XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME = 1066
+XML_RNGP_PAT_ATTR_ATTR = 1067
+XML_RNGP_PAT_ATTR_ELEM = 1068
+XML_RNGP_PAT_DATA_EXCEPT_ATTR = 1069
+XML_RNGP_PAT_DATA_EXCEPT_ELEM = 1070
+XML_RNGP_PAT_DATA_EXCEPT_EMPTY = 1071
+XML_RNGP_PAT_DATA_EXCEPT_GROUP = 1072
+XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE = 1073
+XML_RNGP_PAT_DATA_EXCEPT_LIST = 1074
+XML_RNGP_PAT_DATA_EXCEPT_ONEMORE = 1075
+XML_RNGP_PAT_DATA_EXCEPT_REF = 1076
+XML_RNGP_PAT_DATA_EXCEPT_TEXT = 1077
+XML_RNGP_PAT_LIST_ATTR = 1078
+XML_RNGP_PAT_LIST_ELEM = 1079
+XML_RNGP_PAT_LIST_INTERLEAVE = 1080
+XML_RNGP_PAT_LIST_LIST = 1081
+XML_RNGP_PAT_LIST_REF = 1082
+XML_RNGP_PAT_LIST_TEXT = 1083
+XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME = 1084
+XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME = 1085
+XML_RNGP_PAT_ONEMORE_GROUP_ATTR = 1086
+XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR = 1087
+XML_RNGP_PAT_START_ATTR = 1088
+XML_RNGP_PAT_START_DATA = 1089
+XML_RNGP_PAT_START_EMPTY = 1090
+XML_RNGP_PAT_START_GROUP = 1091
+XML_RNGP_PAT_START_INTERLEAVE = 1092
+XML_RNGP_PAT_START_LIST = 1093
+XML_RNGP_PAT_START_ONEMORE = 1094
+XML_RNGP_PAT_START_TEXT = 1095
+XML_RNGP_PAT_START_VALUE = 1096
+XML_RNGP_PREFIX_UNDEFINED = 1097
+XML_RNGP_REF_CREATE_FAILED = 1098
+XML_RNGP_REF_CYCLE = 1099
+XML_RNGP_REF_NAME_INVALID = 1100
+XML_RNGP_REF_NO_DEF = 1101
+XML_RNGP_REF_NO_NAME = 1102
+XML_RNGP_REF_NOT_EMPTY = 1103
+XML_RNGP_START_CHOICE_AND_INTERLEAVE = 1104
+XML_RNGP_START_CONTENT = 1105
+XML_RNGP_START_EMPTY = 1106
+XML_RNGP_START_MISSING = 1107
+XML_RNGP_TEXT_EXPECTED = 1108
+XML_RNGP_TEXT_HAS_CHILD = 1109
+XML_RNGP_TYPE_MISSING = 1110
+XML_RNGP_TYPE_NOT_FOUND = 1111
+XML_RNGP_TYPE_VALUE = 1112
+XML_RNGP_UNKNOWN_ATTRIBUTE = 1113
+XML_RNGP_UNKNOWN_COMBINE = 1114
+XML_RNGP_UNKNOWN_CONSTRUCT = 1115
+XML_RNGP_UNKNOWN_TYPE_LIB = 1116
+XML_RNGP_URI_FRAGMENT = 1117
+XML_RNGP_URI_NOT_ABSOLUTE = 1118
+XML_RNGP_VALUE_EMPTY = 1119
+XML_RNGP_VALUE_NO_CONTENT = 1120
+XML_RNGP_XMLNS_NAME = 1121
+XML_RNGP_XML_NS = 1122
+XML_XPATH_EXPRESSION_OK = 1200
+XML_XPATH_NUMBER_ERROR = 1201
+XML_XPATH_UNFINISHED_LITERAL_ERROR = 1202
+XML_XPATH_START_LITERAL_ERROR = 1203
+XML_XPATH_VARIABLE_REF_ERROR = 1204
+XML_XPATH_UNDEF_VARIABLE_ERROR = 1205
+XML_XPATH_INVALID_PREDICATE_ERROR = 1206
+XML_XPATH_EXPR_ERROR = 1207
+XML_XPATH_UNCLOSED_ERROR = 1208
+XML_XPATH_UNKNOWN_FUNC_ERROR = 1209
+XML_XPATH_INVALID_OPERAND = 1210
+XML_XPATH_INVALID_TYPE = 1211
+XML_XPATH_INVALID_ARITY = 1212
+XML_XPATH_INVALID_CTXT_SIZE = 1213
+XML_XPATH_INVALID_CTXT_POSITION = 1214
+XML_XPATH_MEMORY_ERROR = 1215
+XML_XPTR_SYNTAX_ERROR = 1216
+XML_XPTR_RESOURCE_ERROR = 1217
+XML_XPTR_SUB_RESOURCE_ERROR = 1218
+XML_XPATH_UNDEF_PREFIX_ERROR = 1219
+XML_XPATH_ENCODING_ERROR = 1220
+XML_XPATH_INVALID_CHAR_ERROR = 1221
+XML_TREE_INVALID_HEX = 1300
+XML_TREE_INVALID_DEC = 1301
+XML_TREE_UNTERMINATED_ENTITY = 1302
+XML_TREE_NOT_UTF8 = 1303
+XML_SAVE_NOT_UTF8 = 1400
+XML_SAVE_CHAR_INVALID = 1401
+XML_SAVE_NO_DOCTYPE = 1402
+XML_SAVE_UNKNOWN_ENCODING = 1403
+XML_REGEXP_COMPILE_ERROR = 1450
+XML_IO_UNKNOWN = 1500
+XML_IO_EACCES = 1501
+XML_IO_EAGAIN = 1502
+XML_IO_EBADF = 1503
+XML_IO_EBADMSG = 1504
+XML_IO_EBUSY = 1505
+XML_IO_ECANCELED = 1506
+XML_IO_ECHILD = 1507
+XML_IO_EDEADLK = 1508
+XML_IO_EDOM = 1509
+XML_IO_EEXIST = 1510
+XML_IO_EFAULT = 1511
+XML_IO_EFBIG = 1512
+XML_IO_EINPROGRESS = 1513
+XML_IO_EINTR = 1514
+XML_IO_EINVAL = 1515
+XML_IO_EIO = 1516
+XML_IO_EISDIR = 1517
+XML_IO_EMFILE = 1518
+XML_IO_EMLINK = 1519
+XML_IO_EMSGSIZE = 1520
+XML_IO_ENAMETOOLONG = 1521
+XML_IO_ENFILE = 1522
+XML_IO_ENODEV = 1523
+XML_IO_ENOENT = 1524
+XML_IO_ENOEXEC = 1525
+XML_IO_ENOLCK = 1526
+XML_IO_ENOMEM = 1527
+XML_IO_ENOSPC = 1528
+XML_IO_ENOSYS = 1529
+XML_IO_ENOTDIR = 1530
+XML_IO_ENOTEMPTY = 1531
+XML_IO_ENOTSUP = 1532
+XML_IO_ENOTTY = 1533
+XML_IO_ENXIO = 1534
+XML_IO_EPERM = 1535
+XML_IO_EPIPE = 1536
+XML_IO_ERANGE = 1537
+XML_IO_EROFS = 1538
+XML_IO_ESPIPE = 1539
+XML_IO_ESRCH = 1540
+XML_IO_ETIMEDOUT = 1541
+XML_IO_EXDEV = 1542
+XML_IO_NETWORK_ATTEMPT = 1543
+XML_IO_ENCODER = 1544
+XML_IO_FLUSH = 1545
+XML_IO_WRITE = 1546
+XML_IO_NO_INPUT = 1547
+XML_IO_BUFFER_FULL = 1548
+XML_IO_LOAD_ERROR = 1549
+XML_IO_ENOTSOCK = 1550
+XML_IO_EISCONN = 1551
+XML_IO_ECONNREFUSED = 1552
+XML_IO_ENETUNREACH = 1553
+XML_IO_EADDRINUSE = 1554
+XML_IO_EALREADY = 1555
+XML_IO_EAFNOSUPPORT = 1556
+XML_XINCLUDE_RECURSION = 1600
+XML_XINCLUDE_PARSE_VALUE = 1601
+XML_XINCLUDE_ENTITY_DEF_MISMATCH = 1602
+XML_XINCLUDE_NO_HREF = 1603
+XML_XINCLUDE_NO_FALLBACK = 1604
+XML_XINCLUDE_HREF_URI = 1605
+XML_XINCLUDE_TEXT_FRAGMENT = 1606
+XML_XINCLUDE_TEXT_DOCUMENT = 1607
+XML_XINCLUDE_INVALID_CHAR = 1608
+XML_XINCLUDE_BUILD_FAILED = 1609
+XML_XINCLUDE_UNKNOWN_ENCODING = 1610
+XML_XINCLUDE_MULTIPLE_ROOT = 1611
+XML_XINCLUDE_XPTR_FAILED = 1612
+XML_XINCLUDE_XPTR_RESULT = 1613
+XML_XINCLUDE_INCLUDE_IN_INCLUDE = 1614
+XML_XINCLUDE_FALLBACKS_IN_INCLUDE = 1615
+XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE = 1616
+XML_XINCLUDE_DEPRECATED_NS = 1617
+XML_XINCLUDE_FRAGMENT_ID = 1618
+XML_CATALOG_MISSING_ATTR = 1650
+XML_CATALOG_ENTRY_BROKEN = 1651
+XML_CATALOG_PREFER_VALUE = 1652
+XML_CATALOG_NOT_CATALOG = 1653
+XML_CATALOG_RECURSION = 1654
+XML_SCHEMAP_PREFIX_UNDEFINED = 1700
+XML_SCHEMAP_ATTRFORMDEFAULT_VALUE = 1701
+XML_SCHEMAP_ATTRGRP_NONAME_NOREF = 1702
+XML_SCHEMAP_ATTR_NONAME_NOREF = 1703
+XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF = 1704
+XML_SCHEMAP_ELEMFORMDEFAULT_VALUE = 1705
+XML_SCHEMAP_ELEM_NONAME_NOREF = 1706
+XML_SCHEMAP_EXTENSION_NO_BASE = 1707
+XML_SCHEMAP_FACET_NO_VALUE = 1708
+XML_SCHEMAP_FAILED_BUILD_IMPORT = 1709
+XML_SCHEMAP_GROUP_NONAME_NOREF = 1710
+XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI = 1711
+XML_SCHEMAP_IMPORT_REDEFINE_NSNAME = 1712
+XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI = 1713
+XML_SCHEMAP_INVALID_BOOLEAN = 1714
+XML_SCHEMAP_INVALID_ENUM = 1715
+XML_SCHEMAP_INVALID_FACET = 1716
+XML_SCHEMAP_INVALID_FACET_VALUE = 1717
+XML_SCHEMAP_INVALID_MAXOCCURS = 1718
+XML_SCHEMAP_INVALID_MINOCCURS = 1719
+XML_SCHEMAP_INVALID_REF_AND_SUBTYPE = 1720
+XML_SCHEMAP_INVALID_WHITE_SPACE = 1721
+XML_SCHEMAP_NOATTR_NOREF = 1722
+XML_SCHEMAP_NOTATION_NO_NAME = 1723
+XML_SCHEMAP_NOTYPE_NOREF = 1724
+XML_SCHEMAP_REF_AND_SUBTYPE = 1725
+XML_SCHEMAP_RESTRICTION_NONAME_NOREF = 1726
+XML_SCHEMAP_SIMPLETYPE_NONAME = 1727
+XML_SCHEMAP_TYPE_AND_SUBTYPE = 1728
+XML_SCHEMAP_UNKNOWN_ALL_CHILD = 1729
+XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD = 1730
+XML_SCHEMAP_UNKNOWN_ATTR_CHILD = 1731
+XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD = 1732
+XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP = 1733
+XML_SCHEMAP_UNKNOWN_BASE_TYPE = 1734
+XML_SCHEMAP_UNKNOWN_CHOICE_CHILD = 1735
+XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD = 1736
+XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD = 1737
+XML_SCHEMAP_UNKNOWN_ELEM_CHILD = 1738
+XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD = 1739
+XML_SCHEMAP_UNKNOWN_FACET_CHILD = 1740
+XML_SCHEMAP_UNKNOWN_FACET_TYPE = 1741
+XML_SCHEMAP_UNKNOWN_GROUP_CHILD = 1742
+XML_SCHEMAP_UNKNOWN_IMPORT_CHILD = 1743
+XML_SCHEMAP_UNKNOWN_LIST_CHILD = 1744
+XML_SCHEMAP_UNKNOWN_NOTATION_CHILD = 1745
+XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD = 1746
+XML_SCHEMAP_UNKNOWN_REF = 1747
+XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD = 1748
+XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD = 1749
+XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD = 1750
+XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD = 1751
+XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD = 1752
+XML_SCHEMAP_UNKNOWN_TYPE = 1753
+XML_SCHEMAP_UNKNOWN_UNION_CHILD = 1754
+XML_SCHEMAP_ELEM_DEFAULT_FIXED = 1755
+XML_SCHEMAP_REGEXP_INVALID = 1756
+XML_SCHEMAP_FAILED_LOAD = 1757
+XML_SCHEMAP_NOTHING_TO_PARSE = 1758
+XML_SCHEMAP_NOROOT = 1759
+XML_SCHEMAP_REDEFINED_GROUP = 1760
+XML_SCHEMAP_REDEFINED_TYPE = 1761
+XML_SCHEMAP_REDEFINED_ELEMENT = 1762
+XML_SCHEMAP_REDEFINED_ATTRGROUP = 1763
+XML_SCHEMAP_REDEFINED_ATTR = 1764
+XML_SCHEMAP_REDEFINED_NOTATION = 1765
+XML_SCHEMAP_FAILED_PARSE = 1766
+XML_SCHEMAP_UNKNOWN_PREFIX = 1767
+XML_SCHEMAP_DEF_AND_PREFIX = 1768
+XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD = 1769
+XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770
+XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771
+XML_SCHEMAP_NOT_SCHEMA = 1772
+XML_SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773
+XML_SCHEMAP_INVALID_ATTR_USE = 1774
+XML_SCHEMAP_RECURSIVE = 1775
+XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE = 1776
+XML_SCHEMAP_INVALID_ATTR_COMBINATION = 1777
+XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION = 1778
+XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD = 1779
+XML_SCHEMAP_INVALID_ATTR_NAME = 1780
+XML_SCHEMAP_REF_AND_CONTENT = 1781
+XML_SCHEMAP_CT_PROPS_CORRECT_1 = 1782
+XML_SCHEMAP_CT_PROPS_CORRECT_2 = 1783
+XML_SCHEMAP_CT_PROPS_CORRECT_3 = 1784
+XML_SCHEMAP_CT_PROPS_CORRECT_4 = 1785
+XML_SCHEMAP_CT_PROPS_CORRECT_5 = 1786
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 = 1787
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 = 1788
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 = 1789
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 = 1790
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3 = 1791
+XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER = 1792
+XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE = 1793
+XML_SCHEMAP_UNION_NOT_EXPRESSIBLE = 1794
+XML_SCHEMAP_SRC_IMPORT_3_1 = 1795
+XML_SCHEMAP_SRC_IMPORT_3_2 = 1796
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 = 1797
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 = 1798
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 = 1799
+XML_SCHEMAP_COS_CT_EXTENDS_1_3 = 1800
+XML_SCHEMAV_NOROOT = 1801
+XML_SCHEMAV_UNDECLAREDELEM = 1802
+XML_SCHEMAV_NOTTOPLEVEL = 1803
+XML_SCHEMAV_MISSING = 1804
+XML_SCHEMAV_WRONGELEM = 1805
+XML_SCHEMAV_NOTYPE = 1806
+XML_SCHEMAV_NOROLLBACK = 1807
+XML_SCHEMAV_ISABSTRACT = 1808
+XML_SCHEMAV_NOTEMPTY = 1809
+XML_SCHEMAV_ELEMCONT = 1810
+XML_SCHEMAV_HAVEDEFAULT = 1811
+XML_SCHEMAV_NOTNILLABLE = 1812
+XML_SCHEMAV_EXTRACONTENT = 1813
+XML_SCHEMAV_INVALIDATTR = 1814
+XML_SCHEMAV_INVALIDELEM = 1815
+XML_SCHEMAV_NOTDETERMINIST = 1816
+XML_SCHEMAV_CONSTRUCT = 1817
+XML_SCHEMAV_INTERNAL = 1818
+XML_SCHEMAV_NOTSIMPLE = 1819
+XML_SCHEMAV_ATTRUNKNOWN = 1820
+XML_SCHEMAV_ATTRINVALID = 1821
+XML_SCHEMAV_VALUE = 1822
+XML_SCHEMAV_FACET = 1823
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1 = 1824
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2 = 1825
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3 = 1826
+XML_SCHEMAV_CVC_TYPE_3_1_1 = 1827
+XML_SCHEMAV_CVC_TYPE_3_1_2 = 1828
+XML_SCHEMAV_CVC_FACET_VALID = 1829
+XML_SCHEMAV_CVC_LENGTH_VALID = 1830
+XML_SCHEMAV_CVC_MINLENGTH_VALID = 1831
+XML_SCHEMAV_CVC_MAXLENGTH_VALID = 1832
+XML_SCHEMAV_CVC_MININCLUSIVE_VALID = 1833
+XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID = 1834
+XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID = 1835
+XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID = 1836
+XML_SCHEMAV_CVC_TOTALDIGITS_VALID = 1837
+XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID = 1838
+XML_SCHEMAV_CVC_PATTERN_VALID = 1839
+XML_SCHEMAV_CVC_ENUMERATION_VALID = 1840
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1 = 1841
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2 = 1842
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3 = 1843
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4 = 1844
+XML_SCHEMAV_CVC_ELT_1 = 1845
+XML_SCHEMAV_CVC_ELT_2 = 1846
+XML_SCHEMAV_CVC_ELT_3_1 = 1847
+XML_SCHEMAV_CVC_ELT_3_2_1 = 1848
+XML_SCHEMAV_CVC_ELT_3_2_2 = 1849
+XML_SCHEMAV_CVC_ELT_4_1 = 1850
+XML_SCHEMAV_CVC_ELT_4_2 = 1851
+XML_SCHEMAV_CVC_ELT_4_3 = 1852
+XML_SCHEMAV_CVC_ELT_5_1_1 = 1853
+XML_SCHEMAV_CVC_ELT_5_1_2 = 1854
+XML_SCHEMAV_CVC_ELT_5_2_1 = 1855
+XML_SCHEMAV_CVC_ELT_5_2_2_1 = 1856
+XML_SCHEMAV_CVC_ELT_5_2_2_2_1 = 1857
+XML_SCHEMAV_CVC_ELT_5_2_2_2_2 = 1858
+XML_SCHEMAV_CVC_ELT_6 = 1859
+XML_SCHEMAV_CVC_ELT_7 = 1860
+XML_SCHEMAV_CVC_ATTRIBUTE_1 = 1861
+XML_SCHEMAV_CVC_ATTRIBUTE_2 = 1862
+XML_SCHEMAV_CVC_ATTRIBUTE_3 = 1863
+XML_SCHEMAV_CVC_ATTRIBUTE_4 = 1864
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1 = 1865
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 = 1866
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 = 1867
+XML_SCHEMAV_CVC_COMPLEX_TYPE_4 = 1868
+XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1 = 1869
+XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2 = 1870
+XML_SCHEMAV_ELEMENT_CONTENT = 1871
+XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING = 1872
+XML_SCHEMAV_CVC_COMPLEX_TYPE_1 = 1873
+XML_SCHEMAV_CVC_AU = 1874
+XML_SCHEMAV_CVC_TYPE_1 = 1875
+XML_SCHEMAV_CVC_TYPE_2 = 1876
+XML_SCHEMAV_CVC_IDC = 1877
+XML_SCHEMAV_CVC_WILDCARD = 1878
+XML_SCHEMAV_MISC = 1879
+XML_XPTR_UNKNOWN_SCHEME = 1900
+XML_XPTR_CHILDSEQ_START = 1901
+XML_XPTR_EVAL_FAILED = 1902
+XML_XPTR_EXTRA_OBJECTS = 1903
+XML_C14N_CREATE_CTXT = 1950
+XML_C14N_REQUIRES_UTF8 = 1951
+XML_C14N_CREATE_STACK = 1952
+XML_C14N_INVALID_NODE = 1953
+XML_C14N_UNKNOW_NODE = 1954
+XML_C14N_RELATIVE_NAMESPACE = 1955
+XML_FTP_PASV_ANSWER = 2000
+XML_FTP_EPSV_ANSWER = 2001
+XML_FTP_ACCNT = 2002
+XML_FTP_URL_SYNTAX = 2003
+XML_HTTP_URL_SYNTAX = 2020
+XML_HTTP_USE_IP = 2021
+XML_HTTP_UNKNOWN_HOST = 2022
+XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000
+XML_SCHEMAP_SRC_SIMPLE_TYPE_2 = 3001
+XML_SCHEMAP_SRC_SIMPLE_TYPE_3 = 3002
+XML_SCHEMAP_SRC_SIMPLE_TYPE_4 = 3003
+XML_SCHEMAP_SRC_RESOLVE = 3004
+XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE = 3005
+XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE = 3006
+XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES = 3007
+XML_SCHEMAP_ST_PROPS_CORRECT_1 = 3008
+XML_SCHEMAP_ST_PROPS_CORRECT_2 = 3009
+XML_SCHEMAP_ST_PROPS_CORRECT_3 = 3010
+XML_SCHEMAP_COS_ST_RESTRICTS_1_1 = 3011
+XML_SCHEMAP_COS_ST_RESTRICTS_1_2 = 3012
+XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1 = 3013
+XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2 = 3014
+XML_SCHEMAP_COS_ST_RESTRICTS_2_1 = 3015
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 = 3016
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 = 3017
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 = 3018
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 = 3019
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 = 3020
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 = 3021
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 = 3022
+XML_SCHEMAP_COS_ST_RESTRICTS_3_1 = 3023
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1 = 3024
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 = 3025
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 = 3026
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 = 3027
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 = 3028
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 = 3029
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 = 3030
+XML_SCHEMAP_COS_ST_DERIVED_OK_2_1 = 3031
+XML_SCHEMAP_COS_ST_DERIVED_OK_2_2 = 3032
+XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED = 3033
+XML_SCHEMAP_S4S_ELEM_MISSING = 3034
+XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED = 3035
+XML_SCHEMAP_S4S_ATTR_MISSING = 3036
+XML_SCHEMAP_S4S_ATTR_INVALID_VALUE = 3037
+XML_SCHEMAP_SRC_ELEMENT_1 = 3038
+XML_SCHEMAP_SRC_ELEMENT_2_1 = 3039
+XML_SCHEMAP_SRC_ELEMENT_2_2 = 3040
+XML_SCHEMAP_SRC_ELEMENT_3 = 3041
+XML_SCHEMAP_P_PROPS_CORRECT_1 = 3042
+XML_SCHEMAP_P_PROPS_CORRECT_2_1 = 3043
+XML_SCHEMAP_P_PROPS_CORRECT_2_2 = 3044
+XML_SCHEMAP_E_PROPS_CORRECT_2 = 3045
+XML_SCHEMAP_E_PROPS_CORRECT_3 = 3046
+XML_SCHEMAP_E_PROPS_CORRECT_4 = 3047
+XML_SCHEMAP_E_PROPS_CORRECT_5 = 3048
+XML_SCHEMAP_E_PROPS_CORRECT_6 = 3049
+XML_SCHEMAP_SRC_INCLUDE = 3050
+XML_SCHEMAP_SRC_ATTRIBUTE_1 = 3051
+XML_SCHEMAP_SRC_ATTRIBUTE_2 = 3052
+XML_SCHEMAP_SRC_ATTRIBUTE_3_1 = 3053
+XML_SCHEMAP_SRC_ATTRIBUTE_3_2 = 3054
+XML_SCHEMAP_SRC_ATTRIBUTE_4 = 3055
+XML_SCHEMAP_NO_XMLNS = 3056
+XML_SCHEMAP_NO_XSI = 3057
+XML_SCHEMAP_COS_VALID_DEFAULT_1 = 3058
+XML_SCHEMAP_COS_VALID_DEFAULT_2_1 = 3059
+XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1 = 3060
+XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2 = 3061
+XML_SCHEMAP_CVC_SIMPLE_TYPE = 3062
+XML_SCHEMAP_COS_CT_EXTENDS_1_1 = 3063
+XML_SCHEMAP_SRC_IMPORT_1_1 = 3064
+XML_SCHEMAP_SRC_IMPORT_1_2 = 3065
+XML_SCHEMAP_SRC_IMPORT_2 = 3066
+XML_SCHEMAP_SRC_IMPORT_2_1 = 3067
+XML_SCHEMAP_SRC_IMPORT_2_2 = 3068
+XML_SCHEMAP_INTERNAL = 3069
+XML_SCHEMAP_NOT_DETERMINISTIC = 3070
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073
+XML_SCHEMAP_MG_PROPS_CORRECT_1 = 3074
+XML_SCHEMAP_MG_PROPS_CORRECT_2 = 3075
+XML_SCHEMAP_SRC_CT_1 = 3076
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 = 3077
+XML_SCHEMAP_AU_PROPS_CORRECT_2 = 3078
+XML_SCHEMAP_A_PROPS_CORRECT_2 = 3079
+XML_SCHEMAP_C_PROPS_CORRECT = 3080
+XML_SCHEMAP_SRC_REDEFINE = 3081
+XML_SCHEMAP_SRC_IMPORT = 3082
+XML_SCHEMAP_WARN_SKIP_SCHEMA = 3083
+XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084
+XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085
+XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086
+XML_SCHEMAP_AG_PROPS_CORRECT = 3087
+XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088
+XML_SCHEMAP_AU_PROPS_CORRECT = 3089
+XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090
+XML_SCHEMAP_COS_ALL_LIMITED = 3091
+XML_SCHEMATRONV_ASSERT = 4000
+XML_SCHEMATRONV_REPORT = 4001
+XML_MODULE_OPEN = 4900
+XML_MODULE_CLOSE = 4901
+XML_CHECK_FOUND_ELEMENT = 5000
+XML_CHECK_FOUND_ATTRIBUTE = 5001
+XML_CHECK_FOUND_TEXT = 5002
+XML_CHECK_FOUND_CDATA = 5003
+XML_CHECK_FOUND_ENTITYREF = 5004
+XML_CHECK_FOUND_ENTITY = 5005
+XML_CHECK_FOUND_PI = 5006
+XML_CHECK_FOUND_COMMENT = 5007
+XML_CHECK_FOUND_DOCTYPE = 5008
+XML_CHECK_FOUND_FRAGMENT = 5009
+XML_CHECK_FOUND_NOTATION = 5010
+XML_CHECK_UNKNOWN_NODE = 5011
+XML_CHECK_ENTITY_TYPE = 5012
+XML_CHECK_NO_PARENT = 5013
+XML_CHECK_NO_DOC = 5014
+XML_CHECK_NO_NAME = 5015
+XML_CHECK_NO_ELEM = 5016
+XML_CHECK_WRONG_DOC = 5017
+XML_CHECK_NO_PREV = 5018
+XML_CHECK_WRONG_PREV = 5019
+XML_CHECK_NO_NEXT = 5020
+XML_CHECK_WRONG_NEXT = 5021
+XML_CHECK_NOT_DTD = 5022
+XML_CHECK_NOT_ATTR = 5023
+XML_CHECK_NOT_ATTR_DECL = 5024
+XML_CHECK_NOT_ELEM_DECL = 5025
+XML_CHECK_NOT_ENTITY_DECL = 5026
+XML_CHECK_NOT_NS_DECL = 5027
+XML_CHECK_NO_HREF = 5028
+XML_CHECK_WRONG_PARENT = 5029
+XML_CHECK_NS_SCOPE = 5030
+XML_CHECK_NS_ANCESTOR = 5031
+XML_CHECK_NOT_UTF8 = 5032
+XML_CHECK_NO_DICT = 5033
+XML_CHECK_NOT_NCNAME = 5034
+XML_CHECK_OUTSIDE_DICT = 5035
+XML_CHECK_WRONG_NAME = 5036
+XML_CHECK_NAME_NOT_NULL = 5037
+XML_I18N_NO_NAME = 6000
+XML_I18N_NO_HANDLER = 6001
+XML_I18N_EXCESS_HANDLER = 6002
+XML_I18N_CONV_FAILED = 6003
+XML_I18N_NO_OUTPUT = 6004
+XML_BUF_OVERFLOW = 7000
+
+# xmlExpNodeType
+XML_EXP_EMPTY = 0
+XML_EXP_FORBID = 1
+XML_EXP_ATOM = 2
+XML_EXP_SEQ = 3
+XML_EXP_OR = 4
+XML_EXP_COUNT = 5
+
+# xmlElementContentType
+XML_ELEMENT_CONTENT_PCDATA = 1
+XML_ELEMENT_CONTENT_ELEMENT = 2
+XML_ELEMENT_CONTENT_SEQ = 3
+XML_ELEMENT_CONTENT_OR = 4
+
+# xmlParserProperties
+XML_PARSER_LOADDTD = 1
+XML_PARSER_DEFAULTATTRS = 2
+XML_PARSER_VALIDATE = 3
+XML_PARSER_SUBST_ENTITIES = 4
+
+# xmlReaderTypes
+XML_READER_TYPE_NONE = 0
+XML_READER_TYPE_ELEMENT = 1
+XML_READER_TYPE_ATTRIBUTE = 2
+XML_READER_TYPE_TEXT = 3
+XML_READER_TYPE_CDATA = 4
+XML_READER_TYPE_ENTITY_REFERENCE = 5
+XML_READER_TYPE_ENTITY = 6
+XML_READER_TYPE_PROCESSING_INSTRUCTION = 7
+XML_READER_TYPE_COMMENT = 8
+XML_READER_TYPE_DOCUMENT = 9
+XML_READER_TYPE_DOCUMENT_TYPE = 10
+XML_READER_TYPE_DOCUMENT_FRAGMENT = 11
+XML_READER_TYPE_NOTATION = 12
+XML_READER_TYPE_WHITESPACE = 13
+XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14
+XML_READER_TYPE_END_ELEMENT = 15
+XML_READER_TYPE_END_ENTITY = 16
+XML_READER_TYPE_XML_DECLARATION = 17
+
+# xmlCatalogPrefer
+XML_CATA_PREFER_NONE = 0
+XML_CATA_PREFER_PUBLIC = 1
+XML_CATA_PREFER_SYSTEM = 2
+
+# xmlElementType
+XML_ELEMENT_NODE = 1
+XML_ATTRIBUTE_NODE = 2
+XML_TEXT_NODE = 3
+XML_CDATA_SECTION_NODE = 4
+XML_ENTITY_REF_NODE = 5
+XML_ENTITY_NODE = 6
+XML_PI_NODE = 7
+XML_COMMENT_NODE = 8
+XML_DOCUMENT_NODE = 9
+XML_DOCUMENT_TYPE_NODE = 10
+XML_DOCUMENT_FRAG_NODE = 11
+XML_NOTATION_NODE = 12
+XML_HTML_DOCUMENT_NODE = 13
+XML_DTD_NODE = 14
+XML_ELEMENT_DECL = 15
+XML_ATTRIBUTE_DECL = 16
+XML_ENTITY_DECL = 17
+XML_NAMESPACE_DECL = 18
+XML_XINCLUDE_START = 19
+XML_XINCLUDE_END = 20
+XML_DOCB_DOCUMENT_NODE = 21
+
+# xlinkActuate
+XLINK_ACTUATE_NONE = 0
+XLINK_ACTUATE_AUTO = 1
+XLINK_ACTUATE_ONREQUEST = 2
+
+# xmlFeature
+XML_WITH_THREAD = 1
+XML_WITH_TREE = 2
+XML_WITH_OUTPUT = 3
+XML_WITH_PUSH = 4
+XML_WITH_READER = 5
+XML_WITH_PATTERN = 6
+XML_WITH_WRITER = 7
+XML_WITH_SAX1 = 8
+XML_WITH_FTP = 9
+XML_WITH_HTTP = 10
+XML_WITH_VALID = 11
+XML_WITH_HTML = 12
+XML_WITH_LEGACY = 13
+XML_WITH_C14N = 14
+XML_WITH_CATALOG = 15
+XML_WITH_XPATH = 16
+XML_WITH_XPTR = 17
+XML_WITH_XINCLUDE = 18
+XML_WITH_ICONV = 19
+XML_WITH_ISO8859X = 20
+XML_WITH_UNICODE = 21
+XML_WITH_REGEXP = 22
+XML_WITH_AUTOMATA = 23
+XML_WITH_EXPR = 24
+XML_WITH_SCHEMAS = 25
+XML_WITH_SCHEMATRON = 26
+XML_WITH_MODULES = 27
+XML_WITH_DEBUG = 28
+XML_WITH_DEBUG_MEM = 29
+XML_WITH_DEBUG_RUN = 30
+XML_WITH_ZLIB = 31
+XML_WITH_ICU = 32
+XML_WITH_LZMA = 33
+XML_WITH_NONE = 99999
+
+# xmlElementContentOccur
+XML_ELEMENT_CONTENT_ONCE = 1
+XML_ELEMENT_CONTENT_OPT = 2
+XML_ELEMENT_CONTENT_MULT = 3
+XML_ELEMENT_CONTENT_PLUS = 4
+
+# xmlXPathError
+XPATH_EXPRESSION_OK = 0
+XPATH_NUMBER_ERROR = 1
+XPATH_UNFINISHED_LITERAL_ERROR = 2
+XPATH_START_LITERAL_ERROR = 3
+XPATH_VARIABLE_REF_ERROR = 4
+XPATH_UNDEF_VARIABLE_ERROR = 5
+XPATH_INVALID_PREDICATE_ERROR = 6
+XPATH_EXPR_ERROR = 7
+XPATH_UNCLOSED_ERROR = 8
+XPATH_UNKNOWN_FUNC_ERROR = 9
+XPATH_INVALID_OPERAND = 10
+XPATH_INVALID_TYPE = 11
+XPATH_INVALID_ARITY = 12
+XPATH_INVALID_CTXT_SIZE = 13
+XPATH_INVALID_CTXT_POSITION = 14
+XPATH_MEMORY_ERROR = 15
+XPTR_SYNTAX_ERROR = 16
+XPTR_RESOURCE_ERROR = 17
+XPTR_SUB_RESOURCE_ERROR = 18
+XPATH_UNDEF_PREFIX_ERROR = 19
+XPATH_ENCODING_ERROR = 20
+XPATH_INVALID_CHAR_ERROR = 21
+XPATH_INVALID_CTXT = 22
+XPATH_STACK_ERROR = 23
+XPATH_FORBID_VARIABLE_ERROR = 24
+XPATH_OP_LIMIT_EXCEEDED = 25
+XPATH_RECURSION_LIMIT_EXCEEDED = 26
+
+# xmlTextReaderMode
+XML_TEXTREADER_MODE_INITIAL = 0
+XML_TEXTREADER_MODE_INTERACTIVE = 1
+XML_TEXTREADER_MODE_ERROR = 2
+XML_TEXTREADER_MODE_EOF = 3
+XML_TEXTREADER_MODE_CLOSED = 4
+XML_TEXTREADER_MODE_READING = 5
+
+# xmlErrorLevel
+XML_ERR_NONE = 0
+XML_ERR_WARNING = 1
+XML_ERR_ERROR = 2
+XML_ERR_FATAL = 3
+
+# xmlCharEncoding
+XML_CHAR_ENCODING_ERROR = -1
+XML_CHAR_ENCODING_NONE = 0
+XML_CHAR_ENCODING_UTF8 = 1
+XML_CHAR_ENCODING_UTF16LE = 2
+XML_CHAR_ENCODING_UTF16BE = 3
+XML_CHAR_ENCODING_UCS4LE = 4
+XML_CHAR_ENCODING_UCS4BE = 5
+XML_CHAR_ENCODING_EBCDIC = 6
+XML_CHAR_ENCODING_UCS4_2143 = 7
+XML_CHAR_ENCODING_UCS4_3412 = 8
+XML_CHAR_ENCODING_UCS2 = 9
+XML_CHAR_ENCODING_8859_1 = 10
+XML_CHAR_ENCODING_8859_2 = 11
+XML_CHAR_ENCODING_8859_3 = 12
+XML_CHAR_ENCODING_8859_4 = 13
+XML_CHAR_ENCODING_8859_5 = 14
+XML_CHAR_ENCODING_8859_6 = 15
+XML_CHAR_ENCODING_8859_7 = 16
+XML_CHAR_ENCODING_8859_8 = 17
+XML_CHAR_ENCODING_8859_9 = 18
+XML_CHAR_ENCODING_2022_JP = 19
+XML_CHAR_ENCODING_SHIFT_JIS = 20
+XML_CHAR_ENCODING_EUC_JP = 21
+XML_CHAR_ENCODING_ASCII = 22
+
+# xmlErrorDomain
+XML_FROM_NONE = 0
+XML_FROM_PARSER = 1
+XML_FROM_TREE = 2
+XML_FROM_NAMESPACE = 3
+XML_FROM_DTD = 4
+XML_FROM_HTML = 5
+XML_FROM_MEMORY = 6
+XML_FROM_OUTPUT = 7
+XML_FROM_IO = 8
+XML_FROM_FTP = 9
+XML_FROM_HTTP = 10
+XML_FROM_XINCLUDE = 11
+XML_FROM_XPATH = 12
+XML_FROM_XPOINTER = 13
+XML_FROM_REGEXP = 14
+XML_FROM_DATATYPE = 15
+XML_FROM_SCHEMASP = 16
+XML_FROM_SCHEMASV = 17
+XML_FROM_RELAXNGP = 18
+XML_FROM_RELAXNGV = 19
+XML_FROM_CATALOG = 20
+XML_FROM_C14N = 21
+XML_FROM_XSLT = 22
+XML_FROM_VALID = 23
+XML_FROM_CHECK = 24
+XML_FROM_WRITER = 25
+XML_FROM_MODULE = 26
+XML_FROM_I18N = 27
+XML_FROM_SCHEMATRONV = 28
+XML_FROM_BUFFER = 29
+XML_FROM_URI = 30
+
+# htmlStatus
+HTML_NA = 0
+HTML_INVALID = 1
+HTML_DEPRECATED = 2
+HTML_VALID = 4
+HTML_REQUIRED = 12
+
+# xmlSchemaValidOption
+XML_SCHEMA_VAL_VC_I_CREATE = 1
+
+# xmlSchemaWhitespaceValueType
+XML_SCHEMA_WHITESPACE_UNKNOWN = 0
+XML_SCHEMA_WHITESPACE_PRESERVE = 1
+XML_SCHEMA_WHITESPACE_REPLACE = 2
+XML_SCHEMA_WHITESPACE_COLLAPSE = 3
+
+# htmlParserOption
+HTML_PARSE_RECOVER = 1
+HTML_PARSE_NODEFDTD = 4
+HTML_PARSE_NOERROR = 32
+HTML_PARSE_NOWARNING = 64
+HTML_PARSE_PEDANTIC = 128
+HTML_PARSE_NOBLANKS = 256
+HTML_PARSE_NONET = 2048
+HTML_PARSE_NOIMPLIED = 8192
+HTML_PARSE_COMPACT = 65536
+HTML_PARSE_IGNORE_ENC = 2097152
+
+# xmlRelaxNGValidErr
+XML_RELAXNG_OK = 0
+XML_RELAXNG_ERR_MEMORY = 1
+XML_RELAXNG_ERR_TYPE = 2
+XML_RELAXNG_ERR_TYPEVAL = 3
+XML_RELAXNG_ERR_DUPID = 4
+XML_RELAXNG_ERR_TYPECMP = 5
+XML_RELAXNG_ERR_NOSTATE = 6
+XML_RELAXNG_ERR_NODEFINE = 7
+XML_RELAXNG_ERR_LISTEXTRA = 8
+XML_RELAXNG_ERR_LISTEMPTY = 9
+XML_RELAXNG_ERR_INTERNODATA = 10
+XML_RELAXNG_ERR_INTERSEQ = 11
+XML_RELAXNG_ERR_INTEREXTRA = 12
+XML_RELAXNG_ERR_ELEMNAME = 13
+XML_RELAXNG_ERR_ATTRNAME = 14
+XML_RELAXNG_ERR_ELEMNONS = 15
+XML_RELAXNG_ERR_ATTRNONS = 16
+XML_RELAXNG_ERR_ELEMWRONGNS = 17
+XML_RELAXNG_ERR_ATTRWRONGNS = 18
+XML_RELAXNG_ERR_ELEMEXTRANS = 19
+XML_RELAXNG_ERR_ATTREXTRANS = 20
+XML_RELAXNG_ERR_ELEMNOTEMPTY = 21
+XML_RELAXNG_ERR_NOELEM = 22
+XML_RELAXNG_ERR_NOTELEM = 23
+XML_RELAXNG_ERR_ATTRVALID = 24
+XML_RELAXNG_ERR_CONTENTVALID = 25
+XML_RELAXNG_ERR_EXTRACONTENT = 26
+XML_RELAXNG_ERR_INVALIDATTR = 27
+XML_RELAXNG_ERR_DATAELEM = 28
+XML_RELAXNG_ERR_VALELEM = 29
+XML_RELAXNG_ERR_LISTELEM = 30
+XML_RELAXNG_ERR_DATATYPE = 31
+XML_RELAXNG_ERR_VALUE = 32
+XML_RELAXNG_ERR_LIST = 33
+XML_RELAXNG_ERR_NOGRAMMAR = 34
+XML_RELAXNG_ERR_EXTRADATA = 35
+XML_RELAXNG_ERR_LACKDATA = 36
+XML_RELAXNG_ERR_INTERNAL = 37
+XML_RELAXNG_ERR_ELEMWRONG = 38
+XML_RELAXNG_ERR_TEXTWRONG = 39
+
+# xmlCatalogAllow
+XML_CATA_ALLOW_NONE = 0
+XML_CATA_ALLOW_GLOBAL = 1
+XML_CATA_ALLOW_DOCUMENT = 2
+XML_CATA_ALLOW_ALL = 3
+
+# xmlAttributeType
+XML_ATTRIBUTE_CDATA = 1
+XML_ATTRIBUTE_ID = 2
+XML_ATTRIBUTE_IDREF = 3
+XML_ATTRIBUTE_IDREFS = 4
+XML_ATTRIBUTE_ENTITY = 5
+XML_ATTRIBUTE_ENTITIES = 6
+XML_ATTRIBUTE_NMTOKEN = 7
+XML_ATTRIBUTE_NMTOKENS = 8
+XML_ATTRIBUTE_ENUMERATION = 9
+XML_ATTRIBUTE_NOTATION = 10
+
+# xmlSchematronValidOptions
+XML_SCHEMATRON_OUT_QUIET = 1
+XML_SCHEMATRON_OUT_TEXT = 2
+XML_SCHEMATRON_OUT_XML = 4
+XML_SCHEMATRON_OUT_ERROR = 8
+XML_SCHEMATRON_OUT_FILE = 256
+XML_SCHEMATRON_OUT_BUFFER = 512
+XML_SCHEMATRON_OUT_IO = 1024
+
+# xmlSchemaContentType
+XML_SCHEMA_CONTENT_UNKNOWN = 0
+XML_SCHEMA_CONTENT_EMPTY = 1
+XML_SCHEMA_CONTENT_ELEMENTS = 2
+XML_SCHEMA_CONTENT_MIXED = 3
+XML_SCHEMA_CONTENT_SIMPLE = 4
+XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5
+XML_SCHEMA_CONTENT_BASIC = 6
+XML_SCHEMA_CONTENT_ANY = 7
+
+# xmlSchemaTypeType
+XML_SCHEMA_TYPE_BASIC = 1
+XML_SCHEMA_TYPE_ANY = 2
+XML_SCHEMA_TYPE_FACET = 3
+XML_SCHEMA_TYPE_SIMPLE = 4
+XML_SCHEMA_TYPE_COMPLEX = 5
+XML_SCHEMA_TYPE_SEQUENCE = 6
+XML_SCHEMA_TYPE_CHOICE = 7
+XML_SCHEMA_TYPE_ALL = 8
+XML_SCHEMA_TYPE_SIMPLE_CONTENT = 9
+XML_SCHEMA_TYPE_COMPLEX_CONTENT = 10
+XML_SCHEMA_TYPE_UR = 11
+XML_SCHEMA_TYPE_RESTRICTION = 12
+XML_SCHEMA_TYPE_EXTENSION = 13
+XML_SCHEMA_TYPE_ELEMENT = 14
+XML_SCHEMA_TYPE_ATTRIBUTE = 15
+XML_SCHEMA_TYPE_ATTRIBUTEGROUP = 16
+XML_SCHEMA_TYPE_GROUP = 17
+XML_SCHEMA_TYPE_NOTATION = 18
+XML_SCHEMA_TYPE_LIST = 19
+XML_SCHEMA_TYPE_UNION = 20
+XML_SCHEMA_TYPE_ANY_ATTRIBUTE = 21
+XML_SCHEMA_TYPE_IDC_UNIQUE = 22
+XML_SCHEMA_TYPE_IDC_KEY = 23
+XML_SCHEMA_TYPE_IDC_KEYREF = 24
+XML_SCHEMA_TYPE_PARTICLE = 25
+XML_SCHEMA_TYPE_ATTRIBUTE_USE = 26
+XML_SCHEMA_FACET_MININCLUSIVE = 1000
+XML_SCHEMA_FACET_MINEXCLUSIVE = 1001
+XML_SCHEMA_FACET_MAXINCLUSIVE = 1002
+XML_SCHEMA_FACET_MAXEXCLUSIVE = 1003
+XML_SCHEMA_FACET_TOTALDIGITS = 1004
+XML_SCHEMA_FACET_FRACTIONDIGITS = 1005
+XML_SCHEMA_FACET_PATTERN = 1006
+XML_SCHEMA_FACET_ENUMERATION = 1007
+XML_SCHEMA_FACET_WHITESPACE = 1008
+XML_SCHEMA_FACET_LENGTH = 1009
+XML_SCHEMA_FACET_MAXLENGTH = 1010
+XML_SCHEMA_FACET_MINLENGTH = 1011
+XML_SCHEMA_EXTRA_QNAMEREF = 2000
+XML_SCHEMA_EXTRA_ATTR_USE_PROHIB = 2001
+
+# xmlModuleOption
+XML_MODULE_LAZY = 1
+XML_MODULE_LOCAL = 2
+
+# xmlParserMode
+XML_PARSE_UNKNOWN = 0
+XML_PARSE_DOM = 1
+XML_PARSE_SAX = 2
+XML_PARSE_PUSH_DOM = 3
+XML_PARSE_PUSH_SAX = 4
+XML_PARSE_READER = 5
+
+# xmlC14NMode
+XML_C14N_1_0 = 0
+XML_C14N_EXCLUSIVE_1_0 = 1
+XML_C14N_1_1 = 2
+
+# xmlParserOption
+XML_PARSE_RECOVER = 1
+XML_PARSE_NOENT = 2
+XML_PARSE_DTDLOAD = 4
+XML_PARSE_DTDATTR = 8
+XML_PARSE_DTDVALID = 16
+XML_PARSE_NOERROR = 32
+XML_PARSE_NOWARNING = 64
+XML_PARSE_PEDANTIC = 128
+XML_PARSE_NOBLANKS = 256
+XML_PARSE_SAX1 = 512
+XML_PARSE_XINCLUDE = 1024
+XML_PARSE_NONET = 2048
+XML_PARSE_NODICT = 4096
+XML_PARSE_NSCLEAN = 8192
+XML_PARSE_NOCDATA = 16384
+XML_PARSE_NOXINCNODE = 32768
+XML_PARSE_COMPACT = 65536
+XML_PARSE_OLD10 = 131072
+XML_PARSE_NOBASEFIX = 262144
+XML_PARSE_HUGE = 524288
+XML_PARSE_OLDSAX = 1048576
+XML_PARSE_IGNORE_ENC = 2097152
+XML_PARSE_BIG_LINES = 4194304
+
+# xmlElementTypeVal
+XML_ELEMENT_TYPE_UNDEFINED = 0
+XML_ELEMENT_TYPE_EMPTY = 1
+XML_ELEMENT_TYPE_ANY = 2
+XML_ELEMENT_TYPE_MIXED = 3
+XML_ELEMENT_TYPE_ELEMENT = 4
+
+# xmlDocProperties
+XML_DOC_WELLFORMED = 1
+XML_DOC_NSVALID = 2
+XML_DOC_OLD10 = 4
+XML_DOC_DTDVALID = 8
+XML_DOC_XINCLUDE = 16
+XML_DOC_USERBUILT = 32
+XML_DOC_INTERNAL = 64
+XML_DOC_HTML = 128
+
+# xlinkType
+XLINK_TYPE_NONE = 0
+XLINK_TYPE_SIMPLE = 1
+XLINK_TYPE_EXTENDED = 2
+XLINK_TYPE_EXTENDED_SET = 3
+
+# xmlXPathObjectType
+XPATH_UNDEFINED = 0
+XPATH_NODESET = 1
+XPATH_BOOLEAN = 2
+XPATH_NUMBER = 3
+XPATH_STRING = 4
+XPATH_POINT = 5
+XPATH_RANGE = 6
+XPATH_LOCATIONSET = 7
+XPATH_USERS = 8
+XPATH_XSLT_TREE = 9
+
+# xmlSchemaValidError
+XML_SCHEMAS_ERR_OK = 0
+XML_SCHEMAS_ERR_NOROOT = 1
+XML_SCHEMAS_ERR_UNDECLAREDELEM = 2
+XML_SCHEMAS_ERR_NOTTOPLEVEL = 3
+XML_SCHEMAS_ERR_MISSING = 4
+XML_SCHEMAS_ERR_WRONGELEM = 5
+XML_SCHEMAS_ERR_NOTYPE = 6
+XML_SCHEMAS_ERR_NOROLLBACK = 7
+XML_SCHEMAS_ERR_ISABSTRACT = 8
+XML_SCHEMAS_ERR_NOTEMPTY = 9
+XML_SCHEMAS_ERR_ELEMCONT = 10
+XML_SCHEMAS_ERR_HAVEDEFAULT = 11
+XML_SCHEMAS_ERR_NOTNILLABLE = 12
+XML_SCHEMAS_ERR_EXTRACONTENT = 13
+XML_SCHEMAS_ERR_INVALIDATTR = 14
+XML_SCHEMAS_ERR_INVALIDELEM = 15
+XML_SCHEMAS_ERR_NOTDETERMINIST = 16
+XML_SCHEMAS_ERR_CONSTRUCT = 17
+XML_SCHEMAS_ERR_INTERNAL = 18
+XML_SCHEMAS_ERR_NOTSIMPLE = 19
+XML_SCHEMAS_ERR_ATTRUNKNOWN = 20
+XML_SCHEMAS_ERR_ATTRINVALID = 21
+XML_SCHEMAS_ERR_VALUE = 22
+XML_SCHEMAS_ERR_FACET = 23
+XML_SCHEMAS_ERR_ = 24
+XML_SCHEMAS_ERR_XXX = 25
+
diff --git a/libxml2-2.9.10/python/libxml2class.py b/libxml2-2.9.10/python/libxml2class.py
new file mode 100644
index 0000000..a353f47
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml2class.py
@@ -0,0 +1,8539 @@
+#
+# Functions from module HTMLparser
+#
+
+def htmlCreateMemoryParserCtxt(buffer, size):
+ """Create a parser context for an HTML in-memory document. """
+ ret = libxml2mod.htmlCreateMemoryParserCtxt(buffer, size)
+ if ret is None:raise parserError('htmlCreateMemoryParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlHandleOmittedElem(val):
+ """Set and return the previous value for handling HTML omitted
+ tags. """
+ ret = libxml2mod.htmlHandleOmittedElem(val)
+ return ret
+
+def htmlIsScriptAttribute(name):
+ """Check if an attribute is of content type Script """
+ ret = libxml2mod.htmlIsScriptAttribute(name)
+ return ret
+
+def htmlNewParserCtxt():
+ """Allocate and initialize a new parser context. """
+ ret = libxml2mod.htmlNewParserCtxt()
+ if ret is None:raise parserError('htmlNewParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlParseDoc(cur, encoding):
+ """parse an HTML in-memory document and build a tree. """
+ ret = libxml2mod.htmlParseDoc(cur, encoding)
+ if ret is None:raise parserError('htmlParseDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlParseFile(filename, encoding):
+ """parse an HTML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. """
+ ret = libxml2mod.htmlParseFile(filename, encoding)
+ if ret is None:raise parserError('htmlParseFile() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadDoc(cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.htmlReadDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadFd(fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. """
+ ret = libxml2mod.htmlReadFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadFd() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. """
+ ret = libxml2mod.htmlReadFile(filename, encoding, options)
+ if ret is None:raise treeError('htmlReadFile() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadMemory(buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.htmlReadMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadMemory() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module HTMLtree
+#
+
+def htmlIsBooleanAttr(name):
+ """Determine if a given attribute is a boolean attribute. """
+ ret = libxml2mod.htmlIsBooleanAttr(name)
+ return ret
+
+def htmlNewDoc(URI, ExternalID):
+ """Creates a new HTML document """
+ ret = libxml2mod.htmlNewDoc(URI, ExternalID)
+ if ret is None:raise treeError('htmlNewDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlNewDocNoDtD(URI, ExternalID):
+ """Creates a new HTML document without a DTD node if @URI and
+ @ExternalID are None """
+ ret = libxml2mod.htmlNewDocNoDtD(URI, ExternalID)
+ if ret is None:raise treeError('htmlNewDocNoDtD() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module SAX2
+#
+
+def SAXDefaultVersion(version):
+ """Set the default version of SAX used globally by the
+ library. By default, during initialization the default is
+ set to 2. Note that it is generally a better coding style
+ to use xmlSAXVersion() to set up the version explicitly for
+ a given parsing context. """
+ ret = libxml2mod.xmlSAXDefaultVersion(version)
+ return ret
+
+def defaultSAXHandlerInit():
+ """Initialize the default SAX2 handler """
+ libxml2mod.xmlDefaultSAXHandlerInit()
+
+def docbDefaultSAXHandlerInit():
+ """Initialize the default SAX handler """
+ libxml2mod.docbDefaultSAXHandlerInit()
+
+def htmlDefaultSAXHandlerInit():
+ """Initialize the default SAX handler """
+ libxml2mod.htmlDefaultSAXHandlerInit()
+
+#
+# Functions from module catalog
+#
+
+def catalogAdd(type, orig, replace):
+ """Add an entry in the catalog, it may overwrite existing but
+ different entries. If called before any other catalog
+ routine, allows to override the default shared catalog put
+ in place by xmlInitializeCatalog(); """
+ ret = libxml2mod.xmlCatalogAdd(type, orig, replace)
+ return ret
+
+def catalogCleanup():
+ """Free up all the memory associated with catalogs """
+ libxml2mod.xmlCatalogCleanup()
+
+def catalogConvert():
+ """Convert all the SGML catalog entries as XML ones """
+ ret = libxml2mod.xmlCatalogConvert()
+ return ret
+
+def catalogDump(out):
+ """Dump all the global catalog content to the given file. """
+ if out is not None: out.flush()
+ libxml2mod.xmlCatalogDump(out)
+
+def catalogGetPublic(pubID):
+ """Try to lookup the catalog reference associated to a public
+ ID DEPRECATED, use xmlCatalogResolvePublic() """
+ ret = libxml2mod.xmlCatalogGetPublic(pubID)
+ return ret
+
+def catalogGetSystem(sysID):
+ """Try to lookup the catalog reference associated to a system
+ ID DEPRECATED, use xmlCatalogResolveSystem() """
+ ret = libxml2mod.xmlCatalogGetSystem(sysID)
+ return ret
+
+def catalogRemove(value):
+ """Remove an entry from the catalog """
+ ret = libxml2mod.xmlCatalogRemove(value)
+ return ret
+
+def catalogResolve(pubID, sysID):
+ """Do a complete resolution lookup of an External Identifier """
+ ret = libxml2mod.xmlCatalogResolve(pubID, sysID)
+ return ret
+
+def catalogResolvePublic(pubID):
+ """Try to lookup the catalog reference associated to a public
+ ID """
+ ret = libxml2mod.xmlCatalogResolvePublic(pubID)
+ return ret
+
+def catalogResolveSystem(sysID):
+ """Try to lookup the catalog resource for a system ID """
+ ret = libxml2mod.xmlCatalogResolveSystem(sysID)
+ return ret
+
+def catalogResolveURI(URI):
+ """Do a complete resolution lookup of an URI """
+ ret = libxml2mod.xmlCatalogResolveURI(URI)
+ return ret
+
+def catalogSetDebug(level):
+ """Used to set the debug level for catalog operation, 0
+ disable debugging, 1 enable it """
+ ret = libxml2mod.xmlCatalogSetDebug(level)
+ return ret
+
+def initializeCatalog():
+ """Do the catalog initialization. this function is not thread
+ safe, catalog initialization should preferably be done once
+ at startup """
+ libxml2mod.xmlInitializeCatalog()
+
+def loadACatalog(filename):
+ """Load the catalog and build the associated data structures.
+ This can be either an XML Catalog or an SGML Catalog It
+ will recurse in SGML CATALOG entries. On the other hand XML
+ Catalogs are not handled recursively. """
+ ret = libxml2mod.xmlLoadACatalog(filename)
+ if ret is None:raise treeError('xmlLoadACatalog() failed')
+ return catalog(_obj=ret)
+
+def loadCatalog(filename):
+ """Load the catalog and makes its definitions effective for
+ the default external entity loader. It will recurse in SGML
+ CATALOG entries. this function is not thread safe, catalog
+ initialization should preferably be done once at startup """
+ ret = libxml2mod.xmlLoadCatalog(filename)
+ return ret
+
+def loadCatalogs(pathss):
+ """Load the catalogs and makes their definitions effective for
+ the default external entity loader. this function is not
+ thread safe, catalog initialization should preferably be
+ done once at startup """
+ libxml2mod.xmlLoadCatalogs(pathss)
+
+def loadSGMLSuperCatalog(filename):
+ """Load an SGML super catalog. It won't expand CATALOG or
+ DELEGATE references. This is only needed for manipulating
+ SGML Super Catalogs like adding and removing CATALOG or
+ DELEGATE entries. """
+ ret = libxml2mod.xmlLoadSGMLSuperCatalog(filename)
+ if ret is None:raise treeError('xmlLoadSGMLSuperCatalog() failed')
+ return catalog(_obj=ret)
+
+def newCatalog(sgml):
+ """create a new Catalog. """
+ ret = libxml2mod.xmlNewCatalog(sgml)
+ if ret is None:raise treeError('xmlNewCatalog() failed')
+ return catalog(_obj=ret)
+
+def parseCatalogFile(filename):
+ """parse an XML file and build a tree. It's like
+ xmlParseFile() except it bypass all catalog lookups. """
+ ret = libxml2mod.xmlParseCatalogFile(filename)
+ if ret is None:raise parserError('xmlParseCatalogFile() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module chvalid
+#
+
+def isBaseChar(ch):
+ """This function is DEPRECATED. Use xmlIsBaseChar_ch or
+ xmlIsBaseCharQ instead """
+ ret = libxml2mod.xmlIsBaseChar(ch)
+ return ret
+
+def isBlank(ch):
+ """This function is DEPRECATED. Use xmlIsBlank_ch or
+ xmlIsBlankQ instead """
+ ret = libxml2mod.xmlIsBlank(ch)
+ return ret
+
+def isChar(ch):
+ """This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ
+ instead """
+ ret = libxml2mod.xmlIsChar(ch)
+ return ret
+
+def isCombining(ch):
+ """This function is DEPRECATED. Use xmlIsCombiningQ instead """
+ ret = libxml2mod.xmlIsCombining(ch)
+ return ret
+
+def isDigit(ch):
+ """This function is DEPRECATED. Use xmlIsDigit_ch or
+ xmlIsDigitQ instead """
+ ret = libxml2mod.xmlIsDigit(ch)
+ return ret
+
+def isExtender(ch):
+ """This function is DEPRECATED. Use xmlIsExtender_ch or
+ xmlIsExtenderQ instead """
+ ret = libxml2mod.xmlIsExtender(ch)
+ return ret
+
+def isIdeographic(ch):
+ """This function is DEPRECATED. Use xmlIsIdeographicQ instead """
+ ret = libxml2mod.xmlIsIdeographic(ch)
+ return ret
+
+def isPubidChar(ch):
+ """This function is DEPRECATED. Use xmlIsPubidChar_ch or
+ xmlIsPubidCharQ instead """
+ ret = libxml2mod.xmlIsPubidChar(ch)
+ return ret
+
+#
+# Functions from module debugXML
+#
+
+def boolToText(boolval):
+ """Convenient way to turn bool into text """
+ ret = libxml2mod.xmlBoolToText(boolval)
+ return ret
+
+def debugDumpString(output, str):
+ """Dumps informations about the string, shorten it if necessary """
+ if output is not None: output.flush()
+ libxml2mod.xmlDebugDumpString(output, str)
+
+def shellPrintXPathError(errorType, arg):
+ """Print the xpath error to libxml default error channel """
+ libxml2mod.xmlShellPrintXPathError(errorType, arg)
+
+#
+# Functions from module dict
+#
+
+def dictCleanup():
+ """Free the dictionary mutex. Do not call unless sure the
+ library is not in use anymore ! """
+ libxml2mod.xmlDictCleanup()
+
+def initializeDict():
+ """Do the dictionary mutex initialization. this function is
+ deprecated """
+ ret = libxml2mod.xmlInitializeDict()
+ return ret
+
+#
+# Functions from module encoding
+#
+
+def addEncodingAlias(name, alias):
+ """Registers an alias @alias for an encoding named @name.
+ Existing alias will be overwritten. """
+ ret = libxml2mod.xmlAddEncodingAlias(name, alias)
+ return ret
+
+def cleanupCharEncodingHandlers():
+ """Cleanup the memory allocated for the char encoding support,
+ it unregisters all the encoding handlers and the aliases. """
+ libxml2mod.xmlCleanupCharEncodingHandlers()
+
+def cleanupEncodingAliases():
+ """Unregisters all aliases """
+ libxml2mod.xmlCleanupEncodingAliases()
+
+def delEncodingAlias(alias):
+ """Unregisters an encoding alias @alias """
+ ret = libxml2mod.xmlDelEncodingAlias(alias)
+ return ret
+
+def encodingAlias(alias):
+ """Lookup an encoding name for the given alias. """
+ ret = libxml2mod.xmlGetEncodingAlias(alias)
+ return ret
+
+def initCharEncodingHandlers():
+ """Initialize the char encoding support, it registers the
+ default encoding supported. NOTE: while public, this
+ function usually doesn't need to be called in normal
+ processing. """
+ libxml2mod.xmlInitCharEncodingHandlers()
+
+#
+# Functions from module entities
+#
+
+def cleanupPredefinedEntities():
+ """Cleanup up the predefined entities table. Deprecated call """
+ libxml2mod.xmlCleanupPredefinedEntities()
+
+def initializePredefinedEntities():
+ """Set up the predefined entities. Deprecated call """
+ libxml2mod.xmlInitializePredefinedEntities()
+
+def predefinedEntity(name):
+ """Check whether this name is an predefined entity. """
+ ret = libxml2mod.xmlGetPredefinedEntity(name)
+ if ret is None:raise treeError('xmlGetPredefinedEntity() failed')
+ return xmlEntity(_obj=ret)
+
+#
+# Functions from module globals
+#
+
+def cleanupGlobals():
+ """Additional cleanup for multi-threading """
+ libxml2mod.xmlCleanupGlobals()
+
+def initGlobals():
+ """Additional initialisation for multi-threading """
+ libxml2mod.xmlInitGlobals()
+
+def thrDefDefaultBufferSize(v):
+ ret = libxml2mod.xmlThrDefDefaultBufferSize(v)
+ return ret
+
+def thrDefDoValidityCheckingDefaultValue(v):
+ ret = libxml2mod.xmlThrDefDoValidityCheckingDefaultValue(v)
+ return ret
+
+def thrDefGetWarningsDefaultValue(v):
+ ret = libxml2mod.xmlThrDefGetWarningsDefaultValue(v)
+ return ret
+
+def thrDefIndentTreeOutput(v):
+ ret = libxml2mod.xmlThrDefIndentTreeOutput(v)
+ return ret
+
+def thrDefKeepBlanksDefaultValue(v):
+ ret = libxml2mod.xmlThrDefKeepBlanksDefaultValue(v)
+ return ret
+
+def thrDefLineNumbersDefaultValue(v):
+ ret = libxml2mod.xmlThrDefLineNumbersDefaultValue(v)
+ return ret
+
+def thrDefLoadExtDtdDefaultValue(v):
+ ret = libxml2mod.xmlThrDefLoadExtDtdDefaultValue(v)
+ return ret
+
+def thrDefParserDebugEntities(v):
+ ret = libxml2mod.xmlThrDefParserDebugEntities(v)
+ return ret
+
+def thrDefPedanticParserDefaultValue(v):
+ ret = libxml2mod.xmlThrDefPedanticParserDefaultValue(v)
+ return ret
+
+def thrDefSaveNoEmptyTags(v):
+ ret = libxml2mod.xmlThrDefSaveNoEmptyTags(v)
+ return ret
+
+def thrDefSubstituteEntitiesDefaultValue(v):
+ ret = libxml2mod.xmlThrDefSubstituteEntitiesDefaultValue(v)
+ return ret
+
+def thrDefTreeIndentString(v):
+ ret = libxml2mod.xmlThrDefTreeIndentString(v)
+ return ret
+
+#
+# Functions from module nanoftp
+#
+
+def nanoFTPCleanup():
+ """Cleanup the FTP protocol layer. This cleanup proxy
+ informations. """
+ libxml2mod.xmlNanoFTPCleanup()
+
+def nanoFTPInit():
+ """Initialize the FTP protocol layer. Currently it just checks
+ for proxy informations, and get the hostname """
+ libxml2mod.xmlNanoFTPInit()
+
+def nanoFTPProxy(host, port, user, passwd, type):
+ """Setup the FTP proxy informations. This can also be done by
+ using ftp_proxy ftp_proxy_user and ftp_proxy_password
+ environment variables. """
+ libxml2mod.xmlNanoFTPProxy(host, port, user, passwd, type)
+
+def nanoFTPScanProxy(URL):
+ """(Re)Initialize the FTP Proxy context by parsing the URL and
+ finding the protocol host port it indicates. Should be like
+ ftp://myproxy/ or ftp://myproxy:3128/ A None URL cleans up
+ proxy informations. """
+ libxml2mod.xmlNanoFTPScanProxy(URL)
+
+#
+# Functions from module nanohttp
+#
+
+def nanoHTTPCleanup():
+ """Cleanup the HTTP protocol layer. """
+ libxml2mod.xmlNanoHTTPCleanup()
+
+def nanoHTTPInit():
+ """Initialize the HTTP protocol layer. Currently it just
+ checks for proxy informations """
+ libxml2mod.xmlNanoHTTPInit()
+
+def nanoHTTPScanProxy(URL):
+ """(Re)Initialize the HTTP Proxy context by parsing the URL
+ and finding the protocol host port it indicates. Should be
+ like http://myproxy/ or http://myproxy:3128/ A None URL
+ cleans up proxy informations. """
+ libxml2mod.xmlNanoHTTPScanProxy(URL)
+
+#
+# Functions from module parser
+#
+
+def createDocParserCtxt(cur):
+ """Creates a parser context for an XML in-memory document. """
+ ret = libxml2mod.xmlCreateDocParserCtxt(cur)
+ if ret is None:raise parserError('xmlCreateDocParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def initParser():
+ """Initialization function for the XML parser. This is not
+ reentrant. Call once before processing in case of use in
+ multithreaded programs. """
+ libxml2mod.xmlInitParser()
+
+def keepBlanksDefault(val):
+ """Set and return the previous value for default blanks text
+ nodes support. The 1.x version of the parser used an
+ heuristic to try to detect ignorable white spaces. As a
+ result the SAX callback was generating
+ xmlSAX2IgnorableWhitespace() callbacks instead of
+ characters() one, and when using the DOM output text nodes
+ containing those blanks were not generated. The 2.x and
+ later version will switch to the XML standard way and
+ ignorableWhitespace() are only generated when running the
+ parser in validating mode and when the current element
+ doesn't allow CDATA or mixed content. This function is
+ provided as a way to force the standard behavior on 1.X
+ libs and to switch back to the old mode for compatibility
+ when running 1.X client code on 2.X . Upgrade of 1.X code
+ should be done by using xmlIsBlankNode() commodity function
+ to detect the "empty" nodes generated. This value also
+ affect autogeneration of indentation when saving code if
+ blanks sections are kept, indentation is not generated. """
+ ret = libxml2mod.xmlKeepBlanksDefault(val)
+ return ret
+
+def lineNumbersDefault(val):
+ """Set and return the previous value for enabling line numbers
+ in elements contents. This may break on old application and
+ is turned off by default. """
+ ret = libxml2mod.xmlLineNumbersDefault(val)
+ return ret
+
+def newParserCtxt():
+ """Allocate and initialize a new parser context. """
+ ret = libxml2mod.xmlNewParserCtxt()
+ if ret is None:raise parserError('xmlNewParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def parseDTD(ExternalID, SystemID):
+ """Load and parse an external subset. """
+ ret = libxml2mod.xmlParseDTD(ExternalID, SystemID)
+ if ret is None:raise parserError('xmlParseDTD() failed')
+ return xmlDtd(_obj=ret)
+
+def parseDoc(cur):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlParseDoc(cur)
+ if ret is None:raise parserError('xmlParseDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def parseEntity(filename):
+ """parse an XML external entity out of context and build a
+ tree. [78] extParsedEnt ::= TextDecl? content This
+ correspond to a "Well Balanced" chunk """
+ ret = libxml2mod.xmlParseEntity(filename)
+ if ret is None:raise parserError('xmlParseEntity() failed')
+ return xmlDoc(_obj=ret)
+
+def parseFile(filename):
+ """parse an XML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. """
+ ret = libxml2mod.xmlParseFile(filename)
+ if ret is None:raise parserError('xmlParseFile() failed')
+ return xmlDoc(_obj=ret)
+
+def parseMemory(buffer, size):
+ """parse an XML in-memory block and build a tree. """
+ ret = libxml2mod.xmlParseMemory(buffer, size)
+ if ret is None:raise parserError('xmlParseMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def pedanticParserDefault(val):
+ """Set and return the previous value for enabling pedantic
+ warnings. """
+ ret = libxml2mod.xmlPedanticParserDefault(val)
+ return ret
+
+def readDoc(cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlReadDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def readFd(fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. NOTE
+ that the file descriptor will not be closed when the reader
+ is closed or reset. """
+ ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadFd() failed')
+ return xmlDoc(_obj=ret)
+
+def readFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. """
+ ret = libxml2mod.xmlReadFile(filename, encoding, options)
+ if ret is None:raise treeError('xmlReadFile() failed')
+ return xmlDoc(_obj=ret)
+
+def readMemory(buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverDoc(cur):
+ """parse an XML in-memory document and build a tree. In the
+ case the document is not Well Formed, a attempt to build a
+ tree is tried anyway """
+ ret = libxml2mod.xmlRecoverDoc(cur)
+ if ret is None:raise treeError('xmlRecoverDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverFile(filename):
+ """parse an XML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. In the case the document is not Well
+ Formed, it attempts to build a tree anyway """
+ ret = libxml2mod.xmlRecoverFile(filename)
+ if ret is None:raise treeError('xmlRecoverFile() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverMemory(buffer, size):
+ """parse an XML in-memory block and build a tree. In the case
+ the document is not Well Formed, an attempt to build a tree
+ is tried anyway """
+ ret = libxml2mod.xmlRecoverMemory(buffer, size)
+ if ret is None:raise treeError('xmlRecoverMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def substituteEntitiesDefault(val):
+ """Set and return the previous value for default entity
+ support. Initially the parser always keep entity references
+ instead of substituting entity values in the output. This
+ function has to be used to change the default parser
+ behavior SAX::substituteEntities() has to be used for
+ changing that on a file by file basis. """
+ ret = libxml2mod.xmlSubstituteEntitiesDefault(val)
+ return ret
+
+#
+# Functions from module parserInternals
+#
+
+def checkLanguageID(lang):
+ """Checks that the value conforms to the LanguageID
+ production: NOTE: this is somewhat deprecated, those
+ productions were removed from the XML Second edition. [33]
+ LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::=
+ ISO639Code | IanaCode | UserCode [35] ISO639Code ::=
+ ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' |
+ 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-'
+ ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The
+ current REC reference the successors of RFC 1766, currently
+ 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag
+ = language ["-" script] ["-" region] *("-" variant) *("-"
+ extension) ["-" privateuse] language = 2*3ALPHA
+ ; shortest ISO 639 code ["-" extlang] ; sometimes
+ followed by ; extended language subtags / 4ALPHA
+ ; or reserved for future use / 5*8ALPHA ; or
+ registered language subtag extlang = 3ALPHA
+ ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently
+ reserved script = 4ALPHA ; ISO 15924
+ code region = 2ALPHA ; ISO 3166-1 code
+ / 3DIGIT ; UN M.49 code variant =
+ 5*8alphanum ; registered variants / (DIGIT
+ 3alphanum) extension = singleton 1*("-" (2*8alphanum))
+ ; Single alphanumerics ; "x" reserved for private use
+ singleton = DIGIT ; 0 - 9 / %x41-57
+ ; A - W / %x59-5A ; Y - Z / %x61-77
+ ; a - w / %x79-7A ; y - z it sounds right to
+ still allow Irregular i-xxx IANA and user codes too The
+ parser below doesn't try to cope with extension or
+ privateuse that could be added but that's not interoperable
+ anyway """
+ ret = libxml2mod.xmlCheckLanguageID(lang)
+ return ret
+
+def copyChar(len, out, val):
+ """append the char value in the array """
+ ret = libxml2mod.xmlCopyChar(len, out, val)
+ return ret
+
+def copyCharMultiByte(out, val):
+ """append the char value in the array """
+ ret = libxml2mod.xmlCopyCharMultiByte(out, val)
+ return ret
+
+def createEntityParserCtxt(URL, ID, base):
+ """Create a parser context for an external entity Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base)
+ if ret is None:raise parserError('xmlCreateEntityParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createFileParserCtxt(filename):
+ """Create a parser context for a file content. Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.xmlCreateFileParserCtxt(filename)
+ if ret is None:raise parserError('xmlCreateFileParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createMemoryParserCtxt(buffer, size):
+ """Create a parser context for an XML in-memory document. """
+ ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createURLParserCtxt(filename, options):
+ """Create a parser context for a file or URL content.
+ Automatic support for ZLIB/Compress compressed document is
+ provided by default if found at compile-time and for file
+ accesses """
+ ret = libxml2mod.xmlCreateURLParserCtxt(filename, options)
+ if ret is None:raise parserError('xmlCreateURLParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlCreateFileParserCtxt(filename, encoding):
+ """Create a parser context for a file content. Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding)
+ if ret is None:raise parserError('htmlCreateFileParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlInitAutoClose():
+ """Initialize the htmlStartCloseIndex for fast lookup of
+ closing tags names. This is not reentrant. Call
+ xmlInitParser() once before processing in case of use in
+ multithreaded programs. """
+ libxml2mod.htmlInitAutoClose()
+
+def isLetter(c):
+ """Check whether the character is allowed by the production
+ [84] Letter ::= BaseChar | Ideographic """
+ ret = libxml2mod.xmlIsLetter(c)
+ return ret
+
+def namePop(ctxt):
+ """Pops the top element name from the name stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.namePop(ctxt__o)
+ return ret
+
+def namePush(ctxt, value):
+ """Pushes a new element name on top of the name stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.namePush(ctxt__o, value)
+ return ret
+
+def nodePop(ctxt):
+ """Pops the top element node from the node stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.nodePop(ctxt__o)
+ if ret is None:raise treeError('nodePop() failed')
+ return xmlNode(_obj=ret)
+
+def nodePush(ctxt, value):
+ """Pushes a new element node on top of the node stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if value is None: value__o = None
+ else: value__o = value._o
+ ret = libxml2mod.nodePush(ctxt__o, value__o)
+ return ret
+
+#
+# Functions from module python
+#
+
+def SAXParseFile(SAX, URI, recover):
+ """Interface to parse an XML file or resource pointed by an
+ URI to build an event flow to the SAX object """
+ libxml2mod.xmlSAXParseFile(SAX, URI, recover)
+
+def createInputBuffer(file, encoding):
+ """Create a libxml2 input buffer from a Python file """
+ ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
+ if ret is None:raise treeError('xmlCreateInputBuffer() failed')
+ return inputBuffer(_obj=ret)
+
+def createOutputBuffer(file, encoding):
+ """Create a libxml2 output buffer from a Python file """
+ ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
+ if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
+ return outputBuffer(_obj=ret)
+
+def createPushParser(SAX, chunk, size, URI):
+ """Create a progressive XML parser context to build either an
+ event flow if the SAX object is not None, or a DOM tree
+ otherwise. """
+ ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
+ if ret is None:raise parserError('xmlCreatePushParser() failed')
+ return parserCtxt(_obj=ret)
+
+def debugMemory(activate):
+ """Switch on the generation of line number for elements nodes.
+ Also returns the number of bytes allocated and not freed by
+ libxml2 since memory debugging was switched on. """
+ ret = libxml2mod.xmlDebugMemory(activate)
+ return ret
+
+def dumpMemory():
+ """dump the memory allocated in the file .memdump """
+ libxml2mod.xmlDumpMemory()
+
+def htmlCreatePushParser(SAX, chunk, size, URI):
+ """Create a progressive HTML parser context to build either an
+ event flow if the SAX object is not None, or a DOM tree
+ otherwise. """
+ ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
+ if ret is None:raise parserError('htmlCreatePushParser() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlSAXParseFile(SAX, URI, encoding):
+ """Interface to parse an HTML file or resource pointed by an
+ URI to build an event flow to the SAX object """
+ libxml2mod.htmlSAXParseFile(SAX, URI, encoding)
+
+def memoryUsed():
+ """Returns the total amount of memory allocated by libxml2 """
+ ret = libxml2mod.xmlMemoryUsed()
+ return ret
+
+def newNode(name):
+ """Create a new Node """
+ ret = libxml2mod.xmlNewNode(name)
+ if ret is None:raise treeError('xmlNewNode() failed')
+ return xmlNode(_obj=ret)
+
+def pythonCleanupParser():
+ """Cleanup function for the XML library. It tries to reclaim
+ all parsing related global memory allocated for the library
+ processing. It doesn't deallocate any document related
+ memory. Calling this function should not prevent reusing
+ the library but one should call xmlCleanupParser() only
+ when the process has finished using the library or XML
+ document built with it. """
+ libxml2mod.xmlPythonCleanupParser()
+
+def setEntityLoader(resolver):
+ """Set the entity resolver as a python function """
+ ret = libxml2mod.xmlSetEntityLoader(resolver)
+ return ret
+
+#
+# Functions from module relaxng
+#
+
+def relaxNGCleanupTypes():
+ """Cleanup the default Schemas type library associated to
+ RelaxNG """
+ libxml2mod.xmlRelaxNGCleanupTypes()
+
+def relaxNGInitTypes():
+ """Initialize the default type libraries. """
+ ret = libxml2mod.xmlRelaxNGInitTypes()
+ return ret
+
+def relaxNGNewMemParserCtxt(buffer, size):
+ """Create an XML RelaxNGs parse context for that memory buffer
+ expected to contain an XML RelaxNGs file. """
+ ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
+ return relaxNgParserCtxt(_obj=ret)
+
+def relaxNGNewParserCtxt(URL):
+ """Create an XML RelaxNGs parse context for that file/resource
+ expected to contain an XML RelaxNGs file. """
+ ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL)
+ if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed')
+ return relaxNgParserCtxt(_obj=ret)
+
+#
+# Functions from module tree
+#
+
+def buildQName(ncname, prefix, memory, len):
+ """Builds the QName @prefix:@ncname in @memory if there is
+ enough space and prefix is not None nor empty, otherwise
+ allocate a new string. If prefix is None or empty it
+ returns ncname. """
+ ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
+ return ret
+
+def compressMode():
+ """get the default compression mode used, ZLIB based. """
+ ret = libxml2mod.xmlGetCompressMode()
+ return ret
+
+def isXHTML(systemID, publicID):
+ """Try to find if the document correspond to an XHTML DTD """
+ ret = libxml2mod.xmlIsXHTML(systemID, publicID)
+ return ret
+
+def newComment(content):
+ """Creation of a new node containing a comment. """
+ ret = libxml2mod.xmlNewComment(content)
+ if ret is None:raise treeError('xmlNewComment() failed')
+ return xmlNode(_obj=ret)
+
+def newDoc(version):
+ """Creates a new XML document """
+ ret = libxml2mod.xmlNewDoc(version)
+ if ret is None:raise treeError('xmlNewDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def newPI(name, content):
+ """Creation of a processing instruction element. Use
+ xmlDocNewPI preferably to get string interning """
+ ret = libxml2mod.xmlNewPI(name, content)
+ if ret is None:raise treeError('xmlNewPI() failed')
+ return xmlNode(_obj=ret)
+
+def newText(content):
+ """Creation of a new text node. """
+ ret = libxml2mod.xmlNewText(content)
+ if ret is None:raise treeError('xmlNewText() failed')
+ return xmlNode(_obj=ret)
+
+def newTextLen(content, len):
+ """Creation of a new text node with an extra parameter for the
+ content's length """
+ ret = libxml2mod.xmlNewTextLen(content, len)
+ if ret is None:raise treeError('xmlNewTextLen() failed')
+ return xmlNode(_obj=ret)
+
+def setCompressMode(mode):
+ """set the default compression mode used, ZLIB based Correct
+ values: 0 (uncompressed) to 9 (max compression) """
+ libxml2mod.xmlSetCompressMode(mode)
+
+def validateNCName(value, space):
+ """Check that a value conforms to the lexical space of NCName """
+ ret = libxml2mod.xmlValidateNCName(value, space)
+ return ret
+
+def validateNMToken(value, space):
+ """Check that a value conforms to the lexical space of NMToken """
+ ret = libxml2mod.xmlValidateNMToken(value, space)
+ return ret
+
+def validateName(value, space):
+ """Check that a value conforms to the lexical space of Name """
+ ret = libxml2mod.xmlValidateName(value, space)
+ return ret
+
+def validateQName(value, space):
+ """Check that a value conforms to the lexical space of QName """
+ ret = libxml2mod.xmlValidateQName(value, space)
+ return ret
+
+#
+# Functions from module uri
+#
+
+def URIEscape(str):
+ """Escaping routine, does not do validity checks ! It will try
+ to escape the chars needing this, but this is heuristic
+ based it's impossible to be sure. """
+ ret = libxml2mod.xmlURIEscape(str)
+ return ret
+
+def URIEscapeStr(str, list):
+ """This routine escapes a string to hex, ignoring reserved
+ characters (a-z) and the characters in the exception list. """
+ ret = libxml2mod.xmlURIEscapeStr(str, list)
+ return ret
+
+def URIUnescapeString(str, len, target):
+ """Unescaping routine, but does not check that the string is
+ an URI. The output is a direct unsigned char translation of
+ %XX values (no encoding) Note that the length of the result
+ can only be smaller or same size as the input string. """
+ ret = libxml2mod.xmlURIUnescapeString(str, len, target)
+ return ret
+
+def buildRelativeURI(URI, base):
+ """Expresses the URI of the reference in terms relative to the
+ base. Some examples of this operation include: base =
+ "http://site1.com/docs/book1.html" URI input
+ URI returned docs/pic1.gif pic1.gif
+ docs/img/pic1.gif img/pic1.gif img/pic1.gif
+ ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif
+ http://site2.com/docs/pic1.gif
+ http://site2.com/docs/pic1.gif base = "docs/book1.html"
+ URI input URI returned docs/pic1.gif
+ pic1.gif docs/img/pic1.gif img/pic1.gif
+ img/pic1.gif ../img/pic1.gif
+ http://site1.com/docs/pic1.gif
+ http://site1.com/docs/pic1.gif Note: if the URI reference
+ is really weird or complicated, it may be worthwhile to
+ first convert it into a "nice" one by calling xmlBuildURI
+ (using 'base') before calling this routine, since this
+ routine (for reasonable efficiency) assumes URI has already
+ been through some validation. """
+ ret = libxml2mod.xmlBuildRelativeURI(URI, base)
+ return ret
+
+def buildURI(URI, base):
+ """Computes he final URI of the reference done by checking
+ that the given URI is valid, and building the final URI
+ using the base URI. This is processed according to section
+ 5.2 of the RFC 2396 5.2. Resolving Relative References to
+ Absolute Form """
+ ret = libxml2mod.xmlBuildURI(URI, base)
+ return ret
+
+def canonicPath(path):
+ """Constructs a canonic path from the specified path. """
+ ret = libxml2mod.xmlCanonicPath(path)
+ return ret
+
+def createURI():
+ """Simply creates an empty xmlURI """
+ ret = libxml2mod.xmlCreateURI()
+ if ret is None:raise uriError('xmlCreateURI() failed')
+ return URI(_obj=ret)
+
+def normalizeURIPath(path):
+ """Applies the 5 normalization steps to a path string--that
+ is, RFC 2396 Section 5.2, steps 6.c through 6.g.
+ Normalization occurs directly on the string, no new
+ allocation is done """
+ ret = libxml2mod.xmlNormalizeURIPath(path)
+ return ret
+
+def parseURI(str):
+ """Parse an URI based on RFC 3986 URI-reference = [
+ absoluteURI | relativeURI ] [ "#" fragment ] """
+ ret = libxml2mod.xmlParseURI(str)
+ if ret is None:raise uriError('xmlParseURI() failed')
+ return URI(_obj=ret)
+
+def parseURIRaw(str, raw):
+ """Parse an URI but allows to keep intact the original
+ fragments. URI-reference = URI / relative-ref """
+ ret = libxml2mod.xmlParseURIRaw(str, raw)
+ if ret is None:raise uriError('xmlParseURIRaw() failed')
+ return URI(_obj=ret)
+
+def pathToURI(path):
+ """Constructs an URI expressing the existing path """
+ ret = libxml2mod.xmlPathToURI(path)
+ return ret
+
+#
+# Functions from module valid
+#
+
+def newValidCtxt():
+ """Allocate a validation context structure. """
+ ret = libxml2mod.xmlNewValidCtxt()
+ if ret is None:raise treeError('xmlNewValidCtxt() failed')
+ return ValidCtxt(_obj=ret)
+
+def validateNameValue(value):
+ """Validate that the given value match Name production """
+ ret = libxml2mod.xmlValidateNameValue(value)
+ return ret
+
+def validateNamesValue(value):
+ """Validate that the given value match Names production """
+ ret = libxml2mod.xmlValidateNamesValue(value)
+ return ret
+
+def validateNmtokenValue(value):
+ """Validate that the given value match Nmtoken production [
+ VC: Name Token ] """
+ ret = libxml2mod.xmlValidateNmtokenValue(value)
+ return ret
+
+def validateNmtokensValue(value):
+ """Validate that the given value match Nmtokens production [
+ VC: Name Token ] """
+ ret = libxml2mod.xmlValidateNmtokensValue(value)
+ return ret
+
+#
+# Functions from module xmlIO
+#
+
+def checkFilename(path):
+ """function checks to see if @path is a valid source (file,
+ socket...) for XML. if stat is not available on the target
+ machine, """
+ ret = libxml2mod.xmlCheckFilename(path)
+ return ret
+
+def cleanupInputCallbacks():
+ """clears the entire input callback table. this includes the
+ compiled-in I/O. """
+ libxml2mod.xmlCleanupInputCallbacks()
+
+def cleanupOutputCallbacks():
+ """clears the entire output callback table. this includes the
+ compiled-in I/O callbacks. """
+ libxml2mod.xmlCleanupOutputCallbacks()
+
+def fileMatch(filename):
+ """input from FILE * """
+ ret = libxml2mod.xmlFileMatch(filename)
+ return ret
+
+def iOFTPMatch(filename):
+ """check if the URI matches an FTP one """
+ ret = libxml2mod.xmlIOFTPMatch(filename)
+ return ret
+
+def iOHTTPMatch(filename):
+ """check if the URI matches an HTTP one """
+ ret = libxml2mod.xmlIOHTTPMatch(filename)
+ return ret
+
+def normalizeWindowsPath(path):
+ """This function is obsolete. Please see xmlURIFromPath in
+ uri.c for a better solution. """
+ ret = libxml2mod.xmlNormalizeWindowsPath(path)
+ return ret
+
+def parserGetDirectory(filename):
+ """lookup the directory for that file """
+ ret = libxml2mod.xmlParserGetDirectory(filename)
+ return ret
+
+def registerDefaultInputCallbacks():
+ """Registers the default compiled-in I/O handlers. """
+ libxml2mod.xmlRegisterDefaultInputCallbacks()
+
+def registerDefaultOutputCallbacks():
+ """Registers the default compiled-in I/O handlers. """
+ libxml2mod.xmlRegisterDefaultOutputCallbacks()
+
+def registerHTTPPostCallbacks():
+ """By default, libxml submits HTTP output requests using the
+ "PUT" method. Calling this method changes the HTTP output
+ method to use the "POST" method instead. """
+ libxml2mod.xmlRegisterHTTPPostCallbacks()
+
+#
+# Functions from module xmlerror
+#
+
+def lastError():
+ """Get the last global error registered. This is per thread if
+ compiled with thread support. """
+ ret = libxml2mod.xmlGetLastError()
+ if ret is None:raise treeError('xmlGetLastError() failed')
+ return Error(_obj=ret)
+
+def resetLastError():
+ """Cleanup the last global error registered. For parsing error
+ this does not change the well-formedness result. """
+ libxml2mod.xmlResetLastError()
+
+#
+# Functions from module xmlreader
+#
+
+def newTextReaderFilename(URI):
+ """Create an xmlTextReader structure fed with the resource at
+ @URI """
+ ret = libxml2mod.xmlNewTextReaderFilename(URI)
+ if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForDoc(cur, URL, encoding, options):
+ """Create an xmltextReader for an XML in-memory document. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForDoc() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForFd(fd, URL, encoding, options):
+ """Create an xmltextReader for an XML from a file descriptor.
+ The parsing flags @options are a combination of
+ xmlParserOption. NOTE that the file descriptor will not be
+ closed when the reader is closed or reset. """
+ ret = libxml2mod.xmlReaderForFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForFd() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForFile(filename, encoding, options)
+ if ret is None:raise treeError('xmlReaderForFile() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForMemory(buffer, size, URL, encoding, options):
+ """Create an xmltextReader for an XML in-memory document. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForMemory() failed')
+ return xmlTextReader(_obj=ret)
+
+#
+# Functions from module xmlregexp
+#
+
+def regexpCompile(regexp):
+ """Parses a regular expression conforming to XML Schemas Part
+ 2 Datatype Appendix F and builds an automata suitable for
+ testing strings against that regular expression """
+ ret = libxml2mod.xmlRegexpCompile(regexp)
+ if ret is None:raise treeError('xmlRegexpCompile() failed')
+ return xmlReg(_obj=ret)
+
+#
+# Functions from module xmlschemas
+#
+
+def schemaNewMemParserCtxt(buffer, size):
+ """Create an XML Schemas parse context for that memory buffer
+ expected to contain an XML Schemas file. """
+ ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
+ return SchemaParserCtxt(_obj=ret)
+
+def schemaNewParserCtxt(URL):
+ """Create an XML Schemas parse context for that file/resource
+ expected to contain an XML Schemas file. """
+ ret = libxml2mod.xmlSchemaNewParserCtxt(URL)
+ if ret is None:raise parserError('xmlSchemaNewParserCtxt() failed')
+ return SchemaParserCtxt(_obj=ret)
+
+#
+# Functions from module xmlschemastypes
+#
+
+def schemaCleanupTypes():
+ """Cleanup the default XML Schemas type library """
+ libxml2mod.xmlSchemaCleanupTypes()
+
+def schemaCollapseString(value):
+ """Removes and normalize white spaces in the string """
+ ret = libxml2mod.xmlSchemaCollapseString(value)
+ return ret
+
+def schemaInitTypes():
+ """Initialize the default XML Schemas type library """
+ libxml2mod.xmlSchemaInitTypes()
+
+def schemaWhiteSpaceReplace(value):
+ """Replaces 0xd, 0x9 and 0xa with a space. """
+ ret = libxml2mod.xmlSchemaWhiteSpaceReplace(value)
+ return ret
+
+#
+# Functions from module xmlstring
+#
+
+def UTF8Charcmp(utf1, utf2):
+ """compares the two UCS4 values """
+ ret = libxml2mod.xmlUTF8Charcmp(utf1, utf2)
+ return ret
+
+def UTF8Size(utf):
+ """calculates the internal size of a UTF8 character """
+ ret = libxml2mod.xmlUTF8Size(utf)
+ return ret
+
+def UTF8Strlen(utf):
+ """compute the length of an UTF8 string, it doesn't do a full
+ UTF8 checking of the content of the string. """
+ ret = libxml2mod.xmlUTF8Strlen(utf)
+ return ret
+
+def UTF8Strloc(utf, utfchar):
+ """a function to provide the relative location of a UTF8 char """
+ ret = libxml2mod.xmlUTF8Strloc(utf, utfchar)
+ return ret
+
+def UTF8Strndup(utf, len):
+ """a strndup for array of UTF8's """
+ ret = libxml2mod.xmlUTF8Strndup(utf, len)
+ return ret
+
+def UTF8Strpos(utf, pos):
+ """a function to provide the equivalent of fetching a
+ character from a string array """
+ ret = libxml2mod.xmlUTF8Strpos(utf, pos)
+ return ret
+
+def UTF8Strsize(utf, len):
+ """storage size of an UTF8 string the behaviour is not
+ guaranteed if the input string is not UTF-8 """
+ ret = libxml2mod.xmlUTF8Strsize(utf, len)
+ return ret
+
+def UTF8Strsub(utf, start, len):
+ """Create a substring from a given UTF-8 string Note:
+ positions are given in units of UTF-8 chars """
+ ret = libxml2mod.xmlUTF8Strsub(utf, start, len)
+ return ret
+
+def checkUTF8(utf):
+ """Checks @utf for being valid UTF-8. @utf is assumed to be
+ null-terminated. This function is not super-strict, as it
+ will allow longer UTF-8 sequences than necessary. Note that
+ Java is capable of producing these sequences if provoked.
+ Also note, this routine checks for the 4-byte maximum size,
+ but does not check for 0x10ffff maximum value. """
+ ret = libxml2mod.xmlCheckUTF8(utf)
+ return ret
+
+#
+# Functions from module xmlunicode
+#
+
+def uCSIsAegeanNumbers(code):
+ """Check whether the character is part of AegeanNumbers UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsAegeanNumbers(code)
+ return ret
+
+def uCSIsAlphabeticPresentationForms(code):
+ """Check whether the character is part of
+ AlphabeticPresentationForms UCS Block """
+ ret = libxml2mod.xmlUCSIsAlphabeticPresentationForms(code)
+ return ret
+
+def uCSIsArabic(code):
+ """Check whether the character is part of Arabic UCS Block """
+ ret = libxml2mod.xmlUCSIsArabic(code)
+ return ret
+
+def uCSIsArabicPresentationFormsA(code):
+ """Check whether the character is part of
+ ArabicPresentationForms-A UCS Block """
+ ret = libxml2mod.xmlUCSIsArabicPresentationFormsA(code)
+ return ret
+
+def uCSIsArabicPresentationFormsB(code):
+ """Check whether the character is part of
+ ArabicPresentationForms-B UCS Block """
+ ret = libxml2mod.xmlUCSIsArabicPresentationFormsB(code)
+ return ret
+
+def uCSIsArmenian(code):
+ """Check whether the character is part of Armenian UCS Block """
+ ret = libxml2mod.xmlUCSIsArmenian(code)
+ return ret
+
+def uCSIsArrows(code):
+ """Check whether the character is part of Arrows UCS Block """
+ ret = libxml2mod.xmlUCSIsArrows(code)
+ return ret
+
+def uCSIsBasicLatin(code):
+ """Check whether the character is part of BasicLatin UCS Block """
+ ret = libxml2mod.xmlUCSIsBasicLatin(code)
+ return ret
+
+def uCSIsBengali(code):
+ """Check whether the character is part of Bengali UCS Block """
+ ret = libxml2mod.xmlUCSIsBengali(code)
+ return ret
+
+def uCSIsBlock(code, block):
+ """Check whether the character is part of the UCS Block """
+ ret = libxml2mod.xmlUCSIsBlock(code, block)
+ return ret
+
+def uCSIsBlockElements(code):
+ """Check whether the character is part of BlockElements UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBlockElements(code)
+ return ret
+
+def uCSIsBopomofo(code):
+ """Check whether the character is part of Bopomofo UCS Block """
+ ret = libxml2mod.xmlUCSIsBopomofo(code)
+ return ret
+
+def uCSIsBopomofoExtended(code):
+ """Check whether the character is part of BopomofoExtended UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBopomofoExtended(code)
+ return ret
+
+def uCSIsBoxDrawing(code):
+ """Check whether the character is part of BoxDrawing UCS Block """
+ ret = libxml2mod.xmlUCSIsBoxDrawing(code)
+ return ret
+
+def uCSIsBraillePatterns(code):
+ """Check whether the character is part of BraillePatterns UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBraillePatterns(code)
+ return ret
+
+def uCSIsBuhid(code):
+ """Check whether the character is part of Buhid UCS Block """
+ ret = libxml2mod.xmlUCSIsBuhid(code)
+ return ret
+
+def uCSIsByzantineMusicalSymbols(code):
+ """Check whether the character is part of
+ ByzantineMusicalSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsByzantineMusicalSymbols(code)
+ return ret
+
+def uCSIsCJKCompatibility(code):
+ """Check whether the character is part of CJKCompatibility UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibility(code)
+ return ret
+
+def uCSIsCJKCompatibilityForms(code):
+ """Check whether the character is part of
+ CJKCompatibilityForms UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityForms(code)
+ return ret
+
+def uCSIsCJKCompatibilityIdeographs(code):
+ """Check whether the character is part of
+ CJKCompatibilityIdeographs UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographs(code)
+ return ret
+
+def uCSIsCJKCompatibilityIdeographsSupplement(code):
+ """Check whether the character is part of
+ CJKCompatibilityIdeographsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographsSupplement(code)
+ return ret
+
+def uCSIsCJKRadicalsSupplement(code):
+ """Check whether the character is part of
+ CJKRadicalsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKRadicalsSupplement(code)
+ return ret
+
+def uCSIsCJKSymbolsandPunctuation(code):
+ """Check whether the character is part of
+ CJKSymbolsandPunctuation UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKSymbolsandPunctuation(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographs(code):
+ """Check whether the character is part of CJKUnifiedIdeographs
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographs(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographsExtensionA(code):
+ """Check whether the character is part of
+ CJKUnifiedIdeographsExtensionA UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionA(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographsExtensionB(code):
+ """Check whether the character is part of
+ CJKUnifiedIdeographsExtensionB UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionB(code)
+ return ret
+
+def uCSIsCat(code, cat):
+ """Check whether the character is part of the UCS Category """
+ ret = libxml2mod.xmlUCSIsCat(code, cat)
+ return ret
+
+def uCSIsCatC(code):
+ """Check whether the character is part of C UCS Category """
+ ret = libxml2mod.xmlUCSIsCatC(code)
+ return ret
+
+def uCSIsCatCc(code):
+ """Check whether the character is part of Cc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCc(code)
+ return ret
+
+def uCSIsCatCf(code):
+ """Check whether the character is part of Cf UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCf(code)
+ return ret
+
+def uCSIsCatCo(code):
+ """Check whether the character is part of Co UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCo(code)
+ return ret
+
+def uCSIsCatCs(code):
+ """Check whether the character is part of Cs UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCs(code)
+ return ret
+
+def uCSIsCatL(code):
+ """Check whether the character is part of L UCS Category """
+ ret = libxml2mod.xmlUCSIsCatL(code)
+ return ret
+
+def uCSIsCatLl(code):
+ """Check whether the character is part of Ll UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLl(code)
+ return ret
+
+def uCSIsCatLm(code):
+ """Check whether the character is part of Lm UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLm(code)
+ return ret
+
+def uCSIsCatLo(code):
+ """Check whether the character is part of Lo UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLo(code)
+ return ret
+
+def uCSIsCatLt(code):
+ """Check whether the character is part of Lt UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLt(code)
+ return ret
+
+def uCSIsCatLu(code):
+ """Check whether the character is part of Lu UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLu(code)
+ return ret
+
+def uCSIsCatM(code):
+ """Check whether the character is part of M UCS Category """
+ ret = libxml2mod.xmlUCSIsCatM(code)
+ return ret
+
+def uCSIsCatMc(code):
+ """Check whether the character is part of Mc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMc(code)
+ return ret
+
+def uCSIsCatMe(code):
+ """Check whether the character is part of Me UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMe(code)
+ return ret
+
+def uCSIsCatMn(code):
+ """Check whether the character is part of Mn UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMn(code)
+ return ret
+
+def uCSIsCatN(code):
+ """Check whether the character is part of N UCS Category """
+ ret = libxml2mod.xmlUCSIsCatN(code)
+ return ret
+
+def uCSIsCatNd(code):
+ """Check whether the character is part of Nd UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNd(code)
+ return ret
+
+def uCSIsCatNl(code):
+ """Check whether the character is part of Nl UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNl(code)
+ return ret
+
+def uCSIsCatNo(code):
+ """Check whether the character is part of No UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNo(code)
+ return ret
+
+def uCSIsCatP(code):
+ """Check whether the character is part of P UCS Category """
+ ret = libxml2mod.xmlUCSIsCatP(code)
+ return ret
+
+def uCSIsCatPc(code):
+ """Check whether the character is part of Pc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPc(code)
+ return ret
+
+def uCSIsCatPd(code):
+ """Check whether the character is part of Pd UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPd(code)
+ return ret
+
+def uCSIsCatPe(code):
+ """Check whether the character is part of Pe UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPe(code)
+ return ret
+
+def uCSIsCatPf(code):
+ """Check whether the character is part of Pf UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPf(code)
+ return ret
+
+def uCSIsCatPi(code):
+ """Check whether the character is part of Pi UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPi(code)
+ return ret
+
+def uCSIsCatPo(code):
+ """Check whether the character is part of Po UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPo(code)
+ return ret
+
+def uCSIsCatPs(code):
+ """Check whether the character is part of Ps UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPs(code)
+ return ret
+
+def uCSIsCatS(code):
+ """Check whether the character is part of S UCS Category """
+ ret = libxml2mod.xmlUCSIsCatS(code)
+ return ret
+
+def uCSIsCatSc(code):
+ """Check whether the character is part of Sc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSc(code)
+ return ret
+
+def uCSIsCatSk(code):
+ """Check whether the character is part of Sk UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSk(code)
+ return ret
+
+def uCSIsCatSm(code):
+ """Check whether the character is part of Sm UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSm(code)
+ return ret
+
+def uCSIsCatSo(code):
+ """Check whether the character is part of So UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSo(code)
+ return ret
+
+def uCSIsCatZ(code):
+ """Check whether the character is part of Z UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZ(code)
+ return ret
+
+def uCSIsCatZl(code):
+ """Check whether the character is part of Zl UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZl(code)
+ return ret
+
+def uCSIsCatZp(code):
+ """Check whether the character is part of Zp UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZp(code)
+ return ret
+
+def uCSIsCatZs(code):
+ """Check whether the character is part of Zs UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZs(code)
+ return ret
+
+def uCSIsCherokee(code):
+ """Check whether the character is part of Cherokee UCS Block """
+ ret = libxml2mod.xmlUCSIsCherokee(code)
+ return ret
+
+def uCSIsCombiningDiacriticalMarks(code):
+ """Check whether the character is part of
+ CombiningDiacriticalMarks UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarks(code)
+ return ret
+
+def uCSIsCombiningDiacriticalMarksforSymbols(code):
+ """Check whether the character is part of
+ CombiningDiacriticalMarksforSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarksforSymbols(code)
+ return ret
+
+def uCSIsCombiningHalfMarks(code):
+ """Check whether the character is part of CombiningHalfMarks
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningHalfMarks(code)
+ return ret
+
+def uCSIsCombiningMarksforSymbols(code):
+ """Check whether the character is part of
+ CombiningMarksforSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningMarksforSymbols(code)
+ return ret
+
+def uCSIsControlPictures(code):
+ """Check whether the character is part of ControlPictures UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsControlPictures(code)
+ return ret
+
+def uCSIsCurrencySymbols(code):
+ """Check whether the character is part of CurrencySymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCurrencySymbols(code)
+ return ret
+
+def uCSIsCypriotSyllabary(code):
+ """Check whether the character is part of CypriotSyllabary UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCypriotSyllabary(code)
+ return ret
+
+def uCSIsCyrillic(code):
+ """Check whether the character is part of Cyrillic UCS Block """
+ ret = libxml2mod.xmlUCSIsCyrillic(code)
+ return ret
+
+def uCSIsCyrillicSupplement(code):
+ """Check whether the character is part of CyrillicSupplement
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCyrillicSupplement(code)
+ return ret
+
+def uCSIsDeseret(code):
+ """Check whether the character is part of Deseret UCS Block """
+ ret = libxml2mod.xmlUCSIsDeseret(code)
+ return ret
+
+def uCSIsDevanagari(code):
+ """Check whether the character is part of Devanagari UCS Block """
+ ret = libxml2mod.xmlUCSIsDevanagari(code)
+ return ret
+
+def uCSIsDingbats(code):
+ """Check whether the character is part of Dingbats UCS Block """
+ ret = libxml2mod.xmlUCSIsDingbats(code)
+ return ret
+
+def uCSIsEnclosedAlphanumerics(code):
+ """Check whether the character is part of
+ EnclosedAlphanumerics UCS Block """
+ ret = libxml2mod.xmlUCSIsEnclosedAlphanumerics(code)
+ return ret
+
+def uCSIsEnclosedCJKLettersandMonths(code):
+ """Check whether the character is part of
+ EnclosedCJKLettersandMonths UCS Block """
+ ret = libxml2mod.xmlUCSIsEnclosedCJKLettersandMonths(code)
+ return ret
+
+def uCSIsEthiopic(code):
+ """Check whether the character is part of Ethiopic UCS Block """
+ ret = libxml2mod.xmlUCSIsEthiopic(code)
+ return ret
+
+def uCSIsGeneralPunctuation(code):
+ """Check whether the character is part of GeneralPunctuation
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsGeneralPunctuation(code)
+ return ret
+
+def uCSIsGeometricShapes(code):
+ """Check whether the character is part of GeometricShapes UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGeometricShapes(code)
+ return ret
+
+def uCSIsGeorgian(code):
+ """Check whether the character is part of Georgian UCS Block """
+ ret = libxml2mod.xmlUCSIsGeorgian(code)
+ return ret
+
+def uCSIsGothic(code):
+ """Check whether the character is part of Gothic UCS Block """
+ ret = libxml2mod.xmlUCSIsGothic(code)
+ return ret
+
+def uCSIsGreek(code):
+ """Check whether the character is part of Greek UCS Block """
+ ret = libxml2mod.xmlUCSIsGreek(code)
+ return ret
+
+def uCSIsGreekExtended(code):
+ """Check whether the character is part of GreekExtended UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGreekExtended(code)
+ return ret
+
+def uCSIsGreekandCoptic(code):
+ """Check whether the character is part of GreekandCoptic UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGreekandCoptic(code)
+ return ret
+
+def uCSIsGujarati(code):
+ """Check whether the character is part of Gujarati UCS Block """
+ ret = libxml2mod.xmlUCSIsGujarati(code)
+ return ret
+
+def uCSIsGurmukhi(code):
+ """Check whether the character is part of Gurmukhi UCS Block """
+ ret = libxml2mod.xmlUCSIsGurmukhi(code)
+ return ret
+
+def uCSIsHalfwidthandFullwidthForms(code):
+ """Check whether the character is part of
+ HalfwidthandFullwidthForms UCS Block """
+ ret = libxml2mod.xmlUCSIsHalfwidthandFullwidthForms(code)
+ return ret
+
+def uCSIsHangulCompatibilityJamo(code):
+ """Check whether the character is part of
+ HangulCompatibilityJamo UCS Block """
+ ret = libxml2mod.xmlUCSIsHangulCompatibilityJamo(code)
+ return ret
+
+def uCSIsHangulJamo(code):
+ """Check whether the character is part of HangulJamo UCS Block """
+ ret = libxml2mod.xmlUCSIsHangulJamo(code)
+ return ret
+
+def uCSIsHangulSyllables(code):
+ """Check whether the character is part of HangulSyllables UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsHangulSyllables(code)
+ return ret
+
+def uCSIsHanunoo(code):
+ """Check whether the character is part of Hanunoo UCS Block """
+ ret = libxml2mod.xmlUCSIsHanunoo(code)
+ return ret
+
+def uCSIsHebrew(code):
+ """Check whether the character is part of Hebrew UCS Block """
+ ret = libxml2mod.xmlUCSIsHebrew(code)
+ return ret
+
+def uCSIsHighPrivateUseSurrogates(code):
+ """Check whether the character is part of
+ HighPrivateUseSurrogates UCS Block """
+ ret = libxml2mod.xmlUCSIsHighPrivateUseSurrogates(code)
+ return ret
+
+def uCSIsHighSurrogates(code):
+ """Check whether the character is part of HighSurrogates UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsHighSurrogates(code)
+ return ret
+
+def uCSIsHiragana(code):
+ """Check whether the character is part of Hiragana UCS Block """
+ ret = libxml2mod.xmlUCSIsHiragana(code)
+ return ret
+
+def uCSIsIPAExtensions(code):
+ """Check whether the character is part of IPAExtensions UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsIPAExtensions(code)
+ return ret
+
+def uCSIsIdeographicDescriptionCharacters(code):
+ """Check whether the character is part of
+ IdeographicDescriptionCharacters UCS Block """
+ ret = libxml2mod.xmlUCSIsIdeographicDescriptionCharacters(code)
+ return ret
+
+def uCSIsKanbun(code):
+ """Check whether the character is part of Kanbun UCS Block """
+ ret = libxml2mod.xmlUCSIsKanbun(code)
+ return ret
+
+def uCSIsKangxiRadicals(code):
+ """Check whether the character is part of KangxiRadicals UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsKangxiRadicals(code)
+ return ret
+
+def uCSIsKannada(code):
+ """Check whether the character is part of Kannada UCS Block """
+ ret = libxml2mod.xmlUCSIsKannada(code)
+ return ret
+
+def uCSIsKatakana(code):
+ """Check whether the character is part of Katakana UCS Block """
+ ret = libxml2mod.xmlUCSIsKatakana(code)
+ return ret
+
+def uCSIsKatakanaPhoneticExtensions(code):
+ """Check whether the character is part of
+ KatakanaPhoneticExtensions UCS Block """
+ ret = libxml2mod.xmlUCSIsKatakanaPhoneticExtensions(code)
+ return ret
+
+def uCSIsKhmer(code):
+ """Check whether the character is part of Khmer UCS Block """
+ ret = libxml2mod.xmlUCSIsKhmer(code)
+ return ret
+
+def uCSIsKhmerSymbols(code):
+ """Check whether the character is part of KhmerSymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsKhmerSymbols(code)
+ return ret
+
+def uCSIsLao(code):
+ """Check whether the character is part of Lao UCS Block """
+ ret = libxml2mod.xmlUCSIsLao(code)
+ return ret
+
+def uCSIsLatin1Supplement(code):
+ """Check whether the character is part of Latin-1Supplement
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsLatin1Supplement(code)
+ return ret
+
+def uCSIsLatinExtendedA(code):
+ """Check whether the character is part of LatinExtended-A UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedA(code)
+ return ret
+
+def uCSIsLatinExtendedAdditional(code):
+ """Check whether the character is part of
+ LatinExtendedAdditional UCS Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedAdditional(code)
+ return ret
+
+def uCSIsLatinExtendedB(code):
+ """Check whether the character is part of LatinExtended-B UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedB(code)
+ return ret
+
+def uCSIsLetterlikeSymbols(code):
+ """Check whether the character is part of LetterlikeSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsLetterlikeSymbols(code)
+ return ret
+
+def uCSIsLimbu(code):
+ """Check whether the character is part of Limbu UCS Block """
+ ret = libxml2mod.xmlUCSIsLimbu(code)
+ return ret
+
+def uCSIsLinearBIdeograms(code):
+ """Check whether the character is part of LinearBIdeograms UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLinearBIdeograms(code)
+ return ret
+
+def uCSIsLinearBSyllabary(code):
+ """Check whether the character is part of LinearBSyllabary UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLinearBSyllabary(code)
+ return ret
+
+def uCSIsLowSurrogates(code):
+ """Check whether the character is part of LowSurrogates UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLowSurrogates(code)
+ return ret
+
+def uCSIsMalayalam(code):
+ """Check whether the character is part of Malayalam UCS Block """
+ ret = libxml2mod.xmlUCSIsMalayalam(code)
+ return ret
+
+def uCSIsMathematicalAlphanumericSymbols(code):
+ """Check whether the character is part of
+ MathematicalAlphanumericSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsMathematicalAlphanumericSymbols(code)
+ return ret
+
+def uCSIsMathematicalOperators(code):
+ """Check whether the character is part of
+ MathematicalOperators UCS Block """
+ ret = libxml2mod.xmlUCSIsMathematicalOperators(code)
+ return ret
+
+def uCSIsMiscellaneousMathematicalSymbolsA(code):
+ """Check whether the character is part of
+ MiscellaneousMathematicalSymbols-A UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsA(code)
+ return ret
+
+def uCSIsMiscellaneousMathematicalSymbolsB(code):
+ """Check whether the character is part of
+ MiscellaneousMathematicalSymbols-B UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsB(code)
+ return ret
+
+def uCSIsMiscellaneousSymbols(code):
+ """Check whether the character is part of MiscellaneousSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousSymbols(code)
+ return ret
+
+def uCSIsMiscellaneousSymbolsandArrows(code):
+ """Check whether the character is part of
+ MiscellaneousSymbolsandArrows UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousSymbolsandArrows(code)
+ return ret
+
+def uCSIsMiscellaneousTechnical(code):
+ """Check whether the character is part of
+ MiscellaneousTechnical UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousTechnical(code)
+ return ret
+
+def uCSIsMongolian(code):
+ """Check whether the character is part of Mongolian UCS Block """
+ ret = libxml2mod.xmlUCSIsMongolian(code)
+ return ret
+
+def uCSIsMusicalSymbols(code):
+ """Check whether the character is part of MusicalSymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsMusicalSymbols(code)
+ return ret
+
+def uCSIsMyanmar(code):
+ """Check whether the character is part of Myanmar UCS Block """
+ ret = libxml2mod.xmlUCSIsMyanmar(code)
+ return ret
+
+def uCSIsNumberForms(code):
+ """Check whether the character is part of NumberForms UCS Block """
+ ret = libxml2mod.xmlUCSIsNumberForms(code)
+ return ret
+
+def uCSIsOgham(code):
+ """Check whether the character is part of Ogham UCS Block """
+ ret = libxml2mod.xmlUCSIsOgham(code)
+ return ret
+
+def uCSIsOldItalic(code):
+ """Check whether the character is part of OldItalic UCS Block """
+ ret = libxml2mod.xmlUCSIsOldItalic(code)
+ return ret
+
+def uCSIsOpticalCharacterRecognition(code):
+ """Check whether the character is part of
+ OpticalCharacterRecognition UCS Block """
+ ret = libxml2mod.xmlUCSIsOpticalCharacterRecognition(code)
+ return ret
+
+def uCSIsOriya(code):
+ """Check whether the character is part of Oriya UCS Block """
+ ret = libxml2mod.xmlUCSIsOriya(code)
+ return ret
+
+def uCSIsOsmanya(code):
+ """Check whether the character is part of Osmanya UCS Block """
+ ret = libxml2mod.xmlUCSIsOsmanya(code)
+ return ret
+
+def uCSIsPhoneticExtensions(code):
+ """Check whether the character is part of PhoneticExtensions
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsPhoneticExtensions(code)
+ return ret
+
+def uCSIsPrivateUse(code):
+ """Check whether the character is part of PrivateUse UCS Block """
+ ret = libxml2mod.xmlUCSIsPrivateUse(code)
+ return ret
+
+def uCSIsPrivateUseArea(code):
+ """Check whether the character is part of PrivateUseArea UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsPrivateUseArea(code)
+ return ret
+
+def uCSIsRunic(code):
+ """Check whether the character is part of Runic UCS Block """
+ ret = libxml2mod.xmlUCSIsRunic(code)
+ return ret
+
+def uCSIsShavian(code):
+ """Check whether the character is part of Shavian UCS Block """
+ ret = libxml2mod.xmlUCSIsShavian(code)
+ return ret
+
+def uCSIsSinhala(code):
+ """Check whether the character is part of Sinhala UCS Block """
+ ret = libxml2mod.xmlUCSIsSinhala(code)
+ return ret
+
+def uCSIsSmallFormVariants(code):
+ """Check whether the character is part of SmallFormVariants
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSmallFormVariants(code)
+ return ret
+
+def uCSIsSpacingModifierLetters(code):
+ """Check whether the character is part of
+ SpacingModifierLetters UCS Block """
+ ret = libxml2mod.xmlUCSIsSpacingModifierLetters(code)
+ return ret
+
+def uCSIsSpecials(code):
+ """Check whether the character is part of Specials UCS Block """
+ ret = libxml2mod.xmlUCSIsSpecials(code)
+ return ret
+
+def uCSIsSuperscriptsandSubscripts(code):
+ """Check whether the character is part of
+ SuperscriptsandSubscripts UCS Block """
+ ret = libxml2mod.xmlUCSIsSuperscriptsandSubscripts(code)
+ return ret
+
+def uCSIsSupplementalArrowsA(code):
+ """Check whether the character is part of SupplementalArrows-A
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalArrowsA(code)
+ return ret
+
+def uCSIsSupplementalArrowsB(code):
+ """Check whether the character is part of SupplementalArrows-B
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalArrowsB(code)
+ return ret
+
+def uCSIsSupplementalMathematicalOperators(code):
+ """Check whether the character is part of
+ SupplementalMathematicalOperators UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalMathematicalOperators(code)
+ return ret
+
+def uCSIsSupplementaryPrivateUseAreaA(code):
+ """Check whether the character is part of
+ SupplementaryPrivateUseArea-A UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaA(code)
+ return ret
+
+def uCSIsSupplementaryPrivateUseAreaB(code):
+ """Check whether the character is part of
+ SupplementaryPrivateUseArea-B UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaB(code)
+ return ret
+
+def uCSIsSyriac(code):
+ """Check whether the character is part of Syriac UCS Block """
+ ret = libxml2mod.xmlUCSIsSyriac(code)
+ return ret
+
+def uCSIsTagalog(code):
+ """Check whether the character is part of Tagalog UCS Block """
+ ret = libxml2mod.xmlUCSIsTagalog(code)
+ return ret
+
+def uCSIsTagbanwa(code):
+ """Check whether the character is part of Tagbanwa UCS Block """
+ ret = libxml2mod.xmlUCSIsTagbanwa(code)
+ return ret
+
+def uCSIsTags(code):
+ """Check whether the character is part of Tags UCS Block """
+ ret = libxml2mod.xmlUCSIsTags(code)
+ return ret
+
+def uCSIsTaiLe(code):
+ """Check whether the character is part of TaiLe UCS Block """
+ ret = libxml2mod.xmlUCSIsTaiLe(code)
+ return ret
+
+def uCSIsTaiXuanJingSymbols(code):
+ """Check whether the character is part of TaiXuanJingSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsTaiXuanJingSymbols(code)
+ return ret
+
+def uCSIsTamil(code):
+ """Check whether the character is part of Tamil UCS Block """
+ ret = libxml2mod.xmlUCSIsTamil(code)
+ return ret
+
+def uCSIsTelugu(code):
+ """Check whether the character is part of Telugu UCS Block """
+ ret = libxml2mod.xmlUCSIsTelugu(code)
+ return ret
+
+def uCSIsThaana(code):
+ """Check whether the character is part of Thaana UCS Block """
+ ret = libxml2mod.xmlUCSIsThaana(code)
+ return ret
+
+def uCSIsThai(code):
+ """Check whether the character is part of Thai UCS Block """
+ ret = libxml2mod.xmlUCSIsThai(code)
+ return ret
+
+def uCSIsTibetan(code):
+ """Check whether the character is part of Tibetan UCS Block """
+ ret = libxml2mod.xmlUCSIsTibetan(code)
+ return ret
+
+def uCSIsUgaritic(code):
+ """Check whether the character is part of Ugaritic UCS Block """
+ ret = libxml2mod.xmlUCSIsUgaritic(code)
+ return ret
+
+def uCSIsUnifiedCanadianAboriginalSyllabics(code):
+ """Check whether the character is part of
+ UnifiedCanadianAboriginalSyllabics UCS Block """
+ ret = libxml2mod.xmlUCSIsUnifiedCanadianAboriginalSyllabics(code)
+ return ret
+
+def uCSIsVariationSelectors(code):
+ """Check whether the character is part of VariationSelectors
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsVariationSelectors(code)
+ return ret
+
+def uCSIsVariationSelectorsSupplement(code):
+ """Check whether the character is part of
+ VariationSelectorsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsVariationSelectorsSupplement(code)
+ return ret
+
+def uCSIsYiRadicals(code):
+ """Check whether the character is part of YiRadicals UCS Block """
+ ret = libxml2mod.xmlUCSIsYiRadicals(code)
+ return ret
+
+def uCSIsYiSyllables(code):
+ """Check whether the character is part of YiSyllables UCS Block """
+ ret = libxml2mod.xmlUCSIsYiSyllables(code)
+ return ret
+
+def uCSIsYijingHexagramSymbols(code):
+ """Check whether the character is part of
+ YijingHexagramSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsYijingHexagramSymbols(code)
+ return ret
+
+#
+# Functions from module xmlversion
+#
+
+def checkVersion(version):
+ """check the compiled lib version against the include one.
+ This can warn or immediately kill the application """
+ libxml2mod.xmlCheckVersion(version)
+
+#
+# Functions from module xpathInternals
+#
+
+def valuePop(ctxt):
+ """Pops the top XPath object from the value stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.valuePop(ctxt__o)
+ return ret
+
+class xmlNode(xmlCore):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlNode got a wrong wrapper object type')
+ self._o = _obj
+ xmlCore.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlNode (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ # accessors for xmlNode
+ def ns(self):
+ """Get the namespace of a node """
+ ret = libxml2mod.xmlNodeGetNs(self._o)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def nsDefs(self):
+ """Get the namespace of a node """
+ ret = libxml2mod.xmlNodeGetNsDefs(self._o)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ #
+ # xmlNode functions from module debugXML
+ #
+
+ def debugDumpNode(self, output, depth):
+ """Dumps debug information for the element node, it is
+ recursive """
+ libxml2mod.xmlDebugDumpNode(output, self._o, depth)
+
+ def debugDumpNodeList(self, output, depth):
+ """Dumps debug information for the list of element node, it is
+ recursive """
+ libxml2mod.xmlDebugDumpNodeList(output, self._o, depth)
+
+ def debugDumpOneNode(self, output, depth):
+ """Dumps debug information for the element node, it is not
+ recursive """
+ libxml2mod.xmlDebugDumpOneNode(output, self._o, depth)
+
+ def lsCountNode(self):
+ """Count the children of @node. """
+ ret = libxml2mod.xmlLsCountNode(self._o)
+ return ret
+
+ def lsOneNode(self, output):
+ """Dump to @output the type and name of @node. """
+ libxml2mod.xmlLsOneNode(output, self._o)
+
+ def shellPrintNode(self):
+ """Print node to the output FILE """
+ libxml2mod.xmlShellPrintNode(self._o)
+
+ #
+ # xmlNode functions from module tree
+ #
+
+ def addChild(self, cur):
+ """Add a new node to @parent, at the end of the child (or
+ property) list merging adjacent TEXT nodes (in which case
+ @cur is freed) If the new node is ATTRIBUTE, it is added
+ into properties instead of children. If there is an
+ attribute with equal name, it is first destroyed. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlAddChild(self._o, cur__o)
+ if ret is None:raise treeError('xmlAddChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addChildList(self, cur):
+ """Add a list of node at the end of the child list of the
+ parent merging adjacent TEXT nodes (@cur may be freed) """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlAddChildList(self._o, cur__o)
+ if ret is None:raise treeError('xmlAddChildList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addContent(self, content):
+ """Append the extra substring to the node content. NOTE: In
+ contrast to xmlNodeSetContent(), @content is supposed to be
+ raw text, so unescaped XML special chars are allowed,
+ entity references are not supported. """
+ libxml2mod.xmlNodeAddContent(self._o, content)
+
+ def addContentLen(self, content, len):
+ """Append the extra substring to the node content. NOTE: In
+ contrast to xmlNodeSetContentLen(), @content is supposed to
+ be raw text, so unescaped XML special chars are allowed,
+ entity references are not supported. """
+ libxml2mod.xmlNodeAddContentLen(self._o, content, len)
+
+ def addNextSibling(self, elem):
+ """Add a new node @elem as the next sibling of @cur If the new
+ node was already inserted in a document it is first
+ unlinked from its existing context. As a result of text
+ merging @elem may be freed. If the new node is ATTRIBUTE,
+ it is added into properties instead of children. If there
+ is an attribute with equal name, it is first destroyed. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddNextSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddNextSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addPrevSibling(self, elem):
+ """Add a new node @elem as the previous sibling of @cur
+ merging adjacent TEXT nodes (@elem may be freed) If the new
+ node was already inserted in a document it is first
+ unlinked from its existing context. If the new node is
+ ATTRIBUTE, it is added into properties instead of children.
+ If there is an attribute with equal name, it is first
+ destroyed. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddPrevSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddPrevSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addSibling(self, elem):
+ """Add a new element @elem to the list of siblings of @cur
+ merging adjacent TEXT nodes (@elem may be freed) If the new
+ element was already inserted in a document it is first
+ unlinked from its existing context. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNode(self, extended):
+ """Do a copy of the node. """
+ ret = libxml2mod.xmlCopyNode(self._o, extended)
+ if ret is None:raise treeError('xmlCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNodeList(self):
+ """Do a recursive copy of the node list. Use
+ xmlDocCopyNodeList() if possible to ensure string interning. """
+ ret = libxml2mod.xmlCopyNodeList(self._o)
+ if ret is None:raise treeError('xmlCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyProp(self, cur):
+ """Do a copy of the attribute. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlCopyProp(self._o, cur__o)
+ if ret is None:raise treeError('xmlCopyProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def copyPropList(self, cur):
+ """Do a copy of an attribute list. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlCopyPropList(self._o, cur__o)
+ if ret is None:raise treeError('xmlCopyPropList() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def docCopyNode(self, doc, extended):
+ """Do a copy of the node to a given document. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocCopyNode(self._o, doc__o, extended)
+ if ret is None:raise treeError('xmlDocCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def docCopyNodeList(self, doc):
+ """Do a recursive copy of the node list. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocCopyNodeList(doc__o, self._o)
+ if ret is None:raise treeError('xmlDocCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def docSetRootElement(self, doc):
+ """Set the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocSetRootElement(doc__o, self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def firstElementChild(self):
+ """Finds the first child node of that element which is a
+ Element node Note the handling of entities references is
+ different than in the W3C DOM element traversal spec since
+ we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlFirstElementChild(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def freeNode(self):
+ """Free a node, this is a recursive behaviour, all the
+ children are freed too. This doesn't unlink the child from
+ the list, use xmlUnlinkNode() first. """
+ libxml2mod.xmlFreeNode(self._o)
+
+ def freeNodeList(self):
+ """Free a node and all its siblings, this is a recursive
+ behaviour, all the children are freed too. """
+ libxml2mod.xmlFreeNodeList(self._o)
+
+ def getBase(self, doc):
+ """Searches for the BASE URL. The code should work on both XML
+ and HTML document even if base mechanisms are completely
+ different. It returns the base as defined in RFC 2396
+ sections 5.1.1. Base URI within Document Content and 5.1.2.
+ Base URI from the Encapsulating Entity However it does not
+ return the document base (5.1.3), use doc->URL in this case """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeGetBase(doc__o, self._o)
+ return ret
+
+ def getContent(self):
+ """Read the value of a node, this can be either the text
+ carried directly by this node if it's a TEXT node or the
+ aggregate string of the values carried by this node child's
+ (TEXT and ENTITY_REF). Entity references are substituted. """
+ ret = libxml2mod.xmlNodeGetContent(self._o)
+ return ret
+
+ def getLang(self):
+ """Searches the language of a node, i.e. the values of the
+ xml:lang attribute or the one carried by the nearest
+ ancestor. """
+ ret = libxml2mod.xmlNodeGetLang(self._o)
+ return ret
+
+ def getSpacePreserve(self):
+ """Searches the space preserving behaviour of a node, i.e. the
+ values of the xml:space attribute or the one carried by the
+ nearest ancestor. """
+ ret = libxml2mod.xmlNodeGetSpacePreserve(self._o)
+ return ret
+
+ def hasNsProp(self, name, nameSpace):
+ """Search for an attribute associated to a node This attribute
+ has to be anchored in the namespace specified. This does
+ the entity substitution. This function looks in DTD
+ attribute declaration for #FIXED or default declaration
+ values unless DTD use has been turned off. Note that a
+ namespace of None indicates to use the default namespace. """
+ ret = libxml2mod.xmlHasNsProp(self._o, name, nameSpace)
+ if ret is None:return None
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def hasProp(self, name):
+ """Search an attribute associated to a node This function also
+ looks in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. """
+ ret = libxml2mod.xmlHasProp(self._o, name)
+ if ret is None:return None
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def isBlankNode(self):
+ """Checks whether this node is an empty or whitespace only
+ (and possibly ignorable) text-node. """
+ ret = libxml2mod.xmlIsBlankNode(self._o)
+ return ret
+
+ def isText(self):
+ """Is this node a Text node ? """
+ ret = libxml2mod.xmlNodeIsText(self._o)
+ return ret
+
+ def lastChild(self):
+ """Search the last child of a node. """
+ ret = libxml2mod.xmlGetLastChild(self._o)
+ if ret is None:raise treeError('xmlGetLastChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def lastElementChild(self):
+ """Finds the last child node of that element which is a
+ Element node Note the handling of entities references is
+ different than in the W3C DOM element traversal spec since
+ we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlLastElementChild(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def lineNo(self):
+ """Get line number of @node. Try to override the limitation of
+ lines being store in 16 bits ints if XML_PARSE_BIG_LINES
+ parser option was used """
+ ret = libxml2mod.xmlGetLineNo(self._o)
+ return ret
+
+ def listGetRawString(self, doc, inLine):
+ """Builds the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs, contrary to
+ xmlNodeListGetString() this function doesn't do any
+ character encoding handling. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeListGetRawString(doc__o, self._o, inLine)
+ return ret
+
+ def listGetString(self, doc, inLine):
+ """Build the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeListGetString(doc__o, self._o, inLine)
+ return ret
+
+ def newChild(self, ns, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child list containing the TEXTs and ENTITY_REFs node will
+ be created. NOTE: @content is supposed to be a piece of XML
+ CDATA, so it allows entity references. XML special chars
+ must be escaped first by using
+ xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
+ be used. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewChild(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNs(self, href, prefix):
+ """Creation of a new Namespace. This function will refuse to
+ create a namespace with a similar prefix than an existing
+ one present on this node. Note that for a default
+ namespace, @prefix should be None. We use href==None in
+ the case of an element creation where the namespace was not
+ defined. """
+ ret = libxml2mod.xmlNewNs(self._o, href, prefix)
+ if ret is None:raise treeError('xmlNewNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def newNsProp(self, ns, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewNsProp(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlNewNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newNsPropEatName(self, ns, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewNsPropEatName(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlNewNsPropEatName() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newProp(self, name, value):
+ """Create a new property carried by a node. """
+ ret = libxml2mod.xmlNewProp(self._o, name, value)
+ if ret is None:raise treeError('xmlNewProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newTextChild(self, ns, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child TEXT node will be created containing the string
+ @content. NOTE: Use xmlNewChild() if @content will contain
+ entities that need to be preserved. Use this function,
+ xmlNewTextChild(), if you need to ensure that reserved XML
+ chars that might appear in @content, such as the ampersand,
+ greater-than or less-than signs, are automatically replaced
+ by their XML escaped entity representations. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewTextChild(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewTextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def nextElementSibling(self):
+ """Finds the first closest next sibling of the node which is
+ an element node. Note the handling of entities references
+ is different than in the W3C DOM element traversal spec
+ since we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlNextElementSibling(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def noNsProp(self, name):
+ """Search and get the value of an attribute associated to a
+ node This does the entity substitution. This function looks
+ in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. This
+ function is similar to xmlGetProp except it will accept
+ only an attribute in no namespace. """
+ ret = libxml2mod.xmlGetNoNsProp(self._o, name)
+ return ret
+
+ def nodePath(self):
+ """Build a structure based Path for the given node """
+ ret = libxml2mod.xmlGetNodePath(self._o)
+ return ret
+
+ def nsProp(self, name, nameSpace):
+ """Search and get the value of an attribute associated to a
+ node This attribute has to be anchored in the namespace
+ specified. This does the entity substitution. This function
+ looks in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. """
+ ret = libxml2mod.xmlGetNsProp(self._o, name, nameSpace)
+ return ret
+
+ def previousElementSibling(self):
+ """Finds the first closest previous sibling of the node which
+ is an element node. Note the handling of entities
+ references is different than in the W3C DOM element
+ traversal spec since we don't have back reference from
+ entities content to entities references. """
+ ret = libxml2mod.xmlPreviousElementSibling(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def prop(self, name):
+ """Search and get the value of an attribute associated to a
+ node This does the entity substitution. This function looks
+ in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off.
+ NOTE: this function acts independently of namespaces
+ associated to the attribute. Use xmlGetNsProp() or
+ xmlGetNoNsProp() for namespace aware processing. """
+ ret = libxml2mod.xmlGetProp(self._o, name)
+ return ret
+
+ def reconciliateNs(self, doc):
+ """This function checks that all the namespaces declared
+ within the given tree are properly declared. This is needed
+ for example after Copy or Cut and then paste operations.
+ The subtree may still hold pointers to namespace
+ declarations outside the subtree or invalid/masked. As much
+ as possible the function try to reuse the existing
+ namespaces found in the new environment. If not possible
+ the new namespaces are redeclared on @tree at the top of
+ the given subtree. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlReconciliateNs(doc__o, self._o)
+ return ret
+
+ def replaceNode(self, cur):
+ """Unlink the old node from its current context, prune the new
+ one at the same place. If @cur was already inserted in a
+ document it is first unlinked from its existing context. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlReplaceNode(self._o, cur__o)
+ if ret is None:raise treeError('xmlReplaceNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def searchNs(self, doc, nameSpace):
+ """Search a Ns registered under a given name space for a
+ document. recurse on the parents until it finds the defined
+ namespace or return None otherwise. @nameSpace can be None,
+ this is a search for the default namespace. We don't allow
+ to cross entities boundaries. If you don't declare the
+ namespace within those you will be in troubles !!! A
+ warning is generated to cover this case. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSearchNs(doc__o, self._o, nameSpace)
+ if ret is None:raise treeError('xmlSearchNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def searchNsByHref(self, doc, href):
+ """Search a Ns aliasing a given URI. Recurse on the parents
+ until it finds the defined namespace or return None
+ otherwise. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSearchNsByHref(doc__o, self._o, href)
+ if ret is None:raise treeError('xmlSearchNsByHref() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def setBase(self, uri):
+ """Set (or reset) the base URI of a node, i.e. the value of
+ the xml:base attribute. """
+ libxml2mod.xmlNodeSetBase(self._o, uri)
+
+ def setContent(self, content):
+ """Replace the content of a node. NOTE: @content is supposed
+ to be a piece of XML CDATA, so it allows entity references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
+ libxml2mod.xmlNodeSetContent(self._o, content)
+
+ def setContentLen(self, content, len):
+ """Replace the content of a node. NOTE: @content is supposed
+ to be a piece of XML CDATA, so it allows entity references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
+ libxml2mod.xmlNodeSetContentLen(self._o, content, len)
+
+ def setLang(self, lang):
+ """Set the language of a node, i.e. the values of the xml:lang
+ attribute. """
+ libxml2mod.xmlNodeSetLang(self._o, lang)
+
+ def setListDoc(self, doc):
+ """update all nodes in the list to point to the right document """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlSetListDoc(self._o, doc__o)
+
+ def setName(self, name):
+ """Set (or reset) the name of a node. """
+ libxml2mod.xmlNodeSetName(self._o, name)
+
+ def setNs(self, ns):
+ """Associate a namespace to a node, a posteriori. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ libxml2mod.xmlSetNs(self._o, ns__o)
+
+ def setNsProp(self, ns, name, value):
+ """Set (or reset) an attribute carried by a node. The ns
+ structure must be in scope, this is not checked """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlSetNsProp(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlSetNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def setProp(self, name, value):
+ """Set (or reset) an attribute carried by a node. If @name has
+ a prefix, then the corresponding namespace-binding will be
+ used, if in scope; it is an error it there's no such
+ ns-binding for the prefix in scope. """
+ ret = libxml2mod.xmlSetProp(self._o, name, value)
+ if ret is None:raise treeError('xmlSetProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def setSpacePreserve(self, val):
+ """Set (or reset) the space preserving behaviour of a node,
+ i.e. the value of the xml:space attribute. """
+ libxml2mod.xmlNodeSetSpacePreserve(self._o, val)
+
+ def setTreeDoc(self, doc):
+ """update all nodes under the tree to point to the right
+ document """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlSetTreeDoc(self._o, doc__o)
+
+ def textConcat(self, content, len):
+ """Concat the given string at the end of the existing node
+ content """
+ ret = libxml2mod.xmlTextConcat(self._o, content, len)
+ return ret
+
+ def textMerge(self, second):
+ """Merge two text nodes into one """
+ if second is None: second__o = None
+ else: second__o = second._o
+ ret = libxml2mod.xmlTextMerge(self._o, second__o)
+ if ret is None:raise treeError('xmlTextMerge() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def unlinkNode(self):
+ """Unlink a node from it's current context, the node is not
+ freed If one need to free the node, use xmlFreeNode()
+ routine after the unlink to discard it. Note that namespace
+ nodes can't be unlinked as they do not have pointer to
+ their parent. """
+ libxml2mod.xmlUnlinkNode(self._o)
+
+ def unsetNsProp(self, ns, name):
+ """Remove an attribute carried by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlUnsetNsProp(self._o, ns__o, name)
+ return ret
+
+ def unsetProp(self, name):
+ """Remove an attribute carried by a node. This handles only
+ attributes in no namespace. """
+ ret = libxml2mod.xmlUnsetProp(self._o, name)
+ return ret
+
+ #
+ # xmlNode functions from module valid
+ #
+
+ def isID(self, doc, attr):
+ """Determine whether an attribute is of type ID. In case we
+ have DTD(s) then this is done if DTD loading has been
+ requested. In the case of HTML documents parsed with the
+ HTML parser, then ID detection is done systematically. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsID(doc__o, self._o, attr__o)
+ return ret
+
+ def isRef(self, doc, attr):
+ """Determine whether an attribute is of type Ref. In case we
+ have DTD(s) then this is simple, otherwise we use an
+ heuristic: name Ref (upper or lowercase). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsRef(doc__o, self._o, attr__o)
+ return ret
+
+ def validNormalizeAttributeValue(self, doc, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidNormalizeAttributeValue(doc__o, self._o, name, value)
+ return ret
+
+ #
+ # xmlNode functions from module xinclude
+ #
+
+ def xincludeProcessTree(self):
+ """Implement the XInclude substitution for the given subtree """
+ ret = libxml2mod.xmlXIncludeProcessTree(self._o)
+ return ret
+
+ def xincludeProcessTreeFlags(self, flags):
+ """Implement the XInclude substitution for the given subtree """
+ ret = libxml2mod.xmlXIncludeProcessTreeFlags(self._o, flags)
+ return ret
+
+ #
+ # xmlNode functions from module xmlschemas
+ #
+
+ def schemaValidateOneElement(self, ctxt):
+ """Validate a branch of a tree, starting with the given @elem. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlSchemaValidateOneElement(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlNode functions from module xpath
+ #
+
+ def xpathCastNodeToNumber(self):
+ """Converts a node to its number value """
+ ret = libxml2mod.xmlXPathCastNodeToNumber(self._o)
+ return ret
+
+ def xpathCastNodeToString(self):
+ """Converts a node to its string value. """
+ ret = libxml2mod.xmlXPathCastNodeToString(self._o)
+ return ret
+
+ def xpathCmpNodes(self, node2):
+ """Compare two nodes w.r.t document order """
+ if node2 is None: node2__o = None
+ else: node2__o = node2._o
+ ret = libxml2mod.xmlXPathCmpNodes(self._o, node2__o)
+ return ret
+
+ def xpathNodeEval(self, str, ctx):
+ """Evaluate the XPath Location Path in the given context. The
+ node 'node' is set as the context node. The context node is
+ not restored. """
+ if ctx is None: ctx__o = None
+ else: ctx__o = ctx._o
+ ret = libxml2mod.xmlXPathNodeEval(self._o, str, ctx__o)
+ if ret is None:raise xpathError('xmlXPathNodeEval() failed')
+ return xpathObjectRet(ret)
+
+ #
+ # xmlNode functions from module xpathInternals
+ #
+
+ def xpathNewNodeSet(self):
+ """Create a new xmlXPathObjectPtr of type NodeSet and
+ initialize it with the single Node @val """
+ ret = libxml2mod.xmlXPathNewNodeSet(self._o)
+ if ret is None:raise xpathError('xmlXPathNewNodeSet() failed')
+ return xpathObjectRet(ret)
+
+ def xpathNewValueTree(self):
+ """Create a new xmlXPathObjectPtr of type Value Tree (XSLT)
+ and initialize it with the tree root @val """
+ ret = libxml2mod.xmlXPathNewValueTree(self._o)
+ if ret is None:raise xpathError('xmlXPathNewValueTree() failed')
+ return xpathObjectRet(ret)
+
+ def xpathNextAncestor(self, ctxt):
+ """Traversal function for the "ancestor" direction the
+ ancestor axis contains the ancestors of the context node;
+ the ancestors of the context node consist of the parent of
+ context node and the parent's parent and so on; the nodes
+ are ordered in reverse document order; thus the parent is
+ the first node on the axis, and the parent's parent is the
+ second node on the axis """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAncestor(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAncestorOrSelf(self, ctxt):
+ """Traversal function for the "ancestor-or-self" direction he
+ ancestor-or-self axis contains the context node and
+ ancestors of the context node in reverse document order;
+ thus the context node is the first node on the axis, and
+ the context node's parent the second; parent here is
+ defined the same as with the parent axis. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAncestorOrSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAttribute(self, ctxt):
+ """Traversal function for the "attribute" direction TODO:
+ support DTD inherited default attributes """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAttribute(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextChild(self, ctxt):
+ """Traversal function for the "child" direction The child axis
+ contains the children of the context node in document order. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextChild(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendant(self, ctxt):
+ """Traversal function for the "descendant" direction the
+ descendant axis contains the descendants of the context
+ node in document order; a descendant is a child or a child
+ of a child and so on. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendantOrSelf(self, ctxt):
+ """Traversal function for the "descendant-or-self" direction
+ the descendant-or-self axis contains the context node and
+ the descendants of the context node in document order; thus
+ the context node is the first node on the axis, and the
+ first child of the context node is the second node on the
+ axis """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextDescendantOrSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowing(self, ctxt):
+ """Traversal function for the "following" direction The
+ following axis contains all nodes in the same document as
+ the context node that are after the context node in
+ document order, excluding any descendants and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in document order """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextFollowing(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowingSibling(self, ctxt):
+ """Traversal function for the "following-sibling" direction
+ The following-sibling axis contains the following siblings
+ of the context node in document order. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextFollowingSibling(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextNamespace(self, ctxt):
+ """Traversal function for the "namespace" direction the
+ namespace axis contains the namespace nodes of the context
+ node; the order of nodes on this axis is
+ implementation-defined; the axis will be empty unless the
+ context node is an element We keep the XML namespace node
+ at the end of the list. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextNamespace(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextParent(self, ctxt):
+ """Traversal function for the "parent" direction The parent
+ axis contains the parent of the context node, if there is
+ one. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextParent(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextParent() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPreceding(self, ctxt):
+ """Traversal function for the "preceding" direction the
+ preceding axis contains all nodes in the same document as
+ the context node that are before the context node in
+ document order, excluding any ancestors and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in reverse document order """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextPreceding(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPrecedingSibling(self, ctxt):
+ """Traversal function for the "preceding-sibling" direction
+ The preceding-sibling axis contains the preceding siblings
+ of the context node in reverse document order; the first
+ preceding sibling is first on the axis; the sibling
+ preceding that node is the second on the axis and so on. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextPrecedingSibling(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextSelf(self, ctxt):
+ """Traversal function for the "self" direction The self axis
+ contains just the context node itself """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ #
+ # xmlNode functions from module xpointer
+ #
+
+ def xpointerNewCollapsedRange(self):
+ """Create a new xmlXPathObjectPtr of type range using a single
+ nodes """
+ ret = libxml2mod.xmlXPtrNewCollapsedRange(self._o)
+ if ret is None:raise treeError('xmlXPtrNewCollapsedRange() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewContext(self, doc, origin):
+ """Create a new XPointer context """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if origin is None: origin__o = None
+ else: origin__o = origin._o
+ ret = libxml2mod.xmlXPtrNewContext(doc__o, self._o, origin__o)
+ if ret is None:raise treeError('xmlXPtrNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ def xpointerNewLocationSetNodes(self, end):
+ """Create a new xmlXPathObjectPtr of type LocationSet and
+ initialize it with the single range made of the two nodes
+ @start and @end """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewLocationSetNodes(self._o, end__o)
+ if ret is None:raise treeError('xmlXPtrNewLocationSetNodes() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewRange(self, startindex, end, endindex):
+ """Create a new xmlXPathObjectPtr of type range """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewRange(self._o, startindex, end__o, endindex)
+ if ret is None:raise treeError('xmlXPtrNewRange() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewRangeNodes(self, end):
+ """Create a new xmlXPathObjectPtr of type range using 2 nodes """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewRangeNodes(self._o, end__o)
+ if ret is None:raise treeError('xmlXPtrNewRangeNodes() failed')
+ return xpathObjectRet(ret)
+
+class xmlDoc(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlDoc got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlDoc (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlDoc functions from module HTMLparser
+ #
+
+ def htmlAutoCloseTag(self, name, elem):
+ """The HTML DTD allows a tag to implicitly close other tags.
+ The list is kept in htmlStartClose array. This function
+ checks if the element or one of it's children would
+ autoclose the given tag. """
+ ret = libxml2mod.htmlAutoCloseTag(self._o, name, elem)
+ return ret
+
+ def htmlIsAutoClosed(self, elem):
+ """The HTML DTD allows a tag to implicitly close other tags.
+ The list is kept in htmlStartClose array. This function
+ checks if a tag is autoclosed by one of it's child """
+ ret = libxml2mod.htmlIsAutoClosed(self._o, elem)
+ return ret
+
+ #
+ # xmlDoc functions from module HTMLtree
+ #
+
+ def htmlDocContentDumpFormatOutput(self, buf, encoding, format):
+ """Dump an HTML document. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ libxml2mod.htmlDocContentDumpFormatOutput(buf__o, self._o, encoding, format)
+
+ def htmlDocContentDumpOutput(self, buf, encoding):
+ """Dump an HTML document. Formatting return/spaces are added. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ libxml2mod.htmlDocContentDumpOutput(buf__o, self._o, encoding)
+
+ def htmlDocDump(self, f):
+ """Dump an HTML document to an open FILE. """
+ ret = libxml2mod.htmlDocDump(f, self._o)
+ return ret
+
+ def htmlGetMetaEncoding(self):
+ """Encoding definition lookup in the Meta tags """
+ ret = libxml2mod.htmlGetMetaEncoding(self._o)
+ return ret
+
+ def htmlNodeDumpFile(self, out, cur):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns are added. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFile(out, self._o, cur__o)
+
+ def htmlNodeDumpFileFormat(self, out, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. TODO: if encoding == None try to save in the doc
+ encoding """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.htmlNodeDumpFileFormat(out, self._o, cur__o, encoding, format)
+ return ret
+
+ def htmlNodeDumpFormatOutput(self, buf, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFormatOutput(buf__o, self._o, cur__o, encoding, format)
+
+ def htmlNodeDumpOutput(self, buf, cur, encoding):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns/spaces are added. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpOutput(buf__o, self._o, cur__o, encoding)
+
+ def htmlSaveFile(self, filename):
+ """Dump an HTML document to a file. If @filename is "-" the
+ stdout file is used. """
+ ret = libxml2mod.htmlSaveFile(filename, self._o)
+ return ret
+
+ def htmlSaveFileEnc(self, filename, encoding):
+ """Dump an HTML document to a file using a given encoding and
+ formatting returns/spaces are added. """
+ ret = libxml2mod.htmlSaveFileEnc(filename, self._o, encoding)
+ return ret
+
+ def htmlSaveFileFormat(self, filename, encoding, format):
+ """Dump an HTML document to a file using a given encoding. """
+ ret = libxml2mod.htmlSaveFileFormat(filename, self._o, encoding, format)
+ return ret
+
+ def htmlSetMetaEncoding(self, encoding):
+ """Sets the current encoding in the Meta tags NOTE: this will
+ not change the document content encoding, just the META
+ flag associated. """
+ ret = libxml2mod.htmlSetMetaEncoding(self._o, encoding)
+ return ret
+
+ #
+ # xmlDoc functions from module debugXML
+ #
+
+ def debugCheckDocument(self, output):
+ """Check the document for potential content problems, and
+ output the errors to @output """
+ ret = libxml2mod.xmlDebugCheckDocument(output, self._o)
+ return ret
+
+ def debugDumpDocument(self, output):
+ """Dumps debug information for the document, it's recursive """
+ libxml2mod.xmlDebugDumpDocument(output, self._o)
+
+ def debugDumpDocumentHead(self, output):
+ """Dumps debug information concerning the document, not
+ recursive """
+ libxml2mod.xmlDebugDumpDocumentHead(output, self._o)
+
+ def debugDumpEntities(self, output):
+ """Dumps debug information for all the entities in use by the
+ document """
+ libxml2mod.xmlDebugDumpEntities(output, self._o)
+
+ #
+ # xmlDoc functions from module entities
+ #
+
+ def addDocEntity(self, name, type, ExternalID, SystemID, content):
+ """Register a new entity for this document. """
+ ret = libxml2mod.xmlAddDocEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlAddDocEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def addDtdEntity(self, name, type, ExternalID, SystemID, content):
+ """Register a new entity for this document DTD external subset. """
+ ret = libxml2mod.xmlAddDtdEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlAddDtdEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def docEntity(self, name):
+ """Do an entity lookup in the document entity hash table and """
+ ret = libxml2mod.xmlGetDocEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetDocEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def dtdEntity(self, name):
+ """Do an entity lookup in the DTD entity hash table and """
+ ret = libxml2mod.xmlGetDtdEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetDtdEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def encodeEntities(self, input):
+ """TODO: remove xmlEncodeEntities, once we are not afraid of
+ breaking binary compatibility People must migrate their
+ code to xmlEncodeEntitiesReentrant ! This routine will
+ issue a warning when encountered. """
+ ret = libxml2mod.xmlEncodeEntities(self._o, input)
+ return ret
+
+ def encodeEntitiesReentrant(self, input):
+ """Do a global encoding of a string, replacing the predefined
+ entities and non ASCII values with their entities and
+ CharRef counterparts. Contrary to xmlEncodeEntities, this
+ routine is reentrant, and result must be deallocated. """
+ ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
+ return ret
+
+ def encodeSpecialChars(self, input):
+ """Do a global encoding of a string, replacing the predefined
+ entities this routine is reentrant, and result must be
+ deallocated. """
+ ret = libxml2mod.xmlEncodeSpecialChars(self._o, input)
+ return ret
+
+ def newEntity(self, name, type, ExternalID, SystemID, content):
+ """Create a new entity, this differs from xmlAddDocEntity()
+ that if the document is None or has no internal subset
+ defined, then an unlinked entity structure will be
+ returned, it is then the responsibility of the caller to
+ link it to the document later or free it when not needed
+ anymore. """
+ ret = libxml2mod.xmlNewEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlNewEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def parameterEntity(self, name):
+ """Do an entity lookup in the internal and external subsets and """
+ ret = libxml2mod.xmlGetParameterEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetParameterEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module relaxng
+ #
+
+ def relaxNGNewDocParserCtxt(self):
+ """Create an XML RelaxNGs parser context for that document.
+ Note: since the process of compiling a RelaxNG schemas
+ modifies the document, the @doc parameter is duplicated
+ internally. """
+ ret = libxml2mod.xmlRelaxNGNewDocParserCtxt(self._o)
+ if ret is None:raise parserError('xmlRelaxNGNewDocParserCtxt() failed')
+ __tmp = relaxNgParserCtxt(_obj=ret)
+ return __tmp
+
+ def relaxNGValidateDoc(self, ctxt):
+ """Validate a document tree in memory. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlRelaxNGValidateDoc(ctxt__o, self._o)
+ return ret
+
+ def relaxNGValidateFullElement(self, ctxt, elem):
+ """Validate a full subtree when
+ xmlRelaxNGValidatePushElement() returned 0 and the content
+ of the node has been expanded. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidateFullElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def relaxNGValidatePopElement(self, ctxt, elem):
+ """Pop the element end from the RelaxNG validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePopElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def relaxNGValidatePushElement(self, ctxt, elem):
+ """Push a new element start on the RelaxNG validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePushElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ #
+ # xmlDoc functions from module tree
+ #
+
+ def copyDoc(self, recursive):
+ """Do a copy of the document info. If recursive, the content
+ tree will be copied too as well as DTD, namespaces and
+ entities. """
+ ret = libxml2mod.xmlCopyDoc(self._o, recursive)
+ if ret is None:raise treeError('xmlCopyDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def copyNode(self, node, extended):
+ """Do a copy of the node to a given document. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlDocCopyNode(node__o, self._o, extended)
+ if ret is None:raise treeError('xmlDocCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNodeList(self, node):
+ """Do a recursive copy of the node list. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlDocCopyNodeList(self._o, node__o)
+ if ret is None:raise treeError('xmlDocCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def createIntSubset(self, name, ExternalID, SystemID):
+ """Create the internal subset of a document """
+ ret = libxml2mod.xmlCreateIntSubset(self._o, name, ExternalID, SystemID)
+ if ret is None:raise treeError('xmlCreateIntSubset() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def docCompressMode(self):
+ """get the compression ratio for a document, ZLIB based """
+ ret = libxml2mod.xmlGetDocCompressMode(self._o)
+ return ret
+
+ def dump(self, f):
+ """Dump an XML document to an open FILE. """
+ ret = libxml2mod.xmlDocDump(f, self._o)
+ return ret
+
+ def elemDump(self, f, cur):
+ """Dump an XML/HTML node, recursive behaviour, children are
+ printed too. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlElemDump(f, self._o, cur__o)
+
+ def formatDump(self, f, format):
+ """Dump an XML document to an open FILE. """
+ ret = libxml2mod.xmlDocFormatDump(f, self._o, format)
+ return ret
+
+ def freeDoc(self):
+ """Free up all the structures used by a document, tree
+ included. """
+ libxml2mod.xmlFreeDoc(self._o)
+
+ def getRootElement(self):
+ """Get the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ ret = libxml2mod.xmlDocGetRootElement(self._o)
+ if ret is None:raise treeError('xmlDocGetRootElement() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def intSubset(self):
+ """Get the internal subset of a document """
+ ret = libxml2mod.xmlGetIntSubset(self._o)
+ if ret is None:raise treeError('xmlGetIntSubset() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def newCDataBlock(self, content, len):
+ """Creation of a new node containing a CDATA block. """
+ ret = libxml2mod.xmlNewCDataBlock(self._o, content, len)
+ if ret is None:raise treeError('xmlNewCDataBlock() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newCharRef(self, name):
+ """Creation of a new character reference node. """
+ ret = libxml2mod.xmlNewCharRef(self._o, name)
+ if ret is None:raise treeError('xmlNewCharRef() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocComment(self, content):
+ """Creation of a new node containing a comment within a
+ document. """
+ ret = libxml2mod.xmlNewDocComment(self._o, content)
+ if ret is None:raise treeError('xmlNewDocComment() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocFragment(self):
+ """Creation of a new Fragment node. """
+ ret = libxml2mod.xmlNewDocFragment(self._o)
+ if ret is None:raise treeError('xmlNewDocFragment() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNode(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocNode(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNodeEatName(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocNodeEatName(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocPI(self, name, content):
+ """Creation of a processing instruction element. """
+ ret = libxml2mod.xmlNewDocPI(self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocPI() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocProp(self, name, value):
+ """Create a new property carried by a document. """
+ ret = libxml2mod.xmlNewDocProp(self._o, name, value)
+ if ret is None:raise treeError('xmlNewDocProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newDocRawNode(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocRawNode(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocRawNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocText(self, content):
+ """Creation of a new text node within a document. """
+ ret = libxml2mod.xmlNewDocText(self._o, content)
+ if ret is None:raise treeError('xmlNewDocText() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocTextLen(self, content, len):
+ """Creation of a new text node with an extra content length
+ parameter. The text node pertain to a given document. """
+ ret = libxml2mod.xmlNewDocTextLen(self._o, content, len)
+ if ret is None:raise treeError('xmlNewDocTextLen() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDtd(self, name, ExternalID, SystemID):
+ """Creation of a new DTD for the external subset. To create an
+ internal subset, use xmlCreateIntSubset(). """
+ ret = libxml2mod.xmlNewDtd(self._o, name, ExternalID, SystemID)
+ if ret is None:raise treeError('xmlNewDtd() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def newGlobalNs(self, href, prefix):
+ """Creation of a Namespace, the old way using PI and without
+ scoping DEPRECATED !!! """
+ ret = libxml2mod.xmlNewGlobalNs(self._o, href, prefix)
+ if ret is None:raise treeError('xmlNewGlobalNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def newReference(self, name):
+ """Creation of a new reference node. """
+ ret = libxml2mod.xmlNewReference(self._o, name)
+ if ret is None:raise treeError('xmlNewReference() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def nodeDumpOutput(self, buf, cur, level, format, encoding):
+ """Dump an XML node, recursive behaviour, children are printed
+ too. Note that @format = 1 provide node indenting only if
+ xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
+ called """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlNodeDumpOutput(buf__o, self._o, cur__o, level, format, encoding)
+
+ def nodeGetBase(self, cur):
+ """Searches for the BASE URL. The code should work on both XML
+ and HTML document even if base mechanisms are completely
+ different. It returns the base as defined in RFC 2396
+ sections 5.1.1. Base URI within Document Content and 5.1.2.
+ Base URI from the Encapsulating Entity However it does not
+ return the document base (5.1.3), use doc->URL in this case """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlNodeGetBase(self._o, cur__o)
+ return ret
+
+ def nodeListGetRawString(self, list, inLine):
+ """Builds the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs, contrary to
+ xmlNodeListGetString() this function doesn't do any
+ character encoding handling. """
+ if list is None: list__o = None
+ else: list__o = list._o
+ ret = libxml2mod.xmlNodeListGetRawString(self._o, list__o, inLine)
+ return ret
+
+ def nodeListGetString(self, list, inLine):
+ """Build the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs """
+ if list is None: list__o = None
+ else: list__o = list._o
+ ret = libxml2mod.xmlNodeListGetString(self._o, list__o, inLine)
+ return ret
+
+ def reconciliateNs(self, tree):
+ """This function checks that all the namespaces declared
+ within the given tree are properly declared. This is needed
+ for example after Copy or Cut and then paste operations.
+ The subtree may still hold pointers to namespace
+ declarations outside the subtree or invalid/masked. As much
+ as possible the function try to reuse the existing
+ namespaces found in the new environment. If not possible
+ the new namespaces are redeclared on @tree at the top of
+ the given subtree. """
+ if tree is None: tree__o = None
+ else: tree__o = tree._o
+ ret = libxml2mod.xmlReconciliateNs(self._o, tree__o)
+ return ret
+
+ def saveFile(self, filename):
+ """Dump an XML document to a file. Will use compression if
+ compiled in and enabled. If @filename is "-" the stdout
+ file is used. """
+ ret = libxml2mod.xmlSaveFile(filename, self._o)
+ return ret
+
+ def saveFileEnc(self, filename, encoding):
+ """Dump an XML document, converting it to the given encoding """
+ ret = libxml2mod.xmlSaveFileEnc(filename, self._o, encoding)
+ return ret
+
+ def saveFileTo(self, buf, encoding):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ ret = libxml2mod.xmlSaveFileTo(buf__o, self._o, encoding)
+ return ret
+
+ def saveFormatFile(self, filename, format):
+ """Dump an XML document to a file. Will use compression if
+ compiled in and enabled. If @filename is "-" the stdout
+ file is used. If @format is set then the document will be
+ indented on output. Note that @format = 1 provide node
+ indenting only if xmlIndentTreeOutput = 1 or
+ xmlKeepBlanksDefault(0) was called """
+ ret = libxml2mod.xmlSaveFormatFile(filename, self._o, format)
+ return ret
+
+ def saveFormatFileEnc(self, filename, encoding, format):
+ """Dump an XML document to a file or an URL. """
+ ret = libxml2mod.xmlSaveFormatFileEnc(filename, self._o, encoding, format)
+ return ret
+
+ def saveFormatFileTo(self, buf, encoding, format):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ ret = libxml2mod.xmlSaveFormatFileTo(buf__o, self._o, encoding, format)
+ return ret
+
+ def searchNs(self, node, nameSpace):
+ """Search a Ns registered under a given name space for a
+ document. recurse on the parents until it finds the defined
+ namespace or return None otherwise. @nameSpace can be None,
+ this is a search for the default namespace. We don't allow
+ to cross entities boundaries. If you don't declare the
+ namespace within those you will be in troubles !!! A
+ warning is generated to cover this case. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSearchNs(self._o, node__o, nameSpace)
+ if ret is None:raise treeError('xmlSearchNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def searchNsByHref(self, node, href):
+ """Search a Ns aliasing a given URI. Recurse on the parents
+ until it finds the defined namespace or return None
+ otherwise. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSearchNsByHref(self._o, node__o, href)
+ if ret is None:raise treeError('xmlSearchNsByHref() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def setDocCompressMode(self, mode):
+ """set the compression ratio for a document, ZLIB based
+ Correct values: 0 (uncompressed) to 9 (max compression) """
+ libxml2mod.xmlSetDocCompressMode(self._o, mode)
+
+ def setListDoc(self, list):
+ """update all nodes in the list to point to the right document """
+ if list is None: list__o = None
+ else: list__o = list._o
+ libxml2mod.xmlSetListDoc(list__o, self._o)
+
+ def setRootElement(self, root):
+ """Set the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ if root is None: root__o = None
+ else: root__o = root._o
+ ret = libxml2mod.xmlDocSetRootElement(self._o, root__o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def setTreeDoc(self, tree):
+ """update all nodes under the tree to point to the right
+ document """
+ if tree is None: tree__o = None
+ else: tree__o = tree._o
+ libxml2mod.xmlSetTreeDoc(tree__o, self._o)
+
+ def stringGetNodeList(self, value):
+ """Parse the value string and build the node list associated.
+ Should produce a flat tree with only TEXTs and ENTITY_REFs. """
+ ret = libxml2mod.xmlStringGetNodeList(self._o, value)
+ if ret is None:raise treeError('xmlStringGetNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def stringLenGetNodeList(self, value, len):
+ """Parse the value string and build the node list associated.
+ Should produce a flat tree with only TEXTs and ENTITY_REFs. """
+ ret = libxml2mod.xmlStringLenGetNodeList(self._o, value, len)
+ if ret is None:raise treeError('xmlStringLenGetNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module valid
+ #
+
+ def ID(self, ID):
+ """Search the attribute declaring the given ID """
+ ret = libxml2mod.xmlGetID(self._o, ID)
+ if ret is None:raise treeError('xmlGetID() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def isID(self, elem, attr):
+ """Determine whether an attribute is of type ID. In case we
+ have DTD(s) then this is done if DTD loading has been
+ requested. In the case of HTML documents parsed with the
+ HTML parser, then ID detection is done systematically. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsID(self._o, elem__o, attr__o)
+ return ret
+
+ def isMixedElement(self, name):
+ """Search in the DtDs whether an element accept Mixed content
+ (or ANY) basically if it is supposed to accept text childs """
+ ret = libxml2mod.xmlIsMixedElement(self._o, name)
+ return ret
+
+ def isRef(self, elem, attr):
+ """Determine whether an attribute is of type Ref. In case we
+ have DTD(s) then this is simple, otherwise we use an
+ heuristic: name Ref (upper or lowercase). """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsRef(self._o, elem__o, attr__o)
+ return ret
+
+ def removeID(self, attr):
+ """Remove the given attribute from the ID table maintained
+ internally. """
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlRemoveID(self._o, attr__o)
+ return ret
+
+ def removeRef(self, attr):
+ """Remove the given attribute from the Ref table maintained
+ internally. """
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlRemoveRef(self._o, attr__o)
+ return ret
+
+ def validCtxtNormalizeAttributeValue(self, ctxt, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character.
+ Also check VC: Standalone Document Declaration in P32, and
+ update ctxt->valid accordingly """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(ctxt__o, self._o, elem__o, name, value)
+ return ret
+
+ def validNormalizeAttributeValue(self, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidNormalizeAttributeValue(self._o, elem__o, name, value)
+ return ret
+
+ def validateDocument(self, ctxt):
+ """Try to validate the document instance basically it does
+ the all the checks described by the XML Rec i.e. validates
+ the internal and external subset (if present) and validate
+ the document tree. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDocument(ctxt__o, self._o)
+ return ret
+
+ def validateDocumentFinal(self, ctxt):
+ """Does the final step for the document validation once all
+ the incremental validation steps have been completed
+ basically it does the following checks described by the XML
+ Rec Check all the IDREF/IDREFS attributes definition for
+ validity """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDocumentFinal(ctxt__o, self._o)
+ return ret
+
+ def validateDtd(self, ctxt, dtd):
+ """Try to validate the document against the dtd instance
+ Basically it does check all the definitions in the DtD.
+ Note the the internal subset (if present) is de-coupled
+ (i.e. not used), which could give problems if ID or IDREF
+ is present. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if dtd is None: dtd__o = None
+ else: dtd__o = dtd._o
+ ret = libxml2mod.xmlValidateDtd(ctxt__o, self._o, dtd__o)
+ return ret
+
+ def validateDtdFinal(self, ctxt):
+ """Does the final step for the dtds validation once all the
+ subsets have been parsed basically it does the following
+ checks described by the XML Rec - check that ENTITY and
+ ENTITIES type attributes default or possible values matches
+ one of the defined entities. - check that NOTATION type
+ attributes default or possible values matches one of the
+ defined notations. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDtdFinal(ctxt__o, self._o)
+ return ret
+
+ def validateElement(self, ctxt, elem):
+ """Try to validate the subtree under an element """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def validateNotationUse(self, ctxt, notationName):
+ """Validate that the given name match a notation declaration.
+ - [ VC: Notation Declared ] """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateNotationUse(ctxt__o, self._o, notationName)
+ return ret
+
+ def validateOneAttribute(self, ctxt, elem, attr, value):
+ """Try to validate a single attribute for an element basically
+ it does the following checks as described by the XML-1.0
+ recommendation: - [ VC: Attribute Value Type ] - [ VC:
+ Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
+ Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
+ Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlValidateOneAttribute(ctxt__o, self._o, elem__o, attr__o, value)
+ return ret
+
+ def validateOneElement(self, ctxt, elem):
+ """Try to validate a single element and it's attributes,
+ basically it does the following checks as described by the
+ XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
+ Required Attribute ] Then call xmlValidateOneAttribute()
+ for each attribute present. The ID/IDREF checkings are
+ done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateOneElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def validateOneNamespace(self, ctxt, elem, prefix, ns, value):
+ """Try to validate a single namespace declaration for an
+ element basically it does the following checks as described
+ by the XML-1.0 recommendation: - [ VC: Attribute Value Type
+ ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
+ [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
+ Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlValidateOneNamespace(ctxt__o, self._o, elem__o, prefix, ns__o, value)
+ return ret
+
+ def validatePopElement(self, ctxt, elem, qname):
+ """Pop the element end from the validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePopElement(ctxt__o, self._o, elem__o, qname)
+ return ret
+
+ def validatePushElement(self, ctxt, elem, qname):
+ """Push a new element start on the validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePushElement(ctxt__o, self._o, elem__o, qname)
+ return ret
+
+ def validateRoot(self, ctxt):
+ """Try to validate a the root element basically it does the
+ following check as described by the XML-1.0 recommendation:
+ - [ VC: Root Element Type ] it doesn't try to recurse or
+ apply other check to the element """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateRoot(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xinclude
+ #
+
+ def xincludeProcess(self):
+ """Implement the XInclude substitution on the XML document @doc """
+ ret = libxml2mod.xmlXIncludeProcess(self._o)
+ return ret
+
+ def xincludeProcessFlags(self, flags):
+ """Implement the XInclude substitution on the XML document @doc """
+ ret = libxml2mod.xmlXIncludeProcessFlags(self._o, flags)
+ return ret
+
+ #
+ # xmlDoc functions from module xmlreader
+ #
+
+ def NewWalker(self, reader):
+ """Setup an xmltextReader to parse a preparsed XML document.
+ This reuses the existing @reader xmlTextReader. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlReaderNewWalker(reader__o, self._o)
+ return ret
+
+ def readerWalker(self):
+ """Create an xmltextReader for a preparsed document. """
+ ret = libxml2mod.xmlReaderWalker(self._o)
+ if ret is None:raise treeError('xmlReaderWalker() failed')
+ __tmp = xmlTextReader(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module xmlschemas
+ #
+
+ def schemaNewDocParserCtxt(self):
+ """Create an XML Schemas parse context for that document. NB.
+ The document may be modified during the parsing process. """
+ ret = libxml2mod.xmlSchemaNewDocParserCtxt(self._o)
+ if ret is None:raise parserError('xmlSchemaNewDocParserCtxt() failed')
+ __tmp = SchemaParserCtxt(_obj=ret)
+ return __tmp
+
+ def schemaValidateDoc(self, ctxt):
+ """Validate a document tree in memory. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlSchemaValidateDoc(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xpath
+ #
+
+ def xpathNewContext(self):
+ """Create a new xmlXPathContext """
+ ret = libxml2mod.xmlXPathNewContext(self._o)
+ if ret is None:raise xpathError('xmlXPathNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ def xpathOrderDocElems(self):
+ """Call this routine to speed up XPath computation on static
+ documents. This stamps all the element nodes with the
+ document order Like for line information, the order is kept
+ in the element->content field, the value stored is actually
+ - the node number (starting at -1) to be able to
+ differentiate from line numbers. """
+ ret = libxml2mod.xmlXPathOrderDocElems(self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xpointer
+ #
+
+ def xpointerNewContext(self, here, origin):
+ """Create a new XPointer context """
+ if here is None: here__o = None
+ else: here__o = here._o
+ if origin is None: origin__o = None
+ else: origin__o = origin._o
+ ret = libxml2mod.xmlXPtrNewContext(self._o, here__o, origin__o)
+ if ret is None:raise treeError('xmlXPtrNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+class parserCtxt(parserCtxtCore):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ parserCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserCtxt(self._o)
+ self._o = None
+
+ # accessors for parserCtxt
+ def doc(self):
+ """Get the document tree from a parser context. """
+ ret = libxml2mod.xmlParserGetDoc(self._o)
+ if ret is None:raise parserError('xmlParserGetDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def isValid(self):
+ """Get the validity information from a parser context. """
+ ret = libxml2mod.xmlParserGetIsValid(self._o)
+ return ret
+
+ def lineNumbers(self, linenumbers):
+ """Switch on the generation of line number for elements nodes. """
+ libxml2mod.xmlParserSetLineNumbers(self._o, linenumbers)
+
+ def loadSubset(self, loadsubset):
+ """Switch the parser to load the DTD without validating. """
+ libxml2mod.xmlParserSetLoadSubset(self._o, loadsubset)
+
+ def pedantic(self, pedantic):
+ """Switch the parser to be pedantic. """
+ libxml2mod.xmlParserSetPedantic(self._o, pedantic)
+
+ def replaceEntities(self, replaceEntities):
+ """Switch the parser to replace entities. """
+ libxml2mod.xmlParserSetReplaceEntities(self._o, replaceEntities)
+
+ def validate(self, validate):
+ """Switch the parser to validation mode. """
+ libxml2mod.xmlParserSetValidate(self._o, validate)
+
+ def wellFormed(self):
+ """Get the well formed information from a parser context. """
+ ret = libxml2mod.xmlParserGetWellFormed(self._o)
+ return ret
+
+ #
+ # parserCtxt functions from module HTMLparser
+ #
+
+ def htmlCtxtReadDoc(self, cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadDoc(self._o, cur, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadFd(self, fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadFd(self._o, fd, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadFd() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadFile(self._o, filename, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadFile() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadMemory(self, buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadMemory() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReset(self):
+ """Reset a parser context """
+ libxml2mod.htmlCtxtReset(self._o)
+
+ def htmlCtxtUseOptions(self, options):
+ """Applies the options to the parser context """
+ ret = libxml2mod.htmlCtxtUseOptions(self._o, options)
+ return ret
+
+ def htmlFreeParserCtxt(self):
+ """Free all the memory used by a parser context. However the
+ parsed document in ctxt->myDoc is not freed. """
+ libxml2mod.htmlFreeParserCtxt(self._o)
+
+ def htmlParseCharRef(self):
+ """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
+ ';' | '&#x' [0-9a-fA-F]+ ';' """
+ ret = libxml2mod.htmlParseCharRef(self._o)
+ return ret
+
+ def htmlParseChunk(self, chunk, size, terminate):
+ """Parse a Chunk of memory """
+ ret = libxml2mod.htmlParseChunk(self._o, chunk, size, terminate)
+ return ret
+
+ def htmlParseDocument(self):
+ """parse an HTML document (and build a tree if using the
+ standard SAX interface). """
+ ret = libxml2mod.htmlParseDocument(self._o)
+ return ret
+
+ def htmlParseElement(self):
+ """parse an HTML element, this is highly recursive this is
+ kept for compatibility with previous code versions [39]
+ element ::= EmptyElemTag | STag content ETag [41]
+ Attribute ::= Name Eq AttValue """
+ libxml2mod.htmlParseElement(self._o)
+
+ #
+ # parserCtxt functions from module parser
+ #
+
+ def byteConsumed(self):
+ """This function provides the current index of the parser
+ relative to the start of the current entity. This function
+ is computed in bytes from the beginning starting at zero
+ and finishing at the size in byte of the file if parsing a
+ file. The function is of constant cost if the input is
+ UTF-8 but can be costly if run on non-UTF-8 input. """
+ ret = libxml2mod.xmlByteConsumed(self._o)
+ return ret
+
+ def clearParserCtxt(self):
+ """Clear (release owned resources) and reinitialize a parser
+ context """
+ libxml2mod.xmlClearParserCtxt(self._o)
+
+ def ctxtReadDoc(self, cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadDoc(self._o, cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadFd(self, fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. This
+ reuses the existing @ctxt parser context NOTE that the file
+ descriptor will not be closed when the reader is closed or
+ reset. """
+ ret = libxml2mod.xmlCtxtReadFd(self._o, fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadFd() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadFile(self._o, filename, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadFile() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadMemory(self, buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadMemory() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReset(self):
+ """Reset a parser context """
+ libxml2mod.xmlCtxtReset(self._o)
+
+ def ctxtResetPush(self, chunk, size, filename, encoding):
+ """Reset a push parser context """
+ ret = libxml2mod.xmlCtxtResetPush(self._o, chunk, size, filename, encoding)
+ return ret
+
+ def ctxtUseOptions(self, options):
+ """Applies the options to the parser context """
+ ret = libxml2mod.xmlCtxtUseOptions(self._o, options)
+ return ret
+
+ def initParserCtxt(self):
+ """Initialize a parser context """
+ ret = libxml2mod.xmlInitParserCtxt(self._o)
+ return ret
+
+ def parseChunk(self, chunk, size, terminate):
+ """Parse a Chunk of memory """
+ ret = libxml2mod.xmlParseChunk(self._o, chunk, size, terminate)
+ return ret
+
+ def parseDocument(self):
+ """parse an XML document (and build a tree if using the
+ standard SAX interface). [1] document ::= prolog element
+ Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? """
+ ret = libxml2mod.xmlParseDocument(self._o)
+ return ret
+
+ def parseExtParsedEnt(self):
+ """parse a general parsed entity An external general parsed
+ entity is well-formed if it matches the production labeled
+ extParsedEnt. [78] extParsedEnt ::= TextDecl? content """
+ ret = libxml2mod.xmlParseExtParsedEnt(self._o)
+ return ret
+
+ def setupParserForBuffer(self, buffer, filename):
+ """Setup the parser context to parse a new buffer; Clears any
+ prior contents from the parser context. The buffer
+ parameter must not be None, but the filename parameter can
+ be """
+ libxml2mod.xmlSetupParserForBuffer(self._o, buffer, filename)
+
+ def stopParser(self):
+ """Blocks further parser processing """
+ libxml2mod.xmlStopParser(self._o)
+
+ #
+ # parserCtxt functions from module parserInternals
+ #
+
+ def decodeEntities(self, len, what, end, end2, end3):
+ """This function is deprecated, we now always process entities
+ content through xmlStringDecodeEntities TODO: remove it in
+ next major release. [67] Reference ::= EntityRef | CharRef
+ [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlDecodeEntities(self._o, len, what, end, end2, end3)
+ return ret
+
+ def handleEntity(self, entity):
+ """Default handling of defined entities, when should we define
+ a new input stream ? When do we just handle that as a set
+ of chars ? OBSOLETE: to be removed at some point. """
+ if entity is None: entity__o = None
+ else: entity__o = entity._o
+ libxml2mod.xmlHandleEntity(self._o, entity__o)
+
+ def namespaceParseNCName(self):
+ """parse an XML namespace name. TODO: this seems not in use
+ anymore, the namespace handling is done on top of the SAX
+ interfaces, i.e. not on raw input. [NS 3] NCName ::=
+ (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter
+ | Digit | '.' | '-' | '_' | CombiningChar | Extender """
+ ret = libxml2mod.xmlNamespaceParseNCName(self._o)
+ return ret
+
+ def namespaceParseNSDef(self):
+ """parse a namespace prefix declaration TODO: this seems not
+ in use anymore, the namespace handling is done on top of
+ the SAX interfaces, i.e. not on raw input. [NS 1] NSDef
+ ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::=
+ 'xmlns' (':' NCName)? """
+ ret = libxml2mod.xmlNamespaceParseNSDef(self._o)
+ return ret
+
+ def nextChar(self):
+ """Skip to the next char input char. """
+ libxml2mod.xmlNextChar(self._o)
+
+ def parseAttValue(self):
+ """parse a value for an attribute Note: the parser won't do
+ substitution of entities here, this will be handled later
+ in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] |
+ Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3
+ Attribute-Value Normalization: Before the value of an
+ attribute is passed to the application or checked for
+ validity, the XML processor must normalize it as follows: -
+ a character reference is processed by appending the
+ referenced character to the attribute value - an entity
+ reference is processed by recursively processing the
+ replacement text of the entity - a whitespace character
+ (#x20, #xD, #xA, #x9) is processed by appending #x20 to the
+ normalized value, except that only a single #x20 is
+ appended for a "#xD#xA" sequence that is part of an
+ external parsed entity or the literal entity value of an
+ internal parsed entity - other characters are processed by
+ appending them to the normalized value If the declared
+ value is not CDATA, then the XML processor must further
+ process the normalized attribute value by discarding any
+ leading and trailing space (#x20) characters, and by
+ replacing sequences of space (#x20) characters by a single
+ space (#x20) character. All attributes for which no
+ declaration has been read should be treated by a
+ non-validating parser as if declared CDATA. """
+ ret = libxml2mod.xmlParseAttValue(self._o)
+ return ret
+
+ def parseAttributeListDecl(self):
+ """: parse the Attribute list def for an element [52]
+ AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53]
+ AttDef ::= S Name S AttType S DefaultDecl """
+ libxml2mod.xmlParseAttributeListDecl(self._o)
+
+ def parseCDSect(self):
+ """Parse escaped pure raw content. [18] CDSect ::= CDStart
+ CData CDEnd [19] CDStart ::= '<![CDATA[' [20] Data ::=
+ (Char* - (Char* ']]>' Char*)) [21] CDEnd ::= ']]>' """
+ libxml2mod.xmlParseCDSect(self._o)
+
+ def parseCharData(self, cdata):
+ """parse a CharData section. if we are within a CDATA section
+ ']]>' marks an end of section. The right angle bracket (>)
+ may be represented using the string "&gt;", and must, for
+ compatibility, be escaped using "&gt;" or a character
+ reference when it appears in the string "]]>" in content,
+ when that string is not marking the end of a CDATA section.
+ [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) """
+ libxml2mod.xmlParseCharData(self._o, cdata)
+
+ def parseCharRef(self):
+ """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
+ ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ]
+ Characters referred to using character references must
+ match the production for Char. """
+ ret = libxml2mod.xmlParseCharRef(self._o)
+ return ret
+
+ def parseComment(self):
+ """Skip an XML (SGML) comment <!-- .... --> The spec says that
+ "For compatibility, the string "--" (double-hyphen) must
+ not occur within comments. " [15] Comment ::= '<!--'
+ ((Char - '-') | ('-' (Char - '-')))* '-->' """
+ libxml2mod.xmlParseComment(self._o)
+
+ def parseContent(self):
+ """Parse a content: [43] content ::= (element | CharData |
+ Reference | CDSect | PI | Comment)* """
+ libxml2mod.xmlParseContent(self._o)
+
+ def parseDocTypeDecl(self):
+ """parse a DOCTYPE declaration [28] doctypedecl ::=
+ '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl |
+ PEReference | S)* ']' S?)? '>' [ VC: Root Element Type ]
+ The Name in the document type declaration must match the
+ element type of the root element. """
+ libxml2mod.xmlParseDocTypeDecl(self._o)
+
+ def parseElement(self):
+ """parse an XML element [39] element ::= EmptyElemTag | STag
+ content ETag [ WFC: Element Type Match ] The Name in an
+ element's end-tag must match the element type in the
+ start-tag. """
+ libxml2mod.xmlParseElement(self._o)
+
+ def parseElementDecl(self):
+ """parse an Element declaration. [45] elementdecl ::=
+ '<!ELEMENT' S Name S contentspec S? '>' [ VC: Unique
+ Element Type Declaration ] No element type may be declared
+ more than once """
+ ret = libxml2mod.xmlParseElementDecl(self._o)
+ return ret
+
+ def parseEncName(self):
+ """parse the XML encoding name [81] EncName ::= [A-Za-z]
+ ([A-Za-z0-9._] | '-')* """
+ ret = libxml2mod.xmlParseEncName(self._o)
+ return ret
+
+ def parseEncodingDecl(self):
+ """parse the XML encoding declaration [80] EncodingDecl ::= S
+ 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this
+ setups the conversion filters. """
+ ret = libxml2mod.xmlParseEncodingDecl(self._o)
+ return ret
+
+ def parseEndTag(self):
+ """parse an end of tag [42] ETag ::= '</' Name S? '>' With
+ namespace [NS 9] ETag ::= '</' QName S? '>' """
+ libxml2mod.xmlParseEndTag(self._o)
+
+ def parseEntityDecl(self):
+ """parse <!ENTITY declarations [70] EntityDecl ::= GEDecl |
+ PEDecl [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S?
+ '>' [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
+ [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
+ [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::=
+ S 'NDATA' S Name [ VC: Notation Declared ] The Name must
+ match the declared name of a notation. """
+ libxml2mod.xmlParseEntityDecl(self._o)
+
+ def parseEntityRef(self):
+ """parse ENTITY references declarations [68] EntityRef ::=
+ '&' Name ';' [ WFC: Entity Declared ] In a document
+ without any DTD, a document with only an internal DTD
+ subset which contains no parameter entity references, or a
+ document with "standalone='yes'", the Name given in the
+ entity reference must match that in an entity declaration,
+ except that well-formed documents need not declare any of
+ the following entities: amp, lt, gt, apos, quot. The
+ declaration of a parameter entity must precede any
+ reference to it. Similarly, the declaration of a general
+ entity must precede any reference to it which appears in a
+ default value in an attribute-list declaration. Note that
+ if entities are declared in the external subset or in
+ external parameter entities, a non-validating processor is
+ not obligated to read and process their declarations; for
+ such documents, the rule that an entity must be declared is
+ a well-formedness constraint only if standalone='yes'. [
+ WFC: Parsed Entity ] An entity reference must not contain
+ the name of an unparsed entity """
+ ret = libxml2mod.xmlParseEntityRef(self._o)
+ if ret is None:raise parserError('xmlParseEntityRef() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def parseExternalSubset(self, ExternalID, SystemID):
+ """parse Markup declarations from an external subset [30]
+ extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl
+ ::= (markupdecl | conditionalSect | PEReference | S) * """
+ libxml2mod.xmlParseExternalSubset(self._o, ExternalID, SystemID)
+
+ def parseMarkupDecl(self):
+ """parse Markup declarations [29] markupdecl ::= elementdecl
+ | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [
+ VC: Proper Declaration/PE Nesting ] Parameter-entity
+ replacement text must be properly nested with markup
+ declarations. That is to say, if either the first character
+ or the last character of a markup declaration (markupdecl
+ above) is contained in the replacement text for a
+ parameter-entity reference, both must be contained in the
+ same replacement text. [ WFC: PEs in Internal Subset ] In
+ the internal DTD subset, parameter-entity references can
+ occur only where markup declarations can occur, not within
+ markup declarations. (This does not apply to references
+ that occur in external parameter entities or to the
+ external subset.) """
+ libxml2mod.xmlParseMarkupDecl(self._o)
+
+ def parseMisc(self):
+ """parse an XML Misc* optional field. [27] Misc ::= Comment |
+ PI | S """
+ libxml2mod.xmlParseMisc(self._o)
+
+ def parseName(self):
+ """parse an XML name. [4] NameChar ::= Letter | Digit | '.' |
+ '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
+ (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20
+ Name)* """
+ ret = libxml2mod.xmlParseName(self._o)
+ return ret
+
+ def parseNamespace(self):
+ """xmlParseNamespace: parse specific PI '<?namespace ...'
+ constructs. This is what the older xml-name Working Draft
+ specified, a bunch of other stuff may still rely on it, so
+ support is still here as if it was declared on the root of
+ the Tree:-( TODO: remove from library To be removed at
+ next drop of binary compatibility """
+ libxml2mod.xmlParseNamespace(self._o)
+
+ def parseNmtoken(self):
+ """parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8]
+ Nmtokens ::= Nmtoken (#x20 Nmtoken)* """
+ ret = libxml2mod.xmlParseNmtoken(self._o)
+ return ret
+
+ def parseNotationDecl(self):
+ """parse a notation declaration [82] NotationDecl ::=
+ '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'
+ Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral
+ 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S
+ SystemLiteral See the NOTE on xmlParseExternalID(). """
+ libxml2mod.xmlParseNotationDecl(self._o)
+
+ def parsePEReference(self):
+ """parse PEReference declarations The entity content is
+ handled directly by pushing it's content as a new input
+ stream. [69] PEReference ::= '%' Name ';' [ WFC: No
+ Recursion ] A parsed entity must not contain a recursive
+ reference to itself, either directly or indirectly. [ WFC:
+ Entity Declared ] In a document without any DTD, a document
+ with only an internal DTD subset which contains no
+ parameter entity references, or a document with
+ "standalone='yes'", ... ... The declaration of a parameter
+ entity must precede any reference to it... [ VC: Entity
+ Declared ] In a document with an external subset or
+ external parameter entities with "standalone='no'", ...
+ ... The declaration of a parameter entity must precede any
+ reference to it... [ WFC: In DTD ] Parameter-entity
+ references may only appear in the DTD. NOTE: misleading but
+ this is handled. """
+ libxml2mod.xmlParsePEReference(self._o)
+
+ def parsePI(self):
+ """parse an XML Processing Instruction. [16] PI ::= '<?'
+ PITarget (S (Char* - (Char* '?>' Char*)))? '?>' The
+ processing is transferred to SAX once parsed. """
+ libxml2mod.xmlParsePI(self._o)
+
+ def parsePITarget(self):
+ """parse the name of a PI [17] PITarget ::= Name - (('X' |
+ 'x') ('M' | 'm') ('L' | 'l')) """
+ ret = libxml2mod.xmlParsePITarget(self._o)
+ return ret
+
+ def parsePubidLiteral(self):
+ """parse an XML public literal [12] PubidLiteral ::= '"'
+ PubidChar* '"' | "'" (PubidChar - "'")* "'" """
+ ret = libxml2mod.xmlParsePubidLiteral(self._o)
+ return ret
+
+ def parseQuotedString(self):
+ """Parse and return a string between quotes or doublequotes
+ TODO: Deprecated, to be removed at next drop of binary
+ compatibility """
+ ret = libxml2mod.xmlParseQuotedString(self._o)
+ return ret
+
+ def parseReference(self):
+ """parse and handle entity references in content, depending on
+ the SAX interface, this may end-up in a call to character()
+ if this is a CharRef, a predefined entity, if there is no
+ reference() callback. or if the parser was asked to switch
+ to that mode. [67] Reference ::= EntityRef | CharRef """
+ libxml2mod.xmlParseReference(self._o)
+
+ def parseSDDecl(self):
+ """parse the XML standalone declaration [32] SDDecl ::= S
+ 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' |
+ 'no')'"')) [ VC: Standalone Document Declaration ] TODO
+ The standalone document declaration must have the value
+ "no" if any external markup declarations contain
+ declarations of: - attributes with default values, if
+ elements to which these attributes apply appear in the
+ document without specifications of values for these
+ attributes, or - entities (other than amp, lt, gt, apos,
+ quot), if references to those entities appear in the
+ document, or - attributes with values subject to
+ normalization, where the attribute appears in the document
+ with a value which will change as a result of
+ normalization, or - element types with element content, if
+ white space occurs directly within any instance of those
+ types. """
+ ret = libxml2mod.xmlParseSDDecl(self._o)
+ return ret
+
+ def parseStartTag(self):
+ """parse a start of tag either for rule element or
+ EmptyElement. In both case we don't parse the tag closing
+ chars. [40] STag ::= '<' Name (S Attribute)* S? '>' [
+ WFC: Unique Att Spec ] No attribute name may appear more
+ than once in the same start-tag or empty-element tag. [44]
+ EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC:
+ Unique Att Spec ] No attribute name may appear more than
+ once in the same start-tag or empty-element tag. With
+ namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>'
+ [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>' """
+ ret = libxml2mod.xmlParseStartTag(self._o)
+ return ret
+
+ def parseSystemLiteral(self):
+ """parse an XML Literal [11] SystemLiteral ::= ('"' [^"]*
+ '"') | ("'" [^']* "'") """
+ ret = libxml2mod.xmlParseSystemLiteral(self._o)
+ return ret
+
+ def parseTextDecl(self):
+ """parse an XML declaration header for external entities [77]
+ TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' """
+ libxml2mod.xmlParseTextDecl(self._o)
+
+ def parseVersionInfo(self):
+ """parse the XML version. [24] VersionInfo ::= S 'version' Eq
+ (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? """
+ ret = libxml2mod.xmlParseVersionInfo(self._o)
+ return ret
+
+ def parseVersionNum(self):
+ """parse the XML version value. [26] VersionNum ::= '1.'
+ [0-9]+ In practice allow [0-9].[0-9]+ at that level """
+ ret = libxml2mod.xmlParseVersionNum(self._o)
+ return ret
+
+ def parseXMLDecl(self):
+ """parse an XML declaration header [23] XMLDecl ::= '<?xml'
+ VersionInfo EncodingDecl? SDDecl? S? '?>' """
+ libxml2mod.xmlParseXMLDecl(self._o)
+
+ def parserHandlePEReference(self):
+ """[69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A
+ parsed entity must not contain a recursive reference to
+ itself, either directly or indirectly. [ WFC: Entity
+ Declared ] In a document without any DTD, a document with
+ only an internal DTD subset which contains no parameter
+ entity references, or a document with "standalone='yes'",
+ ... ... The declaration of a parameter entity must precede
+ any reference to it... [ VC: Entity Declared ] In a
+ document with an external subset or external parameter
+ entities with "standalone='no'", ... ... The declaration
+ of a parameter entity must precede any reference to it...
+ [ WFC: In DTD ] Parameter-entity references may only appear
+ in the DTD. NOTE: misleading but this is handled. A
+ PEReference may have been detected in the current input
+ stream the handling is done accordingly to
+ http://www.w3.org/TR/REC-xml#entproc i.e. - Included in
+ literal in entity values - Included as Parameter Entity
+ reference within DTDs """
+ libxml2mod.xmlParserHandlePEReference(self._o)
+
+ def parserHandleReference(self):
+ """TODO: Remove, now deprecated ... the test is done directly
+ in the content parsing routines. [67] Reference ::=
+ EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [
+ WFC: Entity Declared ] the Name given in the entity
+ reference must match that in an entity declaration, except
+ that well-formed documents need not declare any of the
+ following entities: amp, lt, gt, apos, quot. [ WFC: Parsed
+ Entity ] An entity reference must not contain the name of
+ an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' |
+ '&#x' [0-9a-fA-F]+ ';' A PEReference may have been
+ detected in the current input stream the handling is done
+ accordingly to http://www.w3.org/TR/REC-xml#entproc """
+ libxml2mod.xmlParserHandleReference(self._o)
+
+ def popInput(self):
+ """xmlPopInput: the current input pointed by ctxt->input came
+ to an end pop it and return the next char. """
+ ret = libxml2mod.xmlPopInput(self._o)
+ return ret
+
+ def scanName(self):
+ """Trickery: parse an XML name but without consuming the input
+ flow Needed for rollback cases. Used only when parsing
+ entities references. TODO: seems deprecated now, only used
+ in the default part of xmlParserHandleReference [4]
+ NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ CombiningChar | Extender [5] Name ::= (Letter | '_' | ':')
+ (NameChar)* [6] Names ::= Name (S Name)* """
+ ret = libxml2mod.xmlScanName(self._o)
+ return ret
+
+ def skipBlankChars(self):
+ """skip all blanks character found at that point in the input
+ streams. It pops up finished entities in the process if
+ allowable at that point. """
+ ret = libxml2mod.xmlSkipBlankChars(self._o)
+ return ret
+
+ def stringDecodeEntities(self, str, what, end, end2, end3):
+ """Takes a entity string content and process to do the
+ adequate substitutions. [67] Reference ::= EntityRef |
+ CharRef [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlStringDecodeEntities(self._o, str, what, end, end2, end3)
+ return ret
+
+ def stringLenDecodeEntities(self, str, len, what, end, end2, end3):
+ """Takes a entity string content and process to do the
+ adequate substitutions. [67] Reference ::= EntityRef |
+ CharRef [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlStringLenDecodeEntities(self._o, str, len, what, end, end2, end3)
+ return ret
+
+class xmlAttr(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlAttr got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlAttr (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlAttr functions from module debugXML
+ #
+
+ def debugDumpAttr(self, output, depth):
+ """Dumps debug information for the attribute """
+ libxml2mod.xmlDebugDumpAttr(output, self._o, depth)
+
+ def debugDumpAttrList(self, output, depth):
+ """Dumps debug information for the attribute list """
+ libxml2mod.xmlDebugDumpAttrList(output, self._o, depth)
+
+ #
+ # xmlAttr functions from module tree
+ #
+
+ def copyProp(self, target):
+ """Do a copy of the attribute. """
+ if target is None: target__o = None
+ else: target__o = target._o
+ ret = libxml2mod.xmlCopyProp(target__o, self._o)
+ if ret is None:raise treeError('xmlCopyProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def copyPropList(self, target):
+ """Do a copy of an attribute list. """
+ if target is None: target__o = None
+ else: target__o = target._o
+ ret = libxml2mod.xmlCopyPropList(target__o, self._o)
+ if ret is None:raise treeError('xmlCopyPropList() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def freeProp(self):
+ """Free one attribute, all the content is freed too """
+ libxml2mod.xmlFreeProp(self._o)
+
+ def freePropList(self):
+ """Free a property and all its siblings, all the children are
+ freed too. """
+ libxml2mod.xmlFreePropList(self._o)
+
+ def removeProp(self):
+ """Unlink and free one attribute, all the content is freed too
+ Note this doesn't work for namespace definition attributes """
+ ret = libxml2mod.xmlRemoveProp(self._o)
+ return ret
+
+ #
+ # xmlAttr functions from module valid
+ #
+
+ def removeID(self, doc):
+ """Remove the given attribute from the ID table maintained
+ internally. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRemoveID(doc__o, self._o)
+ return ret
+
+ def removeRef(self, doc):
+ """Remove the given attribute from the Ref table maintained
+ internally. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRemoveRef(doc__o, self._o)
+ return ret
+
+class xmlAttribute(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlAttribute got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlAttribute (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+class catalog:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeCatalog(self._o)
+ self._o = None
+
+ #
+ # catalog functions from module catalog
+ #
+
+ def add(self, type, orig, replace):
+ """Add an entry in the catalog, it may overwrite existing but
+ different entries. """
+ ret = libxml2mod.xmlACatalogAdd(self._o, type, orig, replace)
+ return ret
+
+ def catalogIsEmpty(self):
+ """Check is a catalog is empty """
+ ret = libxml2mod.xmlCatalogIsEmpty(self._o)
+ return ret
+
+ def convertSGMLCatalog(self):
+ """Convert all the SGML catalog entries as XML ones """
+ ret = libxml2mod.xmlConvertSGMLCatalog(self._o)
+ return ret
+
+ def dump(self, out):
+ """Dump the given catalog to the given file. """
+ libxml2mod.xmlACatalogDump(self._o, out)
+
+ def remove(self, value):
+ """Remove an entry from the catalog """
+ ret = libxml2mod.xmlACatalogRemove(self._o, value)
+ return ret
+
+ def resolve(self, pubID, sysID):
+ """Do a complete resolution lookup of an External Identifier """
+ ret = libxml2mod.xmlACatalogResolve(self._o, pubID, sysID)
+ return ret
+
+ def resolvePublic(self, pubID):
+ """Try to lookup the catalog local reference associated to a
+ public ID in that catalog """
+ ret = libxml2mod.xmlACatalogResolvePublic(self._o, pubID)
+ return ret
+
+ def resolveSystem(self, sysID):
+ """Try to lookup the catalog resource for a system ID """
+ ret = libxml2mod.xmlACatalogResolveSystem(self._o, sysID)
+ return ret
+
+ def resolveURI(self, URI):
+ """Do a complete resolution lookup of an URI """
+ ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
+ return ret
+
+class xmlDtd(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlDtd got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlDtd (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlDtd functions from module debugXML
+ #
+
+ def debugDumpDTD(self, output):
+ """Dumps debug information for the DTD """
+ libxml2mod.xmlDebugDumpDTD(output, self._o)
+
+ #
+ # xmlDtd functions from module tree
+ #
+
+ def copyDtd(self):
+ """Do a copy of the dtd. """
+ ret = libxml2mod.xmlCopyDtd(self._o)
+ if ret is None:raise treeError('xmlCopyDtd() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def freeDtd(self):
+ """Free a DTD structure. """
+ libxml2mod.xmlFreeDtd(self._o)
+
+ #
+ # xmlDtd functions from module valid
+ #
+
+ def dtdAttrDesc(self, elem, name):
+ """Search the DTD for the description of this attribute on
+ this element. """
+ ret = libxml2mod.xmlGetDtdAttrDesc(self._o, elem, name)
+ if ret is None:raise treeError('xmlGetDtdAttrDesc() failed')
+ __tmp = xmlAttribute(_obj=ret)
+ return __tmp
+
+ def dtdElementDesc(self, name):
+ """Search the DTD for the description of this element """
+ ret = libxml2mod.xmlGetDtdElementDesc(self._o, name)
+ if ret is None:raise treeError('xmlGetDtdElementDesc() failed')
+ __tmp = xmlElement(_obj=ret)
+ return __tmp
+
+ def dtdQAttrDesc(self, elem, name, prefix):
+ """Search the DTD for the description of this qualified
+ attribute on this element. """
+ ret = libxml2mod.xmlGetDtdQAttrDesc(self._o, elem, name, prefix)
+ if ret is None:raise treeError('xmlGetDtdQAttrDesc() failed')
+ __tmp = xmlAttribute(_obj=ret)
+ return __tmp
+
+ def dtdQElementDesc(self, name, prefix):
+ """Search the DTD for the description of this element """
+ ret = libxml2mod.xmlGetDtdQElementDesc(self._o, name, prefix)
+ if ret is None:raise treeError('xmlGetDtdQElementDesc() failed')
+ __tmp = xmlElement(_obj=ret)
+ return __tmp
+
+class xmlElement(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlElement got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlElement (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+class xmlEntity(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlEntity got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlEntity (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlEntity functions from module parserInternals
+ #
+
+ def handleEntity(self, ctxt):
+ """Default handling of defined entities, when should we define
+ a new input stream ? When do we just handle that as a set
+ of chars ? OBSOLETE: to be removed at some point. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ libxml2mod.xmlHandleEntity(ctxt__o, self._o)
+
+class Error:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for Error
+ def code(self):
+ """The error code, e.g. an xmlParserError """
+ ret = libxml2mod.xmlErrorGetCode(self._o)
+ return ret
+
+ def domain(self):
+ """What part of the library raised this error """
+ ret = libxml2mod.xmlErrorGetDomain(self._o)
+ return ret
+
+ def file(self):
+ """the filename """
+ ret = libxml2mod.xmlErrorGetFile(self._o)
+ return ret
+
+ def level(self):
+ """how consequent is the error """
+ ret = libxml2mod.xmlErrorGetLevel(self._o)
+ return ret
+
+ def line(self):
+ """the line number if available """
+ ret = libxml2mod.xmlErrorGetLine(self._o)
+ return ret
+
+ def message(self):
+ """human-readable informative error message """
+ ret = libxml2mod.xmlErrorGetMessage(self._o)
+ return ret
+
+ #
+ # Error functions from module xmlerror
+ #
+
+ def copyError(self, to):
+ """Save the original error to the new place. """
+ if to is None: to__o = None
+ else: to__o = to._o
+ ret = libxml2mod.xmlCopyError(self._o, to__o)
+ return ret
+
+ def resetError(self):
+ """Cleanup the error. """
+ libxml2mod.xmlResetError(self._o)
+
+class xmlNs(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlNs got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlNs (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlNs functions from module tree
+ #
+
+ def copyNamespace(self):
+ """Do a copy of the namespace. """
+ ret = libxml2mod.xmlCopyNamespace(self._o)
+ if ret is None:raise treeError('xmlCopyNamespace() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def copyNamespaceList(self):
+ """Do a copy of an namespace list. """
+ ret = libxml2mod.xmlCopyNamespaceList(self._o)
+ if ret is None:raise treeError('xmlCopyNamespaceList() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def freeNs(self):
+ """Free up the structures associated to a namespace """
+ libxml2mod.xmlFreeNs(self._o)
+
+ def freeNsList(self):
+ """Free up all the structures associated to the chained
+ namespaces. """
+ libxml2mod.xmlFreeNsList(self._o)
+
+ def newChild(self, parent, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child list containing the TEXTs and ENTITY_REFs node will
+ be created. NOTE: @content is supposed to be a piece of XML
+ CDATA, so it allows entity references. XML special chars
+ must be escaped first by using
+ xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
+ be used. """
+ if parent is None: parent__o = None
+ else: parent__o = parent._o
+ ret = libxml2mod.xmlNewChild(parent__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNode(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocNode(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNodeEatName(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocNodeEatName(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocRawNode(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocRawNode(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocRawNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNodeEatName(self, name):
+ """Creation of a new node element. @ns is optional (None). """
+ ret = libxml2mod.xmlNewNodeEatName(self._o, name)
+ if ret is None:raise treeError('xmlNewNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNsProp(self, node, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlNewNsProp(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlNewNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newNsPropEatName(self, node, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlNewNsPropEatName(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlNewNsPropEatName() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newTextChild(self, parent, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child TEXT node will be created containing the string
+ @content. NOTE: Use xmlNewChild() if @content will contain
+ entities that need to be preserved. Use this function,
+ xmlNewTextChild(), if you need to ensure that reserved XML
+ chars that might appear in @content, such as the ampersand,
+ greater-than or less-than signs, are automatically replaced
+ by their XML escaped entity representations. """
+ if parent is None: parent__o = None
+ else: parent__o = parent._o
+ ret = libxml2mod.xmlNewTextChild(parent__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewTextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def setNs(self, node):
+ """Associate a namespace to a node, a posteriori. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ libxml2mod.xmlSetNs(node__o, self._o)
+
+ def setNsProp(self, node, name, value):
+ """Set (or reset) an attribute carried by a node. The ns
+ structure must be in scope, this is not checked """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSetNsProp(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlSetNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def unsetNsProp(self, node, name):
+ """Remove an attribute carried by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlUnsetNsProp(node__o, self._o, name)
+ return ret
+
+ #
+ # xmlNs functions from module xpathInternals
+ #
+
+ def xpathNodeSetFreeNs(self):
+ """Namespace nodes in libxml don't match the XPath semantic.
+ In a node set the namespace nodes are duplicated and the
+ next pointer is set to the parent node in the XPath
+ semantic. Check if such a node needs to be freed """
+ libxml2mod.xmlXPathNodeSetFreeNs(self._o)
+
+class outputBuffer(ioWriteWrapper):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ioWriteWrapper.__init__(self, _obj=_obj)
+
+ #
+ # outputBuffer functions from module HTMLtree
+ #
+
+ def htmlDocContentDumpFormatOutput(self, cur, encoding, format):
+ """Dump an HTML document. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlDocContentDumpFormatOutput(self._o, cur__o, encoding, format)
+
+ def htmlDocContentDumpOutput(self, cur, encoding):
+ """Dump an HTML document. Formatting return/spaces are added. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlDocContentDumpOutput(self._o, cur__o, encoding)
+
+ def htmlNodeDumpFormatOutput(self, doc, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFormatOutput(self._o, doc__o, cur__o, encoding, format)
+
+ def htmlNodeDumpOutput(self, doc, cur, encoding):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns/spaces are added. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpOutput(self._o, doc__o, cur__o, encoding)
+
+ #
+ # outputBuffer functions from module tree
+ #
+
+ def nodeDumpOutput(self, doc, cur, level, format, encoding):
+ """Dump an XML node, recursive behaviour, children are printed
+ too. Note that @format = 1 provide node indenting only if
+ xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
+ called """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlNodeDumpOutput(self._o, doc__o, cur__o, level, format, encoding)
+
+ def saveFileTo(self, cur, encoding):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlSaveFileTo(self._o, cur__o, encoding)
+ return ret
+
+ def saveFormatFileTo(self, cur, encoding, format):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlSaveFormatFileTo(self._o, cur__o, encoding, format)
+ return ret
+
+ #
+ # outputBuffer functions from module xmlIO
+ #
+
+ def getContent(self):
+ """Gives a pointer to the data currently held in the output
+ buffer """
+ ret = libxml2mod.xmlOutputBufferGetContent(self._o)
+ return ret
+
+ def write(self, len, buf):
+ """Write the content of the array in the output I/O buffer
+ This routine handle the I18N transcoding from internal
+ UTF-8 The buffer is lossless, i.e. will store in case of
+ partial or delayed writes. """
+ ret = libxml2mod.xmlOutputBufferWrite(self._o, len, buf)
+ return ret
+
+ def writeString(self, str):
+ """Write the content of the string in the output I/O buffer
+ This routine handle the I18N transcoding from internal
+ UTF-8 The buffer is lossless, i.e. will store in case of
+ partial or delayed writes. """
+ ret = libxml2mod.xmlOutputBufferWriteString(self._o, str)
+ return ret
+
+class inputBuffer(ioReadWrapper):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ioReadWrapper.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+ #
+ # inputBuffer functions from module xmlIO
+ #
+
+ def grow(self, len):
+ """Grow up the content of the input buffer, the old data are
+ preserved This routine handle the I18N transcoding to
+ internal UTF-8 This routine is used when operating the
+ parser in normal (pull) mode TODO: one should be able to
+ remove one extra copy by copying directly onto in->buffer
+ or in->raw """
+ ret = libxml2mod.xmlParserInputBufferGrow(self._o, len)
+ return ret
+
+ def push(self, len, buf):
+ """Push the content of the arry in the input buffer This
+ routine handle the I18N transcoding to internal UTF-8 This
+ is used when operating the parser in progressive (push)
+ mode. """
+ ret = libxml2mod.xmlParserInputBufferPush(self._o, len, buf)
+ return ret
+
+ def read(self, len):
+ """Refresh the content of the input buffer, the old data are
+ considered consumed This routine handle the I18N
+ transcoding to internal UTF-8 """
+ ret = libxml2mod.xmlParserInputBufferRead(self._o, len)
+ return ret
+
+ #
+ # inputBuffer functions from module xmlreader
+ #
+
+ def Setup(self, reader, URL, encoding, options):
+ """Setup an XML reader with new options """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSetup(reader__o, self._o, URL, encoding, options)
+ return ret
+
+ def newTextReader(self, URI):
+ """Create an xmlTextReader structure fed with @input """
+ ret = libxml2mod.xmlNewTextReader(self._o, URI)
+ if ret is None:raise treeError('xmlNewTextReader() failed')
+ __tmp = xmlTextReader(_obj=ret)
+ __tmp.input = self
+ return __tmp
+
+class xmlReg:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRegFreeRegexp(self._o)
+ self._o = None
+
+ #
+ # xmlReg functions from module xmlregexp
+ #
+
+ def regexpExec(self, content):
+ """Check if the regular expression generates the value """
+ ret = libxml2mod.xmlRegexpExec(self._o, content)
+ return ret
+
+ def regexpIsDeterminist(self):
+ """Check if the regular expression is determinist """
+ ret = libxml2mod.xmlRegexpIsDeterminist(self._o)
+ return ret
+
+ def regexpPrint(self, output):
+ """Print the content of the compiled regular expression """
+ libxml2mod.xmlRegexpPrint(output, self._o)
+
+class relaxNgParserCtxt:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFreeParserCtxt(self._o)
+ self._o = None
+
+ #
+ # relaxNgParserCtxt functions from module relaxng
+ #
+
+ def relaxNGParse(self):
+ """parse a schema definition resource and build an internal
+ XML Schema structure which can be used to validate
+ instances. """
+ ret = libxml2mod.xmlRelaxNGParse(self._o)
+ if ret is None:raise parserError('xmlRelaxNGParse() failed')
+ __tmp = relaxNgSchema(_obj=ret)
+ return __tmp
+
+ def relaxParserSetFlag(self, flags):
+ """Semi private function used to pass informations to a parser
+ context which are a combination of xmlRelaxNGParserFlag . """
+ ret = libxml2mod.xmlRelaxParserSetFlag(self._o, flags)
+ return ret
+
+class relaxNgSchema:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFree(self._o)
+ self._o = None
+
+ #
+ # relaxNgSchema functions from module relaxng
+ #
+
+ def relaxNGDump(self, output):
+ """Dump a RelaxNG structure back """
+ libxml2mod.xmlRelaxNGDump(output, self._o)
+
+ def relaxNGDumpTree(self, output):
+ """Dump the transformed RelaxNG tree. """
+ libxml2mod.xmlRelaxNGDumpTree(output, self._o)
+
+ def relaxNGNewValidCtxt(self):
+ """Create an XML RelaxNGs validation context based on the
+ given schema """
+ ret = libxml2mod.xmlRelaxNGNewValidCtxt(self._o)
+ if ret is None:raise treeError('xmlRelaxNGNewValidCtxt() failed')
+ __tmp = relaxNgValidCtxt(_obj=ret)
+ __tmp.schema = self
+ return __tmp
+
+ #
+ # relaxNgSchema functions from module xmlreader
+ #
+
+ def RelaxNGSetSchema(self, reader):
+ """Use RelaxNG to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then RelaxNG validation is deactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(reader__o, self._o)
+ return ret
+
+class relaxNgValidCtxt(relaxNgValidCtxtCore):
+ def __init__(self, _obj=None):
+ self.schema = None
+ self._o = _obj
+ relaxNgValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # relaxNgValidCtxt functions from module relaxng
+ #
+
+ def relaxNGValidateDoc(self, doc):
+ """Validate a document tree in memory. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRelaxNGValidateDoc(self._o, doc__o)
+ return ret
+
+ def relaxNGValidateFullElement(self, doc, elem):
+ """Validate a full subtree when
+ xmlRelaxNGValidatePushElement() returned 0 and the content
+ of the node has been expanded. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidateFullElement(self._o, doc__o, elem__o)
+ return ret
+
+ def relaxNGValidatePopElement(self, doc, elem):
+ """Pop the element end from the RelaxNG validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePopElement(self._o, doc__o, elem__o)
+ return ret
+
+ def relaxNGValidatePushCData(self, data, len):
+ """check the CData parsed for validation in the current stack """
+ ret = libxml2mod.xmlRelaxNGValidatePushCData(self._o, data, len)
+ return ret
+
+ def relaxNGValidatePushElement(self, doc, elem):
+ """Push a new element start on the RelaxNG validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePushElement(self._o, doc__o, elem__o)
+ return ret
+
+ #
+ # relaxNgValidCtxt functions from module xmlreader
+ #
+
+ def RelaxNGValidateCtxt(self, reader, options):
+ """Use RelaxNG schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then RelaxNG schema validation is
+ deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(reader__o, self._o, options)
+ return ret
+
+class SchemaParserCtxt:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFreeParserCtxt(self._o)
+ self._o = None
+
+ #
+ # SchemaParserCtxt functions from module xmlschemas
+ #
+
+ def schemaParse(self):
+ """parse a schema definition resource and build an internal
+ XML Schema structure which can be used to validate
+ instances. """
+ ret = libxml2mod.xmlSchemaParse(self._o)
+ if ret is None:raise parserError('xmlSchemaParse() failed')
+ __tmp = Schema(_obj=ret)
+ return __tmp
+
+class Schema:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFree(self._o)
+ self._o = None
+
+ #
+ # Schema functions from module xmlreader
+ #
+
+ def SetSchema(self, reader):
+ """Use XSD Schema to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then Schema validation is deactivated. The
+ @schema should not be freed until the reader is deallocated
+ or its use has been deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSetSchema(reader__o, self._o)
+ return ret
+
+ #
+ # Schema functions from module xmlschemas
+ #
+
+ def schemaDump(self, output):
+ """Dump a Schema structure. """
+ libxml2mod.xmlSchemaDump(output, self._o)
+
+ def schemaNewValidCtxt(self):
+ """Create an XML Schemas validation context based on the given
+ schema. """
+ ret = libxml2mod.xmlSchemaNewValidCtxt(self._o)
+ if ret is None:raise treeError('xmlSchemaNewValidCtxt() failed')
+ __tmp = SchemaValidCtxt(_obj=ret)
+ __tmp.schema = self
+ return __tmp
+
+class SchemaValidCtxt(SchemaValidCtxtCore):
+ def __init__(self, _obj=None):
+ self.schema = None
+ self._o = _obj
+ SchemaValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # SchemaValidCtxt functions from module xmlreader
+ #
+
+ def SchemaValidateCtxt(self, reader, options):
+ """Use W3C XSD schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then XML Schema validation is
+ deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(reader__o, self._o, options)
+ return ret
+
+ #
+ # SchemaValidCtxt functions from module xmlschemas
+ #
+
+ def schemaIsValid(self):
+ """Check if any error was detected during validation. """
+ ret = libxml2mod.xmlSchemaIsValid(self._o)
+ return ret
+
+ def schemaSetValidOptions(self, options):
+ """Sets the options to be used during the validation. """
+ ret = libxml2mod.xmlSchemaSetValidOptions(self._o, options)
+ return ret
+
+ def schemaValidCtxtGetOptions(self):
+ """Get the validation context options. """
+ ret = libxml2mod.xmlSchemaValidCtxtGetOptions(self._o)
+ return ret
+
+ def schemaValidCtxtGetParserCtxt(self):
+ """allow access to the parser context of the schema validation
+ context """
+ ret = libxml2mod.xmlSchemaValidCtxtGetParserCtxt(self._o)
+ if ret is None:raise parserError('xmlSchemaValidCtxtGetParserCtxt() failed')
+ __tmp = parserCtxt(_obj=ret)
+ return __tmp
+
+ def schemaValidateDoc(self, doc):
+ """Validate a document tree in memory. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSchemaValidateDoc(self._o, doc__o)
+ return ret
+
+ def schemaValidateFile(self, filename, options):
+ """Do a schemas validation of the given resource, it will use
+ the SAX streamable validation internally. """
+ ret = libxml2mod.xmlSchemaValidateFile(self._o, filename, options)
+ return ret
+
+ def schemaValidateOneElement(self, elem):
+ """Validate a branch of a tree, starting with the given @elem. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlSchemaValidateOneElement(self._o, elem__o)
+ return ret
+
+ def schemaValidateSetFilename(self, filename):
+ """Workaround to provide file error reporting information when
+ this is not provided by current APIs """
+ libxml2mod.xmlSchemaValidateSetFilename(self._o, filename)
+
+class xmlTextReaderLocator:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ #
+ # xmlTextReaderLocator functions from module xmlreader
+ #
+
+ def BaseURI(self):
+ """Obtain the base URI for the given locator. """
+ ret = libxml2mod.xmlTextReaderLocatorBaseURI(self._o)
+ return ret
+
+ def LineNumber(self):
+ """Obtain the line number for the given locator. """
+ ret = libxml2mod.xmlTextReaderLocatorLineNumber(self._o)
+ return ret
+
+class xmlTextReader(xmlTextReaderCore):
+ def __init__(self, _obj=None):
+ self.input = None
+ self._o = _obj
+ xmlTextReaderCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeTextReader(self._o)
+ self._o = None
+
+ #
+ # xmlTextReader functions from module xmlreader
+ #
+
+ def AttributeCount(self):
+ """Provides the number of attributes of the current node """
+ ret = libxml2mod.xmlTextReaderAttributeCount(self._o)
+ return ret
+
+ def BaseUri(self):
+ """The base URI of the node. """
+ ret = libxml2mod.xmlTextReaderConstBaseUri(self._o)
+ return ret
+
+ def ByteConsumed(self):
+ """This function provides the current index of the parser used
+ by the reader, relative to the start of the current entity.
+ This function actually just wraps a call to
+ xmlBytesConsumed() for the parser context associated with
+ the reader. See xmlBytesConsumed() for more information. """
+ ret = libxml2mod.xmlTextReaderByteConsumed(self._o)
+ return ret
+
+ def Close(self):
+ """This method releases any resources allocated by the current
+ instance changes the state to Closed and close any
+ underlying input. """
+ ret = libxml2mod.xmlTextReaderClose(self._o)
+ return ret
+
+ def CurrentDoc(self):
+ """Hacking interface allowing to get the xmlDocPtr
+ corresponding to the current document being accessed by the
+ xmlTextReader. NOTE: as a result of this call, the reader
+ will not destroy the associated XML document and calling
+ xmlFreeDoc() on the result is needed once the reader
+ parsing has finished. """
+ ret = libxml2mod.xmlTextReaderCurrentDoc(self._o)
+ if ret is None:raise treeError('xmlTextReaderCurrentDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def CurrentNode(self):
+ """Hacking interface allowing to get the xmlNodePtr
+ corresponding to the current node being accessed by the
+ xmlTextReader. This is dangerous because the underlying
+ node may be destroyed on the next Reads. """
+ ret = libxml2mod.xmlTextReaderCurrentNode(self._o)
+ if ret is None:raise treeError('xmlTextReaderCurrentNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def Depth(self):
+ """The depth of the node in the tree. """
+ ret = libxml2mod.xmlTextReaderDepth(self._o)
+ return ret
+
+ def Encoding(self):
+ """Determine the encoding of the document being read. """
+ ret = libxml2mod.xmlTextReaderConstEncoding(self._o)
+ return ret
+
+ def Expand(self):
+ """Reads the contents of the current node and the full
+ subtree. It then makes the subtree available until the next
+ xmlTextReaderRead() call """
+ ret = libxml2mod.xmlTextReaderExpand(self._o)
+ if ret is None:raise treeError('xmlTextReaderExpand() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def GetAttribute(self, name):
+ """Provides the value of the attribute with the specified
+ qualified name. """
+ ret = libxml2mod.xmlTextReaderGetAttribute(self._o, name)
+ return ret
+
+ def GetAttributeNo(self, no):
+ """Provides the value of the attribute with the specified
+ index relative to the containing element. """
+ ret = libxml2mod.xmlTextReaderGetAttributeNo(self._o, no)
+ return ret
+
+ def GetAttributeNs(self, localName, namespaceURI):
+ """Provides the value of the specified attribute """
+ ret = libxml2mod.xmlTextReaderGetAttributeNs(self._o, localName, namespaceURI)
+ return ret
+
+ def GetParserColumnNumber(self):
+ """Provide the column number of the current parsing point. """
+ ret = libxml2mod.xmlTextReaderGetParserColumnNumber(self._o)
+ return ret
+
+ def GetParserLineNumber(self):
+ """Provide the line number of the current parsing point. """
+ ret = libxml2mod.xmlTextReaderGetParserLineNumber(self._o)
+ return ret
+
+ def GetParserProp(self, prop):
+ """Read the parser internal property. """
+ ret = libxml2mod.xmlTextReaderGetParserProp(self._o, prop)
+ return ret
+
+ def GetRemainder(self):
+ """Method to get the remainder of the buffered XML. this
+ method stops the parser, set its state to End Of File and
+ return the input stream with what is left that the parser
+ did not use. The implementation is not good, the parser
+ certainly progressed past what's left in reader->input, and
+ there is an allocation problem. Best would be to rewrite it
+ differently. """
+ ret = libxml2mod.xmlTextReaderGetRemainder(self._o)
+ if ret is None:raise treeError('xmlTextReaderGetRemainder() failed')
+ __tmp = inputBuffer(_obj=ret)
+ return __tmp
+
+ def HasAttributes(self):
+ """Whether the node has attributes. """
+ ret = libxml2mod.xmlTextReaderHasAttributes(self._o)
+ return ret
+
+ def HasValue(self):
+ """Whether the node can have a text value. """
+ ret = libxml2mod.xmlTextReaderHasValue(self._o)
+ return ret
+
+ def IsDefault(self):
+ """Whether an Attribute node was generated from the default
+ value defined in the DTD or schema. """
+ ret = libxml2mod.xmlTextReaderIsDefault(self._o)
+ return ret
+
+ def IsEmptyElement(self):
+ """Check if the current node is empty """
+ ret = libxml2mod.xmlTextReaderIsEmptyElement(self._o)
+ return ret
+
+ def IsNamespaceDecl(self):
+ """Determine whether the current node is a namespace
+ declaration rather than a regular attribute. """
+ ret = libxml2mod.xmlTextReaderIsNamespaceDecl(self._o)
+ return ret
+
+ def IsValid(self):
+ """Retrieve the validity status from the parser context """
+ ret = libxml2mod.xmlTextReaderIsValid(self._o)
+ return ret
+
+ def LocalName(self):
+ """The local name of the node. """
+ ret = libxml2mod.xmlTextReaderConstLocalName(self._o)
+ return ret
+
+ def LookupNamespace(self, prefix):
+ """Resolves a namespace prefix in the scope of the current
+ element. """
+ ret = libxml2mod.xmlTextReaderLookupNamespace(self._o, prefix)
+ return ret
+
+ def MoveToAttribute(self, name):
+ """Moves the position of the current instance to the attribute
+ with the specified qualified name. """
+ ret = libxml2mod.xmlTextReaderMoveToAttribute(self._o, name)
+ return ret
+
+ def MoveToAttributeNo(self, no):
+ """Moves the position of the current instance to the attribute
+ with the specified index relative to the containing element. """
+ ret = libxml2mod.xmlTextReaderMoveToAttributeNo(self._o, no)
+ return ret
+
+ def MoveToAttributeNs(self, localName, namespaceURI):
+ """Moves the position of the current instance to the attribute
+ with the specified local name and namespace URI. """
+ ret = libxml2mod.xmlTextReaderMoveToAttributeNs(self._o, localName, namespaceURI)
+ return ret
+
+ def MoveToElement(self):
+ """Moves the position of the current instance to the node that
+ contains the current Attribute node. """
+ ret = libxml2mod.xmlTextReaderMoveToElement(self._o)
+ return ret
+
+ def MoveToFirstAttribute(self):
+ """Moves the position of the current instance to the first
+ attribute associated with the current node. """
+ ret = libxml2mod.xmlTextReaderMoveToFirstAttribute(self._o)
+ return ret
+
+ def MoveToNextAttribute(self):
+ """Moves the position of the current instance to the next
+ attribute associated with the current node. """
+ ret = libxml2mod.xmlTextReaderMoveToNextAttribute(self._o)
+ return ret
+
+ def Name(self):
+ """The qualified name of the node, equal to Prefix :LocalName. """
+ ret = libxml2mod.xmlTextReaderConstName(self._o)
+ return ret
+
+ def NamespaceUri(self):
+ """The URI defining the namespace associated with the node. """
+ ret = libxml2mod.xmlTextReaderConstNamespaceUri(self._o)
+ return ret
+
+ def NewDoc(self, cur, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML in-memory document.
+ The parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewDoc(self._o, cur, URL, encoding, options)
+ return ret
+
+ def NewFd(self, fd, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML from a file
+ descriptor. NOTE that the file descriptor will not be
+ closed when the reader is closed or reset. The parsing
+ flags @options are a combination of xmlParserOption. This
+ reuses the existing @reader xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewFd(self._o, fd, URL, encoding, options)
+ return ret
+
+ def NewFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. The
+ parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewFile(self._o, filename, encoding, options)
+ return ret
+
+ def NewMemory(self, buffer, size, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML in-memory document.
+ The parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewMemory(self._o, buffer, size, URL, encoding, options)
+ return ret
+
+ def NewWalker(self, doc):
+ """Setup an xmltextReader to parse a preparsed XML document.
+ This reuses the existing @reader xmlTextReader. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlReaderNewWalker(self._o, doc__o)
+ return ret
+
+ def Next(self):
+ """Skip to the node following the current one in document
+ order while avoiding the subtree if any. """
+ ret = libxml2mod.xmlTextReaderNext(self._o)
+ return ret
+
+ def NextSibling(self):
+ """Skip to the node following the current one in document
+ order while avoiding the subtree if any. Currently
+ implemented only for Readers built on a document """
+ ret = libxml2mod.xmlTextReaderNextSibling(self._o)
+ return ret
+
+ def NodeType(self):
+ """Get the node type of the current node Reference:
+ http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/Xm
+ lNodeType.html """
+ ret = libxml2mod.xmlTextReaderNodeType(self._o)
+ return ret
+
+ def Normalization(self):
+ """The value indicating whether to normalize white space and
+ attribute values. Since attribute value and end of line
+ normalizations are a MUST in the XML specification only the
+ value true is accepted. The broken bahaviour of accepting
+ out of range character entities like &#0; is of course not
+ supported either. """
+ ret = libxml2mod.xmlTextReaderNormalization(self._o)
+ return ret
+
+ def Prefix(self):
+ """A shorthand reference to the namespace associated with the
+ node. """
+ ret = libxml2mod.xmlTextReaderConstPrefix(self._o)
+ return ret
+
+ def Preserve(self):
+ """This tells the XML Reader to preserve the current node. The
+ caller must also use xmlTextReaderCurrentDoc() to keep an
+ handle on the resulting document once parsing has finished """
+ ret = libxml2mod.xmlTextReaderPreserve(self._o)
+ if ret is None:raise treeError('xmlTextReaderPreserve() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def QuoteChar(self):
+ """The quotation mark character used to enclose the value of
+ an attribute. """
+ ret = libxml2mod.xmlTextReaderQuoteChar(self._o)
+ return ret
+
+ def Read(self):
+ """Moves the position of the current instance to the next node
+ in the stream, exposing its properties. """
+ ret = libxml2mod.xmlTextReaderRead(self._o)
+ return ret
+
+ def ReadAttributeValue(self):
+ """Parses an attribute value into one or more Text and
+ EntityReference nodes. """
+ ret = libxml2mod.xmlTextReaderReadAttributeValue(self._o)
+ return ret
+
+ def ReadInnerXml(self):
+ """Reads the contents of the current node, including child
+ nodes and markup. """
+ ret = libxml2mod.xmlTextReaderReadInnerXml(self._o)
+ return ret
+
+ def ReadOuterXml(self):
+ """Reads the contents of the current node, including child
+ nodes and markup. """
+ ret = libxml2mod.xmlTextReaderReadOuterXml(self._o)
+ return ret
+
+ def ReadState(self):
+ """Gets the read state of the reader. """
+ ret = libxml2mod.xmlTextReaderReadState(self._o)
+ return ret
+
+ def ReadString(self):
+ """Reads the contents of an element or a text node as a string. """
+ ret = libxml2mod.xmlTextReaderReadString(self._o)
+ return ret
+
+ def RelaxNGSetSchema(self, schema):
+ """Use RelaxNG to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then RelaxNG validation is deactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if schema is None: schema__o = None
+ else: schema__o = schema._o
+ ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(self._o, schema__o)
+ return ret
+
+ def RelaxNGValidate(self, rng):
+ """Use RelaxNG schema to validate the document as it is
+ processed. Activation is only possible before the first
+ Read(). If @rng is None, then RelaxNG schema validation is
+ deactivated. """
+ ret = libxml2mod.xmlTextReaderRelaxNGValidate(self._o, rng)
+ return ret
+
+ def RelaxNGValidateCtxt(self, ctxt, options):
+ """Use RelaxNG schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then RelaxNG schema validation is
+ deactivated. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(self._o, ctxt__o, options)
+ return ret
+
+ def SchemaValidate(self, xsd):
+ """Use W3C XSD schema to validate the document as it is
+ processed. Activation is only possible before the first
+ Read(). If @xsd is None, then XML Schema validation is
+ deactivated. """
+ ret = libxml2mod.xmlTextReaderSchemaValidate(self._o, xsd)
+ return ret
+
+ def SchemaValidateCtxt(self, ctxt, options):
+ """Use W3C XSD schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then XML Schema validation is
+ deactivated. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(self._o, ctxt__o, options)
+ return ret
+
+ def SetParserProp(self, prop, value):
+ """Change the parser processing behaviour by changing some of
+ its internal properties. Note that some properties can only
+ be changed before any read has been done. """
+ ret = libxml2mod.xmlTextReaderSetParserProp(self._o, prop, value)
+ return ret
+
+ def SetSchema(self, schema):
+ """Use XSD Schema to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then Schema validation is deactivated. The
+ @schema should not be freed until the reader is deallocated
+ or its use has been deactivated. """
+ if schema is None: schema__o = None
+ else: schema__o = schema._o
+ ret = libxml2mod.xmlTextReaderSetSchema(self._o, schema__o)
+ return ret
+
+ def Setup(self, input, URL, encoding, options):
+ """Setup an XML reader with new options """
+ if input is None: input__o = None
+ else: input__o = input._o
+ ret = libxml2mod.xmlTextReaderSetup(self._o, input__o, URL, encoding, options)
+ return ret
+
+ def Standalone(self):
+ """Determine the standalone status of the document being read. """
+ ret = libxml2mod.xmlTextReaderStandalone(self._o)
+ return ret
+
+ def String(self, str):
+ """Get an interned string from the reader, allows for example
+ to speedup string name comparisons """
+ ret = libxml2mod.xmlTextReaderConstString(self._o, str)
+ return ret
+
+ def Value(self):
+ """Provides the text value of the node if present """
+ ret = libxml2mod.xmlTextReaderConstValue(self._o)
+ return ret
+
+ def XmlLang(self):
+ """The xml:lang scope within which the node resides. """
+ ret = libxml2mod.xmlTextReaderConstXmlLang(self._o)
+ return ret
+
+ def XmlVersion(self):
+ """Determine the XML version of the document being read. """
+ ret = libxml2mod.xmlTextReaderConstXmlVersion(self._o)
+ return ret
+
+class URI:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeURI(self._o)
+ self._o = None
+
+ # accessors for URI
+ def authority(self):
+ """Get the authority part from an URI """
+ ret = libxml2mod.xmlURIGetAuthority(self._o)
+ return ret
+
+ def fragment(self):
+ """Get the fragment part from an URI """
+ ret = libxml2mod.xmlURIGetFragment(self._o)
+ return ret
+
+ def opaque(self):
+ """Get the opaque part from an URI """
+ ret = libxml2mod.xmlURIGetOpaque(self._o)
+ return ret
+
+ def path(self):
+ """Get the path part from an URI """
+ ret = libxml2mod.xmlURIGetPath(self._o)
+ return ret
+
+ def port(self):
+ """Get the port part from an URI """
+ ret = libxml2mod.xmlURIGetPort(self._o)
+ return ret
+
+ def query(self):
+ """Get the query part from an URI """
+ ret = libxml2mod.xmlURIGetQuery(self._o)
+ return ret
+
+ def queryRaw(self):
+ """Get the raw query part from an URI (i.e. the unescaped
+ form). """
+ ret = libxml2mod.xmlURIGetQueryRaw(self._o)
+ return ret
+
+ def scheme(self):
+ """Get the scheme part from an URI """
+ ret = libxml2mod.xmlURIGetScheme(self._o)
+ return ret
+
+ def server(self):
+ """Get the server part from an URI """
+ ret = libxml2mod.xmlURIGetServer(self._o)
+ return ret
+
+ def setAuthority(self, authority):
+ """Set the authority part of an URI. """
+ libxml2mod.xmlURISetAuthority(self._o, authority)
+
+ def setFragment(self, fragment):
+ """Set the fragment part of an URI. """
+ libxml2mod.xmlURISetFragment(self._o, fragment)
+
+ def setOpaque(self, opaque):
+ """Set the opaque part of an URI. """
+ libxml2mod.xmlURISetOpaque(self._o, opaque)
+
+ def setPath(self, path):
+ """Set the path part of an URI. """
+ libxml2mod.xmlURISetPath(self._o, path)
+
+ def setPort(self, port):
+ """Set the port part of an URI. """
+ libxml2mod.xmlURISetPort(self._o, port)
+
+ def setQuery(self, query):
+ """Set the query part of an URI. """
+ libxml2mod.xmlURISetQuery(self._o, query)
+
+ def setQueryRaw(self, query_raw):
+ """Set the raw query part of an URI (i.e. the unescaped form). """
+ libxml2mod.xmlURISetQueryRaw(self._o, query_raw)
+
+ def setScheme(self, scheme):
+ """Set the scheme part of an URI. """
+ libxml2mod.xmlURISetScheme(self._o, scheme)
+
+ def setServer(self, server):
+ """Set the server part of an URI. """
+ libxml2mod.xmlURISetServer(self._o, server)
+
+ def setUser(self, user):
+ """Set the user part of an URI. """
+ libxml2mod.xmlURISetUser(self._o, user)
+
+ def user(self):
+ """Get the user part from an URI """
+ ret = libxml2mod.xmlURIGetUser(self._o)
+ return ret
+
+ #
+ # URI functions from module uri
+ #
+
+ def parseURIReference(self, str):
+ """Parse an URI reference string based on RFC 3986 and fills
+ in the appropriate fields of the @uri structure
+ URI-reference = URI / relative-ref """
+ ret = libxml2mod.xmlParseURIReference(self._o, str)
+ return ret
+
+ def printURI(self, stream):
+ """Prints the URI in the stream @stream. """
+ libxml2mod.xmlPrintURI(stream, self._o)
+
+ def saveUri(self):
+ """Save the URI as an escaped string """
+ ret = libxml2mod.xmlSaveUri(self._o)
+ return ret
+
+class ValidCtxt(ValidCtxtCore):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # ValidCtxt functions from module valid
+ #
+
+ def validCtxtNormalizeAttributeValue(self, doc, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character.
+ Also check VC: Standalone Document Declaration in P32, and
+ update ctxt->valid accordingly """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(self._o, doc__o, elem__o, name, value)
+ return ret
+
+ def validateDocument(self, doc):
+ """Try to validate the document instance basically it does
+ the all the checks described by the XML Rec i.e. validates
+ the internal and external subset (if present) and validate
+ the document tree. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDocument(self._o, doc__o)
+ return ret
+
+ def validateDocumentFinal(self, doc):
+ """Does the final step for the document validation once all
+ the incremental validation steps have been completed
+ basically it does the following checks described by the XML
+ Rec Check all the IDREF/IDREFS attributes definition for
+ validity """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDocumentFinal(self._o, doc__o)
+ return ret
+
+ def validateDtd(self, doc, dtd):
+ """Try to validate the document against the dtd instance
+ Basically it does check all the definitions in the DtD.
+ Note the the internal subset (if present) is de-coupled
+ (i.e. not used), which could give problems if ID or IDREF
+ is present. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if dtd is None: dtd__o = None
+ else: dtd__o = dtd._o
+ ret = libxml2mod.xmlValidateDtd(self._o, doc__o, dtd__o)
+ return ret
+
+ def validateDtdFinal(self, doc):
+ """Does the final step for the dtds validation once all the
+ subsets have been parsed basically it does the following
+ checks described by the XML Rec - check that ENTITY and
+ ENTITIES type attributes default or possible values matches
+ one of the defined entities. - check that NOTATION type
+ attributes default or possible values matches one of the
+ defined notations. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDtdFinal(self._o, doc__o)
+ return ret
+
+ def validateElement(self, doc, elem):
+ """Try to validate the subtree under an element """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateElement(self._o, doc__o, elem__o)
+ return ret
+
+ def validateNotationUse(self, doc, notationName):
+ """Validate that the given name match a notation declaration.
+ - [ VC: Notation Declared ] """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateNotationUse(self._o, doc__o, notationName)
+ return ret
+
+ def validateOneAttribute(self, doc, elem, attr, value):
+ """Try to validate a single attribute for an element basically
+ it does the following checks as described by the XML-1.0
+ recommendation: - [ VC: Attribute Value Type ] - [ VC:
+ Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
+ Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
+ Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlValidateOneAttribute(self._o, doc__o, elem__o, attr__o, value)
+ return ret
+
+ def validateOneElement(self, doc, elem):
+ """Try to validate a single element and it's attributes,
+ basically it does the following checks as described by the
+ XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
+ Required Attribute ] Then call xmlValidateOneAttribute()
+ for each attribute present. The ID/IDREF checkings are
+ done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateOneElement(self._o, doc__o, elem__o)
+ return ret
+
+ def validateOneNamespace(self, doc, elem, prefix, ns, value):
+ """Try to validate a single namespace declaration for an
+ element basically it does the following checks as described
+ by the XML-1.0 recommendation: - [ VC: Attribute Value Type
+ ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
+ [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
+ Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlValidateOneNamespace(self._o, doc__o, elem__o, prefix, ns__o, value)
+ return ret
+
+ def validatePopElement(self, doc, elem, qname):
+ """Pop the element end from the validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePopElement(self._o, doc__o, elem__o, qname)
+ return ret
+
+ def validatePushCData(self, data, len):
+ """check the CData parsed for validation in the current stack """
+ ret = libxml2mod.xmlValidatePushCData(self._o, data, len)
+ return ret
+
+ def validatePushElement(self, doc, elem, qname):
+ """Push a new element start on the validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePushElement(self._o, doc__o, elem__o, qname)
+ return ret
+
+ def validateRoot(self, doc):
+ """Try to validate a the root element basically it does the
+ following check as described by the XML-1.0 recommendation:
+ - [ VC: Root Element Type ] it doesn't try to recurse or
+ apply other check to the element """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateRoot(self._o, doc__o)
+ return ret
+
+class xpathContext:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for xpathContext
+ def contextDoc(self):
+ """Get the doc from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextDoc(self._o)
+ if ret is None:raise xpathError('xmlXPathGetContextDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def contextNode(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextNode(self._o)
+ if ret is None:raise xpathError('xmlXPathGetContextNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def contextPosition(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextPosition(self._o)
+ return ret
+
+ def contextSize(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextSize(self._o)
+ return ret
+
+ def function(self):
+ """Get the current function name xpathContext """
+ ret = libxml2mod.xmlXPathGetFunction(self._o)
+ return ret
+
+ def functionURI(self):
+ """Get the current function name URI xpathContext """
+ ret = libxml2mod.xmlXPathGetFunctionURI(self._o)
+ return ret
+
+ def setContextDoc(self, doc):
+ """Set the doc of an xpathContext """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlXPathSetContextDoc(self._o, doc__o)
+
+ def setContextNode(self, node):
+ """Set the current node of an xpathContext """
+ if node is None: node__o = None
+ else: node__o = node._o
+ libxml2mod.xmlXPathSetContextNode(self._o, node__o)
+
+ #
+ # xpathContext functions from module python
+ #
+
+ def registerXPathFunction(self, name, ns_uri, f):
+ """Register a Python written function to the XPath interpreter """
+ ret = libxml2mod.xmlRegisterXPathFunction(self._o, name, ns_uri, f)
+ return ret
+
+ def xpathRegisterVariable(self, name, ns_uri, value):
+ """Register a variable with the XPath context """
+ ret = libxml2mod.xmlXPathRegisterVariable(self._o, name, ns_uri, value)
+ return ret
+
+ #
+ # xpathContext functions from module xpath
+ #
+
+ def xpathContextSetCache(self, active, value, options):
+ """Creates/frees an object cache on the XPath context. If
+ activates XPath objects (xmlXPathObject) will be cached
+ internally to be reused. @options: 0: This will set the
+ XPath object caching: @value: This will set the maximum
+ number of XPath objects to be cached per slot There are 5
+ slots for: node-set, string, number, boolean, and misc
+ objects. Use <0 for the default number (100). Other values
+ for @options have currently no effect. """
+ ret = libxml2mod.xmlXPathContextSetCache(self._o, active, value, options)
+ return ret
+
+ def xpathEval(self, str):
+ """Evaluate the XPath Location Path in the given context. """
+ ret = libxml2mod.xmlXPathEval(str, self._o)
+ if ret is None:raise xpathError('xmlXPathEval() failed')
+ return xpathObjectRet(ret)
+
+ def xpathEvalExpression(self, str):
+ """Alias for xmlXPathEval(). """
+ ret = libxml2mod.xmlXPathEvalExpression(str, self._o)
+ if ret is None:raise xpathError('xmlXPathEvalExpression() failed')
+ return xpathObjectRet(ret)
+
+ def xpathFreeContext(self):
+ """Free up an xmlXPathContext """
+ libxml2mod.xmlXPathFreeContext(self._o)
+
+ #
+ # xpathContext functions from module xpathInternals
+ #
+
+ def xpathNewParserContext(self, str):
+ """Create a new xmlXPathParserContext """
+ ret = libxml2mod.xmlXPathNewParserContext(str, self._o)
+ if ret is None:raise xpathError('xmlXPathNewParserContext() failed')
+ __tmp = xpathParserContext(_obj=ret)
+ return __tmp
+
+ def xpathNsLookup(self, prefix):
+ """Search in the namespace declaration array of the context
+ for the given namespace name associated to the given prefix """
+ ret = libxml2mod.xmlXPathNsLookup(self._o, prefix)
+ return ret
+
+ def xpathRegisterAllFunctions(self):
+ """Registers all default XPath functions in this context """
+ libxml2mod.xmlXPathRegisterAllFunctions(self._o)
+
+ def xpathRegisterNs(self, prefix, ns_uri):
+ """Register a new namespace. If @ns_uri is None it unregisters
+ the namespace """
+ ret = libxml2mod.xmlXPathRegisterNs(self._o, prefix, ns_uri)
+ return ret
+
+ def xpathRegisteredFuncsCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ functions """
+ libxml2mod.xmlXPathRegisteredFuncsCleanup(self._o)
+
+ def xpathRegisteredNsCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ variables """
+ libxml2mod.xmlXPathRegisteredNsCleanup(self._o)
+
+ def xpathRegisteredVariablesCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ variables """
+ libxml2mod.xmlXPathRegisteredVariablesCleanup(self._o)
+
+ def xpathVariableLookup(self, name):
+ """Search in the Variable array of the context for the given
+ variable value. """
+ ret = libxml2mod.xmlXPathVariableLookup(self._o, name)
+ if ret is None:raise xpathError('xmlXPathVariableLookup() failed')
+ return xpathObjectRet(ret)
+
+ def xpathVariableLookupNS(self, name, ns_uri):
+ """Search in the Variable array of the context for the given
+ variable value. """
+ ret = libxml2mod.xmlXPathVariableLookupNS(self._o, name, ns_uri)
+ if ret is None:raise xpathError('xmlXPathVariableLookupNS() failed')
+ return xpathObjectRet(ret)
+
+ #
+ # xpathContext functions from module xpointer
+ #
+
+ def xpointerEval(self, str):
+ """Evaluate the XPath Location Path in the given context. """
+ ret = libxml2mod.xmlXPtrEval(str, self._o)
+ if ret is None:raise treeError('xmlXPtrEval() failed')
+ return xpathObjectRet(ret)
+
+class xpathParserContext:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for xpathParserContext
+ def context(self):
+ """Get the xpathContext from an xpathParserContext """
+ ret = libxml2mod.xmlXPathParserGetContext(self._o)
+ if ret is None:raise xpathError('xmlXPathParserGetContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ #
+ # xpathParserContext functions from module xpathInternals
+ #
+
+ def xpathAddValues(self):
+ """Implement the add operation on XPath objects: The numeric
+ operators convert their operands to numbers as if by
+ calling the number function. """
+ libxml2mod.xmlXPathAddValues(self._o)
+
+ def xpathBooleanFunction(self, nargs):
+ """Implement the boolean() XPath function boolean
+ boolean(object) The boolean function converts its argument
+ to a boolean as follows: - a number is true if and only if
+ it is neither positive or negative zero nor NaN - a
+ node-set is true if and only if it is non-empty - a string
+ is true if and only if its length is non-zero """
+ libxml2mod.xmlXPathBooleanFunction(self._o, nargs)
+
+ def xpathCeilingFunction(self, nargs):
+ """Implement the ceiling() XPath function number
+ ceiling(number) The ceiling function returns the smallest
+ (closest to negative infinity) number that is not less than
+ the argument and that is an integer. """
+ libxml2mod.xmlXPathCeilingFunction(self._o, nargs)
+
+ def xpathCompareValues(self, inf, strict):
+ """Implement the compare operation on XPath objects: @arg1 <
+ @arg2 (1, 1, ... @arg1 <= @arg2 (1, 0, ... @arg1 >
+ @arg2 (0, 1, ... @arg1 >= @arg2 (0, 0, ... When
+ neither object to be compared is a node-set and the
+ operator is <=, <, >=, >, then the objects are compared by
+ converted both objects to numbers and comparing the numbers
+ according to IEEE 754. The < comparison will be true if and
+ only if the first number is less than the second number.
+ The <= comparison will be true if and only if the first
+ number is less than or equal to the second number. The >
+ comparison will be true if and only if the first number is
+ greater than the second number. The >= comparison will be
+ true if and only if the first number is greater than or
+ equal to the second number. """
+ ret = libxml2mod.xmlXPathCompareValues(self._o, inf, strict)
+ return ret
+
+ def xpathConcatFunction(self, nargs):
+ """Implement the concat() XPath function string concat(string,
+ string, string*) The concat function returns the
+ concatenation of its arguments. """
+ libxml2mod.xmlXPathConcatFunction(self._o, nargs)
+
+ def xpathContainsFunction(self, nargs):
+ """Implement the contains() XPath function boolean
+ contains(string, string) The contains function returns true
+ if the first argument string contains the second argument
+ string, and otherwise returns false. """
+ libxml2mod.xmlXPathContainsFunction(self._o, nargs)
+
+ def xpathCountFunction(self, nargs):
+ """Implement the count() XPath function number count(node-set) """
+ libxml2mod.xmlXPathCountFunction(self._o, nargs)
+
+ def xpathDivValues(self):
+ """Implement the div operation on XPath objects @arg1 / @arg2:
+ The numeric operators convert their operands to numbers as
+ if by calling the number function. """
+ libxml2mod.xmlXPathDivValues(self._o)
+
+ def xpathEqualValues(self):
+ """Implement the equal operation on XPath objects content:
+ @arg1 == @arg2 """
+ ret = libxml2mod.xmlXPathEqualValues(self._o)
+ return ret
+
+ def xpathErr(self, error):
+ """Handle an XPath error """
+ libxml2mod.xmlXPathErr(self._o, error)
+
+ def xpathEvalExpr(self):
+ """Parse and evaluate an XPath expression in the given
+ context, then push the result on the context stack """
+ libxml2mod.xmlXPathEvalExpr(self._o)
+
+ def xpathFalseFunction(self, nargs):
+ """Implement the false() XPath function boolean false() """
+ libxml2mod.xmlXPathFalseFunction(self._o, nargs)
+
+ def xpathFloorFunction(self, nargs):
+ """Implement the floor() XPath function number floor(number)
+ The floor function returns the largest (closest to positive
+ infinity) number that is not greater than the argument and
+ that is an integer. """
+ libxml2mod.xmlXPathFloorFunction(self._o, nargs)
+
+ def xpathFreeParserContext(self):
+ """Free up an xmlXPathParserContext """
+ libxml2mod.xmlXPathFreeParserContext(self._o)
+
+ def xpathIdFunction(self, nargs):
+ """Implement the id() XPath function node-set id(object) The
+ id function selects elements by their unique ID (see [5.2.1
+ Unique IDs]). When the argument to id is of type node-set,
+ then the result is the union of the result of applying id
+ to the string value of each of the nodes in the argument
+ node-set. When the argument to id is of any other type, the
+ argument is converted to a string as if by a call to the
+ string function; the string is split into a
+ whitespace-separated list of tokens (whitespace is any
+ sequence of characters matching the production S); the
+ result is a node-set containing the elements in the same
+ document as the context node that have a unique ID equal to
+ any of the tokens in the list. """
+ libxml2mod.xmlXPathIdFunction(self._o, nargs)
+
+ def xpathLangFunction(self, nargs):
+ """Implement the lang() XPath function boolean lang(string)
+ The lang function returns true or false depending on
+ whether the language of the context node as specified by
+ xml:lang attributes is the same as or is a sublanguage of
+ the language specified by the argument string. The language
+ of the context node is determined by the value of the
+ xml:lang attribute on the context node, or, if the context
+ node has no xml:lang attribute, by the value of the
+ xml:lang attribute on the nearest ancestor of the context
+ node that has an xml:lang attribute. If there is no such
+ attribute, then lang """
+ libxml2mod.xmlXPathLangFunction(self._o, nargs)
+
+ def xpathLastFunction(self, nargs):
+ """Implement the last() XPath function number last() The last
+ function returns the number of nodes in the context node
+ list. """
+ libxml2mod.xmlXPathLastFunction(self._o, nargs)
+
+ def xpathLocalNameFunction(self, nargs):
+ """Implement the local-name() XPath function string
+ local-name(node-set?) The local-name function returns a
+ string containing the local part of the name of the node in
+ the argument node-set that is first in document order. If
+ the node-set is empty or the first node has no name, an
+ empty string is returned. If the argument is omitted it
+ defaults to the context node. """
+ libxml2mod.xmlXPathLocalNameFunction(self._o, nargs)
+
+ def xpathModValues(self):
+ """Implement the mod operation on XPath objects: @arg1 / @arg2
+ The numeric operators convert their operands to numbers as
+ if by calling the number function. """
+ libxml2mod.xmlXPathModValues(self._o)
+
+ def xpathMultValues(self):
+ """Implement the multiply operation on XPath objects: The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathMultValues(self._o)
+
+ def xpathNamespaceURIFunction(self, nargs):
+ """Implement the namespace-uri() XPath function string
+ namespace-uri(node-set?) The namespace-uri function returns
+ a string containing the namespace URI of the expanded name
+ of the node in the argument node-set that is first in
+ document order. If the node-set is empty, the first node
+ has no name, or the expanded name has no namespace URI, an
+ empty string is returned. If the argument is omitted it
+ defaults to the context node. """
+ libxml2mod.xmlXPathNamespaceURIFunction(self._o, nargs)
+
+ def xpathNextAncestor(self, cur):
+ """Traversal function for the "ancestor" direction the
+ ancestor axis contains the ancestors of the context node;
+ the ancestors of the context node consist of the parent of
+ context node and the parent's parent and so on; the nodes
+ are ordered in reverse document order; thus the parent is
+ the first node on the axis, and the parent's parent is the
+ second node on the axis """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAncestor(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAncestorOrSelf(self, cur):
+ """Traversal function for the "ancestor-or-self" direction he
+ ancestor-or-self axis contains the context node and
+ ancestors of the context node in reverse document order;
+ thus the context node is the first node on the axis, and
+ the context node's parent the second; parent here is
+ defined the same as with the parent axis. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAncestorOrSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAttribute(self, cur):
+ """Traversal function for the "attribute" direction TODO:
+ support DTD inherited default attributes """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAttribute(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextChild(self, cur):
+ """Traversal function for the "child" direction The child axis
+ contains the children of the context node in document order. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextChild(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendant(self, cur):
+ """Traversal function for the "descendant" direction the
+ descendant axis contains the descendants of the context
+ node in document order; a descendant is a child or a child
+ of a child and so on. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextDescendant(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendantOrSelf(self, cur):
+ """Traversal function for the "descendant-or-self" direction
+ the descendant-or-self axis contains the context node and
+ the descendants of the context node in document order; thus
+ the context node is the first node on the axis, and the
+ first child of the context node is the second node on the
+ axis """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextDescendantOrSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowing(self, cur):
+ """Traversal function for the "following" direction The
+ following axis contains all nodes in the same document as
+ the context node that are after the context node in
+ document order, excluding any descendants and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in document order """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextFollowing(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowingSibling(self, cur):
+ """Traversal function for the "following-sibling" direction
+ The following-sibling axis contains the following siblings
+ of the context node in document order. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextFollowingSibling(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextNamespace(self, cur):
+ """Traversal function for the "namespace" direction the
+ namespace axis contains the namespace nodes of the context
+ node; the order of nodes on this axis is
+ implementation-defined; the axis will be empty unless the
+ context node is an element We keep the XML namespace node
+ at the end of the list. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextNamespace(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextParent(self, cur):
+ """Traversal function for the "parent" direction The parent
+ axis contains the parent of the context node, if there is
+ one. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextParent(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextParent() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPreceding(self, cur):
+ """Traversal function for the "preceding" direction the
+ preceding axis contains all nodes in the same document as
+ the context node that are before the context node in
+ document order, excluding any ancestors and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in reverse document order """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextPreceding(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPrecedingSibling(self, cur):
+ """Traversal function for the "preceding-sibling" direction
+ The preceding-sibling axis contains the preceding siblings
+ of the context node in reverse document order; the first
+ preceding sibling is first on the axis; the sibling
+ preceding that node is the second on the axis and so on. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextPrecedingSibling(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextSelf(self, cur):
+ """Traversal function for the "self" direction The self axis
+ contains just the context node itself """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNormalizeFunction(self, nargs):
+ """Implement the normalize-space() XPath function string
+ normalize-space(string?) The normalize-space function
+ returns the argument string with white space normalized by
+ stripping leading and trailing whitespace and replacing
+ sequences of whitespace characters by a single space.
+ Whitespace characters are the same allowed by the S
+ production in XML. If the argument is omitted, it defaults
+ to the context node converted to a string, in other words
+ the value of the context node. """
+ libxml2mod.xmlXPathNormalizeFunction(self._o, nargs)
+
+ def xpathNotEqualValues(self):
+ """Implement the equal operation on XPath objects content:
+ @arg1 == @arg2 """
+ ret = libxml2mod.xmlXPathNotEqualValues(self._o)
+ return ret
+
+ def xpathNotFunction(self, nargs):
+ """Implement the not() XPath function boolean not(boolean) The
+ not function returns true if its argument is false, and
+ false otherwise. """
+ libxml2mod.xmlXPathNotFunction(self._o, nargs)
+
+ def xpathNumberFunction(self, nargs):
+ """Implement the number() XPath function number number(object?) """
+ libxml2mod.xmlXPathNumberFunction(self._o, nargs)
+
+ def xpathParseNCName(self):
+ """parse an XML namespace non qualified name. [NS 3] NCName
+ ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::=
+ Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender """
+ ret = libxml2mod.xmlXPathParseNCName(self._o)
+ return ret
+
+ def xpathParseName(self):
+ """parse an XML name [4] NameChar ::= Letter | Digit | '.' |
+ '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
+ (Letter | '_' | ':') (NameChar)* """
+ ret = libxml2mod.xmlXPathParseName(self._o)
+ return ret
+
+ def xpathPopBoolean(self):
+ """Pops a boolean from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopBoolean(self._o)
+ return ret
+
+ def xpathPopNumber(self):
+ """Pops a number from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopNumber(self._o)
+ return ret
+
+ def xpathPopString(self):
+ """Pops a string from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopString(self._o)
+ return ret
+
+ def xpathPositionFunction(self, nargs):
+ """Implement the position() XPath function number position()
+ The position function returns the position of the context
+ node in the context node list. The first position is 1, and
+ so the last position will be equal to last(). """
+ libxml2mod.xmlXPathPositionFunction(self._o, nargs)
+
+ def xpathRoot(self):
+ """Initialize the context to the root of the document """
+ libxml2mod.xmlXPathRoot(self._o)
+
+ def xpathRoundFunction(self, nargs):
+ """Implement the round() XPath function number round(number)
+ The round function returns the number that is closest to
+ the argument and that is an integer. If there are two such
+ numbers, then the one that is closest to positive infinity
+ is returned. """
+ libxml2mod.xmlXPathRoundFunction(self._o, nargs)
+
+ def xpathStartsWithFunction(self, nargs):
+ """Implement the starts-with() XPath function boolean
+ starts-with(string, string) The starts-with function
+ returns true if the first argument string starts with the
+ second argument string, and otherwise returns false. """
+ libxml2mod.xmlXPathStartsWithFunction(self._o, nargs)
+
+ def xpathStringFunction(self, nargs):
+ """Implement the string() XPath function string
+ string(object?) The string function converts an object to a
+ string as follows: - A node-set is converted to a string by
+ returning the value of the node in the node-set that is
+ first in document order. If the node-set is empty, an empty
+ string is returned. - A number is converted to a string as
+ follows + NaN is converted to the string NaN + positive
+ zero is converted to the string 0 + negative zero is
+ converted to the string 0 + positive infinity is converted
+ to the string Infinity + negative infinity is converted to
+ the string -Infinity + if the number is an integer, the
+ number is represented in decimal form as a Number with no
+ decimal point and no leading zeros, preceded by a minus
+ sign (-) if the number is negative + otherwise, the number
+ is represented in decimal form as a Number including a
+ decimal point with at least one digit before the decimal
+ point and at least one digit after the decimal point,
+ preceded by a minus sign (-) if the number is negative;
+ there must be no leading zeros before the decimal point
+ apart possibly from the one required digit immediately
+ before the decimal point; beyond the one required digit
+ after the decimal point there must be as many, but only as
+ many, more digits as are needed to uniquely distinguish the
+ number from all other IEEE 754 numeric values. - The
+ boolean false value is converted to the string false. The
+ boolean true value is converted to the string true. If the
+ argument is omitted, it defaults to a node-set with the
+ context node as its only member. """
+ libxml2mod.xmlXPathStringFunction(self._o, nargs)
+
+ def xpathStringLengthFunction(self, nargs):
+ """Implement the string-length() XPath function number
+ string-length(string?) The string-length returns the number
+ of characters in the string (see [3.6 Strings]). If the
+ argument is omitted, it defaults to the context node
+ converted to a string, in other words the value of the
+ context node. """
+ libxml2mod.xmlXPathStringLengthFunction(self._o, nargs)
+
+ def xpathSubValues(self):
+ """Implement the subtraction operation on XPath objects: The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathSubValues(self._o)
+
+ def xpathSubstringAfterFunction(self, nargs):
+ """Implement the substring-after() XPath function string
+ substring-after(string, string) The substring-after
+ function returns the substring of the first argument string
+ that follows the first occurrence of the second argument
+ string in the first argument string, or the empty stringi
+ if the first argument string does not contain the second
+ argument string. For example,
+ substring-after("1999/04/01","/") returns 04/01, and
+ substring-after("1999/04/01","19") returns 99/04/01. """
+ libxml2mod.xmlXPathSubstringAfterFunction(self._o, nargs)
+
+ def xpathSubstringBeforeFunction(self, nargs):
+ """Implement the substring-before() XPath function string
+ substring-before(string, string) The substring-before
+ function returns the substring of the first argument string
+ that precedes the first occurrence of the second argument
+ string in the first argument string, or the empty string if
+ the first argument string does not contain the second
+ argument string. For example,
+ substring-before("1999/04/01","/") returns 1999. """
+ libxml2mod.xmlXPathSubstringBeforeFunction(self._o, nargs)
+
+ def xpathSubstringFunction(self, nargs):
+ """Implement the substring() XPath function string
+ substring(string, number, number?) The substring function
+ returns the substring of the first argument starting at the
+ position specified in the second argument with length
+ specified in the third argument. For example,
+ substring("12345",2,3) returns "234". If the third argument
+ is not specified, it returns the substring starting at the
+ position specified in the second argument and continuing to
+ the end of the string. For example, substring("12345",2)
+ returns "2345". More precisely, each character in the
+ string (see [3.6 Strings]) is considered to have a numeric
+ position: the position of the first character is 1, the
+ position of the second character is 2 and so on. The
+ returned substring contains those characters for which the
+ position of the character is greater than or equal to the
+ second argument and, if the third argument is specified,
+ less than the sum of the second and third arguments; the
+ comparisons and addition used for the above follow the
+ standard IEEE 754 rules. Thus: - substring("12345", 1.5,
+ 2.6) returns "234" - substring("12345", 0, 3) returns "12"
+ - substring("12345", 0 div 0, 3) returns "" -
+ substring("12345", 1, 0 div 0) returns "" -
+ substring("12345", -42, 1 div 0) returns "12345" -
+ substring("12345", -1 div 0, 1 div 0) returns "" """
+ libxml2mod.xmlXPathSubstringFunction(self._o, nargs)
+
+ def xpathSumFunction(self, nargs):
+ """Implement the sum() XPath function number sum(node-set) The
+ sum function returns the sum of the values of the nodes in
+ the argument node-set. """
+ libxml2mod.xmlXPathSumFunction(self._o, nargs)
+
+ def xpathTranslateFunction(self, nargs):
+ """Implement the translate() XPath function string
+ translate(string, string, string) The translate function
+ returns the first argument string with occurrences of
+ characters in the second argument string replaced by the
+ character at the corresponding position in the third
+ argument string. For example, translate("bar","abc","ABC")
+ returns the string BAr. If there is a character in the
+ second argument string with no character at a corresponding
+ position in the third argument string (because the second
+ argument string is longer than the third argument string),
+ then occurrences of that character in the first argument
+ string are removed. For example,
+ translate("--aaa--","abc-","ABC") """
+ libxml2mod.xmlXPathTranslateFunction(self._o, nargs)
+
+ def xpathTrueFunction(self, nargs):
+ """Implement the true() XPath function boolean true() """
+ libxml2mod.xmlXPathTrueFunction(self._o, nargs)
+
+ def xpathValueFlipSign(self):
+ """Implement the unary - operation on an XPath object The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathValueFlipSign(self._o)
+
+ def xpatherror(self, file, line, no):
+ """Formats an error message. """
+ libxml2mod.xmlXPatherror(self._o, file, line, no)
+
+ #
+ # xpathParserContext functions from module xpointer
+ #
+
+ def xpointerEvalRangePredicate(self):
+ """[8] Predicate ::= '[' PredicateExpr ']' [9]
+ PredicateExpr ::= Expr Evaluate a predicate as in
+ xmlXPathEvalPredicate() but for a Location Set instead of a
+ node set """
+ libxml2mod.xmlXPtrEvalRangePredicate(self._o)
+
+ def xpointerRangeToFunction(self, nargs):
+ """Implement the range-to() XPointer function Obsolete.
+ range-to is not a real function but a special type of
+ location step which is handled in xpath.c. """
+ libxml2mod.xmlXPtrRangeToFunction(self._o, nargs)
+
+# xlinkShow
+XLINK_SHOW_NONE = 0
+XLINK_SHOW_NEW = 1
+XLINK_SHOW_EMBED = 2
+XLINK_SHOW_REPLACE = 3
+
+# xmlRelaxNGParserFlag
+XML_RELAXNGP_NONE = 0
+XML_RELAXNGP_FREE_DOC = 1
+XML_RELAXNGP_CRNG = 2
+
+# xmlBufferAllocationScheme
+XML_BUFFER_ALLOC_DOUBLEIT = 1
+XML_BUFFER_ALLOC_EXACT = 2
+XML_BUFFER_ALLOC_IMMUTABLE = 3
+XML_BUFFER_ALLOC_IO = 4
+XML_BUFFER_ALLOC_HYBRID = 5
+XML_BUFFER_ALLOC_BOUNDED = 6
+
+# xmlParserSeverities
+XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
+XML_PARSER_SEVERITY_VALIDITY_ERROR = 2
+XML_PARSER_SEVERITY_WARNING = 3
+XML_PARSER_SEVERITY_ERROR = 4
+
+# xmlAttributeDefault
+XML_ATTRIBUTE_NONE = 1
+XML_ATTRIBUTE_REQUIRED = 2
+XML_ATTRIBUTE_IMPLIED = 3
+XML_ATTRIBUTE_FIXED = 4
+
+# xmlSchemaValType
+XML_SCHEMAS_UNKNOWN = 0
+XML_SCHEMAS_STRING = 1
+XML_SCHEMAS_NORMSTRING = 2
+XML_SCHEMAS_DECIMAL = 3
+XML_SCHEMAS_TIME = 4
+XML_SCHEMAS_GDAY = 5
+XML_SCHEMAS_GMONTH = 6
+XML_SCHEMAS_GMONTHDAY = 7
+XML_SCHEMAS_GYEAR = 8
+XML_SCHEMAS_GYEARMONTH = 9
+XML_SCHEMAS_DATE = 10
+XML_SCHEMAS_DATETIME = 11
+XML_SCHEMAS_DURATION = 12
+XML_SCHEMAS_FLOAT = 13
+XML_SCHEMAS_DOUBLE = 14
+XML_SCHEMAS_BOOLEAN = 15
+XML_SCHEMAS_TOKEN = 16
+XML_SCHEMAS_LANGUAGE = 17
+XML_SCHEMAS_NMTOKEN = 18
+XML_SCHEMAS_NMTOKENS = 19
+XML_SCHEMAS_NAME = 20
+XML_SCHEMAS_QNAME = 21
+XML_SCHEMAS_NCNAME = 22
+XML_SCHEMAS_ID = 23
+XML_SCHEMAS_IDREF = 24
+XML_SCHEMAS_IDREFS = 25
+XML_SCHEMAS_ENTITY = 26
+XML_SCHEMAS_ENTITIES = 27
+XML_SCHEMAS_NOTATION = 28
+XML_SCHEMAS_ANYURI = 29
+XML_SCHEMAS_INTEGER = 30
+XML_SCHEMAS_NPINTEGER = 31
+XML_SCHEMAS_NINTEGER = 32
+XML_SCHEMAS_NNINTEGER = 33
+XML_SCHEMAS_PINTEGER = 34
+XML_SCHEMAS_INT = 35
+XML_SCHEMAS_UINT = 36
+XML_SCHEMAS_LONG = 37
+XML_SCHEMAS_ULONG = 38
+XML_SCHEMAS_SHORT = 39
+XML_SCHEMAS_USHORT = 40
+XML_SCHEMAS_BYTE = 41
+XML_SCHEMAS_UBYTE = 42
+XML_SCHEMAS_HEXBINARY = 43
+XML_SCHEMAS_BASE64BINARY = 44
+XML_SCHEMAS_ANYTYPE = 45
+XML_SCHEMAS_ANYSIMPLETYPE = 46
+
+# xmlParserInputState
+XML_PARSER_EOF = -1
+XML_PARSER_START = 0
+XML_PARSER_MISC = 1
+XML_PARSER_PI = 2
+XML_PARSER_DTD = 3
+XML_PARSER_PROLOG = 4
+XML_PARSER_COMMENT = 5
+XML_PARSER_START_TAG = 6
+XML_PARSER_CONTENT = 7
+XML_PARSER_CDATA_SECTION = 8
+XML_PARSER_END_TAG = 9
+XML_PARSER_ENTITY_DECL = 10
+XML_PARSER_ENTITY_VALUE = 11
+XML_PARSER_ATTRIBUTE_VALUE = 12
+XML_PARSER_SYSTEM_LITERAL = 13
+XML_PARSER_EPILOG = 14
+XML_PARSER_IGNORE = 15
+XML_PARSER_PUBLIC_LITERAL = 16
+
+# xmlEntityType
+XML_INTERNAL_GENERAL_ENTITY = 1
+XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2
+XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3
+XML_INTERNAL_PARAMETER_ENTITY = 4
+XML_EXTERNAL_PARAMETER_ENTITY = 5
+XML_INTERNAL_PREDEFINED_ENTITY = 6
+
+# xmlSaveOption
+XML_SAVE_FORMAT = 1
+XML_SAVE_NO_DECL = 2
+XML_SAVE_NO_EMPTY = 4
+XML_SAVE_NO_XHTML = 8
+XML_SAVE_XHTML = 16
+XML_SAVE_AS_XML = 32
+XML_SAVE_AS_HTML = 64
+XML_SAVE_WSNONSIG = 128
+
+# xmlPatternFlags
+XML_PATTERN_DEFAULT = 0
+XML_PATTERN_XPATH = 1
+XML_PATTERN_XSSEL = 2
+XML_PATTERN_XSFIELD = 4
+
+# xmlParserErrors
+XML_ERR_OK = 0
+XML_ERR_INTERNAL_ERROR = 1
+XML_ERR_NO_MEMORY = 2
+XML_ERR_DOCUMENT_START = 3
+XML_ERR_DOCUMENT_EMPTY = 4
+XML_ERR_DOCUMENT_END = 5
+XML_ERR_INVALID_HEX_CHARREF = 6
+XML_ERR_INVALID_DEC_CHARREF = 7
+XML_ERR_INVALID_CHARREF = 8
+XML_ERR_INVALID_CHAR = 9
+XML_ERR_CHARREF_AT_EOF = 10
+XML_ERR_CHARREF_IN_PROLOG = 11
+XML_ERR_CHARREF_IN_EPILOG = 12
+XML_ERR_CHARREF_IN_DTD = 13
+XML_ERR_ENTITYREF_AT_EOF = 14
+XML_ERR_ENTITYREF_IN_PROLOG = 15
+XML_ERR_ENTITYREF_IN_EPILOG = 16
+XML_ERR_ENTITYREF_IN_DTD = 17
+XML_ERR_PEREF_AT_EOF = 18
+XML_ERR_PEREF_IN_PROLOG = 19
+XML_ERR_PEREF_IN_EPILOG = 20
+XML_ERR_PEREF_IN_INT_SUBSET = 21
+XML_ERR_ENTITYREF_NO_NAME = 22
+XML_ERR_ENTITYREF_SEMICOL_MISSING = 23
+XML_ERR_PEREF_NO_NAME = 24
+XML_ERR_PEREF_SEMICOL_MISSING = 25
+XML_ERR_UNDECLARED_ENTITY = 26
+XML_WAR_UNDECLARED_ENTITY = 27
+XML_ERR_UNPARSED_ENTITY = 28
+XML_ERR_ENTITY_IS_EXTERNAL = 29
+XML_ERR_ENTITY_IS_PARAMETER = 30
+XML_ERR_UNKNOWN_ENCODING = 31
+XML_ERR_UNSUPPORTED_ENCODING = 32
+XML_ERR_STRING_NOT_STARTED = 33
+XML_ERR_STRING_NOT_CLOSED = 34
+XML_ERR_NS_DECL_ERROR = 35
+XML_ERR_ENTITY_NOT_STARTED = 36
+XML_ERR_ENTITY_NOT_FINISHED = 37
+XML_ERR_LT_IN_ATTRIBUTE = 38
+XML_ERR_ATTRIBUTE_NOT_STARTED = 39
+XML_ERR_ATTRIBUTE_NOT_FINISHED = 40
+XML_ERR_ATTRIBUTE_WITHOUT_VALUE = 41
+XML_ERR_ATTRIBUTE_REDEFINED = 42
+XML_ERR_LITERAL_NOT_STARTED = 43
+XML_ERR_LITERAL_NOT_FINISHED = 44
+XML_ERR_COMMENT_NOT_FINISHED = 45
+XML_ERR_PI_NOT_STARTED = 46
+XML_ERR_PI_NOT_FINISHED = 47
+XML_ERR_NOTATION_NOT_STARTED = 48
+XML_ERR_NOTATION_NOT_FINISHED = 49
+XML_ERR_ATTLIST_NOT_STARTED = 50
+XML_ERR_ATTLIST_NOT_FINISHED = 51
+XML_ERR_MIXED_NOT_STARTED = 52
+XML_ERR_MIXED_NOT_FINISHED = 53
+XML_ERR_ELEMCONTENT_NOT_STARTED = 54
+XML_ERR_ELEMCONTENT_NOT_FINISHED = 55
+XML_ERR_XMLDECL_NOT_STARTED = 56
+XML_ERR_XMLDECL_NOT_FINISHED = 57
+XML_ERR_CONDSEC_NOT_STARTED = 58
+XML_ERR_CONDSEC_NOT_FINISHED = 59
+XML_ERR_EXT_SUBSET_NOT_FINISHED = 60
+XML_ERR_DOCTYPE_NOT_FINISHED = 61
+XML_ERR_MISPLACED_CDATA_END = 62
+XML_ERR_CDATA_NOT_FINISHED = 63
+XML_ERR_RESERVED_XML_NAME = 64
+XML_ERR_SPACE_REQUIRED = 65
+XML_ERR_SEPARATOR_REQUIRED = 66
+XML_ERR_NMTOKEN_REQUIRED = 67
+XML_ERR_NAME_REQUIRED = 68
+XML_ERR_PCDATA_REQUIRED = 69
+XML_ERR_URI_REQUIRED = 70
+XML_ERR_PUBID_REQUIRED = 71
+XML_ERR_LT_REQUIRED = 72
+XML_ERR_GT_REQUIRED = 73
+XML_ERR_LTSLASH_REQUIRED = 74
+XML_ERR_EQUAL_REQUIRED = 75
+XML_ERR_TAG_NAME_MISMATCH = 76
+XML_ERR_TAG_NOT_FINISHED = 77
+XML_ERR_STANDALONE_VALUE = 78
+XML_ERR_ENCODING_NAME = 79
+XML_ERR_HYPHEN_IN_COMMENT = 80
+XML_ERR_INVALID_ENCODING = 81
+XML_ERR_EXT_ENTITY_STANDALONE = 82
+XML_ERR_CONDSEC_INVALID = 83
+XML_ERR_VALUE_REQUIRED = 84
+XML_ERR_NOT_WELL_BALANCED = 85
+XML_ERR_EXTRA_CONTENT = 86
+XML_ERR_ENTITY_CHAR_ERROR = 87
+XML_ERR_ENTITY_PE_INTERNAL = 88
+XML_ERR_ENTITY_LOOP = 89
+XML_ERR_ENTITY_BOUNDARY = 90
+XML_ERR_INVALID_URI = 91
+XML_ERR_URI_FRAGMENT = 92
+XML_WAR_CATALOG_PI = 93
+XML_ERR_NO_DTD = 94
+XML_ERR_CONDSEC_INVALID_KEYWORD = 95
+XML_ERR_VERSION_MISSING = 96
+XML_WAR_UNKNOWN_VERSION = 97
+XML_WAR_LANG_VALUE = 98
+XML_WAR_NS_URI = 99
+XML_WAR_NS_URI_RELATIVE = 100
+XML_ERR_MISSING_ENCODING = 101
+XML_WAR_SPACE_VALUE = 102
+XML_ERR_NOT_STANDALONE = 103
+XML_ERR_ENTITY_PROCESSING = 104
+XML_ERR_NOTATION_PROCESSING = 105
+XML_WAR_NS_COLUMN = 106
+XML_WAR_ENTITY_REDEFINED = 107
+XML_ERR_UNKNOWN_VERSION = 108
+XML_ERR_VERSION_MISMATCH = 109
+XML_ERR_NAME_TOO_LONG = 110
+XML_ERR_USER_STOP = 111
+XML_NS_ERR_XML_NAMESPACE = 200
+XML_NS_ERR_UNDEFINED_NAMESPACE = 201
+XML_NS_ERR_QNAME = 202
+XML_NS_ERR_ATTRIBUTE_REDEFINED = 203
+XML_NS_ERR_EMPTY = 204
+XML_NS_ERR_COLON = 205
+XML_DTD_ATTRIBUTE_DEFAULT = 500
+XML_DTD_ATTRIBUTE_REDEFINED = 501
+XML_DTD_ATTRIBUTE_VALUE = 502
+XML_DTD_CONTENT_ERROR = 503
+XML_DTD_CONTENT_MODEL = 504
+XML_DTD_CONTENT_NOT_DETERMINIST = 505
+XML_DTD_DIFFERENT_PREFIX = 506
+XML_DTD_ELEM_DEFAULT_NAMESPACE = 507
+XML_DTD_ELEM_NAMESPACE = 508
+XML_DTD_ELEM_REDEFINED = 509
+XML_DTD_EMPTY_NOTATION = 510
+XML_DTD_ENTITY_TYPE = 511
+XML_DTD_ID_FIXED = 512
+XML_DTD_ID_REDEFINED = 513
+XML_DTD_ID_SUBSET = 514
+XML_DTD_INVALID_CHILD = 515
+XML_DTD_INVALID_DEFAULT = 516
+XML_DTD_LOAD_ERROR = 517
+XML_DTD_MISSING_ATTRIBUTE = 518
+XML_DTD_MIXED_CORRUPT = 519
+XML_DTD_MULTIPLE_ID = 520
+XML_DTD_NO_DOC = 521
+XML_DTD_NO_DTD = 522
+XML_DTD_NO_ELEM_NAME = 523
+XML_DTD_NO_PREFIX = 524
+XML_DTD_NO_ROOT = 525
+XML_DTD_NOTATION_REDEFINED = 526
+XML_DTD_NOTATION_VALUE = 527
+XML_DTD_NOT_EMPTY = 528
+XML_DTD_NOT_PCDATA = 529
+XML_DTD_NOT_STANDALONE = 530
+XML_DTD_ROOT_NAME = 531
+XML_DTD_STANDALONE_WHITE_SPACE = 532
+XML_DTD_UNKNOWN_ATTRIBUTE = 533
+XML_DTD_UNKNOWN_ELEM = 534
+XML_DTD_UNKNOWN_ENTITY = 535
+XML_DTD_UNKNOWN_ID = 536
+XML_DTD_UNKNOWN_NOTATION = 537
+XML_DTD_STANDALONE_DEFAULTED = 538
+XML_DTD_XMLID_VALUE = 539
+XML_DTD_XMLID_TYPE = 540
+XML_DTD_DUP_TOKEN = 541
+XML_HTML_STRUCURE_ERROR = 800
+XML_HTML_UNKNOWN_TAG = 801
+XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000
+XML_RNGP_ATTR_CONFLICT = 1001
+XML_RNGP_ATTRIBUTE_CHILDREN = 1002
+XML_RNGP_ATTRIBUTE_CONTENT = 1003
+XML_RNGP_ATTRIBUTE_EMPTY = 1004
+XML_RNGP_ATTRIBUTE_NOOP = 1005
+XML_RNGP_CHOICE_CONTENT = 1006
+XML_RNGP_CHOICE_EMPTY = 1007
+XML_RNGP_CREATE_FAILURE = 1008
+XML_RNGP_DATA_CONTENT = 1009
+XML_RNGP_DEF_CHOICE_AND_INTERLEAVE = 1010
+XML_RNGP_DEFINE_CREATE_FAILED = 1011
+XML_RNGP_DEFINE_EMPTY = 1012
+XML_RNGP_DEFINE_MISSING = 1013
+XML_RNGP_DEFINE_NAME_MISSING = 1014
+XML_RNGP_ELEM_CONTENT_EMPTY = 1015
+XML_RNGP_ELEM_CONTENT_ERROR = 1016
+XML_RNGP_ELEMENT_EMPTY = 1017
+XML_RNGP_ELEMENT_CONTENT = 1018
+XML_RNGP_ELEMENT_NAME = 1019
+XML_RNGP_ELEMENT_NO_CONTENT = 1020
+XML_RNGP_ELEM_TEXT_CONFLICT = 1021
+XML_RNGP_EMPTY = 1022
+XML_RNGP_EMPTY_CONSTRUCT = 1023
+XML_RNGP_EMPTY_CONTENT = 1024
+XML_RNGP_EMPTY_NOT_EMPTY = 1025
+XML_RNGP_ERROR_TYPE_LIB = 1026
+XML_RNGP_EXCEPT_EMPTY = 1027
+XML_RNGP_EXCEPT_MISSING = 1028
+XML_RNGP_EXCEPT_MULTIPLE = 1029
+XML_RNGP_EXCEPT_NO_CONTENT = 1030
+XML_RNGP_EXTERNALREF_EMTPY = 1031
+XML_RNGP_EXTERNAL_REF_FAILURE = 1032
+XML_RNGP_EXTERNALREF_RECURSE = 1033
+XML_RNGP_FORBIDDEN_ATTRIBUTE = 1034
+XML_RNGP_FOREIGN_ELEMENT = 1035
+XML_RNGP_GRAMMAR_CONTENT = 1036
+XML_RNGP_GRAMMAR_EMPTY = 1037
+XML_RNGP_GRAMMAR_MISSING = 1038
+XML_RNGP_GRAMMAR_NO_START = 1039
+XML_RNGP_GROUP_ATTR_CONFLICT = 1040
+XML_RNGP_HREF_ERROR = 1041
+XML_RNGP_INCLUDE_EMPTY = 1042
+XML_RNGP_INCLUDE_FAILURE = 1043
+XML_RNGP_INCLUDE_RECURSE = 1044
+XML_RNGP_INTERLEAVE_ADD = 1045
+XML_RNGP_INTERLEAVE_CREATE_FAILED = 1046
+XML_RNGP_INTERLEAVE_EMPTY = 1047
+XML_RNGP_INTERLEAVE_NO_CONTENT = 1048
+XML_RNGP_INVALID_DEFINE_NAME = 1049
+XML_RNGP_INVALID_URI = 1050
+XML_RNGP_INVALID_VALUE = 1051
+XML_RNGP_MISSING_HREF = 1052
+XML_RNGP_NAME_MISSING = 1053
+XML_RNGP_NEED_COMBINE = 1054
+XML_RNGP_NOTALLOWED_NOT_EMPTY = 1055
+XML_RNGP_NSNAME_ATTR_ANCESTOR = 1056
+XML_RNGP_NSNAME_NO_NS = 1057
+XML_RNGP_PARAM_FORBIDDEN = 1058
+XML_RNGP_PARAM_NAME_MISSING = 1059
+XML_RNGP_PARENTREF_CREATE_FAILED = 1060
+XML_RNGP_PARENTREF_NAME_INVALID = 1061
+XML_RNGP_PARENTREF_NO_NAME = 1062
+XML_RNGP_PARENTREF_NO_PARENT = 1063
+XML_RNGP_PARENTREF_NOT_EMPTY = 1064
+XML_RNGP_PARSE_ERROR = 1065
+XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME = 1066
+XML_RNGP_PAT_ATTR_ATTR = 1067
+XML_RNGP_PAT_ATTR_ELEM = 1068
+XML_RNGP_PAT_DATA_EXCEPT_ATTR = 1069
+XML_RNGP_PAT_DATA_EXCEPT_ELEM = 1070
+XML_RNGP_PAT_DATA_EXCEPT_EMPTY = 1071
+XML_RNGP_PAT_DATA_EXCEPT_GROUP = 1072
+XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE = 1073
+XML_RNGP_PAT_DATA_EXCEPT_LIST = 1074
+XML_RNGP_PAT_DATA_EXCEPT_ONEMORE = 1075
+XML_RNGP_PAT_DATA_EXCEPT_REF = 1076
+XML_RNGP_PAT_DATA_EXCEPT_TEXT = 1077
+XML_RNGP_PAT_LIST_ATTR = 1078
+XML_RNGP_PAT_LIST_ELEM = 1079
+XML_RNGP_PAT_LIST_INTERLEAVE = 1080
+XML_RNGP_PAT_LIST_LIST = 1081
+XML_RNGP_PAT_LIST_REF = 1082
+XML_RNGP_PAT_LIST_TEXT = 1083
+XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME = 1084
+XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME = 1085
+XML_RNGP_PAT_ONEMORE_GROUP_ATTR = 1086
+XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR = 1087
+XML_RNGP_PAT_START_ATTR = 1088
+XML_RNGP_PAT_START_DATA = 1089
+XML_RNGP_PAT_START_EMPTY = 1090
+XML_RNGP_PAT_START_GROUP = 1091
+XML_RNGP_PAT_START_INTERLEAVE = 1092
+XML_RNGP_PAT_START_LIST = 1093
+XML_RNGP_PAT_START_ONEMORE = 1094
+XML_RNGP_PAT_START_TEXT = 1095
+XML_RNGP_PAT_START_VALUE = 1096
+XML_RNGP_PREFIX_UNDEFINED = 1097
+XML_RNGP_REF_CREATE_FAILED = 1098
+XML_RNGP_REF_CYCLE = 1099
+XML_RNGP_REF_NAME_INVALID = 1100
+XML_RNGP_REF_NO_DEF = 1101
+XML_RNGP_REF_NO_NAME = 1102
+XML_RNGP_REF_NOT_EMPTY = 1103
+XML_RNGP_START_CHOICE_AND_INTERLEAVE = 1104
+XML_RNGP_START_CONTENT = 1105
+XML_RNGP_START_EMPTY = 1106
+XML_RNGP_START_MISSING = 1107
+XML_RNGP_TEXT_EXPECTED = 1108
+XML_RNGP_TEXT_HAS_CHILD = 1109
+XML_RNGP_TYPE_MISSING = 1110
+XML_RNGP_TYPE_NOT_FOUND = 1111
+XML_RNGP_TYPE_VALUE = 1112
+XML_RNGP_UNKNOWN_ATTRIBUTE = 1113
+XML_RNGP_UNKNOWN_COMBINE = 1114
+XML_RNGP_UNKNOWN_CONSTRUCT = 1115
+XML_RNGP_UNKNOWN_TYPE_LIB = 1116
+XML_RNGP_URI_FRAGMENT = 1117
+XML_RNGP_URI_NOT_ABSOLUTE = 1118
+XML_RNGP_VALUE_EMPTY = 1119
+XML_RNGP_VALUE_NO_CONTENT = 1120
+XML_RNGP_XMLNS_NAME = 1121
+XML_RNGP_XML_NS = 1122
+XML_XPATH_EXPRESSION_OK = 1200
+XML_XPATH_NUMBER_ERROR = 1201
+XML_XPATH_UNFINISHED_LITERAL_ERROR = 1202
+XML_XPATH_START_LITERAL_ERROR = 1203
+XML_XPATH_VARIABLE_REF_ERROR = 1204
+XML_XPATH_UNDEF_VARIABLE_ERROR = 1205
+XML_XPATH_INVALID_PREDICATE_ERROR = 1206
+XML_XPATH_EXPR_ERROR = 1207
+XML_XPATH_UNCLOSED_ERROR = 1208
+XML_XPATH_UNKNOWN_FUNC_ERROR = 1209
+XML_XPATH_INVALID_OPERAND = 1210
+XML_XPATH_INVALID_TYPE = 1211
+XML_XPATH_INVALID_ARITY = 1212
+XML_XPATH_INVALID_CTXT_SIZE = 1213
+XML_XPATH_INVALID_CTXT_POSITION = 1214
+XML_XPATH_MEMORY_ERROR = 1215
+XML_XPTR_SYNTAX_ERROR = 1216
+XML_XPTR_RESOURCE_ERROR = 1217
+XML_XPTR_SUB_RESOURCE_ERROR = 1218
+XML_XPATH_UNDEF_PREFIX_ERROR = 1219
+XML_XPATH_ENCODING_ERROR = 1220
+XML_XPATH_INVALID_CHAR_ERROR = 1221
+XML_TREE_INVALID_HEX = 1300
+XML_TREE_INVALID_DEC = 1301
+XML_TREE_UNTERMINATED_ENTITY = 1302
+XML_TREE_NOT_UTF8 = 1303
+XML_SAVE_NOT_UTF8 = 1400
+XML_SAVE_CHAR_INVALID = 1401
+XML_SAVE_NO_DOCTYPE = 1402
+XML_SAVE_UNKNOWN_ENCODING = 1403
+XML_REGEXP_COMPILE_ERROR = 1450
+XML_IO_UNKNOWN = 1500
+XML_IO_EACCES = 1501
+XML_IO_EAGAIN = 1502
+XML_IO_EBADF = 1503
+XML_IO_EBADMSG = 1504
+XML_IO_EBUSY = 1505
+XML_IO_ECANCELED = 1506
+XML_IO_ECHILD = 1507
+XML_IO_EDEADLK = 1508
+XML_IO_EDOM = 1509
+XML_IO_EEXIST = 1510
+XML_IO_EFAULT = 1511
+XML_IO_EFBIG = 1512
+XML_IO_EINPROGRESS = 1513
+XML_IO_EINTR = 1514
+XML_IO_EINVAL = 1515
+XML_IO_EIO = 1516
+XML_IO_EISDIR = 1517
+XML_IO_EMFILE = 1518
+XML_IO_EMLINK = 1519
+XML_IO_EMSGSIZE = 1520
+XML_IO_ENAMETOOLONG = 1521
+XML_IO_ENFILE = 1522
+XML_IO_ENODEV = 1523
+XML_IO_ENOENT = 1524
+XML_IO_ENOEXEC = 1525
+XML_IO_ENOLCK = 1526
+XML_IO_ENOMEM = 1527
+XML_IO_ENOSPC = 1528
+XML_IO_ENOSYS = 1529
+XML_IO_ENOTDIR = 1530
+XML_IO_ENOTEMPTY = 1531
+XML_IO_ENOTSUP = 1532
+XML_IO_ENOTTY = 1533
+XML_IO_ENXIO = 1534
+XML_IO_EPERM = 1535
+XML_IO_EPIPE = 1536
+XML_IO_ERANGE = 1537
+XML_IO_EROFS = 1538
+XML_IO_ESPIPE = 1539
+XML_IO_ESRCH = 1540
+XML_IO_ETIMEDOUT = 1541
+XML_IO_EXDEV = 1542
+XML_IO_NETWORK_ATTEMPT = 1543
+XML_IO_ENCODER = 1544
+XML_IO_FLUSH = 1545
+XML_IO_WRITE = 1546
+XML_IO_NO_INPUT = 1547
+XML_IO_BUFFER_FULL = 1548
+XML_IO_LOAD_ERROR = 1549
+XML_IO_ENOTSOCK = 1550
+XML_IO_EISCONN = 1551
+XML_IO_ECONNREFUSED = 1552
+XML_IO_ENETUNREACH = 1553
+XML_IO_EADDRINUSE = 1554
+XML_IO_EALREADY = 1555
+XML_IO_EAFNOSUPPORT = 1556
+XML_XINCLUDE_RECURSION = 1600
+XML_XINCLUDE_PARSE_VALUE = 1601
+XML_XINCLUDE_ENTITY_DEF_MISMATCH = 1602
+XML_XINCLUDE_NO_HREF = 1603
+XML_XINCLUDE_NO_FALLBACK = 1604
+XML_XINCLUDE_HREF_URI = 1605
+XML_XINCLUDE_TEXT_FRAGMENT = 1606
+XML_XINCLUDE_TEXT_DOCUMENT = 1607
+XML_XINCLUDE_INVALID_CHAR = 1608
+XML_XINCLUDE_BUILD_FAILED = 1609
+XML_XINCLUDE_UNKNOWN_ENCODING = 1610
+XML_XINCLUDE_MULTIPLE_ROOT = 1611
+XML_XINCLUDE_XPTR_FAILED = 1612
+XML_XINCLUDE_XPTR_RESULT = 1613
+XML_XINCLUDE_INCLUDE_IN_INCLUDE = 1614
+XML_XINCLUDE_FALLBACKS_IN_INCLUDE = 1615
+XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE = 1616
+XML_XINCLUDE_DEPRECATED_NS = 1617
+XML_XINCLUDE_FRAGMENT_ID = 1618
+XML_CATALOG_MISSING_ATTR = 1650
+XML_CATALOG_ENTRY_BROKEN = 1651
+XML_CATALOG_PREFER_VALUE = 1652
+XML_CATALOG_NOT_CATALOG = 1653
+XML_CATALOG_RECURSION = 1654
+XML_SCHEMAP_PREFIX_UNDEFINED = 1700
+XML_SCHEMAP_ATTRFORMDEFAULT_VALUE = 1701
+XML_SCHEMAP_ATTRGRP_NONAME_NOREF = 1702
+XML_SCHEMAP_ATTR_NONAME_NOREF = 1703
+XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF = 1704
+XML_SCHEMAP_ELEMFORMDEFAULT_VALUE = 1705
+XML_SCHEMAP_ELEM_NONAME_NOREF = 1706
+XML_SCHEMAP_EXTENSION_NO_BASE = 1707
+XML_SCHEMAP_FACET_NO_VALUE = 1708
+XML_SCHEMAP_FAILED_BUILD_IMPORT = 1709
+XML_SCHEMAP_GROUP_NONAME_NOREF = 1710
+XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI = 1711
+XML_SCHEMAP_IMPORT_REDEFINE_NSNAME = 1712
+XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI = 1713
+XML_SCHEMAP_INVALID_BOOLEAN = 1714
+XML_SCHEMAP_INVALID_ENUM = 1715
+XML_SCHEMAP_INVALID_FACET = 1716
+XML_SCHEMAP_INVALID_FACET_VALUE = 1717
+XML_SCHEMAP_INVALID_MAXOCCURS = 1718
+XML_SCHEMAP_INVALID_MINOCCURS = 1719
+XML_SCHEMAP_INVALID_REF_AND_SUBTYPE = 1720
+XML_SCHEMAP_INVALID_WHITE_SPACE = 1721
+XML_SCHEMAP_NOATTR_NOREF = 1722
+XML_SCHEMAP_NOTATION_NO_NAME = 1723
+XML_SCHEMAP_NOTYPE_NOREF = 1724
+XML_SCHEMAP_REF_AND_SUBTYPE = 1725
+XML_SCHEMAP_RESTRICTION_NONAME_NOREF = 1726
+XML_SCHEMAP_SIMPLETYPE_NONAME = 1727
+XML_SCHEMAP_TYPE_AND_SUBTYPE = 1728
+XML_SCHEMAP_UNKNOWN_ALL_CHILD = 1729
+XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD = 1730
+XML_SCHEMAP_UNKNOWN_ATTR_CHILD = 1731
+XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD = 1732
+XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP = 1733
+XML_SCHEMAP_UNKNOWN_BASE_TYPE = 1734
+XML_SCHEMAP_UNKNOWN_CHOICE_CHILD = 1735
+XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD = 1736
+XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD = 1737
+XML_SCHEMAP_UNKNOWN_ELEM_CHILD = 1738
+XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD = 1739
+XML_SCHEMAP_UNKNOWN_FACET_CHILD = 1740
+XML_SCHEMAP_UNKNOWN_FACET_TYPE = 1741
+XML_SCHEMAP_UNKNOWN_GROUP_CHILD = 1742
+XML_SCHEMAP_UNKNOWN_IMPORT_CHILD = 1743
+XML_SCHEMAP_UNKNOWN_LIST_CHILD = 1744
+XML_SCHEMAP_UNKNOWN_NOTATION_CHILD = 1745
+XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD = 1746
+XML_SCHEMAP_UNKNOWN_REF = 1747
+XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD = 1748
+XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD = 1749
+XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD = 1750
+XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD = 1751
+XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD = 1752
+XML_SCHEMAP_UNKNOWN_TYPE = 1753
+XML_SCHEMAP_UNKNOWN_UNION_CHILD = 1754
+XML_SCHEMAP_ELEM_DEFAULT_FIXED = 1755
+XML_SCHEMAP_REGEXP_INVALID = 1756
+XML_SCHEMAP_FAILED_LOAD = 1757
+XML_SCHEMAP_NOTHING_TO_PARSE = 1758
+XML_SCHEMAP_NOROOT = 1759
+XML_SCHEMAP_REDEFINED_GROUP = 1760
+XML_SCHEMAP_REDEFINED_TYPE = 1761
+XML_SCHEMAP_REDEFINED_ELEMENT = 1762
+XML_SCHEMAP_REDEFINED_ATTRGROUP = 1763
+XML_SCHEMAP_REDEFINED_ATTR = 1764
+XML_SCHEMAP_REDEFINED_NOTATION = 1765
+XML_SCHEMAP_FAILED_PARSE = 1766
+XML_SCHEMAP_UNKNOWN_PREFIX = 1767
+XML_SCHEMAP_DEF_AND_PREFIX = 1768
+XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD = 1769
+XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770
+XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771
+XML_SCHEMAP_NOT_SCHEMA = 1772
+XML_SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773
+XML_SCHEMAP_INVALID_ATTR_USE = 1774
+XML_SCHEMAP_RECURSIVE = 1775
+XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE = 1776
+XML_SCHEMAP_INVALID_ATTR_COMBINATION = 1777
+XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION = 1778
+XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD = 1779
+XML_SCHEMAP_INVALID_ATTR_NAME = 1780
+XML_SCHEMAP_REF_AND_CONTENT = 1781
+XML_SCHEMAP_CT_PROPS_CORRECT_1 = 1782
+XML_SCHEMAP_CT_PROPS_CORRECT_2 = 1783
+XML_SCHEMAP_CT_PROPS_CORRECT_3 = 1784
+XML_SCHEMAP_CT_PROPS_CORRECT_4 = 1785
+XML_SCHEMAP_CT_PROPS_CORRECT_5 = 1786
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 = 1787
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 = 1788
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 = 1789
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 = 1790
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3 = 1791
+XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER = 1792
+XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE = 1793
+XML_SCHEMAP_UNION_NOT_EXPRESSIBLE = 1794
+XML_SCHEMAP_SRC_IMPORT_3_1 = 1795
+XML_SCHEMAP_SRC_IMPORT_3_2 = 1796
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 = 1797
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 = 1798
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 = 1799
+XML_SCHEMAP_COS_CT_EXTENDS_1_3 = 1800
+XML_SCHEMAV_NOROOT = 1801
+XML_SCHEMAV_UNDECLAREDELEM = 1802
+XML_SCHEMAV_NOTTOPLEVEL = 1803
+XML_SCHEMAV_MISSING = 1804
+XML_SCHEMAV_WRONGELEM = 1805
+XML_SCHEMAV_NOTYPE = 1806
+XML_SCHEMAV_NOROLLBACK = 1807
+XML_SCHEMAV_ISABSTRACT = 1808
+XML_SCHEMAV_NOTEMPTY = 1809
+XML_SCHEMAV_ELEMCONT = 1810
+XML_SCHEMAV_HAVEDEFAULT = 1811
+XML_SCHEMAV_NOTNILLABLE = 1812
+XML_SCHEMAV_EXTRACONTENT = 1813
+XML_SCHEMAV_INVALIDATTR = 1814
+XML_SCHEMAV_INVALIDELEM = 1815
+XML_SCHEMAV_NOTDETERMINIST = 1816
+XML_SCHEMAV_CONSTRUCT = 1817
+XML_SCHEMAV_INTERNAL = 1818
+XML_SCHEMAV_NOTSIMPLE = 1819
+XML_SCHEMAV_ATTRUNKNOWN = 1820
+XML_SCHEMAV_ATTRINVALID = 1821
+XML_SCHEMAV_VALUE = 1822
+XML_SCHEMAV_FACET = 1823
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1 = 1824
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2 = 1825
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3 = 1826
+XML_SCHEMAV_CVC_TYPE_3_1_1 = 1827
+XML_SCHEMAV_CVC_TYPE_3_1_2 = 1828
+XML_SCHEMAV_CVC_FACET_VALID = 1829
+XML_SCHEMAV_CVC_LENGTH_VALID = 1830
+XML_SCHEMAV_CVC_MINLENGTH_VALID = 1831
+XML_SCHEMAV_CVC_MAXLENGTH_VALID = 1832
+XML_SCHEMAV_CVC_MININCLUSIVE_VALID = 1833
+XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID = 1834
+XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID = 1835
+XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID = 1836
+XML_SCHEMAV_CVC_TOTALDIGITS_VALID = 1837
+XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID = 1838
+XML_SCHEMAV_CVC_PATTERN_VALID = 1839
+XML_SCHEMAV_CVC_ENUMERATION_VALID = 1840
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1 = 1841
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2 = 1842
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3 = 1843
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4 = 1844
+XML_SCHEMAV_CVC_ELT_1 = 1845
+XML_SCHEMAV_CVC_ELT_2 = 1846
+XML_SCHEMAV_CVC_ELT_3_1 = 1847
+XML_SCHEMAV_CVC_ELT_3_2_1 = 1848
+XML_SCHEMAV_CVC_ELT_3_2_2 = 1849
+XML_SCHEMAV_CVC_ELT_4_1 = 1850
+XML_SCHEMAV_CVC_ELT_4_2 = 1851
+XML_SCHEMAV_CVC_ELT_4_3 = 1852
+XML_SCHEMAV_CVC_ELT_5_1_1 = 1853
+XML_SCHEMAV_CVC_ELT_5_1_2 = 1854
+XML_SCHEMAV_CVC_ELT_5_2_1 = 1855
+XML_SCHEMAV_CVC_ELT_5_2_2_1 = 1856
+XML_SCHEMAV_CVC_ELT_5_2_2_2_1 = 1857
+XML_SCHEMAV_CVC_ELT_5_2_2_2_2 = 1858
+XML_SCHEMAV_CVC_ELT_6 = 1859
+XML_SCHEMAV_CVC_ELT_7 = 1860
+XML_SCHEMAV_CVC_ATTRIBUTE_1 = 1861
+XML_SCHEMAV_CVC_ATTRIBUTE_2 = 1862
+XML_SCHEMAV_CVC_ATTRIBUTE_3 = 1863
+XML_SCHEMAV_CVC_ATTRIBUTE_4 = 1864
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1 = 1865
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 = 1866
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 = 1867
+XML_SCHEMAV_CVC_COMPLEX_TYPE_4 = 1868
+XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1 = 1869
+XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2 = 1870
+XML_SCHEMAV_ELEMENT_CONTENT = 1871
+XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING = 1872
+XML_SCHEMAV_CVC_COMPLEX_TYPE_1 = 1873
+XML_SCHEMAV_CVC_AU = 1874
+XML_SCHEMAV_CVC_TYPE_1 = 1875
+XML_SCHEMAV_CVC_TYPE_2 = 1876
+XML_SCHEMAV_CVC_IDC = 1877
+XML_SCHEMAV_CVC_WILDCARD = 1878
+XML_SCHEMAV_MISC = 1879
+XML_XPTR_UNKNOWN_SCHEME = 1900
+XML_XPTR_CHILDSEQ_START = 1901
+XML_XPTR_EVAL_FAILED = 1902
+XML_XPTR_EXTRA_OBJECTS = 1903
+XML_C14N_CREATE_CTXT = 1950
+XML_C14N_REQUIRES_UTF8 = 1951
+XML_C14N_CREATE_STACK = 1952
+XML_C14N_INVALID_NODE = 1953
+XML_C14N_UNKNOW_NODE = 1954
+XML_C14N_RELATIVE_NAMESPACE = 1955
+XML_FTP_PASV_ANSWER = 2000
+XML_FTP_EPSV_ANSWER = 2001
+XML_FTP_ACCNT = 2002
+XML_FTP_URL_SYNTAX = 2003
+XML_HTTP_URL_SYNTAX = 2020
+XML_HTTP_USE_IP = 2021
+XML_HTTP_UNKNOWN_HOST = 2022
+XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000
+XML_SCHEMAP_SRC_SIMPLE_TYPE_2 = 3001
+XML_SCHEMAP_SRC_SIMPLE_TYPE_3 = 3002
+XML_SCHEMAP_SRC_SIMPLE_TYPE_4 = 3003
+XML_SCHEMAP_SRC_RESOLVE = 3004
+XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE = 3005
+XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE = 3006
+XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES = 3007
+XML_SCHEMAP_ST_PROPS_CORRECT_1 = 3008
+XML_SCHEMAP_ST_PROPS_CORRECT_2 = 3009
+XML_SCHEMAP_ST_PROPS_CORRECT_3 = 3010
+XML_SCHEMAP_COS_ST_RESTRICTS_1_1 = 3011
+XML_SCHEMAP_COS_ST_RESTRICTS_1_2 = 3012
+XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1 = 3013
+XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2 = 3014
+XML_SCHEMAP_COS_ST_RESTRICTS_2_1 = 3015
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 = 3016
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 = 3017
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 = 3018
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 = 3019
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 = 3020
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 = 3021
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 = 3022
+XML_SCHEMAP_COS_ST_RESTRICTS_3_1 = 3023
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1 = 3024
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 = 3025
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 = 3026
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 = 3027
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 = 3028
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 = 3029
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 = 3030
+XML_SCHEMAP_COS_ST_DERIVED_OK_2_1 = 3031
+XML_SCHEMAP_COS_ST_DERIVED_OK_2_2 = 3032
+XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED = 3033
+XML_SCHEMAP_S4S_ELEM_MISSING = 3034
+XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED = 3035
+XML_SCHEMAP_S4S_ATTR_MISSING = 3036
+XML_SCHEMAP_S4S_ATTR_INVALID_VALUE = 3037
+XML_SCHEMAP_SRC_ELEMENT_1 = 3038
+XML_SCHEMAP_SRC_ELEMENT_2_1 = 3039
+XML_SCHEMAP_SRC_ELEMENT_2_2 = 3040
+XML_SCHEMAP_SRC_ELEMENT_3 = 3041
+XML_SCHEMAP_P_PROPS_CORRECT_1 = 3042
+XML_SCHEMAP_P_PROPS_CORRECT_2_1 = 3043
+XML_SCHEMAP_P_PROPS_CORRECT_2_2 = 3044
+XML_SCHEMAP_E_PROPS_CORRECT_2 = 3045
+XML_SCHEMAP_E_PROPS_CORRECT_3 = 3046
+XML_SCHEMAP_E_PROPS_CORRECT_4 = 3047
+XML_SCHEMAP_E_PROPS_CORRECT_5 = 3048
+XML_SCHEMAP_E_PROPS_CORRECT_6 = 3049
+XML_SCHEMAP_SRC_INCLUDE = 3050
+XML_SCHEMAP_SRC_ATTRIBUTE_1 = 3051
+XML_SCHEMAP_SRC_ATTRIBUTE_2 = 3052
+XML_SCHEMAP_SRC_ATTRIBUTE_3_1 = 3053
+XML_SCHEMAP_SRC_ATTRIBUTE_3_2 = 3054
+XML_SCHEMAP_SRC_ATTRIBUTE_4 = 3055
+XML_SCHEMAP_NO_XMLNS = 3056
+XML_SCHEMAP_NO_XSI = 3057
+XML_SCHEMAP_COS_VALID_DEFAULT_1 = 3058
+XML_SCHEMAP_COS_VALID_DEFAULT_2_1 = 3059
+XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1 = 3060
+XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2 = 3061
+XML_SCHEMAP_CVC_SIMPLE_TYPE = 3062
+XML_SCHEMAP_COS_CT_EXTENDS_1_1 = 3063
+XML_SCHEMAP_SRC_IMPORT_1_1 = 3064
+XML_SCHEMAP_SRC_IMPORT_1_2 = 3065
+XML_SCHEMAP_SRC_IMPORT_2 = 3066
+XML_SCHEMAP_SRC_IMPORT_2_1 = 3067
+XML_SCHEMAP_SRC_IMPORT_2_2 = 3068
+XML_SCHEMAP_INTERNAL = 3069
+XML_SCHEMAP_NOT_DETERMINISTIC = 3070
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073
+XML_SCHEMAP_MG_PROPS_CORRECT_1 = 3074
+XML_SCHEMAP_MG_PROPS_CORRECT_2 = 3075
+XML_SCHEMAP_SRC_CT_1 = 3076
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 = 3077
+XML_SCHEMAP_AU_PROPS_CORRECT_2 = 3078
+XML_SCHEMAP_A_PROPS_CORRECT_2 = 3079
+XML_SCHEMAP_C_PROPS_CORRECT = 3080
+XML_SCHEMAP_SRC_REDEFINE = 3081
+XML_SCHEMAP_SRC_IMPORT = 3082
+XML_SCHEMAP_WARN_SKIP_SCHEMA = 3083
+XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084
+XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085
+XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086
+XML_SCHEMAP_AG_PROPS_CORRECT = 3087
+XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088
+XML_SCHEMAP_AU_PROPS_CORRECT = 3089
+XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090
+XML_SCHEMAP_COS_ALL_LIMITED = 3091
+XML_SCHEMATRONV_ASSERT = 4000
+XML_SCHEMATRONV_REPORT = 4001
+XML_MODULE_OPEN = 4900
+XML_MODULE_CLOSE = 4901
+XML_CHECK_FOUND_ELEMENT = 5000
+XML_CHECK_FOUND_ATTRIBUTE = 5001
+XML_CHECK_FOUND_TEXT = 5002
+XML_CHECK_FOUND_CDATA = 5003
+XML_CHECK_FOUND_ENTITYREF = 5004
+XML_CHECK_FOUND_ENTITY = 5005
+XML_CHECK_FOUND_PI = 5006
+XML_CHECK_FOUND_COMMENT = 5007
+XML_CHECK_FOUND_DOCTYPE = 5008
+XML_CHECK_FOUND_FRAGMENT = 5009
+XML_CHECK_FOUND_NOTATION = 5010
+XML_CHECK_UNKNOWN_NODE = 5011
+XML_CHECK_ENTITY_TYPE = 5012
+XML_CHECK_NO_PARENT = 5013
+XML_CHECK_NO_DOC = 5014
+XML_CHECK_NO_NAME = 5015
+XML_CHECK_NO_ELEM = 5016
+XML_CHECK_WRONG_DOC = 5017
+XML_CHECK_NO_PREV = 5018
+XML_CHECK_WRONG_PREV = 5019
+XML_CHECK_NO_NEXT = 5020
+XML_CHECK_WRONG_NEXT = 5021
+XML_CHECK_NOT_DTD = 5022
+XML_CHECK_NOT_ATTR = 5023
+XML_CHECK_NOT_ATTR_DECL = 5024
+XML_CHECK_NOT_ELEM_DECL = 5025
+XML_CHECK_NOT_ENTITY_DECL = 5026
+XML_CHECK_NOT_NS_DECL = 5027
+XML_CHECK_NO_HREF = 5028
+XML_CHECK_WRONG_PARENT = 5029
+XML_CHECK_NS_SCOPE = 5030
+XML_CHECK_NS_ANCESTOR = 5031
+XML_CHECK_NOT_UTF8 = 5032
+XML_CHECK_NO_DICT = 5033
+XML_CHECK_NOT_NCNAME = 5034
+XML_CHECK_OUTSIDE_DICT = 5035
+XML_CHECK_WRONG_NAME = 5036
+XML_CHECK_NAME_NOT_NULL = 5037
+XML_I18N_NO_NAME = 6000
+XML_I18N_NO_HANDLER = 6001
+XML_I18N_EXCESS_HANDLER = 6002
+XML_I18N_CONV_FAILED = 6003
+XML_I18N_NO_OUTPUT = 6004
+XML_BUF_OVERFLOW = 7000
+
+# xmlExpNodeType
+XML_EXP_EMPTY = 0
+XML_EXP_FORBID = 1
+XML_EXP_ATOM = 2
+XML_EXP_SEQ = 3
+XML_EXP_OR = 4
+XML_EXP_COUNT = 5
+
+# xmlElementContentType
+XML_ELEMENT_CONTENT_PCDATA = 1
+XML_ELEMENT_CONTENT_ELEMENT = 2
+XML_ELEMENT_CONTENT_SEQ = 3
+XML_ELEMENT_CONTENT_OR = 4
+
+# xmlParserProperties
+XML_PARSER_LOADDTD = 1
+XML_PARSER_DEFAULTATTRS = 2
+XML_PARSER_VALIDATE = 3
+XML_PARSER_SUBST_ENTITIES = 4
+
+# xmlReaderTypes
+XML_READER_TYPE_NONE = 0
+XML_READER_TYPE_ELEMENT = 1
+XML_READER_TYPE_ATTRIBUTE = 2
+XML_READER_TYPE_TEXT = 3
+XML_READER_TYPE_CDATA = 4
+XML_READER_TYPE_ENTITY_REFERENCE = 5
+XML_READER_TYPE_ENTITY = 6
+XML_READER_TYPE_PROCESSING_INSTRUCTION = 7
+XML_READER_TYPE_COMMENT = 8
+XML_READER_TYPE_DOCUMENT = 9
+XML_READER_TYPE_DOCUMENT_TYPE = 10
+XML_READER_TYPE_DOCUMENT_FRAGMENT = 11
+XML_READER_TYPE_NOTATION = 12
+XML_READER_TYPE_WHITESPACE = 13
+XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14
+XML_READER_TYPE_END_ELEMENT = 15
+XML_READER_TYPE_END_ENTITY = 16
+XML_READER_TYPE_XML_DECLARATION = 17
+
+# xmlCatalogPrefer
+XML_CATA_PREFER_NONE = 0
+XML_CATA_PREFER_PUBLIC = 1
+XML_CATA_PREFER_SYSTEM = 2
+
+# xmlElementType
+XML_ELEMENT_NODE = 1
+XML_ATTRIBUTE_NODE = 2
+XML_TEXT_NODE = 3
+XML_CDATA_SECTION_NODE = 4
+XML_ENTITY_REF_NODE = 5
+XML_ENTITY_NODE = 6
+XML_PI_NODE = 7
+XML_COMMENT_NODE = 8
+XML_DOCUMENT_NODE = 9
+XML_DOCUMENT_TYPE_NODE = 10
+XML_DOCUMENT_FRAG_NODE = 11
+XML_NOTATION_NODE = 12
+XML_HTML_DOCUMENT_NODE = 13
+XML_DTD_NODE = 14
+XML_ELEMENT_DECL = 15
+XML_ATTRIBUTE_DECL = 16
+XML_ENTITY_DECL = 17
+XML_NAMESPACE_DECL = 18
+XML_XINCLUDE_START = 19
+XML_XINCLUDE_END = 20
+XML_DOCB_DOCUMENT_NODE = 21
+
+# xlinkActuate
+XLINK_ACTUATE_NONE = 0
+XLINK_ACTUATE_AUTO = 1
+XLINK_ACTUATE_ONREQUEST = 2
+
+# xmlFeature
+XML_WITH_THREAD = 1
+XML_WITH_TREE = 2
+XML_WITH_OUTPUT = 3
+XML_WITH_PUSH = 4
+XML_WITH_READER = 5
+XML_WITH_PATTERN = 6
+XML_WITH_WRITER = 7
+XML_WITH_SAX1 = 8
+XML_WITH_FTP = 9
+XML_WITH_HTTP = 10
+XML_WITH_VALID = 11
+XML_WITH_HTML = 12
+XML_WITH_LEGACY = 13
+XML_WITH_C14N = 14
+XML_WITH_CATALOG = 15
+XML_WITH_XPATH = 16
+XML_WITH_XPTR = 17
+XML_WITH_XINCLUDE = 18
+XML_WITH_ICONV = 19
+XML_WITH_ISO8859X = 20
+XML_WITH_UNICODE = 21
+XML_WITH_REGEXP = 22
+XML_WITH_AUTOMATA = 23
+XML_WITH_EXPR = 24
+XML_WITH_SCHEMAS = 25
+XML_WITH_SCHEMATRON = 26
+XML_WITH_MODULES = 27
+XML_WITH_DEBUG = 28
+XML_WITH_DEBUG_MEM = 29
+XML_WITH_DEBUG_RUN = 30
+XML_WITH_ZLIB = 31
+XML_WITH_ICU = 32
+XML_WITH_LZMA = 33
+XML_WITH_NONE = 99999
+
+# xmlElementContentOccur
+XML_ELEMENT_CONTENT_ONCE = 1
+XML_ELEMENT_CONTENT_OPT = 2
+XML_ELEMENT_CONTENT_MULT = 3
+XML_ELEMENT_CONTENT_PLUS = 4
+
+# xmlXPathError
+XPATH_EXPRESSION_OK = 0
+XPATH_NUMBER_ERROR = 1
+XPATH_UNFINISHED_LITERAL_ERROR = 2
+XPATH_START_LITERAL_ERROR = 3
+XPATH_VARIABLE_REF_ERROR = 4
+XPATH_UNDEF_VARIABLE_ERROR = 5
+XPATH_INVALID_PREDICATE_ERROR = 6
+XPATH_EXPR_ERROR = 7
+XPATH_UNCLOSED_ERROR = 8
+XPATH_UNKNOWN_FUNC_ERROR = 9
+XPATH_INVALID_OPERAND = 10
+XPATH_INVALID_TYPE = 11
+XPATH_INVALID_ARITY = 12
+XPATH_INVALID_CTXT_SIZE = 13
+XPATH_INVALID_CTXT_POSITION = 14
+XPATH_MEMORY_ERROR = 15
+XPTR_SYNTAX_ERROR = 16
+XPTR_RESOURCE_ERROR = 17
+XPTR_SUB_RESOURCE_ERROR = 18
+XPATH_UNDEF_PREFIX_ERROR = 19
+XPATH_ENCODING_ERROR = 20
+XPATH_INVALID_CHAR_ERROR = 21
+XPATH_INVALID_CTXT = 22
+XPATH_STACK_ERROR = 23
+XPATH_FORBID_VARIABLE_ERROR = 24
+XPATH_OP_LIMIT_EXCEEDED = 25
+XPATH_RECURSION_LIMIT_EXCEEDED = 26
+
+# xmlTextReaderMode
+XML_TEXTREADER_MODE_INITIAL = 0
+XML_TEXTREADER_MODE_INTERACTIVE = 1
+XML_TEXTREADER_MODE_ERROR = 2
+XML_TEXTREADER_MODE_EOF = 3
+XML_TEXTREADER_MODE_CLOSED = 4
+XML_TEXTREADER_MODE_READING = 5
+
+# xmlErrorLevel
+XML_ERR_NONE = 0
+XML_ERR_WARNING = 1
+XML_ERR_ERROR = 2
+XML_ERR_FATAL = 3
+
+# xmlCharEncoding
+XML_CHAR_ENCODING_ERROR = -1
+XML_CHAR_ENCODING_NONE = 0
+XML_CHAR_ENCODING_UTF8 = 1
+XML_CHAR_ENCODING_UTF16LE = 2
+XML_CHAR_ENCODING_UTF16BE = 3
+XML_CHAR_ENCODING_UCS4LE = 4
+XML_CHAR_ENCODING_UCS4BE = 5
+XML_CHAR_ENCODING_EBCDIC = 6
+XML_CHAR_ENCODING_UCS4_2143 = 7
+XML_CHAR_ENCODING_UCS4_3412 = 8
+XML_CHAR_ENCODING_UCS2 = 9
+XML_CHAR_ENCODING_8859_1 = 10
+XML_CHAR_ENCODING_8859_2 = 11
+XML_CHAR_ENCODING_8859_3 = 12
+XML_CHAR_ENCODING_8859_4 = 13
+XML_CHAR_ENCODING_8859_5 = 14
+XML_CHAR_ENCODING_8859_6 = 15
+XML_CHAR_ENCODING_8859_7 = 16
+XML_CHAR_ENCODING_8859_8 = 17
+XML_CHAR_ENCODING_8859_9 = 18
+XML_CHAR_ENCODING_2022_JP = 19
+XML_CHAR_ENCODING_SHIFT_JIS = 20
+XML_CHAR_ENCODING_EUC_JP = 21
+XML_CHAR_ENCODING_ASCII = 22
+
+# xmlErrorDomain
+XML_FROM_NONE = 0
+XML_FROM_PARSER = 1
+XML_FROM_TREE = 2
+XML_FROM_NAMESPACE = 3
+XML_FROM_DTD = 4
+XML_FROM_HTML = 5
+XML_FROM_MEMORY = 6
+XML_FROM_OUTPUT = 7
+XML_FROM_IO = 8
+XML_FROM_FTP = 9
+XML_FROM_HTTP = 10
+XML_FROM_XINCLUDE = 11
+XML_FROM_XPATH = 12
+XML_FROM_XPOINTER = 13
+XML_FROM_REGEXP = 14
+XML_FROM_DATATYPE = 15
+XML_FROM_SCHEMASP = 16
+XML_FROM_SCHEMASV = 17
+XML_FROM_RELAXNGP = 18
+XML_FROM_RELAXNGV = 19
+XML_FROM_CATALOG = 20
+XML_FROM_C14N = 21
+XML_FROM_XSLT = 22
+XML_FROM_VALID = 23
+XML_FROM_CHECK = 24
+XML_FROM_WRITER = 25
+XML_FROM_MODULE = 26
+XML_FROM_I18N = 27
+XML_FROM_SCHEMATRONV = 28
+XML_FROM_BUFFER = 29
+XML_FROM_URI = 30
+
+# htmlStatus
+HTML_NA = 0
+HTML_INVALID = 1
+HTML_DEPRECATED = 2
+HTML_VALID = 4
+HTML_REQUIRED = 12
+
+# xmlSchemaValidOption
+XML_SCHEMA_VAL_VC_I_CREATE = 1
+
+# xmlSchemaWhitespaceValueType
+XML_SCHEMA_WHITESPACE_UNKNOWN = 0
+XML_SCHEMA_WHITESPACE_PRESERVE = 1
+XML_SCHEMA_WHITESPACE_REPLACE = 2
+XML_SCHEMA_WHITESPACE_COLLAPSE = 3
+
+# htmlParserOption
+HTML_PARSE_RECOVER = 1
+HTML_PARSE_NODEFDTD = 4
+HTML_PARSE_NOERROR = 32
+HTML_PARSE_NOWARNING = 64
+HTML_PARSE_PEDANTIC = 128
+HTML_PARSE_NOBLANKS = 256
+HTML_PARSE_NONET = 2048
+HTML_PARSE_NOIMPLIED = 8192
+HTML_PARSE_COMPACT = 65536
+HTML_PARSE_IGNORE_ENC = 2097152
+
+# xmlRelaxNGValidErr
+XML_RELAXNG_OK = 0
+XML_RELAXNG_ERR_MEMORY = 1
+XML_RELAXNG_ERR_TYPE = 2
+XML_RELAXNG_ERR_TYPEVAL = 3
+XML_RELAXNG_ERR_DUPID = 4
+XML_RELAXNG_ERR_TYPECMP = 5
+XML_RELAXNG_ERR_NOSTATE = 6
+XML_RELAXNG_ERR_NODEFINE = 7
+XML_RELAXNG_ERR_LISTEXTRA = 8
+XML_RELAXNG_ERR_LISTEMPTY = 9
+XML_RELAXNG_ERR_INTERNODATA = 10
+XML_RELAXNG_ERR_INTERSEQ = 11
+XML_RELAXNG_ERR_INTEREXTRA = 12
+XML_RELAXNG_ERR_ELEMNAME = 13
+XML_RELAXNG_ERR_ATTRNAME = 14
+XML_RELAXNG_ERR_ELEMNONS = 15
+XML_RELAXNG_ERR_ATTRNONS = 16
+XML_RELAXNG_ERR_ELEMWRONGNS = 17
+XML_RELAXNG_ERR_ATTRWRONGNS = 18
+XML_RELAXNG_ERR_ELEMEXTRANS = 19
+XML_RELAXNG_ERR_ATTREXTRANS = 20
+XML_RELAXNG_ERR_ELEMNOTEMPTY = 21
+XML_RELAXNG_ERR_NOELEM = 22
+XML_RELAXNG_ERR_NOTELEM = 23
+XML_RELAXNG_ERR_ATTRVALID = 24
+XML_RELAXNG_ERR_CONTENTVALID = 25
+XML_RELAXNG_ERR_EXTRACONTENT = 26
+XML_RELAXNG_ERR_INVALIDATTR = 27
+XML_RELAXNG_ERR_DATAELEM = 28
+XML_RELAXNG_ERR_VALELEM = 29
+XML_RELAXNG_ERR_LISTELEM = 30
+XML_RELAXNG_ERR_DATATYPE = 31
+XML_RELAXNG_ERR_VALUE = 32
+XML_RELAXNG_ERR_LIST = 33
+XML_RELAXNG_ERR_NOGRAMMAR = 34
+XML_RELAXNG_ERR_EXTRADATA = 35
+XML_RELAXNG_ERR_LACKDATA = 36
+XML_RELAXNG_ERR_INTERNAL = 37
+XML_RELAXNG_ERR_ELEMWRONG = 38
+XML_RELAXNG_ERR_TEXTWRONG = 39
+
+# xmlCatalogAllow
+XML_CATA_ALLOW_NONE = 0
+XML_CATA_ALLOW_GLOBAL = 1
+XML_CATA_ALLOW_DOCUMENT = 2
+XML_CATA_ALLOW_ALL = 3
+
+# xmlAttributeType
+XML_ATTRIBUTE_CDATA = 1
+XML_ATTRIBUTE_ID = 2
+XML_ATTRIBUTE_IDREF = 3
+XML_ATTRIBUTE_IDREFS = 4
+XML_ATTRIBUTE_ENTITY = 5
+XML_ATTRIBUTE_ENTITIES = 6
+XML_ATTRIBUTE_NMTOKEN = 7
+XML_ATTRIBUTE_NMTOKENS = 8
+XML_ATTRIBUTE_ENUMERATION = 9
+XML_ATTRIBUTE_NOTATION = 10
+
+# xmlSchematronValidOptions
+XML_SCHEMATRON_OUT_QUIET = 1
+XML_SCHEMATRON_OUT_TEXT = 2
+XML_SCHEMATRON_OUT_XML = 4
+XML_SCHEMATRON_OUT_ERROR = 8
+XML_SCHEMATRON_OUT_FILE = 256
+XML_SCHEMATRON_OUT_BUFFER = 512
+XML_SCHEMATRON_OUT_IO = 1024
+
+# xmlSchemaContentType
+XML_SCHEMA_CONTENT_UNKNOWN = 0
+XML_SCHEMA_CONTENT_EMPTY = 1
+XML_SCHEMA_CONTENT_ELEMENTS = 2
+XML_SCHEMA_CONTENT_MIXED = 3
+XML_SCHEMA_CONTENT_SIMPLE = 4
+XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5
+XML_SCHEMA_CONTENT_BASIC = 6
+XML_SCHEMA_CONTENT_ANY = 7
+
+# xmlSchemaTypeType
+XML_SCHEMA_TYPE_BASIC = 1
+XML_SCHEMA_TYPE_ANY = 2
+XML_SCHEMA_TYPE_FACET = 3
+XML_SCHEMA_TYPE_SIMPLE = 4
+XML_SCHEMA_TYPE_COMPLEX = 5
+XML_SCHEMA_TYPE_SEQUENCE = 6
+XML_SCHEMA_TYPE_CHOICE = 7
+XML_SCHEMA_TYPE_ALL = 8
+XML_SCHEMA_TYPE_SIMPLE_CONTENT = 9
+XML_SCHEMA_TYPE_COMPLEX_CONTENT = 10
+XML_SCHEMA_TYPE_UR = 11
+XML_SCHEMA_TYPE_RESTRICTION = 12
+XML_SCHEMA_TYPE_EXTENSION = 13
+XML_SCHEMA_TYPE_ELEMENT = 14
+XML_SCHEMA_TYPE_ATTRIBUTE = 15
+XML_SCHEMA_TYPE_ATTRIBUTEGROUP = 16
+XML_SCHEMA_TYPE_GROUP = 17
+XML_SCHEMA_TYPE_NOTATION = 18
+XML_SCHEMA_TYPE_LIST = 19
+XML_SCHEMA_TYPE_UNION = 20
+XML_SCHEMA_TYPE_ANY_ATTRIBUTE = 21
+XML_SCHEMA_TYPE_IDC_UNIQUE = 22
+XML_SCHEMA_TYPE_IDC_KEY = 23
+XML_SCHEMA_TYPE_IDC_KEYREF = 24
+XML_SCHEMA_TYPE_PARTICLE = 25
+XML_SCHEMA_TYPE_ATTRIBUTE_USE = 26
+XML_SCHEMA_FACET_MININCLUSIVE = 1000
+XML_SCHEMA_FACET_MINEXCLUSIVE = 1001
+XML_SCHEMA_FACET_MAXINCLUSIVE = 1002
+XML_SCHEMA_FACET_MAXEXCLUSIVE = 1003
+XML_SCHEMA_FACET_TOTALDIGITS = 1004
+XML_SCHEMA_FACET_FRACTIONDIGITS = 1005
+XML_SCHEMA_FACET_PATTERN = 1006
+XML_SCHEMA_FACET_ENUMERATION = 1007
+XML_SCHEMA_FACET_WHITESPACE = 1008
+XML_SCHEMA_FACET_LENGTH = 1009
+XML_SCHEMA_FACET_MAXLENGTH = 1010
+XML_SCHEMA_FACET_MINLENGTH = 1011
+XML_SCHEMA_EXTRA_QNAMEREF = 2000
+XML_SCHEMA_EXTRA_ATTR_USE_PROHIB = 2001
+
+# xmlModuleOption
+XML_MODULE_LAZY = 1
+XML_MODULE_LOCAL = 2
+
+# xmlParserMode
+XML_PARSE_UNKNOWN = 0
+XML_PARSE_DOM = 1
+XML_PARSE_SAX = 2
+XML_PARSE_PUSH_DOM = 3
+XML_PARSE_PUSH_SAX = 4
+XML_PARSE_READER = 5
+
+# xmlC14NMode
+XML_C14N_1_0 = 0
+XML_C14N_EXCLUSIVE_1_0 = 1
+XML_C14N_1_1 = 2
+
+# xmlParserOption
+XML_PARSE_RECOVER = 1
+XML_PARSE_NOENT = 2
+XML_PARSE_DTDLOAD = 4
+XML_PARSE_DTDATTR = 8
+XML_PARSE_DTDVALID = 16
+XML_PARSE_NOERROR = 32
+XML_PARSE_NOWARNING = 64
+XML_PARSE_PEDANTIC = 128
+XML_PARSE_NOBLANKS = 256
+XML_PARSE_SAX1 = 512
+XML_PARSE_XINCLUDE = 1024
+XML_PARSE_NONET = 2048
+XML_PARSE_NODICT = 4096
+XML_PARSE_NSCLEAN = 8192
+XML_PARSE_NOCDATA = 16384
+XML_PARSE_NOXINCNODE = 32768
+XML_PARSE_COMPACT = 65536
+XML_PARSE_OLD10 = 131072
+XML_PARSE_NOBASEFIX = 262144
+XML_PARSE_HUGE = 524288
+XML_PARSE_OLDSAX = 1048576
+XML_PARSE_IGNORE_ENC = 2097152
+XML_PARSE_BIG_LINES = 4194304
+
+# xmlElementTypeVal
+XML_ELEMENT_TYPE_UNDEFINED = 0
+XML_ELEMENT_TYPE_EMPTY = 1
+XML_ELEMENT_TYPE_ANY = 2
+XML_ELEMENT_TYPE_MIXED = 3
+XML_ELEMENT_TYPE_ELEMENT = 4
+
+# xmlDocProperties
+XML_DOC_WELLFORMED = 1
+XML_DOC_NSVALID = 2
+XML_DOC_OLD10 = 4
+XML_DOC_DTDVALID = 8
+XML_DOC_XINCLUDE = 16
+XML_DOC_USERBUILT = 32
+XML_DOC_INTERNAL = 64
+XML_DOC_HTML = 128
+
+# xlinkType
+XLINK_TYPE_NONE = 0
+XLINK_TYPE_SIMPLE = 1
+XLINK_TYPE_EXTENDED = 2
+XLINK_TYPE_EXTENDED_SET = 3
+
+# xmlXPathObjectType
+XPATH_UNDEFINED = 0
+XPATH_NODESET = 1
+XPATH_BOOLEAN = 2
+XPATH_NUMBER = 3
+XPATH_STRING = 4
+XPATH_POINT = 5
+XPATH_RANGE = 6
+XPATH_LOCATIONSET = 7
+XPATH_USERS = 8
+XPATH_XSLT_TREE = 9
+
+# xmlSchemaValidError
+XML_SCHEMAS_ERR_OK = 0
+XML_SCHEMAS_ERR_NOROOT = 1
+XML_SCHEMAS_ERR_UNDECLAREDELEM = 2
+XML_SCHEMAS_ERR_NOTTOPLEVEL = 3
+XML_SCHEMAS_ERR_MISSING = 4
+XML_SCHEMAS_ERR_WRONGELEM = 5
+XML_SCHEMAS_ERR_NOTYPE = 6
+XML_SCHEMAS_ERR_NOROLLBACK = 7
+XML_SCHEMAS_ERR_ISABSTRACT = 8
+XML_SCHEMAS_ERR_NOTEMPTY = 9
+XML_SCHEMAS_ERR_ELEMCONT = 10
+XML_SCHEMAS_ERR_HAVEDEFAULT = 11
+XML_SCHEMAS_ERR_NOTNILLABLE = 12
+XML_SCHEMAS_ERR_EXTRACONTENT = 13
+XML_SCHEMAS_ERR_INVALIDATTR = 14
+XML_SCHEMAS_ERR_INVALIDELEM = 15
+XML_SCHEMAS_ERR_NOTDETERMINIST = 16
+XML_SCHEMAS_ERR_CONSTRUCT = 17
+XML_SCHEMAS_ERR_INTERNAL = 18
+XML_SCHEMAS_ERR_NOTSIMPLE = 19
+XML_SCHEMAS_ERR_ATTRUNKNOWN = 20
+XML_SCHEMAS_ERR_ATTRINVALID = 21
+XML_SCHEMAS_ERR_VALUE = 22
+XML_SCHEMAS_ERR_FACET = 23
+XML_SCHEMAS_ERR_ = 24
+XML_SCHEMAS_ERR_XXX = 25
+
diff --git a/libxml2-2.9.10/python/libxml2class.txt b/libxml2-2.9.10/python/libxml2class.txt
new file mode 100644
index 0000000..ca88544
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml2class.txt
@@ -0,0 +1,1177 @@
+ Generated Classes for libxml2-python
+
+#
+# Global functions of the module
+#
+
+
+# functions from module HTMLparser
+htmlCreateMemoryParserCtxt()
+htmlHandleOmittedElem()
+htmlIsScriptAttribute()
+htmlNewParserCtxt()
+htmlParseDoc()
+htmlParseFile()
+htmlReadDoc()
+htmlReadFd()
+htmlReadFile()
+htmlReadMemory()
+
+# functions from module HTMLtree
+htmlIsBooleanAttr()
+htmlNewDoc()
+htmlNewDocNoDtD()
+
+# functions from module SAX2
+SAXDefaultVersion()
+defaultSAXHandlerInit()
+docbDefaultSAXHandlerInit()
+htmlDefaultSAXHandlerInit()
+
+# functions from module catalog
+catalogAdd()
+catalogCleanup()
+catalogConvert()
+catalogDump()
+catalogGetPublic()
+catalogGetSystem()
+catalogRemove()
+catalogResolve()
+catalogResolvePublic()
+catalogResolveSystem()
+catalogResolveURI()
+catalogSetDebug()
+initializeCatalog()
+loadACatalog()
+loadCatalog()
+loadCatalogs()
+loadSGMLSuperCatalog()
+newCatalog()
+parseCatalogFile()
+
+# functions from module chvalid
+isBaseChar()
+isBlank()
+isChar()
+isCombining()
+isDigit()
+isExtender()
+isIdeographic()
+isPubidChar()
+
+# functions from module debugXML
+boolToText()
+debugDumpString()
+shellPrintXPathError()
+
+# functions from module dict
+dictCleanup()
+initializeDict()
+
+# functions from module encoding
+addEncodingAlias()
+cleanupCharEncodingHandlers()
+cleanupEncodingAliases()
+delEncodingAlias()
+encodingAlias()
+initCharEncodingHandlers()
+
+# functions from module entities
+cleanupPredefinedEntities()
+initializePredefinedEntities()
+predefinedEntity()
+
+# functions from module globals
+cleanupGlobals()
+initGlobals()
+thrDefDefaultBufferSize()
+thrDefDoValidityCheckingDefaultValue()
+thrDefGetWarningsDefaultValue()
+thrDefIndentTreeOutput()
+thrDefKeepBlanksDefaultValue()
+thrDefLineNumbersDefaultValue()
+thrDefLoadExtDtdDefaultValue()
+thrDefParserDebugEntities()
+thrDefPedanticParserDefaultValue()
+thrDefSaveNoEmptyTags()
+thrDefSubstituteEntitiesDefaultValue()
+thrDefTreeIndentString()
+
+# functions from module nanoftp
+nanoFTPCleanup()
+nanoFTPInit()
+nanoFTPProxy()
+nanoFTPScanProxy()
+
+# functions from module nanohttp
+nanoHTTPCleanup()
+nanoHTTPInit()
+nanoHTTPScanProxy()
+
+# functions from module parser
+createDocParserCtxt()
+initParser()
+keepBlanksDefault()
+lineNumbersDefault()
+newParserCtxt()
+parseDTD()
+parseDoc()
+parseEntity()
+parseFile()
+parseMemory()
+pedanticParserDefault()
+readDoc()
+readFd()
+readFile()
+readMemory()
+recoverDoc()
+recoverFile()
+recoverMemory()
+substituteEntitiesDefault()
+
+# functions from module parserInternals
+checkLanguageID()
+copyChar()
+copyCharMultiByte()
+createEntityParserCtxt()
+createFileParserCtxt()
+createMemoryParserCtxt()
+createURLParserCtxt()
+htmlCreateFileParserCtxt()
+htmlInitAutoClose()
+isLetter()
+namePop()
+namePush()
+nodePop()
+nodePush()
+
+# functions from module python
+SAXParseFile()
+createInputBuffer()
+createOutputBuffer()
+createPushParser()
+debugMemory()
+dumpMemory()
+htmlCreatePushParser()
+htmlSAXParseFile()
+memoryUsed()
+newNode()
+pythonCleanupParser()
+setEntityLoader()
+
+# functions from module relaxng
+relaxNGCleanupTypes()
+relaxNGInitTypes()
+relaxNGNewMemParserCtxt()
+relaxNGNewParserCtxt()
+
+# functions from module tree
+buildQName()
+compressMode()
+isXHTML()
+newComment()
+newDoc()
+newPI()
+newText()
+newTextLen()
+setCompressMode()
+validateNCName()
+validateNMToken()
+validateName()
+validateQName()
+
+# functions from module uri
+URIEscape()
+URIEscapeStr()
+URIUnescapeString()
+buildRelativeURI()
+buildURI()
+canonicPath()
+createURI()
+normalizeURIPath()
+parseURI()
+parseURIRaw()
+pathToURI()
+
+# functions from module valid
+newValidCtxt()
+validateNameValue()
+validateNamesValue()
+validateNmtokenValue()
+validateNmtokensValue()
+
+# functions from module xmlIO
+checkFilename()
+cleanupInputCallbacks()
+cleanupOutputCallbacks()
+fileMatch()
+iOFTPMatch()
+iOHTTPMatch()
+normalizeWindowsPath()
+parserGetDirectory()
+registerDefaultInputCallbacks()
+registerDefaultOutputCallbacks()
+registerHTTPPostCallbacks()
+
+# functions from module xmlerror
+lastError()
+resetLastError()
+
+# functions from module xmlreader
+newTextReaderFilename()
+readerForDoc()
+readerForFd()
+readerForFile()
+readerForMemory()
+
+# functions from module xmlregexp
+regexpCompile()
+
+# functions from module xmlschemas
+schemaNewMemParserCtxt()
+schemaNewParserCtxt()
+
+# functions from module xmlschemastypes
+schemaCleanupTypes()
+schemaCollapseString()
+schemaInitTypes()
+schemaWhiteSpaceReplace()
+
+# functions from module xmlstring
+UTF8Charcmp()
+UTF8Size()
+UTF8Strlen()
+UTF8Strloc()
+UTF8Strndup()
+UTF8Strpos()
+UTF8Strsize()
+UTF8Strsub()
+checkUTF8()
+
+# functions from module xmlunicode
+uCSIsAegeanNumbers()
+uCSIsAlphabeticPresentationForms()
+uCSIsArabic()
+uCSIsArabicPresentationFormsA()
+uCSIsArabicPresentationFormsB()
+uCSIsArmenian()
+uCSIsArrows()
+uCSIsBasicLatin()
+uCSIsBengali()
+uCSIsBlock()
+uCSIsBlockElements()
+uCSIsBopomofo()
+uCSIsBopomofoExtended()
+uCSIsBoxDrawing()
+uCSIsBraillePatterns()
+uCSIsBuhid()
+uCSIsByzantineMusicalSymbols()
+uCSIsCJKCompatibility()
+uCSIsCJKCompatibilityForms()
+uCSIsCJKCompatibilityIdeographs()
+uCSIsCJKCompatibilityIdeographsSupplement()
+uCSIsCJKRadicalsSupplement()
+uCSIsCJKSymbolsandPunctuation()
+uCSIsCJKUnifiedIdeographs()
+uCSIsCJKUnifiedIdeographsExtensionA()
+uCSIsCJKUnifiedIdeographsExtensionB()
+uCSIsCat()
+uCSIsCatC()
+uCSIsCatCc()
+uCSIsCatCf()
+uCSIsCatCo()
+uCSIsCatCs()
+uCSIsCatL()
+uCSIsCatLl()
+uCSIsCatLm()
+uCSIsCatLo()
+uCSIsCatLt()
+uCSIsCatLu()
+uCSIsCatM()
+uCSIsCatMc()
+uCSIsCatMe()
+uCSIsCatMn()
+uCSIsCatN()
+uCSIsCatNd()
+uCSIsCatNl()
+uCSIsCatNo()
+uCSIsCatP()
+uCSIsCatPc()
+uCSIsCatPd()
+uCSIsCatPe()
+uCSIsCatPf()
+uCSIsCatPi()
+uCSIsCatPo()
+uCSIsCatPs()
+uCSIsCatS()
+uCSIsCatSc()
+uCSIsCatSk()
+uCSIsCatSm()
+uCSIsCatSo()
+uCSIsCatZ()
+uCSIsCatZl()
+uCSIsCatZp()
+uCSIsCatZs()
+uCSIsCherokee()
+uCSIsCombiningDiacriticalMarks()
+uCSIsCombiningDiacriticalMarksforSymbols()
+uCSIsCombiningHalfMarks()
+uCSIsCombiningMarksforSymbols()
+uCSIsControlPictures()
+uCSIsCurrencySymbols()
+uCSIsCypriotSyllabary()
+uCSIsCyrillic()
+uCSIsCyrillicSupplement()
+uCSIsDeseret()
+uCSIsDevanagari()
+uCSIsDingbats()
+uCSIsEnclosedAlphanumerics()
+uCSIsEnclosedCJKLettersandMonths()
+uCSIsEthiopic()
+uCSIsGeneralPunctuation()
+uCSIsGeometricShapes()
+uCSIsGeorgian()
+uCSIsGothic()
+uCSIsGreek()
+uCSIsGreekExtended()
+uCSIsGreekandCoptic()
+uCSIsGujarati()
+uCSIsGurmukhi()
+uCSIsHalfwidthandFullwidthForms()
+uCSIsHangulCompatibilityJamo()
+uCSIsHangulJamo()
+uCSIsHangulSyllables()
+uCSIsHanunoo()
+uCSIsHebrew()
+uCSIsHighPrivateUseSurrogates()
+uCSIsHighSurrogates()
+uCSIsHiragana()
+uCSIsIPAExtensions()
+uCSIsIdeographicDescriptionCharacters()
+uCSIsKanbun()
+uCSIsKangxiRadicals()
+uCSIsKannada()
+uCSIsKatakana()
+uCSIsKatakanaPhoneticExtensions()
+uCSIsKhmer()
+uCSIsKhmerSymbols()
+uCSIsLao()
+uCSIsLatin1Supplement()
+uCSIsLatinExtendedA()
+uCSIsLatinExtendedAdditional()
+uCSIsLatinExtendedB()
+uCSIsLetterlikeSymbols()
+uCSIsLimbu()
+uCSIsLinearBIdeograms()
+uCSIsLinearBSyllabary()
+uCSIsLowSurrogates()
+uCSIsMalayalam()
+uCSIsMathematicalAlphanumericSymbols()
+uCSIsMathematicalOperators()
+uCSIsMiscellaneousMathematicalSymbolsA()
+uCSIsMiscellaneousMathematicalSymbolsB()
+uCSIsMiscellaneousSymbols()
+uCSIsMiscellaneousSymbolsandArrows()
+uCSIsMiscellaneousTechnical()
+uCSIsMongolian()
+uCSIsMusicalSymbols()
+uCSIsMyanmar()
+uCSIsNumberForms()
+uCSIsOgham()
+uCSIsOldItalic()
+uCSIsOpticalCharacterRecognition()
+uCSIsOriya()
+uCSIsOsmanya()
+uCSIsPhoneticExtensions()
+uCSIsPrivateUse()
+uCSIsPrivateUseArea()
+uCSIsRunic()
+uCSIsShavian()
+uCSIsSinhala()
+uCSIsSmallFormVariants()
+uCSIsSpacingModifierLetters()
+uCSIsSpecials()
+uCSIsSuperscriptsandSubscripts()
+uCSIsSupplementalArrowsA()
+uCSIsSupplementalArrowsB()
+uCSIsSupplementalMathematicalOperators()
+uCSIsSupplementaryPrivateUseAreaA()
+uCSIsSupplementaryPrivateUseAreaB()
+uCSIsSyriac()
+uCSIsTagalog()
+uCSIsTagbanwa()
+uCSIsTags()
+uCSIsTaiLe()
+uCSIsTaiXuanJingSymbols()
+uCSIsTamil()
+uCSIsTelugu()
+uCSIsThaana()
+uCSIsThai()
+uCSIsTibetan()
+uCSIsUgaritic()
+uCSIsUnifiedCanadianAboriginalSyllabics()
+uCSIsVariationSelectors()
+uCSIsVariationSelectorsSupplement()
+uCSIsYiRadicals()
+uCSIsYiSyllables()
+uCSIsYijingHexagramSymbols()
+
+# functions from module xmlversion
+checkVersion()
+
+# functions from module xpathInternals
+valuePop()
+
+
+#
+# Set of classes of the module
+#
+
+
+
+Class xmlNode(xmlCore)
+ # accessors
+ ns()
+ nsDefs()
+
+ # functions from module debugXML
+ debugDumpNode()
+ debugDumpNodeList()
+ debugDumpOneNode()
+ lsCountNode()
+ lsOneNode()
+ shellPrintNode()
+
+ # functions from module tree
+ addChild()
+ addChildList()
+ addContent()
+ addContentLen()
+ addNextSibling()
+ addPrevSibling()
+ addSibling()
+ copyNode()
+ copyNodeList()
+ copyProp()
+ copyPropList()
+ docCopyNode()
+ docCopyNodeList()
+ docSetRootElement()
+ firstElementChild()
+ freeNode()
+ freeNodeList()
+ getBase()
+ getContent()
+ getLang()
+ getSpacePreserve()
+ hasNsProp()
+ hasProp()
+ isBlankNode()
+ isText()
+ lastChild()
+ lastElementChild()
+ lineNo()
+ listGetRawString()
+ listGetString()
+ newChild()
+ newNs()
+ newNsProp()
+ newNsPropEatName()
+ newProp()
+ newTextChild()
+ nextElementSibling()
+ noNsProp()
+ nodePath()
+ nsProp()
+ previousElementSibling()
+ prop()
+ reconciliateNs()
+ replaceNode()
+ searchNs()
+ searchNsByHref()
+ setBase()
+ setContent()
+ setContentLen()
+ setLang()
+ setListDoc()
+ setName()
+ setNs()
+ setNsProp()
+ setProp()
+ setSpacePreserve()
+ setTreeDoc()
+ textConcat()
+ textMerge()
+ unlinkNode()
+ unsetNsProp()
+ unsetProp()
+
+ # functions from module valid
+ isID()
+ isRef()
+ validNormalizeAttributeValue()
+
+ # functions from module xinclude
+ xincludeProcessTree()
+ xincludeProcessTreeFlags()
+
+ # functions from module xmlschemas
+ schemaValidateOneElement()
+
+ # functions from module xpath
+ xpathCastNodeToNumber()
+ xpathCastNodeToString()
+ xpathCmpNodes()
+ xpathNodeEval()
+
+ # functions from module xpathInternals
+ xpathNewNodeSet()
+ xpathNewValueTree()
+ xpathNextAncestor()
+ xpathNextAncestorOrSelf()
+ xpathNextAttribute()
+ xpathNextChild()
+ xpathNextDescendant()
+ xpathNextDescendantOrSelf()
+ xpathNextFollowing()
+ xpathNextFollowingSibling()
+ xpathNextNamespace()
+ xpathNextParent()
+ xpathNextPreceding()
+ xpathNextPrecedingSibling()
+ xpathNextSelf()
+
+ # functions from module xpointer
+ xpointerNewCollapsedRange()
+ xpointerNewContext()
+ xpointerNewLocationSetNodes()
+ xpointerNewRange()
+ xpointerNewRangeNodes()
+
+
+Class xmlDoc(xmlNode)
+
+ # functions from module HTMLparser
+ htmlAutoCloseTag()
+ htmlIsAutoClosed()
+
+ # functions from module HTMLtree
+ htmlDocContentDumpFormatOutput()
+ htmlDocContentDumpOutput()
+ htmlDocDump()
+ htmlGetMetaEncoding()
+ htmlNodeDumpFile()
+ htmlNodeDumpFileFormat()
+ htmlNodeDumpFormatOutput()
+ htmlNodeDumpOutput()
+ htmlSaveFile()
+ htmlSaveFileEnc()
+ htmlSaveFileFormat()
+ htmlSetMetaEncoding()
+
+ # functions from module debugXML
+ debugCheckDocument()
+ debugDumpDocument()
+ debugDumpDocumentHead()
+ debugDumpEntities()
+
+ # functions from module entities
+ addDocEntity()
+ addDtdEntity()
+ docEntity()
+ dtdEntity()
+ encodeEntities()
+ encodeEntitiesReentrant()
+ encodeSpecialChars()
+ newEntity()
+ parameterEntity()
+
+ # functions from module relaxng
+ relaxNGNewDocParserCtxt()
+ relaxNGValidateDoc()
+ relaxNGValidateFullElement()
+ relaxNGValidatePopElement()
+ relaxNGValidatePushElement()
+
+ # functions from module tree
+ copyDoc()
+ copyNode()
+ copyNodeList()
+ createIntSubset()
+ docCompressMode()
+ dump()
+ elemDump()
+ formatDump()
+ freeDoc()
+ getRootElement()
+ intSubset()
+ newCDataBlock()
+ newCharRef()
+ newDocComment()
+ newDocFragment()
+ newDocNode()
+ newDocNodeEatName()
+ newDocPI()
+ newDocProp()
+ newDocRawNode()
+ newDocText()
+ newDocTextLen()
+ newDtd()
+ newGlobalNs()
+ newReference()
+ nodeDumpOutput()
+ nodeGetBase()
+ nodeListGetRawString()
+ nodeListGetString()
+ reconciliateNs()
+ saveFile()
+ saveFileEnc()
+ saveFileTo()
+ saveFormatFile()
+ saveFormatFileEnc()
+ saveFormatFileTo()
+ searchNs()
+ searchNsByHref()
+ setDocCompressMode()
+ setListDoc()
+ setRootElement()
+ setTreeDoc()
+ stringGetNodeList()
+ stringLenGetNodeList()
+
+ # functions from module valid
+ ID()
+ isID()
+ isMixedElement()
+ isRef()
+ removeID()
+ removeRef()
+ validCtxtNormalizeAttributeValue()
+ validNormalizeAttributeValue()
+ validateDocument()
+ validateDocumentFinal()
+ validateDtd()
+ validateDtdFinal()
+ validateElement()
+ validateNotationUse()
+ validateOneAttribute()
+ validateOneElement()
+ validateOneNamespace()
+ validatePopElement()
+ validatePushElement()
+ validateRoot()
+
+ # functions from module xinclude
+ xincludeProcess()
+ xincludeProcessFlags()
+
+ # functions from module xmlreader
+ NewWalker()
+ readerWalker()
+
+ # functions from module xmlschemas
+ schemaNewDocParserCtxt()
+ schemaValidateDoc()
+
+ # functions from module xpath
+ xpathNewContext()
+ xpathOrderDocElems()
+
+ # functions from module xpointer
+ xpointerNewContext()
+
+
+Class parserCtxt(parserCtxtCore)
+ # accessors
+ doc()
+ isValid()
+ lineNumbers()
+ loadSubset()
+ pedantic()
+ replaceEntities()
+ validate()
+ wellFormed()
+
+ # functions from module HTMLparser
+ htmlCtxtReadDoc()
+ htmlCtxtReadFd()
+ htmlCtxtReadFile()
+ htmlCtxtReadMemory()
+ htmlCtxtReset()
+ htmlCtxtUseOptions()
+ htmlFreeParserCtxt()
+ htmlParseCharRef()
+ htmlParseChunk()
+ htmlParseDocument()
+ htmlParseElement()
+
+ # functions from module parser
+ byteConsumed()
+ clearParserCtxt()
+ ctxtReadDoc()
+ ctxtReadFd()
+ ctxtReadFile()
+ ctxtReadMemory()
+ ctxtReset()
+ ctxtResetPush()
+ ctxtUseOptions()
+ initParserCtxt()
+ parseChunk()
+ parseDocument()
+ parseExtParsedEnt()
+ setupParserForBuffer()
+ stopParser()
+
+ # functions from module parserInternals
+ decodeEntities()
+ handleEntity()
+ namespaceParseNCName()
+ namespaceParseNSDef()
+ nextChar()
+ parseAttValue()
+ parseAttributeListDecl()
+ parseCDSect()
+ parseCharData()
+ parseCharRef()
+ parseComment()
+ parseContent()
+ parseDocTypeDecl()
+ parseElement()
+ parseElementDecl()
+ parseEncName()
+ parseEncodingDecl()
+ parseEndTag()
+ parseEntityDecl()
+ parseEntityRef()
+ parseExternalSubset()
+ parseMarkupDecl()
+ parseMisc()
+ parseName()
+ parseNamespace()
+ parseNmtoken()
+ parseNotationDecl()
+ parsePEReference()
+ parsePI()
+ parsePITarget()
+ parsePubidLiteral()
+ parseQuotedString()
+ parseReference()
+ parseSDDecl()
+ parseStartTag()
+ parseSystemLiteral()
+ parseTextDecl()
+ parseVersionInfo()
+ parseVersionNum()
+ parseXMLDecl()
+ parserHandlePEReference()
+ parserHandleReference()
+ popInput()
+ scanName()
+ skipBlankChars()
+ stringDecodeEntities()
+ stringLenDecodeEntities()
+
+
+Class xmlAttr(xmlNode)
+
+ # functions from module debugXML
+ debugDumpAttr()
+ debugDumpAttrList()
+
+ # functions from module tree
+ copyProp()
+ copyPropList()
+ freeProp()
+ freePropList()
+ removeProp()
+
+ # functions from module valid
+ removeID()
+ removeRef()
+
+
+Class xmlAttribute(xmlNode)
+Class catalog()
+
+ # functions from module catalog
+ add()
+ catalogIsEmpty()
+ convertSGMLCatalog()
+ dump()
+ remove()
+ resolve()
+ resolvePublic()
+ resolveSystem()
+ resolveURI()
+
+
+Class xmlDtd(xmlNode)
+
+ # functions from module debugXML
+ debugDumpDTD()
+
+ # functions from module tree
+ copyDtd()
+ freeDtd()
+
+ # functions from module valid
+ dtdAttrDesc()
+ dtdElementDesc()
+ dtdQAttrDesc()
+ dtdQElementDesc()
+
+
+Class xmlElement(xmlNode)
+
+
+Class xmlEntity(xmlNode)
+
+ # functions from module parserInternals
+ handleEntity()
+Class Error()
+ # accessors
+ code()
+ domain()
+ file()
+ level()
+ line()
+ message()
+
+ # functions from module xmlerror
+ copyError()
+ resetError()
+
+
+Class xmlNs(xmlNode)
+
+ # functions from module tree
+ copyNamespace()
+ copyNamespaceList()
+ freeNs()
+ freeNsList()
+ newChild()
+ newDocNode()
+ newDocNodeEatName()
+ newDocRawNode()
+ newNodeEatName()
+ newNsProp()
+ newNsPropEatName()
+ newTextChild()
+ setNs()
+ setNsProp()
+ unsetNsProp()
+
+ # functions from module xpathInternals
+ xpathNodeSetFreeNs()
+
+
+Class outputBuffer(ioWriteWrapper)
+
+ # functions from module HTMLtree
+ htmlDocContentDumpFormatOutput()
+ htmlDocContentDumpOutput()
+ htmlNodeDumpFormatOutput()
+ htmlNodeDumpOutput()
+
+ # functions from module tree
+ nodeDumpOutput()
+ saveFileTo()
+ saveFormatFileTo()
+
+ # functions from module xmlIO
+ getContent()
+ write()
+ writeString()
+
+
+Class inputBuffer(ioReadWrapper)
+
+ # functions from module xmlIO
+ grow()
+ push()
+ read()
+
+ # functions from module xmlreader
+ Setup()
+ newTextReader()
+Class xmlReg()
+
+ # functions from module xmlregexp
+ regexpExec()
+ regexpIsDeterminist()
+ regexpPrint()
+Class relaxNgParserCtxt()
+
+ # functions from module relaxng
+ relaxNGParse()
+ relaxParserSetFlag()
+Class relaxNgSchema()
+
+ # functions from module relaxng
+ relaxNGDump()
+ relaxNGDumpTree()
+ relaxNGNewValidCtxt()
+
+ # functions from module xmlreader
+ RelaxNGSetSchema()
+
+
+Class relaxNgValidCtxt(relaxNgValidCtxtCore)
+
+ # functions from module relaxng
+ relaxNGValidateDoc()
+ relaxNGValidateFullElement()
+ relaxNGValidatePopElement()
+ relaxNGValidatePushCData()
+ relaxNGValidatePushElement()
+
+ # functions from module xmlreader
+ RelaxNGValidateCtxt()
+Class SchemaParserCtxt()
+
+ # functions from module xmlschemas
+ schemaParse()
+Class Schema()
+
+ # functions from module xmlreader
+ SetSchema()
+
+ # functions from module xmlschemas
+ schemaDump()
+ schemaNewValidCtxt()
+
+
+Class SchemaValidCtxt(SchemaValidCtxtCore)
+
+ # functions from module xmlreader
+ SchemaValidateCtxt()
+
+ # functions from module xmlschemas
+ schemaIsValid()
+ schemaSetValidOptions()
+ schemaValidCtxtGetOptions()
+ schemaValidCtxtGetParserCtxt()
+ schemaValidateDoc()
+ schemaValidateFile()
+ schemaValidateOneElement()
+ schemaValidateSetFilename()
+Class xmlTextReaderLocator()
+
+ # functions from module xmlreader
+ BaseURI()
+ LineNumber()
+
+
+Class xmlTextReader(xmlTextReaderCore)
+
+ # functions from module xmlreader
+ AttributeCount()
+ BaseUri()
+ ByteConsumed()
+ Close()
+ CurrentDoc()
+ CurrentNode()
+ Depth()
+ Encoding()
+ Expand()
+ GetAttribute()
+ GetAttributeNo()
+ GetAttributeNs()
+ GetParserColumnNumber()
+ GetParserLineNumber()
+ GetParserProp()
+ GetRemainder()
+ HasAttributes()
+ HasValue()
+ IsDefault()
+ IsEmptyElement()
+ IsNamespaceDecl()
+ IsValid()
+ LocalName()
+ LookupNamespace()
+ MoveToAttribute()
+ MoveToAttributeNo()
+ MoveToAttributeNs()
+ MoveToElement()
+ MoveToFirstAttribute()
+ MoveToNextAttribute()
+ Name()
+ NamespaceUri()
+ NewDoc()
+ NewFd()
+ NewFile()
+ NewMemory()
+ NewWalker()
+ Next()
+ NextSibling()
+ NodeType()
+ Normalization()
+ Prefix()
+ Preserve()
+ QuoteChar()
+ Read()
+ ReadAttributeValue()
+ ReadInnerXml()
+ ReadOuterXml()
+ ReadState()
+ ReadString()
+ RelaxNGSetSchema()
+ RelaxNGValidate()
+ RelaxNGValidateCtxt()
+ SchemaValidate()
+ SchemaValidateCtxt()
+ SetParserProp()
+ SetSchema()
+ Setup()
+ Standalone()
+ String()
+ Value()
+ XmlLang()
+ XmlVersion()
+Class URI()
+ # accessors
+ authority()
+ fragment()
+ opaque()
+ path()
+ port()
+ query()
+ queryRaw()
+ scheme()
+ server()
+ setAuthority()
+ setFragment()
+ setOpaque()
+ setPath()
+ setPort()
+ setQuery()
+ setQueryRaw()
+ setScheme()
+ setServer()
+ setUser()
+ user()
+
+ # functions from module uri
+ parseURIReference()
+ printURI()
+ saveUri()
+
+
+Class ValidCtxt(ValidCtxtCore)
+
+ # functions from module valid
+ validCtxtNormalizeAttributeValue()
+ validateDocument()
+ validateDocumentFinal()
+ validateDtd()
+ validateDtdFinal()
+ validateElement()
+ validateNotationUse()
+ validateOneAttribute()
+ validateOneElement()
+ validateOneNamespace()
+ validatePopElement()
+ validatePushCData()
+ validatePushElement()
+ validateRoot()
+Class xpathContext()
+ # accessors
+ contextDoc()
+ contextNode()
+ contextPosition()
+ contextSize()
+ function()
+ functionURI()
+ setContextDoc()
+ setContextNode()
+
+ # functions from module python
+ registerXPathFunction()
+ xpathRegisterVariable()
+
+ # functions from module xpath
+ xpathContextSetCache()
+ xpathEval()
+ xpathEvalExpression()
+ xpathFreeContext()
+
+ # functions from module xpathInternals
+ xpathNewParserContext()
+ xpathNsLookup()
+ xpathRegisterAllFunctions()
+ xpathRegisterNs()
+ xpathRegisteredFuncsCleanup()
+ xpathRegisteredNsCleanup()
+ xpathRegisteredVariablesCleanup()
+ xpathVariableLookup()
+ xpathVariableLookupNS()
+
+ # functions from module xpointer
+ xpointerEval()
+Class xpathParserContext()
+ # accessors
+ context()
+
+ # functions from module xpathInternals
+ xpathAddValues()
+ xpathBooleanFunction()
+ xpathCeilingFunction()
+ xpathCompareValues()
+ xpathConcatFunction()
+ xpathContainsFunction()
+ xpathCountFunction()
+ xpathDivValues()
+ xpathEqualValues()
+ xpathErr()
+ xpathEvalExpr()
+ xpathFalseFunction()
+ xpathFloorFunction()
+ xpathFreeParserContext()
+ xpathIdFunction()
+ xpathLangFunction()
+ xpathLastFunction()
+ xpathLocalNameFunction()
+ xpathModValues()
+ xpathMultValues()
+ xpathNamespaceURIFunction()
+ xpathNextAncestor()
+ xpathNextAncestorOrSelf()
+ xpathNextAttribute()
+ xpathNextChild()
+ xpathNextDescendant()
+ xpathNextDescendantOrSelf()
+ xpathNextFollowing()
+ xpathNextFollowingSibling()
+ xpathNextNamespace()
+ xpathNextParent()
+ xpathNextPreceding()
+ xpathNextPrecedingSibling()
+ xpathNextSelf()
+ xpathNormalizeFunction()
+ xpathNotEqualValues()
+ xpathNotFunction()
+ xpathNumberFunction()
+ xpathParseNCName()
+ xpathParseName()
+ xpathPopBoolean()
+ xpathPopNumber()
+ xpathPopString()
+ xpathPositionFunction()
+ xpathRoot()
+ xpathRoundFunction()
+ xpathStartsWithFunction()
+ xpathStringFunction()
+ xpathStringLengthFunction()
+ xpathSubValues()
+ xpathSubstringAfterFunction()
+ xpathSubstringBeforeFunction()
+ xpathSubstringFunction()
+ xpathSumFunction()
+ xpathTranslateFunction()
+ xpathTrueFunction()
+ xpathValueFlipSign()
+ xpatherror()
+
+ # functions from module xpointer
+ xpointerEvalRangePredicate()
+ xpointerRangeToFunction()
diff --git a/libxml2-2.9.10/python/libxml_wrap.h b/libxml2-2.9.10/python/libxml_wrap.h
new file mode 100644
index 0000000..53a0618
--- /dev/null
+++ b/libxml2-2.9.10/python/libxml_wrap.h
@@ -0,0 +1,279 @@
+#include <Python.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/catalog.h>
+#include <libxml/threads.h>
+#include <libxml/nanoftp.h>
+#include <libxml/nanohttp.h>
+#include <libxml/uri.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/debugXML.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/xinclude.h>
+#include <libxml/xpointer.h>
+#include <libxml/xmlunicode.h>
+#include <libxml/xmlregexp.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlreader.h>
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#endif
+
+/*
+ * for older versions of Python, we don't use PyBytes, but keep PyString
+ * and don't use Capsule but CObjects
+ */
+#if PY_VERSION_HEX < 0x02070000
+#ifndef PyBytes_Check
+#define PyBytes_Check PyString_Check
+#define PyBytes_Size PyString_Size
+#define PyBytes_AsString PyString_AsString
+#define PyBytes_AS_STRING PyString_AS_STRING
+#define PyBytes_GET_SIZE PyString_GET_SIZE
+#endif
+#ifndef PyCapsule_New
+#define PyCapsule_New PyCObject_FromVoidPtrAndDesc
+#define PyCapsule_CheckExact PyCObject_Check
+#define PyCapsule_GetPointer(o, n) PyCObject_GetDesc((o))
+#endif
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ * Repeated here since the definition is not available when
+ * compiled outside the libxml2 build tree.
+ */
+#ifdef __GNUC__
+#ifdef ATTRIBUTE_UNUSED
+#undef ATTRIBUTE_UNUSED
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#endif /* ATTRIBUTE_UNUSED */
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+#define PyxmlNode_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlNode_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlNodePtr obj;
+} PyxmlNode_Object;
+
+#define PyxmlXPathContext_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlXPathContext_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlXPathContextPtr obj;
+} PyxmlXPathContext_Object;
+
+#define PyxmlXPathParserContext_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlXPathParserContext_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlXPathParserContextPtr obj;
+} PyxmlXPathParserContext_Object;
+
+#define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyparserCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlParserCtxtPtr obj;
+} PyparserCtxt_Object;
+
+#define PyValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyValidCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlValidCtxtPtr obj;
+} PyValidCtxt_Object;
+
+#define Pycatalog_Get(v) (((v) == Py_None) ? NULL : \
+ (((Pycatalog_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlCatalogPtr obj;
+} Pycatalog_Object;
+
+#ifdef LIBXML_REGEXP_ENABLED
+#define PyxmlReg_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlReg_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlRegexpPtr obj;
+} PyxmlReg_Object;
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#ifdef LIBXML_READER_ENABLED
+#define PyxmlTextReader_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlTextReader_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlTextReaderPtr obj;
+} PyxmlTextReader_Object;
+
+#define PyxmlTextReaderLocator_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlTextReaderLocator_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlTextReaderLocatorPtr obj;
+} PyxmlTextReaderLocator_Object;
+#endif
+
+#define PyURI_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyURI_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlErrorPtr obj;
+} PyError_Object;
+
+#define PyError_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyError_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlOutputBufferPtr obj;
+} PyoutputBuffer_Object;
+
+#define PyoutputBuffer_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyoutputBuffer_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlParserInputBufferPtr obj;
+} PyinputBuffer_Object;
+
+#define PyinputBuffer_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyinputBuffer_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlURIPtr obj;
+} PyURI_Object;
+
+/* FILE * have their own internal representation */
+#if PY_MAJOR_VERSION >= 3
+FILE *libxml_PyFileGet(PyObject *f);
+void libxml_PyFileRelease(FILE *f);
+#define PyFile_Get(v) (((v) == Py_None) ? NULL : libxml_PyFileGet(v))
+#define PyFile_Release(f) libxml_PyFileRelease(f)
+#else
+#define PyFile_Get(v) (((v) == Py_None) ? NULL : \
+ (PyFile_Check(v) ? (PyFile_AsFile(v)) : stdout))
+#define PyFile_Release(f)
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+typedef struct {
+ PyObject_HEAD
+ xmlRelaxNGPtr obj;
+} PyrelaxNgSchema_Object;
+
+#define PyrelaxNgSchema_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyrelaxNgSchema_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlRelaxNGParserCtxtPtr obj;
+} PyrelaxNgParserCtxt_Object;
+
+#define PyrelaxNgParserCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyrelaxNgParserCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlRelaxNGValidCtxtPtr obj;
+} PyrelaxNgValidCtxt_Object;
+
+#define PyrelaxNgValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyrelaxNgValidCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlSchemaPtr obj;
+} PySchema_Object;
+
+#define PySchema_Get(v) (((v) == Py_None) ? NULL : \
+ (((PySchema_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlSchemaParserCtxtPtr obj;
+} PySchemaParserCtxt_Object;
+
+#define PySchemaParserCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PySchemaParserCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlSchemaValidCtxtPtr obj;
+} PySchemaValidCtxt_Object;
+
+#define PySchemaValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PySchemaValidCtxt_Object *)(v))->obj))
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+
+PyObject * libxml_intWrap(int val);
+PyObject * libxml_longWrap(long val);
+PyObject * libxml_xmlCharPtrWrap(xmlChar *str);
+PyObject * libxml_constxmlCharPtrWrap(const xmlChar *str);
+PyObject * libxml_charPtrWrap(char *str);
+PyObject * libxml_constcharPtrWrap(const char *str);
+PyObject * libxml_charPtrConstWrap(const char *str);
+PyObject * libxml_xmlCharPtrConstWrap(const xmlChar *str);
+PyObject * libxml_xmlDocPtrWrap(xmlDocPtr doc);
+PyObject * libxml_xmlNodePtrWrap(xmlNodePtr node);
+PyObject * libxml_xmlAttrPtrWrap(xmlAttrPtr attr);
+PyObject * libxml_xmlNsPtrWrap(xmlNsPtr ns);
+PyObject * libxml_xmlAttributePtrWrap(xmlAttributePtr ns);
+PyObject * libxml_xmlElementPtrWrap(xmlElementPtr ns);
+PyObject * libxml_doubleWrap(double val);
+PyObject * libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt);
+PyObject * libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt);
+PyObject * libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt);
+PyObject * libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj);
+PyObject * libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid);
+PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj);
+PyObject * libxml_xmlURIPtrWrap(xmlURIPtr uri);
+PyObject * libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer);
+PyObject * libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer);
+#ifdef LIBXML_REGEXP_ENABLED
+PyObject * libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp);
+#endif /* LIBXML_REGEXP_ENABLED */
+#ifdef LIBXML_READER_ENABLED
+PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader);
+PyObject * libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator);
+#endif
+
+xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);
+#ifdef LIBXML_SCHEMAS_ENABLED
+PyObject * libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt);
+PyObject * libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt);
+PyObject * libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid);
+PyObject * libxml_xmlSchemaPtrWrap(xmlSchemaPtr ctxt);
+PyObject * libxml_xmlSchemaParserCtxtPtrWrap(xmlSchemaParserCtxtPtr ctxt);
+PyObject * libxml_xmlSchemaValidCtxtPtrWrap(xmlSchemaValidCtxtPtr valid);
+#endif /* LIBXML_SCHEMAS_ENABLED */
+PyObject * libxml_xmlErrorPtrWrap(xmlErrorPtr error);
+PyObject * libxml_xmlSchemaSetValidErrors(PyObject * self, PyObject * args);
+PyObject * libxml_xmlRegisterInputCallback(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUnregisterInputCallback(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeRemoveNsDef(PyObject * self, PyObject * args);
diff --git a/libxml2-2.9.10/python/setup.py.in b/libxml2-2.9.10/python/setup.py.in
new file mode 100755
index 0000000..90c2114
--- /dev/null
+++ b/libxml2-2.9.10/python/setup.py.in
@@ -0,0 +1,242 @@
+#!/usr/bin/python -u
+#
+# Setup script for libxml2 and libxslt if found
+#
+import sys, os
+from distutils.core import setup, Extension
+
+# Below ROOT, we expect to find include, include/libxml2, lib and bin.
+# On *nix, it is not needed (but should not harm),
+# on Windows, it is set by configure.js.
+ROOT = r'@prefix@'
+
+# Thread-enabled libxml2
+with_threads = @WITH_THREADS@
+
+# If this flag is set (windows only),
+# a private copy of the dlls are included in the package.
+# If this flag is not set, the libxml2 and libxslt
+# dlls must be found somewhere in the PATH at runtime.
+WITHDLLS = 1 and sys.platform.startswith('win')
+
+def missing(file):
+ if os.access(file, os.R_OK) == 0:
+ return 1
+ return 0
+
+try:
+ HOME = os.environ['HOME']
+except:
+ HOME="C:"
+
+if WITHDLLS:
+ # libxml dlls (expected in ROOT/bin)
+ dlls = [ 'iconv.dll','libxml2.dll','libxslt.dll','libexslt.dll' ]
+ dlls = [os.path.join(ROOT,'bin',dll) for dll in dlls]
+
+ # create __init__.py for the libxmlmods package
+ if not os.path.exists("libxmlmods"):
+ os.mkdir("libxmlmods")
+ open("libxmlmods/__init__.py","w").close()
+
+ def altImport(s):
+ s = s.replace("import libxml2mod","from libxmlmods import libxml2mod")
+ s = s.replace("import libxsltmod","from libxmlmods import libxsltmod")
+ return s
+
+if sys.platform.startswith('win'):
+ libraryPrefix = 'lib'
+ platformLibs = []
+else:
+ libraryPrefix = ''
+ platformLibs = ["m","z"]
+
+# those are examined to find
+# - libxml2/libxml/tree.h
+# - iconv.h
+# - libxslt/xsltconfig.h
+includes_dir = [
+"/usr/include",
+"/usr/local/include",
+"/opt/include",
+os.path.join(ROOT,'include'),
+HOME
+];
+
+xml_includes=""
+for dir in includes_dir:
+ if not missing(dir + "/libxml2/libxml/tree.h"):
+ xml_includes=dir + "/libxml2"
+ break;
+
+if xml_includes == "":
+ print("failed to find headers for libxml2: update includes_dir")
+ sys.exit(1)
+
+iconv_includes=""
+for dir in includes_dir:
+ if not missing(dir + "/iconv.h"):
+ iconv_includes=dir
+ break;
+
+if iconv_includes == "":
+ print("failed to find headers for libiconv: update includes_dir")
+ sys.exit(1)
+
+# those are added in the linker search path for libraries
+libdirs = [
+os.path.join(ROOT,'lib'),
+]
+
+xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
+ "libxml.c", "libxml.py", "libxml_wrap.h", "types.c",
+ "xmlgenerator.py", "README", "TODO", "drv_libxml2.py"]
+
+xslt_files = ["libxslt-api.xml", "libxslt-python-api.xml",
+ "libxslt.c", "libxsl.py", "libxslt_wrap.h",
+ "xsltgenerator.py"]
+
+if missing("libxml2-py.c") or missing("libxml2.py"):
+ try:
+ try:
+ import xmlgenerator
+ except:
+ import generator
+ except:
+ print("failed to find and generate stubs for libxml2, aborting ...")
+ print(sys.exc_info()[0], sys.exc_info()[1])
+ sys.exit(1)
+
+ head = open("libxml.py", "r")
+ generated = open("libxml2class.py", "r")
+ result = open("libxml2.py", "w")
+ for line in head.readlines():
+ if WITHDLLS:
+ result.write(altImport(line))
+ else:
+ result.write(line)
+ for line in generated.readlines():
+ result.write(line)
+ head.close()
+ generated.close()
+ result.close()
+
+with_xslt=0
+if missing("libxslt-py.c") or missing("libxslt.py"):
+ if missing("xsltgenerator.py") or missing("libxslt-api.xml"):
+ print("libxslt stub generator not found, libxslt not built")
+ else:
+ try:
+ import xsltgenerator
+ except:
+ print("failed to generate stubs for libxslt, aborting ...")
+ print(sys.exc_info()[0], sys.exc_info()[1])
+ else:
+ head = open("libxsl.py", "r")
+ generated = open("libxsltclass.py", "r")
+ result = open("libxslt.py", "w")
+ for line in head.readlines():
+ if WITHDLLS:
+ result.write(altImport(line))
+ else:
+ result.write(line)
+ for line in generated.readlines():
+ result.write(line)
+ head.close()
+ generated.close()
+ result.close()
+ with_xslt=1
+else:
+ with_xslt=1
+
+if with_xslt == 1:
+ xslt_includes=""
+ for dir in includes_dir:
+ if not missing(dir + "/libxslt/xsltconfig.h"):
+ xslt_includes=dir + "/libxslt"
+ break;
+
+ if xslt_includes == "":
+ print("failed to find headers for libxslt: update includes_dir")
+ with_xslt = 0
+
+
+descr = "libxml2 package"
+modules = [ 'libxml2', 'drv_libxml2' ]
+if WITHDLLS:
+ modules.append('libxmlmods.__init__')
+c_files = ['libxml2-py.c', 'libxml.c', 'types.c' ]
+includes= [xml_includes, iconv_includes]
+libs = [libraryPrefix + "xml2"] + platformLibs
+macros = []
+if with_threads:
+ macros.append(('_REENTRANT','1'))
+if with_xslt == 1:
+ descr = "libxml2 and libxslt package"
+ if not sys.platform.startswith('win'):
+ #
+ # We are gonna build 2 identical shared libs with merge initializing
+ # both libxml2mod and libxsltmod
+ #
+ c_files = c_files + ['libxslt-py.c', 'libxslt.c']
+ xslt_c_files = c_files
+ macros.append(('MERGED_MODULES', '1'))
+ else:
+ #
+ # On windows the MERGED_MODULE option is not needed
+ # (and does not work)
+ #
+ xslt_c_files = ['libxslt-py.c', 'libxslt.c', 'types.c']
+ libs.insert(0, libraryPrefix + 'exslt')
+ libs.insert(0, libraryPrefix + 'xslt')
+ includes.append(xslt_includes)
+ modules.append('libxslt')
+
+
+extens=[Extension('libxml2mod', c_files, include_dirs=includes,
+ library_dirs=libdirs,
+ libraries=libs, define_macros=macros)]
+if with_xslt == 1:
+ extens.append(Extension('libxsltmod', xslt_c_files, include_dirs=includes,
+ library_dirs=libdirs,
+ libraries=libs, define_macros=macros))
+
+if missing("MANIFEST"):
+
+ manifest = open("MANIFEST", "w")
+ manifest.write("setup.py\n")
+ for file in xml_files:
+ manifest.write(file + "\n")
+ if with_xslt == 1:
+ for file in xslt_files:
+ manifest.write(file + "\n")
+ manifest.close()
+
+if WITHDLLS:
+ ext_package = "libxmlmods"
+ if sys.version >= "2.2":
+ base = "lib/site-packages/"
+ else:
+ base = ""
+ data_files = [(base+"libxmlmods",dlls)]
+else:
+ ext_package = None
+ data_files = []
+
+setup (name = "libxml2-python",
+ # On *nix, the version number is created from setup.py.in
+ # On windows, it is set by configure.js
+ version = "@LIBXML_VERSION@",
+ description = descr,
+ author = "Daniel Veillard",
+ author_email = "veillard@redhat.com",
+ url = "http://xmlsoft.org/python.html",
+ licence="MIT Licence",
+ py_modules=modules,
+ ext_modules=extens,
+ ext_package=ext_package,
+ data_files=data_files,
+ )
+
+sys.exit(0)
+
diff --git a/libxml2-2.9.10/python/tests/Makefile.am b/libxml2-2.9.10/python/tests/Makefile.am
new file mode 100644
index 0000000..227e24d
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/Makefile.am
@@ -0,0 +1,78 @@
+exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples
+dist_example_DATA = $(PYTESTS) $(XMLS)
+
+PYTESTS= \
+ build.py \
+ attribs.py \
+ tst.py \
+ tstxpath.py \
+ xpathext.py \
+ push.py \
+ pushSAX.py \
+ pushSAXhtml.py \
+ error.py \
+ serialize.py\
+ validate.py \
+ tstURI.py \
+ cutnpaste.py\
+ xpathret.py \
+ xpath.py \
+ outbuf.py \
+ inbuf.py \
+ input_callback.py \
+ resolver.py \
+ regexp.py \
+ reader.py \
+ reader2.py \
+ reader3.py \
+ reader4.py \
+ reader5.py \
+ reader6.py \
+ reader7.py \
+ reader8.py \
+ readernext.py \
+ walker.py \
+ nsdel.py \
+ ctxterror.py\
+ readererr.py\
+ relaxng.py \
+ schema.py \
+ thread2.py \
+ sync.py \
+ tstLastError.py \
+ indexes.py \
+ dtdvalid.py \
+ tstmem.py \
+ validDTD.py \
+ validSchemas.py \
+ validRNG.py \
+ compareNodes.py \
+ xpathns.py \
+ xpathleak.py
+
+XMLS= \
+ tst.xml \
+ valid.xml \
+ invalid.xml \
+ test.dtd
+
+CLEANFILES = core tmp.xml *.pyc
+
+if WITH_PYTHON
+tests: $(PYTESTS)
+ @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
+ @echo "## running Python regression tests"
+ @(export PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
+ export LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export PATH="$(top_builddir)/.libs:$$PATH" ; \
+ for test in $(PYTESTS) ; do \
+ log=`$(PYTHON) $(srcdir)/$$test` ; \
+ if [ "$$?" -ne 0 ] ; then \
+ echo "-- $$test" ; \
+ echo "$$log" ; \
+ exit 1 ; \
+ fi ; \
+ done)
+else
+tests:
+endif
diff --git a/libxml2-2.9.10/python/tests/Makefile.in b/libxml2-2.9.10/python/tests/Makefile.in
new file mode 100644
index 0000000..b2a9da5
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/Makefile.in
@@ -0,0 +1,688 @@
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = python/tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_example_DATA) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(exampledir)"
+DATA = $(dist_example_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XML_PRIVATE_LIBS = @XML_PRIVATE_LIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples
+dist_example_DATA = $(PYTESTS) $(XMLS)
+PYTESTS = \
+ build.py \
+ attribs.py \
+ tst.py \
+ tstxpath.py \
+ xpathext.py \
+ push.py \
+ pushSAX.py \
+ pushSAXhtml.py \
+ error.py \
+ serialize.py\
+ validate.py \
+ tstURI.py \
+ cutnpaste.py\
+ xpathret.py \
+ xpath.py \
+ outbuf.py \
+ inbuf.py \
+ input_callback.py \
+ resolver.py \
+ regexp.py \
+ reader.py \
+ reader2.py \
+ reader3.py \
+ reader4.py \
+ reader5.py \
+ reader6.py \
+ reader7.py \
+ reader8.py \
+ readernext.py \
+ walker.py \
+ nsdel.py \
+ ctxterror.py\
+ readererr.py\
+ relaxng.py \
+ schema.py \
+ thread2.py \
+ sync.py \
+ tstLastError.py \
+ indexes.py \
+ dtdvalid.py \
+ tstmem.py \
+ validDTD.py \
+ validSchemas.py \
+ validRNG.py \
+ compareNodes.py \
+ xpathns.py \
+ xpathleak.py
+
+XMLS = \
+ tst.xml \
+ valid.xml \
+ invalid.xml \
+ test.dtd
+
+CLEANFILES = core tmp.xml *.pyc
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu python/tests/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-dist_exampleDATA: $(dist_example_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(exampledir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(exampledir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \
+ done
+
+uninstall-dist_exampleDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(exampledir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_exampleDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_exampleDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_exampleDATA install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-dist_exampleDATA
+
+.PRECIOUS: Makefile
+
+
+@WITH_PYTHON_TRUE@tests: $(PYTESTS)
+@WITH_PYTHON_TRUE@ @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
+@WITH_PYTHON_TRUE@ @echo "## running Python regression tests"
+@WITH_PYTHON_TRUE@ @(export PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
+@WITH_PYTHON_TRUE@ export LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+@WITH_PYTHON_TRUE@ export PATH="$(top_builddir)/.libs:$$PATH" ; \
+@WITH_PYTHON_TRUE@ for test in $(PYTESTS) ; do \
+@WITH_PYTHON_TRUE@ log=`$(PYTHON) $(srcdir)/$$test` ; \
+@WITH_PYTHON_TRUE@ if [ "$$?" -ne 0 ] ; then \
+@WITH_PYTHON_TRUE@ echo "-- $$test" ; \
+@WITH_PYTHON_TRUE@ echo "$$log" ; \
+@WITH_PYTHON_TRUE@ exit 1 ; \
+@WITH_PYTHON_TRUE@ fi ; \
+@WITH_PYTHON_TRUE@ done)
+@WITH_PYTHON_FALSE@tests:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libxml2-2.9.10/python/tests/attribs.py b/libxml2-2.9.10/python/tests/attribs.py
new file mode 100755
index 0000000..99132c2
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/attribs.py
@@ -0,0 +1,34 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Testing XML document serialization
+#
+doc = libxml2.parseDoc(
+"""<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE test [
+<!ELEMENT test (#PCDATA) >
+<!ATTLIST test xmlns:abc CDATA #FIXED "http://abc.org" >
+<!ATTLIST test abc:attr CDATA #FIXED "def" >
+]>
+<test />
+""")
+elem = doc.getRootElement()
+attr = elem.hasNsProp('attr', 'http://abc.org')
+if attr == None or attr.serialize()[:-1] != """<!ATTLIST test abc:attr CDATA #FIXED "def">""":
+ print("Failed to find defaulted attribute abc:attr")
+ sys.exit(1)
+
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/build.py b/libxml2-2.9.10/python/tests/build.py
new file mode 100755
index 0000000..b2d3f78
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/build.py
@@ -0,0 +1,59 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+doc = libxml2.newDoc("1.0")
+comment = doc.newDocComment("This is a generated document")
+doc.addChild(comment)
+pi = libxml2.newPI("test", "PI content")
+doc.addChild(pi)
+root = doc.newChild(None, "doc", None)
+ns = root.newNs("http://example.com/doc", "my")
+root.setNs(ns)
+elem = root.newChild(None, "foo", "bar")
+elem.setBase("http://example.com/imgs")
+elem.setProp("img", "image.gif")
+doc.saveFile("tmp.xml")
+doc.freeDoc()
+
+doc = libxml2.parseFile("tmp.xml")
+comment = doc.children
+if comment.type != "comment" or \
+ comment.content != "This is a generated document":
+ print("error rereading comment")
+ sys.exit(1)
+pi = comment.next
+if pi.type != "pi" or pi.name != "test" or pi.content != "PI content":
+ print("error rereading PI")
+ sys.exit(1)
+root = pi.next
+if root.name != "doc":
+ print("error rereading root")
+ sys.exit(1)
+ns = root.ns()
+if ns.name != "my" or ns.content != "http://example.com/doc":
+ print("error rereading namespace")
+ sys.exit(1)
+elem = root.children
+if elem.name != "foo":
+ print("error rereading elem")
+ sys.exit(1)
+if elem.getBase(None) != "http://example.com/imgs":
+ print("error rereading base")
+ sys.exit(1)
+if elem.prop("img") != "image.gif":
+ print("error rereading property")
+ sys.exit(1)
+
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/compareNodes.py b/libxml2-2.9.10/python/tests/compareNodes.py
new file mode 100755
index 0000000..ca5a5a2
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/compareNodes.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Testing XML Node comparison and Node hash-value
+#
+doc = libxml2.parseDoc("""<root><foo/></root>""")
+root = doc.getRootElement()
+
+# Create two different objects which point to foo
+foonode1 = root.children
+foonode2 = root.children
+
+# Now check that [in]equality tests work ok
+if not ( foonode1 == foonode2 ):
+ print("Error comparing nodes with ==, nodes should be equal but are unequal")
+ sys.exit(1)
+if not ( foonode1 != root ):
+ print("Error comparing nodes with ==, nodes should not be equal but are equal")
+ sys.exit(1)
+if not ( foonode1 != root ):
+ print("Error comparing nodes with !=, nodes should not be equal but are equal")
+if ( foonode1 != foonode2 ):
+ print("Error comparing nodes with !=, nodes should be equal but are unequal")
+
+# Next check that the hash function for the objects also works ok
+if not (hash(foonode1) == hash(foonode2)):
+ print("Error hash values for two equal nodes are different")
+ sys.exit(1)
+if not (hash(foonode1) != hash(root)):
+ print("Error hash values for two unequal nodes are not different")
+ sys.exit(1)
+if hash(foonode1) == hash(root):
+ print("Error hash values for two unequal nodes are equal")
+ sys.exit(1)
+
+# Basic tests successful
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/ctxterror.py b/libxml2-2.9.10/python/tests/ctxterror.py
new file mode 100755
index 0000000..416e384
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/ctxterror.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python -u
+#
+# This test exercise the redirection of error messages with a
+# functions defined in Python.
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+expect="""--> (3) xmlns: URI foo is not absolute
+--> (4) Opening and ending tag mismatch: x line 0 and y
+"""
+
+err=""
+def callback(arg,msg,severity,reserved):
+ global err
+ err = err + "%s (%d) %s" % (arg,severity,msg)
+
+s = """<x xmlns="foo"></y>"""
+
+parserCtxt = libxml2.createPushParser(None,"",0,"test.xml")
+parserCtxt.setErrorHandler(callback, "-->")
+if parserCtxt.getErrorHandler() != (callback,"-->"):
+ print("getErrorHandler failed")
+ sys.exit(1)
+parserCtxt.parseChunk(s,len(s),1)
+doc = parserCtxt.doc()
+doc.freeDoc()
+parserCtxt = None
+
+if err != expect:
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
+ sys.exit(1)
+
+i = 10000
+while i > 0:
+ parserCtxt = libxml2.createPushParser(None,"",0,"test.xml")
+ parserCtxt.setErrorHandler(callback, "-->")
+ parserCtxt.parseChunk(s,len(s),1)
+ doc = parserCtxt.doc()
+ doc.freeDoc()
+ parserCtxt = None
+ err = ""
+ i = i - 1
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/cutnpaste.py b/libxml2-2.9.10/python/tests/cutnpaste.py
new file mode 100755
index 0000000..7787246
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/cutnpaste.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Testing XML document serialization
+#
+source = libxml2.parseDoc("""<?xml version="1.0"?>
+<root xmlns:foo="http://example.org/foo"
+ xmlns:bar="http://example.org/bar">
+<include xmlns="http://example.org/include">
+<fragment><foo:elem bar="tricky"/></fragment>
+</include>
+</root>
+""")
+
+target = libxml2.parseDoc("""<?xml version="1.0"?>
+<root xmlns:foobar="http://example.org/bar"/>""")
+
+fragment = source.xpathEval("//*[name()='fragment']")[0]
+dest = target.getRootElement()
+
+# do a cut and paste operation
+fragment.unlinkNode()
+dest.addChild(fragment)
+# do the namespace fixup
+dest.reconciliateNs(target)
+
+# The source tree can be freed at that point
+source.freeDoc()
+
+# check the resulting tree
+str = dest.serialize()
+if str != """<root xmlns:foobar="http://example.org/bar" xmlns:default="http://example.org/include" xmlns:foo="http://example.org/foo"><default:fragment><foo:elem bar="tricky"/></default:fragment></root>""":
+ print("reconciliateNs() failed")
+ sys.exit(1)
+target.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/dtdvalid.py b/libxml2-2.9.10/python/tests/dtdvalid.py
new file mode 100755
index 0000000..d4049b8
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/dtdvalid.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+dtd="""<!ELEMENT foo EMPTY>"""
+instance="""<?xml version="1.0"?>
+<foo></foo>"""
+
+dtd = libxml2.parseDTD(None, 'test.dtd')
+ctxt = libxml2.newValidCtxt()
+doc = libxml2.parseDoc(instance)
+ret = doc.validateDtd(ctxt, dtd)
+if ret != 1:
+ print("error doing DTD validation")
+ sys.exit(1)
+
+doc.freeDoc()
+dtd.freeDtd()
+del dtd
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/libxml2-2.9.10/python/tests/error.py b/libxml2-2.9.10/python/tests/error.py
new file mode 100755
index 0000000..530c2ee
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/error.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python -u
+#
+# This test exercise the redirection of error messages with a
+# functions defined in Python.
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+expect='--> I/O --> warning : --> failed to load external entity "missing.xml"\n'
+err=""
+def callback(ctx, str):
+ global err
+
+ err = err + "%s %s" % (ctx, str)
+
+got_exc = 0
+libxml2.registerErrorHandler(callback, "-->")
+try:
+ doc = libxml2.parseFile("missing.xml")
+except libxml2.parserError:
+ got_exc = 1
+
+if got_exc == 0:
+ print("Failed to get a parser exception")
+ sys.exit(1)
+
+if err != expect:
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
+ sys.exit(1)
+
+i = 10000
+while i > 0:
+ try:
+ doc = libxml2.parseFile("missing.xml")
+ except libxml2.parserError:
+ got_exc = 1
+ err = ""
+ i = i - 1
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/inbuf.py b/libxml2-2.9.10/python/tests/inbuf.py
new file mode 100755
index 0000000..0c16674
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/inbuf.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+i = 0
+while i < 5000:
+ f = str_io("foobar")
+ buf = libxml2.inputBuffer(f)
+ i = i + 1
+
+del f
+del buf
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/libxml2-2.9.10/python/tests/indexes.py b/libxml2-2.9.10/python/tests/indexes.py
new file mode 100755
index 0000000..e41a0d9
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/indexes.py
@@ -0,0 +1,113 @@
+#!/usr/bin/python -u
+# -*- coding: ISO-8859-1 -*-
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+ctxt = None
+
+class callback:
+ def __init__(self, startd, starte, ende, delta, endd):
+ self.startd = startd
+ self.starte = starte
+ self.ende = ende
+ self.endd = endd
+ self.delta = delta
+ self.count = 0
+
+ def startDocument(self):
+ global ctxt
+ if ctxt.byteConsumed() != self.startd:
+ print("document start at wrong index: %d expecting %d\n" % (
+ ctxt.byteConsumed(), self.startd))
+ sys.exit(1)
+
+ def endDocument(self):
+ global ctxt
+ expect = self.ende + self.delta * (self.count - 1) + self.endd
+ if ctxt.byteConsumed() != expect:
+ print("document end at wrong index: %d expecting %d\n" % (
+ ctxt.byteConsumed(), expect))
+ sys.exit(1)
+
+ def startElement(self, tag, attrs):
+ global ctxt
+ if tag == "bar1":
+ expect = self.starte + self.delta * self.count
+ if ctxt.byteConsumed() != expect:
+ print("element start at wrong index: %d expecting %d\n" % (
+ ctxt.byteConsumed(), expect))
+ sys.exit(1)
+
+
+ def endElement(self, tag):
+ global ctxt
+ if tag == "bar1":
+ expect = self.ende + self.delta * self.count
+ if ctxt.byteConsumed() != expect:
+ print("element end at wrong index: %d expecting %d\n" % (
+ ctxt.byteConsumed(), expect))
+ sys.exit(1)
+ self.count = self.count + 1
+
+ def characters(self, data):
+ pass
+
+#
+# First run a pure UTF-8 test
+#
+handler = callback(0, 13, 27, 198, 183)
+ctxt = libxml2.createPushParser(handler, "<foo>\n", 6, "test.xml")
+chunk = """ <bar1>chars1</bar1>
+ <bar2>chars2</bar2>
+ <bar3>chars3</bar3>
+ <bar4>chars4</bar4>
+ <bar5>chars5</bar5>
+ <bar6>&lt;s6</bar6>
+ <bar7>chars7</bar7>
+ <bar8>&#38;8</bar8>
+ <bar9>chars9</bar9>
+"""
+i = 0
+while i < 10000:
+ ctxt.parseChunk(chunk, len(chunk), 0)
+ i = i + 1
+chunk = "</foo>"
+ctxt.parseChunk(chunk, len(chunk), 1)
+ctxt=None
+
+#
+# Then run a test relying on ISO-Latin-1
+#
+handler = callback(43, 57, 71, 198, 183)
+chunk="""<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo>
+"""
+ctxt = libxml2.createPushParser(handler, chunk, len(chunk), "test.xml")
+chunk = """ <bar1>chars1</bar1>
+ <bar2>chars2</bar2>
+ <bar3>chars3</bar3>
+ <bar4>chàrs4</bar4>
+ <bar5>chars5</bar5>
+ <bar6>&lt;s6</bar6>
+ <bar7>chars7</bar7>
+ <bar8>&#38;8</bar8>
+ <bar9>très 9</bar9>
+"""
+i = 0
+while i < 10000:
+ ctxt.parseChunk(chunk, len(chunk), 0)
+ i = i + 1
+chunk = "</foo>"
+ctxt.parseChunk(chunk, len(chunk), 1)
+ctxt=None
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/input_callback.py b/libxml2-2.9.10/python/tests/input_callback.py
new file mode 100755
index 0000000..495ab62
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/input_callback.py
@@ -0,0 +1,148 @@
+#!/usr/bin/python -u
+#
+# This tests custom input callbacks
+#
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# We implement a new scheme, py://strings/ that will reference this dictionary
+pystrings = {
+ 'catalogs/catalog.xml' :
+'''<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+ <rewriteSystem systemIdStartString="http://example.com/dtds/" rewritePrefix="../dtds/"/>
+</catalog>''',
+
+ 'xml/sample.xml' :
+'''<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE root SYSTEM "http://example.com/dtds/sample.dtd">
+<root>&sample.entity;</root>''',
+
+ 'dtds/sample.dtd' :
+'''
+<!ELEMENT root (#PCDATA)>
+<!ENTITY sample.entity "replacement text">'''
+}
+
+prefix = "py://strings/"
+startURL = prefix + "xml/sample.xml"
+catURL = prefix + "catalogs/catalog.xml"
+
+def my_input_cb(URI):
+ if not(URI.startswith(prefix)):
+ return None
+ path = URI[len(prefix):]
+ if path not in pystrings:
+ return None
+ return str_io(pystrings[path])
+
+
+def run_test(desc, docpath, catalog, exp_status="verified", exp_err=[], test_callback=None,
+ root_name="root", root_content="replacement text"):
+ opts = libxml2.XML_PARSE_DTDLOAD | libxml2.XML_PARSE_NONET | libxml2.XML_PARSE_COMPACT
+ actual_err = []
+
+ def my_global_error_cb(ctx, msg):
+ actual_err.append((-1, msg))
+ def my_ctx_error_cb(arg, msg, severity, reserved):
+ actual_err.append((severity, msg))
+
+ libxml2.registerErrorHandler(my_global_error_cb, None)
+ try:
+ parser = libxml2.createURLParserCtxt(docpath, opts)
+ parser.setErrorHandler(my_ctx_error_cb, None)
+ if catalog is not None:
+ parser.addLocalCatalog(catalog)
+ if test_callback is not None:
+ test_callback()
+ parser.parseDocument()
+ doc = parser.doc()
+ actual_status = "loaded"
+ e = doc.getRootElement()
+ if e.name == root_name and e.content == root_content:
+ actual_status = "verified"
+ doc.freeDoc()
+ except libxml2.parserError:
+ actual_status = "not loaded"
+
+ if actual_status != exp_status:
+ print("Test '%s' failed: expect status '%s', actual '%s'" % (desc, exp_status, actual_status))
+ sys.exit(1)
+ elif actual_err != exp_err:
+ print("Test '%s' failed" % desc)
+ print("Expect errors:")
+ for s,m in exp_err: print(" [%2d] '%s'" % (s,m))
+ print("Actual errors:")
+ for s,m in actual_err: print(" [%2d] '%s'" % (s,m))
+ sys.exit(1)
+
+
+# Check that we cannot read custom schema without custom callback
+run_test(desc="Loading entity without custom callback",
+ docpath=startURL, catalog=None,
+ exp_status="not loaded", exp_err=[
+ (-1, "I/O "),
+ (-1, "warning : "),
+ (-1, "failed to load external entity \"py://strings/xml/sample.xml\"\n")
+ ])
+
+# Register handler and try to load the same entity
+libxml2.registerInputCallback(my_input_cb)
+run_test(desc="Loading entity with custom callback",
+ docpath=startURL, catalog=None,
+ exp_status="loaded", exp_err=[
+ (-1, "Attempt to load network entity http://example.com/dtds/sample.dtd"),
+ ( 4, "Entity 'sample.entity' not defined\n")
+ ])
+
+# Register a catalog (also accessible via pystr://) and retry
+run_test(desc="Loading entity with custom callback and catalog",
+ docpath=startURL, catalog=catURL)
+
+# Unregister custom callback when parser is already created
+run_test(desc="Loading entity and unregistering callback",
+ docpath=startURL, catalog=catURL,
+ test_callback=lambda: libxml2.popInputCallbacks(),
+ exp_status="loaded", exp_err=[
+ ( 3, "failed to load external entity \"py://strings/dtds/sample.dtd\"\n"),
+ ( 4, "Entity 'sample.entity' not defined\n")
+ ])
+
+# Try to load the document again
+run_test(desc="Retry loading document after unregistering callback",
+ docpath=startURL, catalog=catURL,
+ exp_status="not loaded", exp_err=[
+ (-1, "I/O "),
+ (-1, "warning : "),
+ (-1, "failed to load external entity \"py://strings/xml/sample.xml\"\n")
+ ])
+
+# But should be able to read standard I/O yet...
+run_test(desc="Loading using standard i/o after unregistering callback",
+ docpath="tst.xml", catalog=None,
+ root_name='doc', root_content='bar')
+
+# Now pop ALL input callbacks, should fail to load even standard I/O
+try:
+ while True:
+ libxml2.popInputCallbacks()
+except IndexError:
+ pass
+
+run_test(desc="Loading using standard i/o after unregistering all callbacks",
+ docpath="tst.xml", catalog=None,
+ exp_status="not loaded", exp_err=[
+ (-1, "I/O "),
+ (-1, "warning : "),
+ (-1, "failed to load external entity \"tst.xml\"\n")
+ ])
+
+print("OK")
+sys.exit(0);
diff --git a/libxml2-2.9.10/python/tests/invalid.xml b/libxml2-2.9.10/python/tests/invalid.xml
new file mode 100644
index 0000000..7c9b27e
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/invalid.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a, b, a)>
+<!ELEMENT a EMPTY>
+<!ELEMENT b EMPTY>
+]>
+<doc><b/><a/><b/></doc>
diff --git a/libxml2-2.9.10/python/tests/nsdel.py b/libxml2-2.9.10/python/tests/nsdel.py
new file mode 100755
index 0000000..079399a
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/nsdel.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python -u
+#
+# this test exercise the XPath basic engine, parser, etc, and
+# allows to detect memory leaks
+#
+import sys
+import libxml2
+
+instance="""<?xml version="1.0"?>
+<tag xmlns:foo='urn:foo' xmlns:bar='urn:bar' xmlns:baz='urn:baz' />"""
+
+def namespaceDefs(node):
+ n = node.nsDefs()
+ while n:
+ yield n
+ n = n.next
+
+def checkNamespaceDefs(node, count):
+ nsList = list(namespaceDefs(node))
+ #print nsList
+ if len(nsList) != count :
+ raise Exception("Error: saw %d namespace declarations. Expected %d" % (len(nsList), count))
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+# Remove single namespace
+doc = libxml2.parseDoc(instance)
+node = doc.getRootElement()
+checkNamespaceDefs(node, 3)
+ns = node.removeNsDef('urn:bar')
+checkNamespaceDefs(node, 2)
+ns.freeNsList()
+doc.freeDoc()
+
+# Remove all namespaces
+doc = libxml2.parseDoc(instance)
+node = doc.getRootElement()
+checkNamespaceDefs(node, 3)
+ns = node.removeNsDef(None)
+checkNamespaceDefs(node, 0)
+ns.freeNsList()
+doc.freeDoc()
+
+# Remove a namespace refered to by a child
+doc = libxml2.newDoc("1.0")
+root = doc.newChild(None, "root", None)
+namespace = root.newNs("http://example.com/sample", "s")
+child = root.newChild(namespace, "child", None)
+root.removeNsDef("http://example.com/sample")
+doc.reconciliateNs(root)
+namespace.freeNsList()
+doc.serialize() # This should not segfault
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/outbuf.py b/libxml2-2.9.10/python/tests/outbuf.py
new file mode 100755
index 0000000..62761cc
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/outbuf.py
@@ -0,0 +1,110 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+def testSimpleBufferWrites():
+ f = str_io()
+ buf = libxml2.createOutputBuffer(f, "ISO-8859-1")
+ buf.write(3, "foo")
+ buf.writeString("bar")
+ buf.close()
+
+ if f.getvalue() != "foobar":
+ print("Failed to save to StringIO")
+ sys.exit(1)
+
+def testSaveDocToBuffer():
+ """
+ Regression test for bug #154294.
+ """
+ input = '<foo>Hello</foo>'
+ expected = '''\
+<?xml version="1.0" encoding="UTF-8"?>
+<foo>Hello</foo>
+'''
+ f = str_io()
+ buf = libxml2.createOutputBuffer(f, 'UTF-8')
+ doc = libxml2.parseDoc(input)
+ doc.saveFileTo(buf, 'UTF-8')
+ doc.freeDoc()
+ if f.getvalue() != expected:
+ print('xmlDoc.saveFileTo() call failed.')
+ print(' got: %s' % repr(f.getvalue()))
+ print('expected: %s' % repr(expected))
+ sys.exit(1)
+
+def testSaveFormattedDocToBuffer():
+ input = '<outer><inner>Some text</inner><inner/></outer>'
+ # The formatted and non-formatted versions of the output.
+ expected = ('''\
+<?xml version="1.0" encoding="UTF-8"?>
+<outer><inner>Some text</inner><inner/></outer>
+''', '''\
+<?xml version="1.0" encoding="UTF-8"?>
+<outer>
+ <inner>Some text</inner>
+ <inner/>
+</outer>
+''')
+ doc = libxml2.parseDoc(input)
+ for i in (0, 1):
+ f = str_io()
+ buf = libxml2.createOutputBuffer(f, 'UTF-8')
+ doc.saveFormatFileTo(buf, 'UTF-8', i)
+ if f.getvalue() != expected[i]:
+ print('xmlDoc.saveFormatFileTo() call failed.')
+ print(' got: %s' % repr(f.getvalue()))
+ print('expected: %s' % repr(expected[i]))
+ sys.exit(1)
+ doc.freeDoc()
+
+def testSaveIntoOutputBuffer():
+ """
+ Similar to the previous two tests, except this time we invoke the save
+ methods on the output buffer object and pass in an XML node object.
+ """
+ input = '<foo>Hello</foo>'
+ expected = '''\
+<?xml version="1.0" encoding="UTF-8"?>
+<foo>Hello</foo>
+'''
+ f = str_io()
+ doc = libxml2.parseDoc(input)
+ buf = libxml2.createOutputBuffer(f, 'UTF-8')
+ buf.saveFileTo(doc, 'UTF-8')
+ if f.getvalue() != expected:
+ print('outputBuffer.saveFileTo() call failed.')
+ print(' got: %s' % repr(f.getvalue()))
+ print('expected: %s' % repr(expected))
+ sys.exit(1)
+ f = str_io()
+ buf = libxml2.createOutputBuffer(f, 'UTF-8')
+ buf.saveFormatFileTo(doc, 'UTF-8', 1)
+ if f.getvalue() != expected:
+ print('outputBuffer.saveFormatFileTo() call failed.')
+ print(' got: %s' % repr(f.getvalue()))
+ print('expected: %s' % repr(expected))
+ sys.exit(1)
+ doc.freeDoc()
+
+if __name__ == '__main__':
+ # Memory debug specific
+ libxml2.debugMemory(1)
+
+ testSimpleBufferWrites()
+ testSaveDocToBuffer()
+ testSaveFormattedDocToBuffer()
+ testSaveIntoOutputBuffer()
+
+ libxml2.cleanupParser()
+ if libxml2.debugMemory(1) == 0:
+ print("OK")
+ else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/push.py b/libxml2-2.9.10/python/tests/push.py
new file mode 100755
index 0000000..0edd61d
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/push.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml")
+ctxt.parseChunk("/>", 2, 1)
+doc = ctxt.doc()
+ctxt=None
+if doc.name != "test.xml":
+ print("document name error")
+ sys.exit(1)
+root = doc.children
+if root.name != "foo":
+ print("root element name error")
+ sys.exit(1)
+doc.freeDoc()
+i = 10000
+while i > 0:
+ ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml")
+ ctxt.parseChunk("/>", 2, 1)
+ doc = ctxt.doc()
+ doc.freeDoc()
+ i = i -1
+ctxt=None
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/pushSAX.py b/libxml2-2.9.10/python/tests/pushSAX.py
new file mode 100755
index 0000000..48f6e82
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/pushSAX.py
@@ -0,0 +1,64 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+log = ""
+
+class callback:
+ def startDocument(self):
+ global log
+ log = log + "startDocument:"
+
+ def endDocument(self):
+ global log
+ log = log + "endDocument:"
+
+ def startElement(self, tag, attrs):
+ global log
+ log = log + "startElement %s %s:" % (tag, attrs)
+
+ def endElement(self, tag):
+ global log
+ log = log + "endElement %s:" % (tag)
+
+ def characters(self, data):
+ global log
+ log = log + "characters: %s:" % (data)
+
+ def warning(self, msg):
+ global log
+ log = log + "warning: %s:" % (msg)
+
+ def error(self, msg):
+ global log
+ log = log + "error: %s:" % (msg)
+
+ def fatalError(self, msg):
+ global log
+ log = log + "fatalError: %s:" % (msg)
+
+handler = callback()
+
+ctxt = libxml2.createPushParser(handler, "<foo", 4, "test.xml")
+chunk = " url='tst'>b"
+ctxt.parseChunk(chunk, len(chunk), 0)
+chunk = "ar</foo>"
+ctxt.parseChunk(chunk, len(chunk), 1)
+ctxt=None
+
+reference = "startDocument:startElement foo {'url': 'tst'}:characters: bar:endElement foo:endDocument:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Exprected: %s" % reference)
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/pushSAXhtml.py b/libxml2-2.9.10/python/tests/pushSAXhtml.py
new file mode 100755
index 0000000..159d308
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/pushSAXhtml.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+log = ""
+
+class callback:
+ def startDocument(self):
+ global log
+ log = log + "startDocument:"
+
+ def endDocument(self):
+ global log
+ log = log + "endDocument:"
+
+ def startElement(self, tag, attrs):
+ global log
+ log = log + "startElement %s %s:" % (tag, attrs)
+
+ def endElement(self, tag):
+ global log
+ log = log + "endElement %s:" % (tag)
+
+ def characters(self, data):
+ global log
+ log = log + "characters: %s:" % (data)
+
+ def warning(self, msg):
+ global log
+ log = log + "warning: %s:" % (msg)
+
+ def error(self, msg):
+ global log
+ log = log + "error: %s:" % (msg)
+
+ def fatalError(self, msg):
+ global log
+ log = log + "fatalError: %s:" % (msg)
+
+handler = callback()
+
+ctxt = libxml2.htmlCreatePushParser(handler, "<foo", 4, "test.xml")
+chunk = " url='tst'>b"
+ctxt.htmlParseChunk(chunk, len(chunk), 0)
+chunk = "ar</foo>"
+ctxt.htmlParseChunk(chunk, len(chunk), 1)
+ctxt=None
+
+reference = """startDocument:startElement html None:startElement body None:startElement foo {'url': 'tst'}:error: Tag foo invalid
+:characters: bar:endElement foo:endElement body:endElement html:endDocument:"""
+if log != reference:
+ print("Error got: %s" % log)
+ print("Exprected: %s" % reference)
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/reader.py b/libxml2-2.9.10/python/tests/reader.py
new file mode 100755
index 0000000..173ce66
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/reader.py
@@ -0,0 +1,446 @@
+#!/usr/bin/python -u
+# -*- coding: ISO-8859-1 -*-
+#
+# this tests the basic APIs of the XmlTextReader interface
+#
+import libxml2
+import sys
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+f = str_io("""<a><b b1="b1"/><c>content of c</c></a>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test1")
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to first element")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test1: Error reading the first element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to second element")
+ sys.exit(1)
+if reader.Name() != "b" or reader.IsEmptyElement() != 1 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 1:
+ print("test1: Error reading the second element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to third element")
+ sys.exit(1)
+if reader.Name() != "c" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test1: Error reading the third element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to text node")
+ sys.exit(1)
+if reader.Name() != "#text" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 3 or reader.HasAttributes() != 0 or \
+ reader.Value() != "content of c":
+ print("test1: Error reading the text node")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to end of third element")
+ sys.exit(1)
+if reader.Name() != "c" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 15 or reader.HasAttributes() != 0:
+ print("test1: Error reading the end of third element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to end of first element")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 15 or reader.HasAttributes() != 0:
+ print("test1: Error reading the end of first element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test1: Error reading to end of document")
+ sys.exit(1)
+
+#
+# example from the XmlTextReader docs
+#
+f = str_io("""<test xmlns:dt="urn:datatypes" dt:type="int"/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test2")
+
+ret = reader.Read()
+if ret != 1:
+ print("Error reading test element")
+ sys.exit(1)
+if reader.GetAttributeNo(0) != "urn:datatypes" or \
+ reader.GetAttributeNo(1) != "int" or \
+ reader.GetAttributeNs("type", "urn:datatypes") != "int" or \
+ reader.GetAttribute("dt:type") != "int":
+ print("error reading test attributes")
+ sys.exit(1)
+
+#
+# example from the XmlTextReader docs
+#
+f = str_io("""<root xmlns:a="urn:456">
+<item>
+<ref href="a:b"/>
+</item>
+</root>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test3")
+
+ret = reader.Read()
+while ret == 1:
+ if reader.Name() == "ref":
+ if reader.LookupNamespace("a") != "urn:456":
+ print("error resolving namespace prefix")
+ sys.exit(1)
+ break
+ ret = reader.Read()
+if ret != 1:
+ print("Error finding the ref element")
+ sys.exit(1)
+
+#
+# Home made example for the various attribute access functions
+#
+f = str_io("""<testattr xmlns="urn:1" xmlns:a="urn:2" b="b" a:b="a:b"/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test4")
+ret = reader.Read()
+if ret != 1:
+ print("Error reading the testattr element")
+ sys.exit(1)
+#
+# Attribute exploration by index
+#
+if reader.MoveToAttributeNo(0) != 1:
+ print("Failed moveToAttribute(0)")
+ sys.exit(1)
+if reader.Value() != "urn:1":
+ print("Failed to read attribute(0)")
+ sys.exit(1)
+if reader.Name() != "xmlns":
+ print("Failed to read attribute(0) name")
+ sys.exit(1)
+if reader.MoveToAttributeNo(1) != 1:
+ print("Failed moveToAttribute(1)")
+ sys.exit(1)
+if reader.Value() != "urn:2":
+ print("Failed to read attribute(1)")
+ sys.exit(1)
+if reader.Name() != "xmlns:a":
+ print("Failed to read attribute(1) name")
+ sys.exit(1)
+if reader.MoveToAttributeNo(2) != 1:
+ print("Failed moveToAttribute(2)")
+ sys.exit(1)
+if reader.Value() != "b":
+ print("Failed to read attribute(2)")
+ sys.exit(1)
+if reader.Name() != "b":
+ print("Failed to read attribute(2) name")
+ sys.exit(1)
+if reader.MoveToAttributeNo(3) != 1:
+ print("Failed moveToAttribute(3)")
+ sys.exit(1)
+if reader.Value() != "a:b":
+ print("Failed to read attribute(3)")
+ sys.exit(1)
+if reader.Name() != "a:b":
+ print("Failed to read attribute(3) name")
+ sys.exit(1)
+#
+# Attribute exploration by name
+#
+if reader.MoveToAttribute("xmlns") != 1:
+ print("Failed moveToAttribute('xmlns')")
+ sys.exit(1)
+if reader.Value() != "urn:1":
+ print("Failed to read attribute('xmlns')")
+ sys.exit(1)
+if reader.MoveToAttribute("xmlns:a") != 1:
+ print("Failed moveToAttribute('xmlns')")
+ sys.exit(1)
+if reader.Value() != "urn:2":
+ print("Failed to read attribute('xmlns:a')")
+ sys.exit(1)
+if reader.MoveToAttribute("b") != 1:
+ print("Failed moveToAttribute('b')")
+ sys.exit(1)
+if reader.Value() != "b":
+ print("Failed to read attribute('b')")
+ sys.exit(1)
+if reader.MoveToAttribute("a:b") != 1:
+ print("Failed moveToAttribute('a:b')")
+ sys.exit(1)
+if reader.Value() != "a:b":
+ print("Failed to read attribute('a:b')")
+ sys.exit(1)
+if reader.MoveToAttributeNs("b", "urn:2") != 1:
+ print("Failed moveToAttribute('b', 'urn:2')")
+ sys.exit(1)
+if reader.Value() != "a:b":
+ print("Failed to read attribute('b', 'urn:2')")
+ sys.exit(1)
+#
+# Go back and read in sequence
+#
+if reader.MoveToElement() != 1:
+ print("Failed to move back to element")
+ sys.exit(1)
+if reader.MoveToFirstAttribute() != 1:
+ print("Failed to move to first attribute")
+ sys.exit(1)
+if reader.Value() != "urn:1":
+ print("Failed to read attribute(0)")
+ sys.exit(1)
+if reader.Name() != "xmlns":
+ print("Failed to read attribute(0) name")
+ sys.exit(1)
+if reader.MoveToNextAttribute() != 1:
+ print("Failed to move to next attribute")
+ sys.exit(1)
+if reader.Value() != "urn:2":
+ print("Failed to read attribute(1)")
+ sys.exit(1)
+if reader.Name() != "xmlns:a":
+ print("Failed to read attribute(1) name")
+ sys.exit(1)
+if reader.MoveToNextAttribute() != 1:
+ print("Failed to move to next attribute")
+ sys.exit(1)
+if reader.Value() != "b":
+ print("Failed to read attribute(2)")
+ sys.exit(1)
+if reader.Name() != "b":
+ print("Failed to read attribute(2) name")
+ sys.exit(1)
+if reader.MoveToNextAttribute() != 1:
+ print("Failed to move to next attribute")
+ sys.exit(1)
+if reader.Value() != "a:b":
+ print("Failed to read attribute(3)")
+ sys.exit(1)
+if reader.Name() != "a:b":
+ print("Failed to read attribute(3) name")
+ sys.exit(1)
+if reader.MoveToNextAttribute() != 0:
+ print("Failed to detect last attribute")
+ sys.exit(1)
+
+
+#
+# a couple of tests for namespace nodes
+#
+f = str_io("""<a xmlns="http://example.com/foo"/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test6")
+ret = reader.Read()
+if ret != 1:
+ print("test6: failed to Read()")
+ sys.exit(1)
+ret = reader.MoveToFirstAttribute()
+if ret != 1:
+ print("test6: failed to MoveToFirstAttribute()")
+ sys.exit(1)
+if reader.NamespaceUri() != "http://www.w3.org/2000/xmlns/" or \
+ reader.LocalName() != "xmlns" or reader.Name() != "xmlns" or \
+ reader.Value() != "http://example.com/foo" or reader.NodeType() != 2:
+ print("test6: failed to read the namespace node")
+ sys.exit(1)
+
+f = str_io("""<a xmlns:prefix="http://example.com/foo"/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test7")
+ret = reader.Read()
+if ret != 1:
+ print("test7: failed to Read()")
+ sys.exit(1)
+ret = reader.MoveToFirstAttribute()
+if ret != 1:
+ print("test7: failed to MoveToFirstAttribute()")
+ sys.exit(1)
+if reader.NamespaceUri() != "http://www.w3.org/2000/xmlns/" or \
+ reader.LocalName() != "prefix" or reader.Name() != "xmlns:prefix" or \
+ reader.Value() != "http://example.com/foo" or reader.NodeType() != 2:
+ print("test7: failed to read the namespace node")
+ sys.exit(1)
+
+#
+# Test for a limit case:
+#
+f = str_io("""<a/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test8")
+ret = reader.Read()
+if ret != 1:
+ print("test8: failed to read the node")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 1:
+ print("test8: failed to analyze the node")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test8: failed to detect the EOF")
+ sys.exit(1)
+
+#
+# Another test provided by Stéphane Bidoul and checked with C#
+#
+def tst_reader(s):
+ f = str_io(s)
+ input = libxml2.inputBuffer(f)
+ reader = input.newTextReader("tst")
+ res = ""
+ while reader.Read():
+ res=res + "%s (%s) [%s] %d %d\n" % (reader.NodeType(),reader.Name(),
+ reader.Value(), reader.IsEmptyElement(),
+ reader.Depth())
+ if reader.NodeType() == 1: # Element
+ while reader.MoveToNextAttribute():
+ res = res + "-- %s (%s) [%s] %d %d\n" % (reader.NodeType(),
+ reader.Name(),reader.Value(),
+ reader.IsEmptyElement(), reader.Depth())
+ return res
+
+doc="""<a><b b1="b1"/><c>content of c</c></a>"""
+expect="""1 (a) [None] 0 0
+1 (b) [None] 1 1
+-- 2 (b1) [b1] 0 2
+1 (c) [None] 0 1
+3 (#text) [content of c] 0 2
+15 (c) [None] 0 1
+15 (a) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test5 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<test><b/><c/></test>"""
+expect="""1 (test) [None] 0 0
+1 (b) [None] 1 1
+1 (c) [None] 1 1
+15 (test) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test9 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<a><b>bbb</b><c>ccc</c></a>"""
+expect="""1 (a) [None] 0 0
+1 (b) [None] 0 1
+3 (#text) [bbb] 0 2
+15 (b) [None] 0 1
+1 (c) [None] 0 1
+3 (#text) [ccc] 0 2
+15 (c) [None] 0 1
+15 (a) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test10 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<test a="a"/>"""
+expect="""1 (test) [None] 1 0
+-- 2 (a) [a] 0 1
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test11 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<test><a>aaa</a><b/></test>"""
+expect="""1 (test) [None] 0 0
+1 (a) [None] 0 1
+3 (#text) [aaa] 0 2
+15 (a) [None] 0 1
+1 (b) [None] 1 1
+15 (test) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test12 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<test><p></p></test>"""
+expect="""1 (test) [None] 0 0
+1 (p) [None] 0 1
+15 (p) [None] 0 1
+15 (test) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test13 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<p></p>"""
+expect="""1 (p) [None] 0 0
+15 (p) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test14 failed")
+ print(res)
+ sys.exit(1)
+
+#
+# test from bug #108801
+#
+doc="""<?xml version="1.0" standalone="no"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+]>
+
+<article>
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+</article>
+"""
+expect="""10 (article) [None] 0 0
+1 (article) [None] 0 0
+3 (#text) [
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+] 0 1
+15 (article) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test15 failed")
+ print(res)
+ sys.exit(1)
+
+#
+# cleanup for memory allocation counting
+#
+del f
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/reader2.py b/libxml2-2.9.10/python/tests/reader2.py
new file mode 100755
index 0000000..8570575
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/reader2.py
@@ -0,0 +1,265 @@
+#!/usr/bin/python -u
+#
+# this tests the DTD validation with the XmlTextReader interface
+#
+import sys
+import glob
+import string
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+err=""
+expect="""../../test/valid/rss.xml:177: element rss: validity error : Element rss does not carry attribute version
+</rss>
+ ^
+../../test/valid/xlink.xml:450: element termdef: validity error : ID dt-arc already defined
+ <p><termdef id="dt-arc" term="Arc">An <ter
+ ^
+../../test/valid/xlink.xml:530: validity error : attribute def line 199 references an unknown ID "dt-xlg"
+
+^
+"""
+def callback(ctx, str):
+ global err
+ err = err + "%s" % (str)
+libxml2.registerErrorHandler(callback, "")
+
+valid_files = glob.glob("../../test/valid/*.x*")
+valid_files.sort()
+for file in valid_files:
+ if file.find("t8") != -1:
+ continue
+ if file == "../../test/valid/rss.xml":
+ continue
+ if file == "../../test/valid/xlink.xml":
+ continue
+ reader = libxml2.newTextReaderFilename(file)
+ #print "%s:" % (file)
+ reader.SetParserProp(libxml2.PARSER_VALIDATE, 1)
+ ret = reader.Read()
+ while ret == 1:
+ ret = reader.Read()
+ if ret != 0:
+ print("Error parsing and validating %s" % (file))
+ #sys.exit(1)
+
+if err != expect:
+ print(err)
+
+#
+# another separate test based on Stephane Bidoul one
+#
+s = """
+<!DOCTYPE test [
+<!ELEMENT test (x,b)>
+<!ELEMENT x (c)>
+<!ELEMENT b (#PCDATA)>
+<!ELEMENT c (#PCDATA)>
+<!ENTITY x "<x><c>xxx</c></x>">
+]>
+<test>
+ &x;
+ <b>bbb</b>
+</test>
+"""
+expect="""10,test
+1,test
+14,#text
+1,x
+1,c
+3,#text
+15,c
+15,x
+14,#text
+1,b
+3,#text
+15,b
+14,#text
+15,test
+"""
+res=""
+err=""
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test2")
+reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
+reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
+while reader.Read() == 1:
+ res = res + "%s,%s\n" % (reader.NodeType(),reader.Name())
+
+if res != expect:
+ print("test2 failed: unexpected output")
+ print(res)
+ sys.exit(1)
+if err != "":
+ print("test2 failed: validation error found")
+ print(err)
+ sys.exit(1)
+
+#
+# Another test for external entity parsing and validation
+#
+
+s = """<!DOCTYPE test [
+<!ELEMENT test (x)>
+<!ELEMENT x (#PCDATA)>
+<!ENTITY e SYSTEM "tst.ent">
+]>
+<test>
+ &e;
+</test>
+"""
+tst_ent = """<x>hello</x>"""
+expect="""10 test
+1 test
+14 #text
+1 x
+3 #text
+15 x
+14 #text
+15 test
+"""
+res=""
+
+def myResolver(URL, ID, ctxt):
+ if URL == "tst.ent":
+ return(str_io(tst_ent))
+ return None
+
+libxml2.setEntityLoader(myResolver)
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test3")
+reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
+reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
+while reader.Read() == 1:
+ res = res + "%s %s\n" % (reader.NodeType(),reader.Name())
+
+if res != expect:
+ print("test3 failed: unexpected output")
+ print(res)
+ sys.exit(1)
+if err != "":
+ print("test3 failed: validation error found")
+ print(err)
+ sys.exit(1)
+
+#
+# Another test for recursive entity parsing, validation, and replacement of
+# entities, making sure the entity ref node doesn't show up in that case
+#
+
+s = """<!DOCTYPE test [
+<!ELEMENT test (x, x)>
+<!ELEMENT x (y)>
+<!ELEMENT y (#PCDATA)>
+<!ENTITY x "<x>&y;</x>">
+<!ENTITY y "<y>yyy</y>">
+]>
+<test>
+ &x;
+ &x;
+</test>"""
+expect="""10 test 0
+1 test 0
+14 #text 1
+1 x 1
+1 y 2
+3 #text 3
+15 y 2
+15 x 1
+14 #text 1
+1 x 1
+1 y 2
+3 #text 3
+15 y 2
+15 x 1
+14 #text 1
+15 test 0
+"""
+res=""
+err=""
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test4")
+reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
+reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
+while reader.Read() == 1:
+ res = res + "%s %s %d\n" % (reader.NodeType(),reader.Name(),reader.Depth())
+
+if res != expect:
+ print("test4 failed: unexpected output")
+ print(res)
+ sys.exit(1)
+if err != "":
+ print("test4 failed: validation error found")
+ print(err)
+ sys.exit(1)
+
+#
+# The same test but without entity substitution this time
+#
+
+s = """<!DOCTYPE test [
+<!ELEMENT test (x, x)>
+<!ELEMENT x (y)>
+<!ELEMENT y (#PCDATA)>
+<!ENTITY x "<x>&y;</x>">
+<!ENTITY y "<y>yyy</y>">
+]>
+<test>
+ &x;
+ &x;
+</test>"""
+expect="""10 test 0
+1 test 0
+14 #text 1
+5 x 1
+14 #text 1
+5 x 1
+14 #text 1
+15 test 0
+"""
+res=""
+err=""
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test5")
+reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
+while reader.Read() == 1:
+ res = res + "%s %s %d\n" % (reader.NodeType(),reader.Name(),reader.Depth())
+
+if res != expect:
+ print("test5 failed: unexpected output")
+ print(res)
+if err != "":
+ print("test5 failed: validation error found")
+ print(err)
+
+#
+# cleanup
+#
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/reader3.py b/libxml2-2.9.10/python/tests/reader3.py
new file mode 100755
index 0000000..4302b6c
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/reader3.py
@@ -0,0 +1,160 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+docstr="""<?xml version='1.0'?>
+<!DOCTYPE doc [
+<!ENTITY tst "<p>test</p>">
+]>
+<doc>&tst;</doc>"""
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# First test, normal don't substitute entities.
+#
+f = str_io(docstr)
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test_noent")
+ret = reader.Read()
+if ret != 1:
+ print("Error reading to root")
+ sys.exit(1)
+if reader.Name() == "doc" or reader.NodeType() == 10:
+ ret = reader.Read()
+if ret != 1:
+ print("Error reading to root")
+ sys.exit(1)
+if reader.Name() != "doc" or reader.NodeType() != 1:
+ print("test_normal: Error reading the root element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_normal: Error reading to the entity")
+ sys.exit(1)
+if reader.Name() != "tst" or reader.NodeType() != 5:
+ print("test_normal: Error reading the entity")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_normal: Error reading to the end of root")
+ sys.exit(1)
+if reader.Name() != "doc" or reader.NodeType() != 15:
+ print("test_normal: Error reading the end of the root element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test_normal: Error detecting the end")
+ sys.exit(1)
+
+#
+# Second test, completely substitute the entities.
+#
+f = str_io(docstr)
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test_noent")
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES, 1)
+ret = reader.Read()
+if ret != 1:
+ print("Error reading to root")
+ sys.exit(1)
+if reader.Name() == "doc" or reader.NodeType() == 10:
+ ret = reader.Read()
+if ret != 1:
+ print("Error reading to root")
+ sys.exit(1)
+if reader.Name() != "doc" or reader.NodeType() != 1:
+ print("test_noent: Error reading the root element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_noent: Error reading to the entity content")
+ sys.exit(1)
+if reader.Name() != "p" or reader.NodeType() != 1:
+ print("test_noent: Error reading the p element from entity")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_noent: Error reading to the text node")
+ sys.exit(1)
+if reader.NodeType() != 3 or reader.Value() != "test":
+ print("test_noent: Error reading the text node")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_noent: Error reading to the end of p element")
+ sys.exit(1)
+if reader.Name() != "p" or reader.NodeType() != 15:
+ print("test_noent: Error reading the end of the p element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_noent: Error reading to the end of root")
+ sys.exit(1)
+if reader.Name() != "doc" or reader.NodeType() != 15:
+ print("test_noent: Error reading the end of the root element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test_noent: Error detecting the end")
+ sys.exit(1)
+
+#
+# third test, crazy stuff about empty element in external parsed entities
+#
+s = """<!DOCTYPE struct [
+<!ENTITY simplestruct2.ent SYSTEM "simplestruct2.ent">
+]>
+<struct>&simplestruct2.ent;</struct>
+"""
+expect="""10 struct 0 0
+1 struct 0 0
+1 descr 1 1
+15 struct 0 0
+"""
+res=""
+simplestruct2_ent="""<descr/>"""
+
+def myResolver(URL, ID, ctxt):
+ if URL == "simplestruct2.ent":
+ return(str_io(simplestruct2_ent))
+ return None
+
+libxml2.setEntityLoader(myResolver)
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test3")
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+while reader.Read() == 1:
+ res = res + "%s %s %d %d\n" % (reader.NodeType(),reader.Name(),
+ reader.Depth(),reader.IsEmptyElement())
+
+if res != expect:
+ print("test3 failed: unexpected output")
+ print(res)
+ sys.exit(1)
+
+#
+# cleanup
+#
+del f
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/reader4.py b/libxml2-2.9.10/python/tests/reader4.py
new file mode 100755
index 0000000..0bb3e3f
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/reader4.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python -u
+#
+# this tests the basic APIs of the XmlTextReader interface
+#
+import libxml2
+import sys
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+def tst_reader(s):
+ f = str_io(s)
+ input = libxml2.inputBuffer(f)
+ reader = input.newTextReader("tst")
+ res = ""
+ while reader.Read():
+ res=res + "%s (%s) [%s] %d\n" % (reader.NodeType(),reader.Name(),
+ reader.Value(), reader.IsEmptyElement())
+ if reader.NodeType() == 1: # Element
+ while reader.MoveToNextAttribute():
+ res = res + "-- %s (%s) [%s]\n" % (reader.NodeType(),
+ reader.Name(),reader.Value())
+ return res
+
+expect="""1 (test) [None] 0
+1 (b) [None] 1
+1 (c) [None] 1
+15 (test) [None] 0
+"""
+
+res = tst_reader("""<test><b/><c/></test>""")
+
+if res != expect:
+ print("Did not get the expected error message:")
+ print(res)
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/reader5.py b/libxml2-2.9.10/python/tests/reader5.py
new file mode 100755
index 0000000..82d0dae
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/reader5.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python -u
+#
+# this tests the Expand() API of the xmlTextReader interface
+# this extract the Dragon bibliography entries from the XML specification
+#
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+expect="""<bibl id="Aho" key="Aho/Ullman">Aho, Alfred V.,
+Ravi Sethi, and Jeffrey D. Ullman.
+<emph>Compilers: Principles, Techniques, and Tools</emph>.
+Reading: Addison-Wesley, 1986, rpt. corr. 1988.</bibl>"""
+
+f = open('../../test/valid/REC-xml-19980210.xml', 'rb')
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("REC")
+res=""
+while reader.Read() > 0:
+ while reader.Name() == 'bibl':
+ node = reader.Expand() # expand the subtree
+ if node.xpathEval("@id = 'Aho'"): # use XPath on it
+ res = res + node.serialize()
+ if reader.Next() != 1: # skip the subtree
+ break;
+
+if res != expect:
+ print("Error: didn't get the expected output")
+ print("got '%s'" % (res))
+ print("expected '%s'" % (expect))
+
+
+#
+# cleanup
+#
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/reader6.py b/libxml2-2.9.10/python/tests/reader6.py
new file mode 100755
index 0000000..ef33b18
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/reader6.py
@@ -0,0 +1,128 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+schema="""<element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <oneOrMore>
+ <element name="label">
+ <text/>
+ </element>
+ <optional>
+ <element name="opt">
+ <empty/>
+ </element>
+ </optional>
+ <element name="item">
+ <data type="byte"/>
+ </element>
+ </oneOrMore>
+</element>
+"""
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Parse the Relax NG Schemas
+#
+rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+rngs = rngp.relaxNGParse()
+del rngp
+
+#
+# Parse and validate the correct document
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+
+f = str_io(docstr)
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("correct")
+reader.RelaxNGSetSchema(rngs)
+ret = reader.Read()
+while ret == 1:
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document")
+ sys.exit(1)
+
+if reader.IsValid() != 1:
+ print("Document failed to validate")
+ sys.exit(1)
+
+#
+# Parse and validate the incorrect document
+#
+docstr="""<foo>
+<label>some text</label>
+<item>1000</item>
+</foo>"""
+
+err=""
+# RNG errors are not as good as before , TODO
+#expect="""RNG validity error: file error line 3 element text
+#Type byte doesn't allow value '1000'
+#RNG validity error: file error line 3 element text
+#Error validating datatype byte
+#RNG validity error: file error line 3 element text
+#Element item failed to validate content
+#"""
+expect="""Type byte doesn't allow value '1000'
+Error validating datatype byte
+Element item failed to validate content
+"""
+
+def callback(ctx, str):
+ global err
+ err = err + "%s" % (str)
+libxml2.registerErrorHandler(callback, "")
+
+f = str_io(docstr)
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("error")
+reader.RelaxNGSetSchema(rngs)
+ret = reader.Read()
+while ret == 1:
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document")
+ sys.exit(1)
+
+if reader.IsValid() != 0:
+ print("Document failed to detect the validation error")
+ sys.exit(1)
+
+if err != expect:
+ print("Did not get the expected error message:")
+ print(err)
+ sys.exit(1)
+
+#
+# cleanup
+#
+del f
+del input
+del reader
+del rngs
+libxml2.relaxNGCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/reader7.py b/libxml2-2.9.10/python/tests/reader7.py
new file mode 100755
index 0000000..c88e370
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/reader7.py
@@ -0,0 +1,101 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+result = ""
+def processNode(reader):
+ global result
+
+ result = result + "%d %d %s %d\n" % (reader.Depth(), reader.NodeType(),
+ reader.Name(), reader.IsEmptyElement())
+
+#
+# Parse a document testing the readerForxxx API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+reader = libxml2.readerForDoc(docstr, "test1", None, 0)
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test1")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test1")
+ print(result)
+ sys.exit(1)
+
+#
+# Reuse the reader for another document testing the ReaderNewxxx API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>1000</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+reader.NewDoc(docstr, "test2", None, 0)
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test2")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test2")
+ print(result)
+ sys.exit(1)
+
+#
+# cleanup
+#
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/reader8.py b/libxml2-2.9.10/python/tests/reader8.py
new file mode 100755
index 0000000..de2dcd6
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/reader8.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Parse a document testing the Close() API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+
+reader = libxml2.readerForDoc(docstr, "test1", None, 0)
+ret = reader.Read()
+ret = reader.Read()
+ret = reader.Close()
+
+if ret != 0:
+ print("Error closing the document test1")
+ sys.exit(1)
+
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/readererr.py b/libxml2-2.9.10/python/tests/readererr.py
new file mode 100755
index 0000000..c8ceba5
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/readererr.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python -u
+#
+# this tests the basic APIs of the XmlTextReader interface
+#
+import libxml2
+import sys
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+expect="""--> (3) test1:1:xmlns: URI foo is not absolute
+--> (4) test1:1:Opening and ending tag mismatch: c line 1 and a
+"""
+err=""
+def myErrorHandler(arg,msg,severity,locator):
+ global err
+ err = err + "%s (%d) %s:%d:%s" % (arg,severity,locator.BaseURI(),locator.LineNumber(),msg)
+
+f = str_io("""<a xmlns="foo"><b b1="b1"/><c>content of c</a>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test1")
+reader.SetErrorHandler(myErrorHandler,"-->")
+while reader.Read() == 1:
+ pass
+
+if err != expect:
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
+ sys.exit(1)
+
+reader.SetErrorHandler(None,None)
+if reader.GetErrorHandler() != (None,None):
+ print("GetErrorHandler failed")
+ sys.exit(1)
+
+#
+# cleanup for memory allocation counting
+#
+del f
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/readernext.py b/libxml2-2.9.10/python/tests/readernext.py
new file mode 100755
index 0000000..fcb9ae3
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/readernext.py
@@ -0,0 +1,86 @@
+#!/usr/bin/python -u
+# -*- coding: ISO-8859-1 -*-
+#
+# this tests the next API of the XmlTextReader interface
+#
+import libxml2
+import sys
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+f = str_io("""<a><b><c /></b><d>content of d</d></a>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test_next")
+ret = reader.Read()
+if ret != 1:
+ print("test_next: Error reading to first element")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test_next: Error reading the first element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_next: Error reading to second element")
+ sys.exit(1)
+if reader.Name() != "b" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test_next: Error reading the second element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_next: Error reading to third element")
+ sys.exit(1)
+if reader.Name() != "c" or reader.NodeType() != 1 or \
+ reader.HasAttributes() != 0:
+ print("test_next: Error reading the third element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_next: Error reading to end of third element")
+ sys.exit(1)
+if reader.Name() != "b" or reader.NodeType() != 15:
+ print("test_next: Error reading to end of second element")
+ sys.exit(1)
+ret = reader.Next()
+if ret != 1:
+ print("test_next: Error moving to third element")
+ sys.exit(1)
+if reader.Name() != "d" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test_next: Error reading third element")
+ sys.exit(1)
+ret = reader.Next()
+if ret != 1:
+ print("test_next: Error reading to end of first element")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 15 or reader.HasAttributes() != 0:
+ print("test_next: Error reading the end of first element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test_next: Error reading to end of document")
+ sys.exit(1)
+
+#
+# cleanup for memory allocation counting
+#
+del f
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/regexp.py b/libxml2-2.9.10/python/tests/regexp.py
new file mode 100755
index 0000000..a03e459
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/regexp.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python -u
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+re = libxml2.regexpCompile("a|b")
+if re.regexpExec("a") != 1:
+ print("error checking 'a'")
+ sys.exit(1)
+if re.regexpExec("b") != 1:
+ print("error checking 'b'")
+ sys.exit(1)
+if re.regexpExec("ab") != 0:
+ print("error checking 'ab'")
+ sys.exit(1)
+if re.regexpExec("") != 0:
+ print("error checking 'ab'")
+ sys.exit(1)
+if re.regexpIsDeterminist() != 1:
+ print("error checking determinism")
+ sys.exit(1)
+del re
+
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/relaxng.py b/libxml2-2.9.10/python/tests/relaxng.py
new file mode 100755
index 0000000..fa3d327
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/relaxng.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+schema="""<?xml version="1.0"?>
+<element name="foo"
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ xmlns:a="http://relaxng.org/ns/annotation/1.0"
+ xmlns:ex1="http://www.example.com/n1"
+ xmlns:ex2="http://www.example.com/n2">
+ <a:documentation>A foo element.</a:documentation>
+ <element name="ex1:bar1">
+ <empty/>
+ </element>
+ <element name="ex2:bar2">
+ <empty/>
+ </element>
+</element>
+"""
+instance="""<?xml version="1.0"?>
+<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1"/><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
+
+rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+rngs = rngp.relaxNGParse()
+ctxt = rngs.relaxNGNewValidCtxt()
+doc = libxml2.parseDoc(instance)
+ret = doc.relaxNGValidateDoc(ctxt)
+if ret != 0:
+ print("error doing RelaxNG validation")
+ sys.exit(1)
+
+doc.freeDoc()
+del rngp
+del rngs
+del ctxt
+libxml2.relaxNGCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/libxml2-2.9.10/python/tests/resolver.py b/libxml2-2.9.10/python/tests/resolver.py
new file mode 100755
index 0000000..6f21f52
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/resolver.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+def myResolver(URL, ID, ctxt):
+ return(str_io("<foo/>"))
+
+libxml2.setEntityLoader(myResolver)
+
+doc = libxml2.parseFile("doesnotexist.xml")
+root = doc.children
+if root.name != "foo":
+ print("root element name error")
+ sys.exit(1)
+doc.freeDoc()
+
+i = 0
+while i < 5000:
+ doc = libxml2.parseFile("doesnotexist.xml")
+ root = doc.children
+ if root.name != "foo":
+ print("root element name error")
+ sys.exit(1)
+ doc.freeDoc()
+ i = i + 1
+
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/libxml2-2.9.10/python/tests/schema.py b/libxml2-2.9.10/python/tests/schema.py
new file mode 100755
index 0000000..8089272
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/schema.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+schema="""<?xml version="1.0" encoding="iso-8859-1"?>
+<schema xmlns = "http://www.w3.org/2001/XMLSchema">
+ <element name = "Customer">
+ <complexType>
+ <sequence>
+ <element name = "FirstName" type = "string" />
+ <element name = "MiddleInitial" type = "string" />
+ <element name = "LastName" type = "string" />
+ </sequence>
+ <attribute name = "customerID" type = "integer" />
+ </complexType>
+ </element>
+</schema>"""
+
+instance="""<?xml version="1.0" encoding="iso-8859-1"?>
+<Customer customerID = "24332">
+ <FirstName>Raymond</FirstName>
+ <MiddleInitial>G</MiddleInitial>
+ <LastName>Bayliss</LastName>
+</Customer>
+"""
+
+ctxt_parser = libxml2.schemaNewMemParserCtxt(schema, len(schema))
+ctxt_schema = ctxt_parser.schemaParse()
+ctxt_valid = ctxt_schema.schemaNewValidCtxt()
+doc = libxml2.parseDoc(instance)
+ret = doc.schemaValidateDoc(ctxt_valid)
+if ret != 0:
+ print("error doing schema validation")
+ sys.exit(1)
+
+doc.freeDoc()
+del ctxt_parser
+del ctxt_schema
+del ctxt_valid
+libxml2.schemaCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/libxml2-2.9.10/python/tests/serialize.py b/libxml2-2.9.10/python/tests/serialize.py
new file mode 100755
index 0000000..80b901a
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/serialize.py
@@ -0,0 +1,150 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Testing XML document serialization
+#
+doc = libxml2.parseDoc("""<root><foo>hello</foo></root>""")
+str = doc.serialize()
+if str != """<?xml version="1.0"?>
+<root><foo>hello</foo></root>
+""":
+ print("error serializing XML document 1")
+ sys.exit(1)
+str = doc.serialize("iso-8859-1")
+if str != """<?xml version="1.0" encoding="iso-8859-1"?>
+<root><foo>hello</foo></root>
+""":
+ print("error serializing XML document 2")
+ sys.exit(1)
+str = doc.serialize(format=1)
+if str != """<?xml version="1.0"?>
+<root>
+ <foo>hello</foo>
+</root>
+""":
+ print("error serializing XML document 3")
+ sys.exit(1)
+str = doc.serialize("iso-8859-1", 1)
+if str != """<?xml version="1.0" encoding="iso-8859-1"?>
+<root>
+ <foo>hello</foo>
+</root>
+""":
+ print("error serializing XML document 4")
+ sys.exit(1)
+
+#
+# Test serializing a subnode
+#
+root = doc.getRootElement()
+str = root.serialize()
+if str != """<root><foo>hello</foo></root>""":
+ print("error serializing XML root 1")
+ sys.exit(1)
+str = root.serialize("iso-8859-1")
+if str != """<root><foo>hello</foo></root>""":
+ print("error serializing XML root 2")
+ sys.exit(1)
+str = root.serialize(format=1)
+if str != """<root>
+ <foo>hello</foo>
+</root>""":
+ print("error serializing XML root 3")
+ sys.exit(1)
+str = root.serialize("iso-8859-1", 1)
+if str != """<root>
+ <foo>hello</foo>
+</root>""":
+ print("error serializing XML root 4")
+ sys.exit(1)
+doc.freeDoc()
+
+#
+# Testing HTML document serialization
+#
+doc = libxml2.htmlParseDoc("""<html><head><title>Hello</title><body><p>hello</body></html>""", None)
+str = doc.serialize()
+if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html><head><title>Hello</title></head><body><p>hello</p></body></html>
+""":
+ print("error serializing HTML document 1")
+ sys.exit(1)
+str = doc.serialize("ISO-8859-1")
+if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Hello</title></head><body><p>hello</p></body></html>
+""":
+ print("error serializing HTML document 2")
+ sys.exit(1)
+str = doc.serialize(format=1)
+if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Hello</title>
+</head>
+<body><p>hello</p></body>
+</html>
+""":
+ print("error serializing HTML document 3")
+ sys.exit(1)
+str = doc.serialize("iso-8859-1", 1)
+if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Hello</title>
+</head>
+<body><p>hello</p></body>
+</html>
+""":
+ print("error serializing HTML document 4")
+ sys.exit(1)
+
+#
+# Test serializing a subnode
+#
+doc.htmlSetMetaEncoding(None)
+root = doc.getRootElement()
+str = root.serialize()
+if str != """<html><head><title>Hello</title></head><body><p>hello</p></body></html>""":
+ print("error serializing HTML root 1")
+ sys.exit(1)
+str = root.serialize("ISO-8859-1")
+if str != """<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Hello</title></head><body><p>hello</p></body></html>""":
+ print("error serializing HTML root 2")
+ sys.exit(1)
+str = root.serialize(format=1)
+if str != """<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Hello</title>
+</head>
+<body><p>hello</p></body>
+</html>""":
+ print("error serializing HTML root 3")
+ sys.exit(1)
+str = root.serialize("iso-8859-1", 1)
+if str != """<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Hello</title>
+</head>
+<body><p>hello</p></body>
+</html>""":
+ print("error serializing HTML root 4")
+ sys.exit(1)
+
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/sync.py b/libxml2-2.9.10/python/tests/sync.py
new file mode 100755
index 0000000..5a8609e
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/sync.py
@@ -0,0 +1,138 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+log = ""
+
+class callback:
+ def startDocument(self):
+ global log
+ log = log + "startDocument:"
+
+ def endDocument(self):
+ global log
+ log = log + "endDocument:"
+
+ def startElement(self, tag, attrs):
+ global log
+ log = log + "startElement %s %s:" % (tag, attrs)
+
+ def endElement(self, tag):
+ global log
+ log = log + "endElement %s:" % (tag)
+
+ def characters(self, data):
+ global log
+ log = log + "characters: %s:" % (data)
+
+ def warning(self, msg):
+ global log
+ log = log + "warning: %s:" % (msg)
+
+ def error(self, msg):
+ global log
+ log = log + "error: %s:" % (msg)
+
+ def fatalError(self, msg):
+ global log
+ log = log + "fatalError: %s:" % (msg)
+
+handler = callback()
+
+log=""
+chunk="""<foo><bar2/>"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference = "startDocument:startElement foo None:startElement bar2 None:endElement bar2:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2></bar2>"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference = "startDocument:startElement foo None:startElement bar2 None:endElement bar2:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2>"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference = "startDocument:startElement foo None:startElement bar2 None:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2 a="1" b='2' />"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference1 = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:endElement bar2:"
+reference2 = "startDocument:startElement foo None:startElement bar2 {'b': '2', 'a': '1'}:endElement bar2:"
+if log not in (reference1, reference2):
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2 a="1" b='2' >"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference1 = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:"
+reference2 = "startDocument:startElement foo None:startElement bar2 {'b': '2', 'a': '1'}:"
+if log not in (reference1, reference2):
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2 a="1" b='2' ></bar2>"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference1 = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:endElement bar2:"
+reference2 = "startDocument:startElement foo None:startElement bar2 {'b': '2', 'a': '1'}:endElement bar2:"
+if log not in (reference1, reference2):
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2 a="b='1' />"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference = "startDocument:startElement foo None:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/test.dtd b/libxml2-2.9.10/python/tests/test.dtd
new file mode 100644
index 0000000..b61b438
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/test.dtd
@@ -0,0 +1 @@
+<!ELEMENT foo EMPTY>
diff --git a/libxml2-2.9.10/python/tests/thread2.py b/libxml2-2.9.10/python/tests/thread2.py
new file mode 100755
index 0000000..2749eb0
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/thread2.py
@@ -0,0 +1,99 @@
+#!/usr/bin/python -u
+import string, sys, time
+try:
+ from _thread import get_ident
+except:
+ from thread import get_ident
+from threading import Thread, Lock
+
+import libxml2
+
+THREADS_COUNT = 15
+
+failed = 0
+
+class ErrorHandler:
+
+ def __init__(self):
+ self.errors = []
+ self.lock = Lock()
+
+ def handler(self,ctx,str):
+ self.lock.acquire()
+ self.errors.append(str)
+ self.lock.release()
+
+def getLineNumbersDefault():
+ old = libxml2.lineNumbersDefault(0)
+ libxml2.lineNumbersDefault(old)
+ return old
+
+def test(expectedLineNumbersDefault):
+ time.sleep(1)
+ global failed
+ # check a per thread-global
+ if expectedLineNumbersDefault != getLineNumbersDefault():
+ failed = 1
+ print("FAILED to obtain correct value for " \
+ "lineNumbersDefault in thread %d" % get_ident())
+ # check ther global error handler
+ # (which is NOT per-thread in the python bindings)
+ try:
+ doc = libxml2.parseFile("bad.xml")
+ except:
+ pass
+ else:
+ assert "failed"
+
+# global error handler
+eh = ErrorHandler()
+libxml2.registerErrorHandler(eh.handler,"")
+
+# set on the main thread only
+libxml2.lineNumbersDefault(1)
+test(1)
+ec = len(eh.errors)
+if ec == 0:
+ print("FAILED: should have obtained errors")
+ sys.exit(1)
+
+ts = []
+for i in range(THREADS_COUNT):
+ # expect 0 for lineNumbersDefault because
+ # the new value has been set on the main thread only
+ ts.append(Thread(target=test,args=(0,)))
+for t in ts:
+ t.start()
+for t in ts:
+ t.join()
+
+if len(eh.errors) != ec+THREADS_COUNT*ec:
+ print("FAILED: did not obtain the correct number of errors")
+ sys.exit(1)
+
+# set lineNumbersDefault for future new threads
+libxml2.thrDefLineNumbersDefaultValue(1)
+ts = []
+for i in range(THREADS_COUNT):
+ # expect 1 for lineNumbersDefault
+ ts.append(Thread(target=test,args=(1,)))
+for t in ts:
+ t.start()
+for t in ts:
+ t.join()
+
+if len(eh.errors) != ec+THREADS_COUNT*ec*2:
+ print("FAILED: did not obtain the correct number of errors")
+ sys.exit(1)
+
+if failed:
+ print("FAILED")
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/tst.py b/libxml2-2.9.10/python/tests/tst.py
new file mode 100755
index 0000000..57a7318
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/tst.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+doc = libxml2.parseFile("tst.xml")
+if doc.name != "tst.xml":
+ print("doc.name failed")
+ sys.exit(1)
+root = doc.children
+if root.name != "doc":
+ print("root.name failed")
+ sys.exit(1)
+child = root.children
+if child.name != "foo":
+ print("child.name failed")
+ sys.exit(1)
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/tst.xml b/libxml2-2.9.10/python/tests/tst.xml
new file mode 100644
index 0000000..751d46d
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/tst.xml
@@ -0,0 +1 @@
+<doc><foo>bar</foo></doc>
diff --git a/libxml2-2.9.10/python/tests/tstLastError.py b/libxml2-2.9.10/python/tests/tstLastError.py
new file mode 100755
index 0000000..81d0acc
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/tstLastError.py
@@ -0,0 +1,82 @@
+#!/usr/bin/python -u
+import sys, unittest
+
+import libxml2
+
+class TestCase(unittest.TestCase):
+
+ def runTest(self):
+ self.test1()
+ self.test2()
+
+ def setUp(self):
+ libxml2.debugMemory(1)
+
+ def tearDown(self):
+ libxml2.cleanupParser()
+ if libxml2.debugMemory(1) != 0:
+ libxml2.dumpMemory()
+ self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
+ else:
+ print("OK")
+
+ def failUnlessXmlError(self,f,args,exc,domain,code,message,level,file,line):
+ """Run function f, with arguments args and expect an exception exc;
+ when the exception is raised, check the libxml2.lastError for
+ expected values."""
+ # disable the default error handler
+ libxml2.registerErrorHandler(None,None)
+ try:
+ f(*args)
+ except exc:
+ e = libxml2.lastError()
+ if e is None:
+ self.fail("lastError not set")
+ if 0:
+ print("domain = ",e.domain())
+ print("code = ",e.code())
+ print("message =",repr(e.message()))
+ print("level =",e.level())
+ print("file =",e.file())
+ print("line =",e.line())
+ print()
+ self.failUnlessEqual(domain,e.domain())
+ self.failUnlessEqual(code,e.code())
+ self.failUnlessEqual(message,e.message())
+ self.failUnlessEqual(level,e.level())
+ self.failUnlessEqual(file,e.file())
+ self.failUnlessEqual(line,e.line())
+ else:
+ self.fail("exception %s should have been raised" % exc)
+
+ def test1(self):
+ """Test readFile with a file that does not exist"""
+ self.failUnlessXmlError(libxml2.readFile,
+ ("dummy.xml",None,0),
+ libxml2.treeError,
+ domain=libxml2.XML_FROM_IO,
+ code=libxml2.XML_IO_LOAD_ERROR,
+ message='failed to load external entity "dummy.xml"\n',
+ level=libxml2.XML_ERR_WARNING,
+ file=None,
+ line=0)
+
+ def test2(self):
+ """Test a well-formedness error: we get the last error only"""
+ s = "<x>\n<a>\n</x>"
+ self.failUnlessXmlError(libxml2.readMemory,
+ (s,len(s),"dummy.xml",None,0),
+ libxml2.treeError,
+ domain=libxml2.XML_FROM_PARSER,
+ code=libxml2.XML_ERR_LTSLASH_REQUIRED,
+ message='EndTag: \'</\' not found\n',
+ level=libxml2.XML_ERR_FATAL,
+ file='dummy.xml',
+ line=3)
+
+if __name__ == "__main__":
+ test = TestCase()
+ test.setUp()
+ test.test1()
+ test.test2()
+ test.tearDown()
diff --git a/libxml2-2.9.10/python/tests/tstURI.py b/libxml2-2.9.10/python/tests/tstURI.py
new file mode 100755
index 0000000..e4d58af
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/tstURI.py
@@ -0,0 +1,41 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+uri = libxml2.parseURI("http://example.org:8088/foo/bar?query=simple#fragid")
+if uri.scheme() != 'http':
+ print("Error parsing URI: wrong scheme")
+ sys.exit(1)
+if uri.server() != 'example.org':
+ print("Error parsing URI: wrong server")
+ sys.exit(1)
+if uri.port() != 8088:
+ print("Error parsing URI: wrong port")
+ sys.exit(1)
+if uri.path() != '/foo/bar':
+ print("Error parsing URI: wrong path")
+ sys.exit(1)
+if uri.query() != 'query=simple':
+ print("Error parsing URI: wrong query")
+ sys.exit(1)
+if uri.fragment() != 'fragid':
+ print("Error parsing URI: wrong query")
+ sys.exit(1)
+uri.setScheme("https")
+uri.setPort(223)
+uri.setFragment(None)
+result=uri.saveUri()
+if result != "https://example.org:223/foo/bar?query=simple":
+ print("Error modifying or saving the URI")
+uri = None
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/tstmem.py b/libxml2-2.9.10/python/tests/tstmem.py
new file mode 100755
index 0000000..6b34cf3
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/tstmem.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python -u
+import libxml2
+import libxml2mod
+import sys
+
+def error(msg, data):
+ pass
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+dtd="""<!ELEMENT foo EMPTY>"""
+instance="""<?xml version="1.0"?>
+<foo></foo>"""
+
+dtd = libxml2.parseDTD(None, 'test.dtd')
+ctxt = libxml2.newValidCtxt()
+libxml2mod.xmlSetValidErrors(ctxt._o, error, error)
+doc = libxml2.parseDoc(instance)
+ret = doc.validateDtd(ctxt, dtd)
+if ret != 1:
+ print("error doing DTD validation")
+ sys.exit(1)
+
+doc.freeDoc()
+dtd.freeDtd()
+del dtd
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/tstxpath.py b/libxml2-2.9.10/python/tests/tstxpath.py
new file mode 100755
index 0000000..0ba5a6d
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/tstxpath.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+#memory debug specific
+libxml2.debugMemory(1)
+
+called = ""
+
+def foo(ctx, x):
+ global called
+
+ #
+ # test that access to the XPath evaluation contexts
+ #
+ pctxt = libxml2.xpathParserContext(_obj=ctx)
+ ctxt = pctxt.context()
+ called = ctxt.function()
+ return x + 1
+
+def bar(ctxt, x):
+ return "%d" % (x + 2)
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+res = ctxt.xpathEval("//*")
+if len(res) != 2:
+ print("xpath query: wrong node set size")
+ sys.exit(1)
+if res[0].name != "doc" or res[1].name != "foo":
+ print("xpath query: wrong node set value")
+ sys.exit(1)
+libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
+libxml2.registerXPathFunction(ctxt._o, "bar", None, bar)
+i = 10000
+while i > 0:
+ res = ctxt.xpathEval("foo(1)")
+ if res != 2:
+ print("xpath extension failure")
+ sys.exit(1)
+ i = i - 1
+i = 10000
+while i > 0:
+ res = ctxt.xpathEval("bar(1)")
+ if res != "3":
+ print("xpath extension failure got %s expecting '3'")
+ sys.exit(1)
+ i = i - 1
+doc.freeDoc()
+ctxt.xpathFreeContext()
+
+if called != "foo":
+ print("xpath function: failed to access the context")
+ print("xpath function: %s" % (called))
+ sys.exit(1)
+
+#memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/valid.xml b/libxml2-2.9.10/python/tests/valid.xml
new file mode 100644
index 0000000..8a7f679
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/valid.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc EMPTY>
+]>
+<doc/>
diff --git a/libxml2-2.9.10/python/tests/validDTD.py b/libxml2-2.9.10/python/tests/validDTD.py
new file mode 100755
index 0000000..4b03b8e
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/validDTD.py
@@ -0,0 +1,59 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+ARG = 'test string'
+
+class ErrorHandler:
+
+ def __init__(self):
+ self.errors = []
+
+ def handler(self, msg, data):
+ if data != ARG:
+ raise Exception("Error handler did not receive correct argument")
+ self.errors.append(msg)
+
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+dtd="""<!ELEMENT foo EMPTY>"""
+valid="""<?xml version="1.0"?>
+<foo></foo>"""
+
+invalid="""<?xml version="1.0"?>
+<foo><bar/></foo>"""
+
+dtd = libxml2.parseDTD(None, 'test.dtd')
+ctxt = libxml2.newValidCtxt()
+e = ErrorHandler()
+ctxt.setValidityErrorHandler(e.handler, e.handler, ARG)
+
+# Test valid document
+doc = libxml2.parseDoc(valid)
+ret = doc.validateDtd(ctxt, dtd)
+if ret != 1 or e.errors:
+ print("error doing DTD validation")
+ sys.exit(1)
+doc.freeDoc()
+
+# Test invalid document
+doc = libxml2.parseDoc(invalid)
+ret = doc.validateDtd(ctxt, dtd)
+if ret != 0 or not e.errors:
+ print("Error: document supposed to be invalid")
+doc.freeDoc()
+
+dtd.freeDtd()
+del dtd
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/libxml2-2.9.10/python/tests/validRNG.py b/libxml2-2.9.10/python/tests/validRNG.py
new file mode 100755
index 0000000..57f13a4
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/validRNG.py
@@ -0,0 +1,76 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+ARG = 'test string'
+
+class ErrorHandler:
+
+ def __init__(self):
+ self.errors = []
+
+ def handler(self, msg, data):
+ if data != ARG:
+ raise Exception("Error handler did not receive correct argument")
+ self.errors.append(msg)
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+schema="""<?xml version="1.0"?>
+<element name="foo"
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ xmlns:a="http://relaxng.org/ns/annotation/1.0"
+ xmlns:ex1="http://www.example.com/n1"
+ xmlns:ex2="http://www.example.com/n2">
+ <a:documentation>A foo element.</a:documentation>
+ <element name="ex1:bar1">
+ <empty/>
+ </element>
+ <element name="ex2:bar2">
+ <empty/>
+ </element>
+</element>
+"""
+
+valid="""<?xml version="1.0"?>
+<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1"/><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
+
+invalid="""<?xml version="1.0"?>
+<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1">bad</pre1:bar1><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
+
+rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+rngs = rngp.relaxNGParse()
+ctxt = rngs.relaxNGNewValidCtxt()
+e = ErrorHandler()
+ctxt.setValidityErrorHandler(e.handler, e.handler, ARG)
+
+# Test valid document
+doc = libxml2.parseDoc(valid)
+ret = doc.relaxNGValidateDoc(ctxt)
+if ret != 0 or e.errors:
+ print("error doing RelaxNG validation")
+ sys.exit(1)
+doc.freeDoc()
+
+# Test invalid document
+doc = libxml2.parseDoc(invalid)
+ret = doc.relaxNGValidateDoc(ctxt)
+if ret == 0 or not e.errors:
+ print("Error: document supposed to be RelaxNG invalid")
+ sys.exit(1)
+doc.freeDoc()
+
+del rngp
+del rngs
+del ctxt
+libxml2.relaxNGCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/libxml2-2.9.10/python/tests/validSchemas.py b/libxml2-2.9.10/python/tests/validSchemas.py
new file mode 100755
index 0000000..cc543f3
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/validSchemas.py
@@ -0,0 +1,83 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+ARG = 'test string'
+
+class ErrorHandler:
+
+ def __init__(self):
+ self.errors = []
+
+ def handler(self, msg, data):
+ if data != ARG:
+ raise Exception("Error handler did not receive correct argument")
+ self.errors.append(msg)
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+schema="""<?xml version="1.0" encoding="iso-8859-1"?>
+<schema xmlns = "http://www.w3.org/2001/XMLSchema">
+ <element name = "Customer">
+ <complexType>
+ <sequence>
+ <element name = "FirstName" type = "string" />
+ <element name = "MiddleInitial" type = "string" />
+ <element name = "LastName" type = "string" />
+ </sequence>
+ <attribute name = "customerID" type = "integer" />
+ </complexType>
+ </element>
+</schema>"""
+
+valid="""<?xml version="1.0" encoding="iso-8859-1"?>
+<Customer customerID = "24332">
+ <FirstName>Raymond</FirstName>
+ <MiddleInitial>G</MiddleInitial>
+ <LastName>Bayliss</LastName>
+</Customer>
+"""
+
+invalid="""<?xml version="1.0" encoding="iso-8859-1"?>
+<Customer customerID = "24332">
+ <MiddleInitial>G</MiddleInitial>
+ <LastName>Bayliss</LastName>
+</Customer>
+"""
+
+e = ErrorHandler()
+ctxt_parser = libxml2.schemaNewMemParserCtxt(schema, len(schema))
+ctxt_schema = ctxt_parser.schemaParse()
+ctxt_valid = ctxt_schema.schemaNewValidCtxt()
+ctxt_valid.setValidityErrorHandler(e.handler, e.handler, ARG)
+
+# Test valid document
+doc = libxml2.parseDoc(valid)
+ret = doc.schemaValidateDoc(ctxt_valid)
+if ret != 0 or e.errors:
+ print("error doing schema validation")
+ sys.exit(1)
+doc.freeDoc()
+
+# Test invalid document
+doc = libxml2.parseDoc(invalid)
+ret = doc.schemaValidateDoc(ctxt_valid)
+if ret == 0 or not e.errors:
+ print("Error: document supposer to be schema invalid")
+ sys.exit(1)
+doc.freeDoc()
+
+del ctxt_parser
+del ctxt_schema
+del ctxt_valid
+libxml2.schemaCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/libxml2-2.9.10/python/tests/validate.py b/libxml2-2.9.10/python/tests/validate.py
new file mode 100755
index 0000000..16c0386
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/validate.py
@@ -0,0 +1,82 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+ctxt = libxml2.createFileParserCtxt("valid.xml")
+ctxt.validate(1)
+ctxt.parseDocument()
+doc = ctxt.doc()
+valid = ctxt.isValid()
+
+if doc.name != "valid.xml":
+ print("doc.name failed")
+ sys.exit(1)
+root = doc.children
+if root.name != "doc":
+ print("root.name failed")
+ sys.exit(1)
+if valid != 1:
+ print("validity chec failed")
+ sys.exit(1)
+doc.freeDoc()
+
+i = 1000
+while i > 0:
+ ctxt = libxml2.createFileParserCtxt("valid.xml")
+ ctxt.validate(1)
+ ctxt.parseDocument()
+ doc = ctxt.doc()
+ valid = ctxt.isValid()
+ doc.freeDoc()
+ if valid != 1:
+ print("validity check failed")
+ sys.exit(1)
+ i = i - 1
+
+#desactivate error messages from the validation
+def noerr(ctx, str):
+ pass
+
+libxml2.registerErrorHandler(noerr, None)
+
+ctxt = libxml2.createFileParserCtxt("invalid.xml")
+ctxt.validate(1)
+ctxt.parseDocument()
+doc = ctxt.doc()
+valid = ctxt.isValid()
+if doc.name != "invalid.xml":
+ print("doc.name failed")
+ sys.exit(1)
+root = doc.children
+if root.name != "doc":
+ print("root.name failed")
+ sys.exit(1)
+if valid != 0:
+ print("validity chec failed")
+ sys.exit(1)
+doc.freeDoc()
+
+i = 1000
+while i > 0:
+ ctxt = libxml2.createFileParserCtxt("invalid.xml")
+ ctxt.validate(1)
+ ctxt.parseDocument()
+ doc = ctxt.doc()
+ valid = ctxt.isValid()
+ doc.freeDoc()
+ if valid != 0:
+ print("validity check failed")
+ sys.exit(1)
+ i = i - 1
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/walker.py b/libxml2-2.9.10/python/tests/walker.py
new file mode 100755
index 0000000..47f0557
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/walker.py
@@ -0,0 +1,144 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+result = ""
+def processNode(reader):
+ global result
+
+ result = result + "%d %d %s %d\n" % (reader.Depth(), reader.NodeType(),
+ reader.Name(), reader.IsEmptyElement())
+
+#
+# Parse a document testing the readerForxxx API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+doc = libxml2.parseDoc(docstr)
+reader = doc.readerWalker();
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test1")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test1")
+ print(result)
+ sys.exit(1)
+
+doc.freeDoc()
+
+#
+# Reuse the reader for another document testing the ReaderNewWalker API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>1000</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+doc = libxml2.parseDoc(docstr)
+reader.NewWalker(doc)
+
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test2")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test2")
+ print(result)
+ sys.exit(1)
+
+doc.freeDoc()
+
+#
+# Reuse the reader for another document testing the ReaderNewxxx API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>1000</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+reader.NewDoc(docstr, "test3", None, 0)
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test3")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test3")
+ print(result)
+ sys.exit(1)
+
+#
+# cleanup
+#
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/xpath.py b/libxml2-2.9.10/python/tests/xpath.py
new file mode 100755
index 0000000..72e6c9d
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/xpath.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python -u
+#
+# this test exercise the XPath basic engine, parser, etc, and
+# allows to detect memory leaks
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+doc = libxml2.parseFile("tst.xml")
+if doc.name != "tst.xml":
+ print("doc.name error")
+ sys.exit(1);
+
+ctxt = doc.xpathNewContext()
+res = ctxt.xpathEval("//*")
+if len(res) != 2:
+ print("xpath query: wrong node set size")
+ sys.exit(1)
+if res[0].name != "doc" or res[1].name != "foo":
+ print("xpath query: wrong node set value")
+ sys.exit(1)
+ctxt.setContextNode(res[0])
+res = ctxt.xpathEval("foo")
+if len(res) != 1:
+ print("xpath query: wrong node set size")
+ sys.exit(1)
+if res[0].name != "foo":
+ print("xpath query: wrong node set value")
+ sys.exit(1)
+doc.freeDoc()
+ctxt.xpathFreeContext()
+i = 1000
+while i > 0:
+ doc = libxml2.parseFile("tst.xml")
+ ctxt = doc.xpathNewContext()
+ res = ctxt.xpathEval("//*")
+ doc.freeDoc()
+ ctxt.xpathFreeContext()
+ i = i -1
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/xpathext.py b/libxml2-2.9.10/python/tests/xpathext.py
new file mode 100755
index 0000000..b83d283
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/xpathext.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+def foo(ctx, x):
+ return x + 1
+
+def bar(ctx, x):
+ return "%d" % (x + 2)
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+res = ctxt.xpathEval("//*")
+if len(res) != 2:
+ print("xpath query: wrong node set size")
+ sys.exit(1)
+if res[0].name != "doc" or res[1].name != "foo":
+ print("xpath query: wrong node set value")
+ sys.exit(1)
+
+libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
+libxml2.registerXPathFunction(ctxt._o, "bar", None, bar)
+i = 10000
+while i > 0:
+ res = ctxt.xpathEval("foo(1)")
+ if res != 2:
+ print("xpath extension failure")
+ sys.exit(1)
+ i = i - 1
+i = 10000
+while i > 0:
+ res = ctxt.xpathEval("bar(1)")
+ if res != "3":
+ print("xpath extension failure got %s expecting '3'")
+ sys.exit(1)
+ i = i - 1
+doc.freeDoc()
+ctxt.xpathFreeContext()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/xpathleak.py b/libxml2-2.9.10/python/tests/xpathleak.py
new file mode 100755
index 0000000..6940b79
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/xpathleak.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+import sys, libxml2
+
+libxml2.debugMemory(True)
+
+expect="""--> Invalid expression
+--> Invalid expression
+--> Invalid expression
+--> Invalid expression
+--> Invalid expression
+--> Invalid expression
+--> Invalid expression
+--> Invalid expression
+--> Invalid expression
+--> Invalid expression
+"""
+err=""
+def callback(ctx, str):
+ global err
+
+ err = err + "%s %s" % (ctx, str)
+
+libxml2.registerErrorHandler(callback, "-->")
+
+doc = libxml2.parseDoc("<fish/>")
+ctxt = doc.xpathNewContext()
+ctxt.setContextNode(doc)
+badexprs = (
+ ":false()", "bad:()", "bad(:)", ":bad(:)", "bad:(:)", "bad:bad(:)",
+ "a:/b", "/c:/d", "//e:/f", "g://h"
+ )
+for expr in badexprs:
+ try:
+ ctxt.xpathEval(expr)
+ except libxml2.xpathError:
+ pass
+ else:
+ print("Unexpectedly legal expression:", expr)
+ctxt.xpathFreeContext()
+doc.freeDoc()
+
+if err != expect:
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
+ sys.exit(1)
+
+libxml2.cleanupParser()
+leakedbytes = libxml2.debugMemory(True)
+if leakedbytes == 0:
+ print("OK")
+else:
+ print("Memory leak", leakedbytes, "bytes")
+ # drop file to .memdump file in cwd, but won't work if not compiled in
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/xpathns.py b/libxml2-2.9.10/python/tests/xpathns.py
new file mode 100755
index 0000000..379535e
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/xpathns.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python -u
+#
+import libxml2
+
+expect=' xmlns:a="urn:whatevar"'
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+d = libxml2.parseDoc("<a:a xmlns:a='urn:whatevar'/>")
+res=""
+for n in d.xpathEval("//namespace::*"):
+ res = res + n.serialize()
+d.freeDoc()
+
+if res != expect:
+ print("test5 failed: unexpected output")
+ print(res)
+del res
+del d
+del n
+# Memory debug specific
+libxml2.cleanupParser()
+
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/tests/xpathret.py b/libxml2-2.9.10/python/tests/xpathret.py
new file mode 100755
index 0000000..11c8b32
--- /dev/null
+++ b/libxml2-2.9.10/python/tests/xpathret.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+#memory debug specific
+libxml2.debugMemory(1)
+
+#
+# A document hosting the nodes returned from the extension function
+#
+mydoc = libxml2.newDoc("1.0")
+
+def foo(ctx, str):
+ global mydoc
+
+ #
+ # test returning a node set works as expected
+ #
+ parent = mydoc.newDocNode(None, 'p', None)
+ mydoc.addChild(parent)
+ node = mydoc.newDocText(str)
+ parent.addChild(node)
+ return [parent]
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
+res = ctxt.xpathEval("foo('hello')")
+if type(res) != type([]):
+ print("Failed to return a nodeset")
+ sys.exit(1)
+if len(res) != 1:
+ print("Unexpected nodeset size")
+ sys.exit(1)
+node = res[0]
+if node.name != 'p':
+ print("Unexpected nodeset element result")
+ sys.exit(1)
+node = node.children
+if node.type != 'text':
+ print("Unexpected nodeset element children type")
+ sys.exit(1)
+if node.content != 'hello':
+ print("Unexpected nodeset element children content")
+ sys.exit(1)
+
+doc.freeDoc()
+mydoc.freeDoc()
+ctxt.xpathFreeContext()
+
+#memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/libxml2-2.9.10/python/types.c b/libxml2-2.9.10/python/types.c
new file mode 100644
index 0000000..c2bafeb
--- /dev/null
+++ b/libxml2-2.9.10/python/types.c
@@ -0,0 +1,955 @@
+/*
+ * types.c: converter functions between the internal representation
+ * and the Python objects
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+#include "libxml_wrap.h"
+#include <libxml/xpathInternals.h>
+
+#if PY_MAJOR_VERSION >= 3
+#define PY_IMPORT_STRING_SIZE PyUnicode_FromStringAndSize
+#define PY_IMPORT_STRING PyUnicode_FromString
+#define PY_IMPORT_INT PyLong_FromLong
+#else
+#define PY_IMPORT_STRING_SIZE PyString_FromStringAndSize
+#define PY_IMPORT_STRING PyString_FromString
+#define PY_IMPORT_INT PyInt_FromLong
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+FILE *
+libxml_PyFileGet(PyObject *f) {
+ int fd, flags;
+ FILE *res;
+ const char *mode;
+
+ fd = PyObject_AsFileDescriptor(f);
+ /*
+ * Get the flags on the fd to understand how it was opened
+ */
+ flags = fcntl(fd, F_GETFL, 0);
+ switch (flags & O_ACCMODE) {
+ case O_RDWR:
+ if (flags & O_APPEND)
+ mode = "a+";
+ else
+ mode = "rw";
+ break;
+ case O_RDONLY:
+ if (flags & O_APPEND)
+ mode = "r+";
+ else
+ mode = "r";
+ break;
+ case O_WRONLY:
+ if (flags & O_APPEND)
+ mode = "a";
+ else
+ mode = "w";
+ break;
+ default:
+ return(NULL);
+ }
+
+ /*
+ * the FILE struct gets a new fd, so that it can be closed
+ * independently of the file descriptor given. The risk though is
+ * lack of sync. So at the python level sync must be implemented
+ * before and after a conversion took place. No way around it
+ * in the Python3 infrastructure !
+ * The duplicated fd and FILE * will be released in the subsequent
+ * call to libxml_PyFileRelease() which must be generated accordingly
+ */
+ fd = dup(fd);
+ if (fd == -1)
+ return(NULL);
+ res = fdopen(fd, mode);
+ if (res == NULL) {
+ close(fd);
+ return(NULL);
+ }
+ return(res);
+}
+
+void libxml_PyFileRelease(FILE *f) {
+ if (f != NULL)
+ fclose(f);
+}
+#endif
+
+PyObject *
+libxml_intWrap(int val)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_intWrap: val = %d\n", val);
+#endif
+ ret = PY_IMPORT_INT((long) val);
+ return (ret);
+}
+
+PyObject *
+libxml_longWrap(long val)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_longWrap: val = %ld\n", val);
+#endif
+ ret = PyLong_FromLong(val);
+ return (ret);
+}
+
+PyObject *
+libxml_doubleWrap(double val)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_doubleWrap: val = %f\n", val);
+#endif
+ ret = PyFloat_FromDouble((double) val);
+ return (ret);
+}
+
+PyObject *
+libxml_charPtrWrap(char *str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlcharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING(str);
+ xmlFree(str);
+ return (ret);
+}
+
+PyObject *
+libxml_charPtrConstWrap(const char *str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlcharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING(str);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlCharPtrWrap(xmlChar * str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlCharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING((char *) str);
+ xmlFree(str);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlCharPtrConstWrap(const xmlChar * str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlCharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING((char *) str);
+ return (ret);
+}
+
+PyObject *
+libxml_constcharPtrWrap(const char *str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlcharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING(str);
+ return (ret);
+}
+
+PyObject *
+libxml_constxmlCharPtrWrap(const xmlChar * str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlCharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING((char *) str);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlDocPtrWrap(xmlDocPtr doc)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlDocPtrWrap: doc = %p\n", doc);
+#endif
+ if (doc == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ /* TODO: look at deallocation */
+ ret = PyCapsule_New((void *) doc, (char *) "xmlDocPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlNodePtrWrap(xmlNodePtr node)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlNodePtrWrap: node = %p\n", node);
+#endif
+ if (node == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) node, (char *) "xmlNodePtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlURIPtrWrap(xmlURIPtr uri)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlURIPtrWrap: uri = %p\n", uri);
+#endif
+ if (uri == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) uri, (char *) "xmlURIPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlNsPtrWrap(xmlNsPtr ns)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlNsPtrWrap: node = %p\n", ns);
+#endif
+ if (ns == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) ns, (char *) "xmlNsPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlAttrPtrWrap(xmlAttrPtr attr)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlAttrNodePtrWrap: attr = %p\n", attr);
+#endif
+ if (attr == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) attr, (char *) "xmlAttrPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlAttributePtrWrap(xmlAttributePtr attr)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlAttributePtrWrap: attr = %p\n", attr);
+#endif
+ if (attr == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) attr, (char *) "xmlAttributePtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlElementPtrWrap(xmlElementPtr elem)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlElementNodePtrWrap: elem = %p\n", elem);
+#endif
+ if (elem == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) elem, (char *) "xmlElementPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlXPathContextPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) ctxt, (char *) "xmlXPathContextPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlXPathParserContextPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *)ctxt, (char *)"xmlXPathParserContextPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlParserCtxtPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+ ret = PyCapsule_New((void *) ctxt, (char *) "xmlParserCtxtPtr", NULL);
+ return (ret);
+}
+
+/**
+ * libxml_xmlXPathDestructNsNode:
+ * cap: xmlNsPtr namespace node capsule object
+ *
+ * This function is called if and when a namespace node returned in
+ * an XPath node set is to be destroyed. That's the only kind of
+ * object returned in node set not directly linked to the original
+ * xmlDoc document, see xmlXPathNodeSetDupNs.
+ */
+#if PY_VERSION_HEX < 0x02070000
+static void
+libxml_xmlXPathDestructNsNode(void *cap, void *desc ATTRIBUTE_UNUSED)
+#else
+static void
+libxml_xmlXPathDestructNsNode(PyObject *cap)
+#endif
+{
+#ifdef DEBUG
+ fprintf(stderr, "libxml_xmlXPathDestructNsNode called %p\n", cap);
+#endif
+#if PY_VERSION_HEX < 0x02070000
+ xmlXPathNodeSetFreeNs((xmlNsPtr) cap);
+#else
+ xmlXPathNodeSetFreeNs((xmlNsPtr) PyCapsule_GetPointer(cap, "xmlNsPtr"));
+#endif
+}
+
+PyObject *
+libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlXPathObjectPtrWrap: ctxt = %p\n", obj);
+#endif
+ if (obj == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ switch (obj->type) {
+ case XPATH_XSLT_TREE: {
+ if ((obj->nodesetval == NULL) ||
+ (obj->nodesetval->nodeNr == 0) ||
+ (obj->nodesetval->nodeTab == NULL)) {
+ ret = PyList_New(0);
+ } else {
+ int i, len = 0;
+ xmlNodePtr node;
+
+ node = obj->nodesetval->nodeTab[0]->children;
+ while (node != NULL) {
+ len++;
+ node = node->next;
+ }
+ ret = PyList_New(len);
+ node = obj->nodesetval->nodeTab[0]->children;
+ for (i = 0;i < len;i++) {
+ PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));
+ node = node->next;
+ }
+ }
+ /*
+ * Return now, do not free the object passed down
+ */
+ return (ret);
+ }
+ case XPATH_NODESET:
+ if ((obj->nodesetval == NULL)
+ || (obj->nodesetval->nodeNr == 0)) {
+ ret = PyList_New(0);
+ } else {
+ int i;
+ xmlNodePtr node;
+
+ ret = PyList_New(obj->nodesetval->nodeNr);
+ for (i = 0; i < obj->nodesetval->nodeNr; i++) {
+ node = obj->nodesetval->nodeTab[i];
+ if (node->type == XML_NAMESPACE_DECL) {
+ PyObject *ns = PyCapsule_New((void *) node,
+ (char *) "xmlNsPtr",
+ libxml_xmlXPathDestructNsNode);
+ PyList_SetItem(ret, i, ns);
+ /* make sure the xmlNsPtr is not destroyed now */
+ obj->nodesetval->nodeTab[i] = NULL;
+ } else {
+ PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));
+ }
+ }
+ }
+ break;
+ case XPATH_BOOLEAN:
+ ret = PY_IMPORT_INT((long) obj->boolval);
+ break;
+ case XPATH_NUMBER:
+ ret = PyFloat_FromDouble(obj->floatval);
+ break;
+ case XPATH_STRING:
+ ret = PY_IMPORT_STRING((char *) obj->stringval);
+ break;
+ case XPATH_POINT:
+ {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PY_IMPORT_INT((long) obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ ret = tuple;
+ break;
+ }
+ case XPATH_RANGE:
+ {
+ unsigned short bCollapsedRange;
+
+ bCollapsedRange = ( (obj->user2 == NULL) ||
+ ((obj->user2 == obj->user) && (obj->index == obj->index2)) );
+ if ( bCollapsedRange ) {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+ PyObject *list;
+
+ list = PyList_New(1);
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PY_IMPORT_INT((long) obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 0, tuple);
+
+ ret = list;
+ } else {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+ PyObject *list;
+
+ list = PyList_New(2);
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PY_IMPORT_INT((long) obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 0, tuple);
+
+ node = libxml_xmlNodePtrWrap(obj->user2);
+ indexIntoNode = PY_IMPORT_INT((long) obj->index2);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 1, tuple);
+
+ ret = list;
+ }
+ break;
+ }
+ case XPATH_LOCATIONSET:
+ {
+ xmlLocationSetPtr set;
+
+ set = obj->user;
+ if ( set && set->locNr > 0 ) {
+ int i;
+ PyObject *list;
+
+ list = PyList_New(set->locNr);
+
+ for (i=0; i<set->locNr; i++) {
+ xmlXPathObjectPtr setobj;
+ PyObject *pyobj;
+
+ setobj = set->locTab[i]; /*xmlXPathObjectPtr setobj*/
+
+ pyobj = libxml_xmlXPathObjectPtrWrap(setobj);
+ /* xmlXPathFreeObject(setobj) is called */
+ set->locTab[i] = NULL;
+
+ PyList_SetItem(list, i, pyobj);
+ }
+ set->locNr = 0;
+ ret = list;
+ } else {
+ Py_INCREF(Py_None);
+ ret = Py_None;
+ }
+ break;
+ }
+ default:
+#ifdef DEBUG
+ printf("Unable to convert XPath object type %d\n", obj->type);
+#endif
+ Py_INCREF(Py_None);
+ ret = Py_None;
+ }
+ xmlXPathFreeObject(obj);
+ return (ret);
+}
+
+xmlXPathObjectPtr
+libxml_xmlXPathObjectPtrConvert(PyObject *obj)
+{
+ xmlXPathObjectPtr ret = NULL;
+
+#ifdef DEBUG
+ printf("libxml_xmlXPathObjectPtrConvert: obj = %p\n", obj);
+#endif
+ if (obj == NULL) {
+ return (NULL);
+ }
+ if PyFloat_Check (obj) {
+ ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
+ } else if PyLong_Check(obj) {
+#ifdef PyLong_AS_LONG
+ ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj));
+#else
+ ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj));
+#endif
+#ifdef PyBool_Check
+ } else if PyBool_Check (obj) {
+
+ if (obj == Py_True) {
+ ret = xmlXPathNewBoolean(1);
+ }
+ else {
+ ret = xmlXPathNewBoolean(0);
+ }
+#endif
+ } else if PyBytes_Check (obj) {
+ xmlChar *str;
+
+ str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj),
+ PyBytes_GET_SIZE(obj));
+ ret = xmlXPathWrapString(str);
+#ifdef PyUnicode_Check
+ } else if PyUnicode_Check (obj) {
+#if PY_VERSION_HEX >= 0x03030000
+ xmlChar *str;
+ const char *tmp;
+ Py_ssize_t size;
+
+ /* tmp doesn't need to be deallocated */
+ tmp = PyUnicode_AsUTF8AndSize(obj, &size);
+ str = xmlStrndup((const xmlChar *) tmp, (int) size);
+ ret = xmlXPathWrapString(str);
+#else
+ xmlChar *str = NULL;
+ PyObject *b;
+
+ b = PyUnicode_AsUTF8String(obj);
+ if (b != NULL) {
+ str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(b),
+ PyBytes_GET_SIZE(b));
+ Py_DECREF(b);
+ }
+ ret = xmlXPathWrapString(str);
+#endif
+#endif
+ } else if PyList_Check (obj) {
+ int i;
+ PyObject *node;
+ xmlNodePtr cur;
+ xmlNodeSetPtr set;
+
+ set = xmlXPathNodeSetCreate(NULL);
+
+ for (i = 0; i < PyList_Size(obj); i++) {
+ node = PyList_GetItem(obj, i);
+ if ((node == NULL) || (node->ob_type == NULL))
+ continue;
+
+ cur = NULL;
+ if (PyCapsule_CheckExact(node)) {
+#ifdef DEBUG
+ printf("Got a Capsule\n");
+#endif
+ cur = PyxmlNode_Get(node);
+ } else if ((PyObject_HasAttrString(node, (char *) "_o")) &&
+ (PyObject_HasAttrString(node, (char *) "get_doc"))) {
+ PyObject *wrapper;
+
+ wrapper = PyObject_GetAttrString(node, (char *) "_o");
+ if (wrapper != NULL)
+ cur = PyxmlNode_Get(wrapper);
+ } else {
+#ifdef DEBUG
+ printf("Unknown object in Python return list\n");
+#endif
+ }
+ if (cur != NULL) {
+ xmlXPathNodeSetAdd(set, cur);
+ }
+ }
+ ret = xmlXPathWrapNodeSet(set);
+ } else {
+#ifdef DEBUG
+ printf("Unable to convert Python Object to XPath");
+#endif
+ }
+ return (ret);
+}
+
+PyObject *
+libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlValidCtxtPtrWrap: valid = %p\n", valid);
+#endif
+ if (valid == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+ ret =
+ PyCapsule_New((void *) valid,
+ (char *) "xmlValidCtxtPtr", NULL);
+
+ return (ret);
+}
+
+PyObject *
+libxml_xmlCatalogPtrWrap(xmlCatalogPtr catal)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlNodePtrWrap: catal = %p\n", catal);
+#endif
+ if (catal == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) catal,
+ (char *) "xmlCatalogPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlOutputBufferPtrWrap: buffer = %p\n", buffer);
+#endif
+ if (buffer == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) buffer,
+ (char *) "xmlOutputBufferPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlParserInputBufferPtrWrap: buffer = %p\n", buffer);
+#endif
+ if (buffer == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) buffer,
+ (char *) "xmlParserInputBufferPtr", NULL);
+ return (ret);
+}
+
+#ifdef LIBXML_REGEXP_ENABLED
+PyObject *
+libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlRegexpPtrWrap: regexp = %p\n", regexp);
+#endif
+ if (regexp == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) regexp,
+ (char *) "xmlRegexpPtr", NULL);
+ return (ret);
+}
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#ifdef LIBXML_READER_ENABLED
+PyObject *
+libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlTextReaderPtrWrap: reader = %p\n", reader);
+#endif
+ if (reader == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) reader,
+ (char *) "xmlTextReaderPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlTextReaderLocatorPtrWrap: locator = %p\n", locator);
+#endif
+ if (locator == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) locator,
+ (char *) "xmlTextReaderLocatorPtr", NULL);
+ return (ret);
+}
+#endif /* LIBXML_READER_ENABLED */
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+PyObject *
+libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlRelaxNGPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) ctxt,
+ (char *) "xmlRelaxNGPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlRelaxNGParserCtxtPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) ctxt,
+ (char *) "xmlRelaxNGParserCtxtPtr", NULL);
+ return (ret);
+}
+PyObject *
+libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlRelaxNGValidCtxtPtrWrap: valid = %p\n", valid);
+#endif
+ if (valid == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) valid,
+ (char *) "xmlRelaxNGValidCtxtPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlSchemaPtrWrap(xmlSchemaPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlSchemaPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) ctxt,
+ (char *) "xmlSchemaPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlSchemaParserCtxtPtrWrap(xmlSchemaParserCtxtPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlSchemaParserCtxtPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) ctxt,
+ (char *) "xmlSchemaParserCtxtPtr", NULL);
+
+ return (ret);
+}
+
+PyObject *
+libxml_xmlSchemaValidCtxtPtrWrap(xmlSchemaValidCtxtPtr valid)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlSchemaValidCtxtPtrWrap: valid = %p\n", valid);
+#endif
+ if (valid == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+ ret =
+ PyCapsule_New((void *) valid,
+ (char *) "xmlSchemaValidCtxtPtr", NULL);
+
+ return (ret);
+}
+#endif /* LIBXML_SCHEMAS_ENABLED */
+
+PyObject *
+libxml_xmlErrorPtrWrap(xmlErrorPtr error)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlErrorPtrWrap: error = %p\n", error);
+#endif
+ if (error == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) error, (char *) "xmlErrorPtr", NULL);
+ return (ret);
+}