upgrade dependencies (#57)

wch-ch32v003
Matt Knight 2 years ago committed by Matt Knight
parent 0d0e667c26
commit 7a0d75f105

@ -895,7 +895,7 @@ fn Arguments(
comptime value_parsers: anytype,
comptime multi_arg_kind: MultiArgKind,
) type {
var fields: [params.len]builtin.TypeInfo.StructField = undefined;
var fields: [params.len]builtin.Type.StructField = undefined;
var i: usize = 0;
for (params) |param| {

@ -1,23 +0,0 @@
language: c
sudo: false
addons:
apt:
packages:
# Some tests require the DTDs.
w3c-sgml-lib
matrix:
include:
# Try to emulate a C89 compiler on a POSIX system by disabling as many
# GNU extensions as possible.
- compiler: gcc
env: CFLAGS="-O2 -std=c89 -D_XOPEN_SOURCE=700 -Werror -Wno-error=array-bounds"
# clang with AddressSanitizer and UndefinedBehaviorSanitizer.
- compiler: clang
sudo: required
dist: trusty
env: CONFIG="--without-python"
CFLAGS="-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,unsigned-integer-overflow -fno-sanitize-recover=all -Werror -Wno-error=cast-align"
UBSAN_OPTIONS=print_stacktrace=1
script: sh autogen.sh $CONFIG && make -j2 V=1 && make check
git:
depth: 10

@ -1,5 +0,0 @@
Daniel Veillard <daniel@veillard.com>
Bjorn Reese <breese@users.sourceforge.net>
William Brack <wbrack@mmm.com.hk>
Igor Zlatkovic <igor@zlatkovic.com> for the Windows port
Aleksey Sanin <aleksey@aleksey.com>

@ -1,20 +0,0 @@
The current version of the code can be found in the GNOME Git Repository:
https://gitlab.gnome.org/GNOME/libxml2
There's mirror on GitHub:
https://github.com/GNOME/libxml2
Start discussions and send patches to the mailing list, or file a bug and
add a patch as attachment.
https://mail.gnome.org/mailman/listinfo/xml
https://gitlab.gnome.org/GNOME/libxml2/issues
Format patches with git-format-patch and use plain text attachments
if possible.
All code must conform to C89 and pass the "make check" tests. Avoid
compiler warnings and add regression tests if possible.

@ -1,305 +0,0 @@
/*
* DOCBparser.c : an attempt to parse SGML Docbook documents
*
* This is deprecated !!!
* Code removed with release 2.6.0 it was broken.
* The doc are expect to be migrated to XML DocBook
*
* See Copyright for the status of this software.
*
* daniel@veillard.com
*/
#define IN_LIBXML
#include "libxml.h"
#ifdef LIBXML_DOCB_ENABLED
#include <libxml/xmlerror.h>
#include <libxml/DOCBparser.h>
/**
* docbEncodeEntities:
* @out: a pointer to an array of bytes to store the result
* @outlen: the length of @out
* @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in
* @quoteChar: the quote character to escape (' or ") or zero.
*
* Take a block of UTF-8 chars in and try to convert it to an ASCII
* plus SGML entities block of chars out.
*
* Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
* The value of @inlen after return is the number of octets consumed
* as the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
*/
int
docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
int *outlen ATTRIBUTE_UNUSED,
const unsigned char *in ATTRIBUTE_UNUSED,
int *inlen ATTRIBUTE_UNUSED,
int quoteChar ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbEncodeEntities() deprecated function reached\n");
deprecated = 1;
}
return(-1);
}
/**
* docbParseDocument:
* @ctxt: an SGML parser context
*
* parse an SGML document (and build a tree if using the standard SAX
* interface).
*
* Returns 0, -1 in case of error. the parser context is augmented
* as a result of the parsing.
*/
int
docbParseDocument(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseDocument() deprecated function reached\n");
deprecated = 1;
}
return (xmlParseDocument(ctxt));
}
/**
* docbFreeParserCtxt:
* @ctxt: an SGML parser context
*
* Free all the memory used by a parser context. However the parsed
* document in ctxt->myDoc is not freed.
*/
void
docbFreeParserCtxt(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbFreeParserCtxt() deprecated function reached\n");
deprecated = 1;
}
xmlFreeParserCtxt(ctxt);
}
/**
* docbParseChunk:
* @ctxt: an XML parser context
* @chunk: an char array
* @size: the size in byte of the chunk
* @terminate: last chunk indicator
*
* Parse a Chunk of memory
*
* Returns zero if no error, the xmlParserErrors otherwise.
*/
int
docbParseChunk(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
const char *chunk ATTRIBUTE_UNUSED,
int size ATTRIBUTE_UNUSED,
int terminate ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseChunk() deprecated function reached\n");
deprecated = 1;
}
return (xmlParseChunk(ctxt, chunk, size, terminate));
}
/**
* docbCreatePushParserCtxt:
* @sax: a SAX handler
* @user_data: The user data returned on SAX callbacks
* @chunk: a pointer to an array of chars
* @size: number of chars in the array
* @filename: an optional file name or URI
* @enc: an optional encoding
*
* Create a parser context for using the DocBook SGML parser in push mode
* To allow content encoding detection, @size should be >= 4
* The value of @filename is used for fetching external entities
* and error/warning reports.
*
* Returns the new parser context or NULL
*/
docbParserCtxtPtr
docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
void *user_data ATTRIBUTE_UNUSED,
const char *chunk ATTRIBUTE_UNUSED,
int size ATTRIBUTE_UNUSED,
const char *filename ATTRIBUTE_UNUSED,
xmlCharEncoding enc ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseChunk() deprecated function reached\n");
deprecated = 1;
}
return(xmlCreatePushParserCtxt(sax, user_data, chunk, size, filename));
}
/**
* docbSAXParseDoc:
* @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the SGML document encoding, or NULL
* @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks.
*
* parse an SGML in-memory document and build a tree.
* It use the given SAX function block to handle the parsing callback.
* If sax is NULL, fallback to the default DOM tree building routines.
*
* Returns the resulting document tree
*/
docbDocPtr
docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED,
docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
void *userData ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseChunk() deprecated function reached\n");
deprecated = 1;
}
return (xmlSAXParseMemoryWithData(sax, (const char *)cur,
xmlStrlen((const xmlChar *) cur), 0, userData));
}
/**
* docbParseDoc:
* @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the SGML document encoding, or NULL
*
* parse an SGML in-memory document and build a tree.
*
* Returns the resulting document tree
*/
docbDocPtr
docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseChunk() deprecated function reached\n");
deprecated = 1;
}
return (xmlParseDoc(cur));
}
/**
* docbCreateFileParserCtxt:
* @filename: the filename
* @encoding: the SGML document encoding, or NULL
*
* Create a parser context for a file content.
* Automatic support for ZLIB/Compress compressed document is provided
* by default if found at compile-time.
*
* Returns the new parser context or NULL
*/
docbParserCtxtPtr
docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbCreateFileParserCtxt() deprecated function reached\n");
deprecated = 1;
}
return (xmlCreateFileParserCtxt(filename));
}
/**
* docbSAXParseFile:
* @filename: the filename
* @encoding: a free form C string describing the SGML document encoding, or NULL
* @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks.
*
* parse an SGML file and build a tree. Automatic support for ZLIB/Compress
* compressed document is provided by default if found at compile-time.
* It use the given SAX function block to handle the parsing callback.
* If sax is NULL, fallback to the default DOM tree building routines.
*
* Returns the resulting document tree
*/
docbDocPtr
docbSAXParseFile(const char *filename ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED,
docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
void *userData ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbSAXParseFile() deprecated function reached\n");
deprecated = 1;
}
return (xmlSAXParseFileWithData(sax, filename, 0, userData));
}
/**
* docbParseFile:
* @filename: the filename
* @encoding: a free form C string describing document encoding, or NULL
*
* parse a Docbook SGML file and build a tree. Automatic support for
* ZLIB/Compress compressed document is provided by default if found
* at compile-time.
*
* Returns the resulting document tree
*/
docbDocPtr
docbParseFile(const char *filename ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseFile() deprecated function reached\n");
deprecated = 1;
}
return (xmlParseFile(filename));
}
#define bottom_DOCBparser
#include "elfgcchack.h"
#endif /* LIBXML_DOCB_ENABLED */

@ -1,51 +0,0 @@
See also the generic INSTALL file for configure options
Compilation
1. What is the process to compile libxml?
As most UNIX libraries libxml follows the "standard":
gunzip -c xxx.tar.gz | tar xvf -
cd libxml-xxxx
./configure --help
to see the options, then the compilation/installation proper
./configure [possible options]
make
make install
At that point you may have to rerun ldconfig or similar utility to
update your list of installed shared libs.
At this point you can check that the library is properly functioning
by running
make check
Please report test failures to the mailing list or bug tracker.
2. What other libraries are needed to compile/install libxml?
Libxml does not require any other libraries. A platform with somewhat
recent POSIX support should be sufficient (please report any violation
to this rule you may find).
However if found at configuration time, libxml will detect and use
the following libs:
libz: a highly portable and widely available compression library
https://zlib.net/
liblzma: another compression library
https://tukaani.org/xz/
iconv: a powerful character encoding conversion library. It's
part of POSIX.1-2001, so it doesn't need to be installed
on modern UNIX-like systems, specifically on Linux.
https://www.gnu.org/software/libiconv/
ICU: Mainly used by Chromium on Windows. Unnecessary on most
systems.
Daniel
veillard@redhat.com

@ -1,9 +0,0 @@
See first http://xmlsoft.org/bugs.html and use the list please.
Daniel Veillard
E-mail: veillard@redhat.com
Userid: veillard
Co-maintainer: William Brack <wbrack@mmm.com.hk>
Windows port: Igor Zlatkovic <igor@zlatkovic.com>
Rob Richards <rrichards@ctindustries.net>

@ -1,34 +0,0 @@
# This is a makefile for win32 systems (VC 5.0).
# Christopher Blizzard
# http://odin.appliedtheory.com/
CC = cl
CFLAGS = /c /GB /Gi /nologo /I. /DWIN32 /MT /Zi
LD = link
LDFLAGS = /DEBUG /NODEFAULTLIB:libc
AR = lib
all: xml.lib
test: tester.exe
SHARED_OBJS = entities.obj parser.obj tree.obj SAX.obj
xml.lib: $(SHARED_OBJS)
$(AR) /out:xml.lib $(SHARED_OBJS)
tester.obj: $(SHARED_OBJS)
$(CC) $(CFLAGS) tester.c /out:tester.obj
tester.exe: tester.obj xml.lib
$(LD) $(LDFLAGS) /out:tester.exe tester.obj xml.lib
clean:
-del /f $(SHARED_OBJS) tester.obj
-del /f tester.exe
-del /f xml.lib
-del /f *.pdb
-del /f *.idb
-del /f *.ilk

@ -1,40 +0,0 @@
XML toolkit from the GNOME project
Full documentation is available on-line at
http://xmlsoft.org/
This code is released under the MIT Licence see the Copyright file.
To build on an Unixised setup:
./configure ; make ; make install
if the ./configure file does not exist, run ./autogen.sh instead.
To build on Windows:
see instructions on win32/Readme.txt
To assert build quality:
on an Unixised setup:
run make tests
otherwise:
There is 3 standalone tools runtest.c runsuite.c testapi.c, which
should compile as part of the build or as any application would.
Launch them from this directory to get results, runtest checks
the proper functioning of libxml2 main APIs while testapi does
a full coverage check. Report failures to the list.
To report bugs, follow the instructions at:
http://xmlsoft.org/bugs.html
A mailing-list xml@gnome.org is available, to subscribe:
http://mail.gnome.org/mailman/listinfo/xml
The list archive is at:
http://mail.gnome.org/archives/xml/
All technical answers asked privately will be automatically answered on
the list and archived for public access unless privacy is explicitly
required and justified.
Daniel Veillard
$Id$

@ -1,5 +0,0 @@
Please read the CONTRIBUTING file for instructions
Daniel
$Id$

@ -1,86 +0,0 @@
libxml2 on VxWorks 6.4+
Here are my instructions for building on VxWorks.... I am very ashamed of
how I did this because it is a complete hack, but it works great, so I
can't complain too much.
General Information
1. The only way to build for VxWorks is to cross compile from a windows or
linux system. We use a RedHat 5.1 workstation system as our build
environment.
2. VxWorks 6.X has two main types of executable, DKMs (dynamic kernel
modules), and RTPs (real-time processes). Kernel modules are the bread
and butter of VxWorks, but they look nothing like processes/threads in
normal UNIX/Windows systems. RTPs are more like processes that have
memory protection, threads, etc. VxWorks 6.X also introduces some level
of POSIX conformance to their environment. The POSIX conformance was the
key for us to be able to port libxml2. We support accessing libxml2 from
both DKMs and RTPs.
3. There are 2 compilers for VxWorks, the WindRiver compiler, and a port
of the GNU toolchain, we have only tested and built with the GNU
toolchain.
How To Build
1. Run the configure on your native linux system (this is the cheesy
hack). Since the VxWorks GNU toolchain is very close in version to the
one in red hat, it generates a good config.h file. We configured libxml2
with the following to keep the size down, (but we have done basic testing
with everything compiled in).
./configure --with-minimum --with-reader --with-writer --with-regexps
--with-threads --with-thread-alloc
2. Rename the libxml2 folder to "src". This step is required for our
replacement makefile to work.
3. Run the replacement makefile. I wrote a new makefile that sets all the
proper vxworks defines and uses the correct compilers. The two defines on
the make command line are to tell it which VxWorks Target (SH3.2 little
endian), and the executable type. We have tested this code on PENTIUM2gnu
and SH32gnule.
This makefile creates a shared library that runs on VxWorks: (libxml2.so)
make -f Makefile.vxworks clean all VXCPU=SH32gnule VXTYPE=RTP
This makefile creates a kernel module that runs on VxWorks: (xml2.out)
make -f Makefile.vxworks clean all VXCPU=SH32gnule VXTYPE=DKM
Important Notes
1. There are several ways that this process could be improved, but at the
end of the day, we make products, not port libraries, so we did a meets
minimum for our needs.
2. VxWorks is the devil, give me embedded linux every day.
3. No matter what I tried, I couldn't get the configure to pick up the
VxWorks toolchain, and in my investigation, it has something to do with
automake/autoconf, not any individual package. VxWorks doesn't play by
the normal rules for building toolchains.
4. The PIC flag in VxWorks (especially for SH processors) is very
important, and very troublesome. On linux, you can liberally use the PIC
flag when compiling and the compiler/linker will ignore it as needed, on
VxWorks if must always be on for shared libraries, and always be off for
static libraries and executables.
5. If anyone wants to work on a better way to do the build of libxml2 for
VxWorks, I'm happy to help as much as I can, but I'm not looking to
support it myself.
Attached Files
1. To use my Makefile for vxworks, you should enter the vxworks
environment (/opt/windriver/wrenv.linux -p vxworks-6.4 for me).
2. Run: build.sh libxml2-2.6.32 SH32gnule RTP (where you have
libxml2-2.6.32.tar.gz and the Makefile in the same directory as the script
file).
Thanks,
Jim Wert Jr.
JWert@ILSTechnology.com

@ -1,85 +0,0 @@
LIBXML2=$1
TARGETCPU=$2
TARGETTYPE=$3
if [ -z "$2" ]; then
TARGETCPU=SIMPENTIUMgnu
fi
if [ -z "$3" ]; then
TARGETTYPE=RTP
fi
echo "LIBXML2 Version: ${LIBXML2}"
echo "LIBXML2 Target CPU: ${TARGETCPU}"
echo "LIBXML2 Target Type: ${TARGETTYPE}"
rm -fR src
tar xvzf ${LIBXML2}.tar.gz
mv ${LIBXML2} src
cd src
./configure --with-minimum --with-reader --with-writer --with-regexps --with-threads --with-thread-alloc
find . -name '*.in' -exec rm -fR {} +
find . -name '*.am' -exec rm -fR {} +
rm -fR *.m4
rm -fR *.pc
rm -fR *.pl
rm -fR *.py
rm -fR *.spec
rm -fR .deps
rm -fR AUTHORS
rm -fR bakefile
rm -fR ChangeLog
rm -fR config.guess
rm -fR config.log
rm -fR config.status
rm -fR config.stub
rm -fR config.sub
rm -fR configure
rm -fR COPYING
rm -fR Copyright
rm -fR depcomp
rm -fR doc
rm -fR example
rm -fR INSTALL
rm -fR install-sh
rm -fR libxml.3
rm -fR ltmain.sh
rm -fR Makefile
rm -fR Makefile.tests
rm -fR macos
rm -fR mkinstalldirs
rm -fR missing
rm -fR nanoftp.c
rm -fR nanohttp.c
rm -fR NEWS
rm -fR python
rm -fR README
rm -fR README.tests
rm -fR regressions.xml
rm -fR result
rm -fR runsuite.c
rm -fR runtest.c
rm -fR test
rm -fR test*.c
rm -fR TODO*
rm -fR trio*
rm -fR vms
rm -fR win32
rm -fR xml2*
rm -fR xmllint.c
rm -fR xstc
cd ..
make clean all VXCPU=${TARGETCPU} VXTYPE=${TARGETTYPE}
if [ "${TARGETTYPE}" = "RTP" ]; then
cp libxml2.so ../../lib/.
else
cp xml2.out ../../bin/.
fi
cp -R src/include/libxml ../../include/.

@ -1,15 +0,0 @@
<?xml version="1.0" ?>
<!-- $Id$ -->
<bakefile-gen>
<disable-formats>gnu,dmars,cbx_unix,cbuilderx</disable-formats>
<input>libxml2.bkl</input>
<!-- List of output formats to generate: -->
<add-formats>
borland,dmars,mingw,msvc,msvc6prj,watcom,cbuilderx,cbx_unix,gnu
</add-formats>
</bakefile-gen>

@ -1,92 +0,0 @@
LIBXML2 build system for Win32 README
-------------------------------------
In this folder are stored all the files required to compile LIBXML2 with win32 compilers.
Bakefile (http://bakefile.sourceforge.net) is used as makefile generator.
Supported makefiles:
- makefile.vc for Microsoft NMAKE
- makefile.bcc for Borland MAKE
- makefile.wat for OpenWatcom MAKE
- makefile.gcc for MinGW MINGW32-MAKE
- all DSP & DSW for Microsoft VisualC++ 6.0 (can be used also with VS.NET AFAIK)
This readme is organized as:
1.0 HOWTO compile LIBXML2 using makefiles <-- for users who want to build the library using *command-line*
1.1 HOWTO compile LIBXML2 using an IDE <-- for users who want to build the library using an *IDE*
1.2 HOWTO regenerate makefiles for LIBXML2 <-- for libxml2 mantainers/developers/advanced users
If you just want to compile the library (and the test programs) you should definitely avoid the
section 1.1 and focus on the 1.0.
1.0 HOWTO compile LIBXML2 using makefiles
-----------------------------------------
Choose your preferred compiler among those actually supported (see above) and then run
mycompilermake -fmakefile.makefileext [options]
for a full list of the available options you should open with a notepad (or something like that)
the makefile you want to use; at the beginning you should see a section which starts as:
# -------------------------------------------------------------------------
# These are configurable options:
# -------------------------------------------------------------------------
here you can find all the options actually used by that makefile.
They can be customized when running the makefile writing something like:
nmake -fmakefile.vc BUILD=release
mingw32-make -fmakefile.gcc BUILD=debug ICONV_DIR=c:\myiconv
or they can be permanently changed modifying the makefile.
That's all: for any problem/compile-error/suggestion, write to
frm@users.sourceforge.net with the word "libxml2" in the subject.
1.1 HOWTO compile LIBXML2 using an IDE
--------------------------------------
Actually only the Microsoft VisualC++ 6.0 project files are generated.
In future other Integrated Development Environments (IDEs) will be supported as well.
With MSVC++ 6.0, you should open the DSW file and then set as the active project the
"libxml2" project, if you want to build the library or one of the test projects if you
want to run them.
Using the command "Build->Set Active Configuration" you can choose one of the predefined
configuration.
1.2 HOWTO regenerate makefiles for LIBXML2
------------------------------------------
Be sure to have installed Bakefile (http://bakefile.sourceforge.net).
Just run the "bakefile_gen" command inside the folder containing the "libxml2.bkl" file.
NOTE: if you want to remove all the makefiles, you can use the "bakefile_gen -c" command.
The template files used to generate all makefiles are only two:
- libxml2.bkl (the main one)
- Bakefiles.bkgen
All the other files can be dynamically regenerated.
If you have problems with the compilation of LIBXML2 under windows (using one of the supported compiler)
please write to:
Francesco Montorsi <frm@users.sourceforge.net>

@ -1,745 +0,0 @@
<?xml version="1.0" ?>
<!-- Author: Francesco Montorsi <frm@users.sourceforge.net> -->
<!-- Date: 30/8/2004 -->
<!-- Last revision: 26/1/2005 -->
<!-- LIBXML2 BAKEFILE -->
<!-- -->
<!-- The bakefile used to build the library and the test -->
<!-- programs. The makefiles output is put: -->
<!-- -->
<!-- - in the ..\LIB folder -->
<!-- - in the ..\BIN folder -->
<!-- -->
<makefile>
<using module="datafiles"/>
<requires version="0.1.5"/>
<!-- This is a bakefile, that is, a generic template used to -->
<!-- generate makefiles ALL supported compilers. -->
<!-- To use this project file you need Bakefile installed. -->
<!-- With the command "bakefile_gen" you can regen all the -->
<!-- makefiles and project files. -->
<!-- See http://bakefile.sourceforge.net for more info. -->
<!--
This file is divided in:
- generic options
- generic variables
- libxml2 options
- libxml2 variables
- about config.h creation
- templates
- libxml2 library target
- libxml2 test program targets
-->
<!-- -->
<!-- GENERIC OPTIONS -->
<!-- -->
<!-- This is a standard option that determines -->
<!-- whether the user wants to build this library as -->
<!-- a dll or as a static library. -->
<option name="SHARED">
<values>0,1</values>
<values-description>,DLL</values-description>
<default-value>0</default-value>
<description>If set to zero a STATIC libxml library will be built</description>
</option>
<!-- Configuration for building the bakefile with -->
<!-- unicode strings or not (unicode or ansi). -->
<option name="UNICODE">
<values>0,1</values>
<values-description>,Unicode</values-description>
<default-value>0</default-value>
<description>Compile Unicode build?</description>
</option>
<!-- There are several options that deal with build -->
<!-- types. First, there's this one, BUILD. -->
<!-- -->
<!-- BUILD determines whether or not we want to build -->
<!-- in release or debug mode. Note that in practice -->
<!-- this means modifying the optimize tag, which by -->
<!-- default is set to off. In this case debug means -->
<!-- off (no optimizations), and release means speed -->
<!-- (fast with inlining). There is also a size option -->
<!-- that is not addressed in this example bakefile. -->
<option name="BUILD">
<values>debug,release</values>
<values-description>Debug,Release</values-description>
<default-value>release</default-value>
<description>
Type of compiled binaries
</description>
</option>
<!-- -->
<!-- GENERIC VARIABLES -->
<!-- -->
<!-- Set the ISDLL variable, so that we can use it -->
<!-- inside an if statement later on (options not -->
<!-- allowed in if statements). -->
<set var="ISDLL" cond="SHARED=='1'">1</set>
<set var="ISDLL" cond="SHARED=='0'">0</set>
<!-- The unicode define we want. By default bakefile -->
<!-- makes variables an empty string, so if unicode -->
<!-- is not defined $(UNICODE_DEFINE) would expand -->
<!-- to nothing (literally). -->
<set var="UNICODE_DEFINE">
<if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
</set>
<!-- The debug define we need with win32 compilers -->
<!-- (on Linux, the wx-config program is used). -->
<set var="DEBUG_DEFINE">
<if cond="FORMAT!='autoconf' and BUILD=='debug'">
__WXDEBUG__
</if>
</set>
<!-- Value we will use later on for the debug-info -->
<!-- tag inside our templates. -->
<set var="DEBUGINFO">
<if cond="BUILD=='debug'">on</if>
<if cond="BUILD=='release'">off</if>
</set>
<!-- Value we will use later on for the debug-runtime -->
<!-- tag inside our templates. -->
<set var="DEBUGRUNTIME">
<if cond="BUILD=='debug'">on</if>
<if cond="BUILD=='release'">off</if>
</set>
<!-- Value for optimize tag. -->
<set var="OPTIMIZEFLAG">
<if cond="BUILD=='debug'">off</if>
<if cond="BUILD=='release'">speed</if>
</set>
<!-- Level of warnings. Here we max it out in debug -->
<!-- mode, and turn them off in release mode. -->
<set var="WARNINGS">
<if cond="BUILD=='debug'">max</if>
<if cond="BUILD=='release'">no</if>
</set>
<!-- Set MYCPPFLAGS as empty; maybe it will be filled later... -->
<set var="MYCPPFLAGS"></set>
<if cond="FORMAT=='mingw' or FORMAT=='autoconf'">
<!-- With GCC, settings warnings to MAX would force -->
<!-- Bakefile to call GCC with "-W -Wall" which generates -->
<!-- a *lot* of warnings about wxWidgets headers... -->
<!-- this is why "-W -Wall" is here replaced by "-Wall". -->
<set var="WARNINGS">default</set>
<set var="MYCPPFLAGS">-Wall</set>
</if>
<!-- -->
<!-- LIBXML2 OPTIONS -->
<!-- -->
<!-- Note #1: not all of them are used by win32 makefiles -->
<!-- -->
<!-- Note #2: since all combinations of non-path options are -->
<!-- translated into different 'configurations' by -->
<!-- Bakefile when using the MSVC6PRJ output, we must -->
<!-- avoid to create a 10 MB libxml2.dsp file forcing -->
<!-- some options to their default values... this -->
<!-- behaviour can be overridden by the -->
<!-- FULL_OPTIONS_SUPPORT -->
<!-- variable defined below... -->
<set var="FULL_OPTIONS_SUPPORT">
<if cond="FORMAT=='msvc6prj'">0</if>
<if cond="FORMAT!='msvc6prj'">1</if>
</set>
<option name="ICONV_DIR" category="path">
<default-value>c:\iconv</default-value>
<description>The iconv library main folder</description>
</option>
<option name="WITH_TRIO">
<values>0,1</values>
<default-value>0</default-value>
<description>Enable TRIO string manipulator</description>
</option>
<!-- see the note #2 -->
<if cond="FULL_OPTIONS_SUPPORT=='0'">
<set var="WITH_THREADS">native</set>
</if>
<if cond="FULL_OPTIONS_SUPPORT=='1'">
<option name="WITH_THREADS">
<values>no,ctls,native,posix</values>
<default-value>native</default-value>
<description>Enable thread safety</description>
</option>
</if>
<option name="WITH_FTP">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable FTP client</description>
</option>
<option name="WITH_HTTP">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable HTTP client</description>
</option>
<option name="WITH_C14N">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable C14N support</description>
</option>
<option name="WITH_CATALOG">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable catalog support</description>
</option>
<option name="WITH_DOCB">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable DocBook support</description>
</option>
<option name="WITH_XPATH">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable XPath support</description>
</option>
<option name="WITH_XPTR">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable XPointer support</description>
</option>
<option name="WITH_XINCLUDE">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable XInclude support</description>
</option>
<!-- see the note #2 -->
<if cond="FULL_OPTIONS_SUPPORT=='0'">
<set var="WITH_ICONV">1</set>
</if>
<if cond="FULL_OPTIONS_SUPPORT=='1'">
<option name="WITH_ICONV">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable iconv support</description>
</option>
</if>
<option name="WITH_ISO8859X">
<values>0,1</values>
<default-value>0</default-value>
<description>Enable iso8859x support</description>
</option>
<!-- see the note #2 -->
<if cond="FULL_OPTIONS_SUPPORT=='0'">
<set var="WITH_ZLIB">0</set>
</if>
<if cond="FULL_OPTIONS_SUPPORT=='1'">
<option name="WITH_ZLIB">
<values>0,1</values>
<default-value>0</default-value>
<description>Enable ZLIB support</description>
</option>
</if>
<option name="WITH_REGEXPS">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable regular expressions</description>
</option>
<option name="WITH_TREE">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable tree api</description>
</option>
<option name="WITH_READER">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable xmlReader api</description>
</option>
<option name="WITH_WRITER">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable xmlWriter api</description>
</option>
<option name="WITH_WALKER">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable xmlDocWalker api</description>
</option>
<option name="WITH_PATTERN">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable xmlPattern api</description>
</option>
<option name="WITH_PUSH">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable push api</description>
</option>
<option name="WITH_VALID">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable DTD validation support</description>
</option>
<option name="WITH_SAX1">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable SAX1 api</description>
</option>
<option name="WITH_SCHEMAS">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable XML Schema support</description>
</option>
<option name="WITH_LEGACY">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable deprecated APIs</description>
</option>
<option name="WITH_OUTPUT">
<values>0,1</values>
<default-value>1</default-value>
<description>Enable serialization support</description>
</option>
<option name="WITH_PYTHON">
<values>0,1</values>
<default-value>0</default-value>
<description>Build Python bindings</description>
</option>
<!-- -->
<!-- LIBXML2 VARIABLES -->
<!-- -->
<!-- Put all the objects files generated by -->
<!-- the compilation in a subfolder of BUILD -->
<set var="BUILDDIR">$(FORMAT)</set>
<!-- This variable is set to 1 when the current output writer supports -->
<!-- the __DEFINE_ARG variable. Otherwise it's set to zero. -->
<set var="HAS_DEFINE_ARG">
<if cond="FORMAT!='msvc6prj'">1</if>
<if cond="FORMAT=='msvc6prj'">0</if>
</set>
<!-- The root directory of libxml2 -->
<set var="XMLBASEDIR">..</set>
<!-- The directory where libxml2' tests will be put -->
<set var="XMLTESTDIR">$(XMLBASEDIR)$(DIRSEP)bin</set>
<set var="LIBXML_MAJOR_VERSION">2</set>
<set var="LIBXML_MINOR_VERSION">6</set>
<set var="LIBXML_MICRO_VERSION">16</set>
<!-- some defines related to threads -->
<set var="THREADS_DEF">
<if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='native'">
$(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS
</if>
<if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='ctls'">
$(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS $(__DEFINE_ARG)HAVE_COMPILER_TLS
</if>
<if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='posix'">
$(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_PTHREAD_H
</if>
</set>
<if cond="FORMAT=='borland'">
<set var="THREADS_DEF">
<if cond="WITH_THREADS=='native'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
<if cond="WITH_THREADS=='ctls'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
<if cond="WITH_THREADS=='posix'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
</set>
</if>
<!-- some other conditional defines -->
<set var="DEBUG_DEF"><if cond="BUILD=='debug'">_DEBUG</if></set>
<set var="DEBUG_DEF"><if cond="BUILD=='release'">NDEBUG</if></set>
<!-- this is very very important when compiling with MINGW: without this line,
the test programs (and all the programs built with libxml2 which use xmlFree)
won't build because of "undefined references to __xmlFree" -->
<set var="STATIC_DEF"><if cond="SHARED=='0'">LIBXML_STATIC</if></set>
<!-- some conditional libraries dependencies -->
<set var="ICONV_LIB"><if cond="WITH_ICONV=='1'">iconv</if></set>
<set var="WSOCK32_LIB"><if cond="WITH_THREADS=='native'">wsock32</if></set>
<set var="ZLIB_LIB"><if cond="WITH_ZLIB=='1'">zdll</if></set>
<set var="POSIX_LIB"><if cond="WITH_THREADS=='posix'">pthreadVC</if></set>
<set var="XMLINCLUDEDIR">$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)libxml$(DIRSEP)</set>
<!-- -->
<!-- ABOUT CONFIG.H HEADER CREATION -->
<!-- -->
<set var="CONFIG_SRCNAME">win32config.h</set>
<set var="CONFIG_DSTNAME">config.h</set>
<if cond="FORMAT!='msvc6prj' and FORMAT!='autoconf' and FORMAT!='gnu'">
<copy-file-to-file id="setup">
<!-- On win32 we need to manually copy a default config.h file -->
<!-- from the include/mc/msw folder to include/mc -->
<src>../include/$(CONFIG_SRCNAME)</src>
<dst>../$(CONFIG_DSTNAME)</dst>
<dependency-of>all</dependency-of>
<!-- With autoconf, we will use the configure script to translate -->
<!-- include/mc/config.h.in to include/mc/config.h and thus we do -->
<!-- not need to do anything here... -->
</copy-file-to-file>
</if>
<if cond="FORMAT!='msvc6prj'">
<mkdir id="setuplibdir"><dir>$(XMLBASEDIR)$(DIRSEP)lib</dir></mkdir>
<mkdir id="setupbindir"><dir>$(XMLBASEDIR)$(DIRSEP)bin</dir></mkdir>
<!-- Creates all output folders -->
<phony id="setupdirs">
<dependency-of>all</dependency-of>
<depends>setuplibdir</depends>
<depends>setupbindir</depends>
</phony>
</if>
<!-- This defines a tag which includes headers on MSVC -->
<!-- Note that $(value) is stuck in there by bakefile, -->
<!-- and is the value between the beginning and end tag. -->
<define-tag name="headers" rules="dll,lib,exe">
<if cond="FORMAT=='msvc6prj'">
<msvc-project-files>
$(value)
</msvc-project-files>
</if>
</define-tag>
<!-- Creates the following custom build rule for MSVC6PRJ file:
copies ..\include\win32config.h into ..\config.h
NOTE: this tag must be used before the <sources> tag if you want that the configuration
file will be created before any other source file is compiled... -->
<define-tag name="msvc-copy-setup-h" rules="dll,lib,action">
<if cond="FORMAT=='msvc6prj'">
<headers>$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</headers>
<set var="__subdir">$(value)</set>
<set var="_custom_build_files" append="1">$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</set>
<set var="_custom_build____include_win32config_h">
Creating the configuration file ..\$(CONFIG_DSTNAME) from ..\include\$(CONFIG_SRCNAME)
InputPath=..\include\$(CONFIG_SRCNAME)
"..\$(CONFIG_DSTNAME)" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
$(TAB)copy "$(DOLLAR)(InputPath)" ..\$(CONFIG_DSTNAME)
</set>
</if>
</define-tag>
<!-- -->
<!-- TEMPLATES -->
<!-- -->
<!-- The basic template: used by all the targets -->
<template id="base">
<if cond="FORMAT=='mingw'">
<define>HAVE_W32API_H</define>
<ldflags>-mthreads</ldflags>
</if>
<cxxflags>$(MYCPPFLAGS)</cxxflags>
<warnings>$(WARNINGS)</warnings>
<define>$(UNICODE_DEFINE)</define>
<optimize>$(OPTIMIZEFLAG)</optimize>
<debug-info>$(DEBUGINFO)</debug-info>
<debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
</template>
<!-- The template used both by the library and by the test programs -->
<template id="xml2" template="base">
<!-- -I & -L equivalents -->
<include>$(XMLBASEDIR)$(DIRSEP)include</include>
<include>$(ICONV_DIR)$(DIRSEP)include</include>
<lib-path>$(ICONV_DIR)$(DIRSEP)lib</lib-path>
<!-- some conditional define flags -->
<cflags>$(THREADS_DEF)</cflags>
<define>$(ZLIB_DEF)</define>
<define>$(DEBUG_DEF)</define>
<define>$(STATIC_DEF)</define>
<if cond="HAS_DEFINE_ARG=='0'">
<!-- we are probably using an IDE output: defaults to WITH_THREADS=='native' -->
<define>_REENTRANT</define>
<define>HAVE_WIN32_THREADS</define>
</if>
<!-- these must always be defined on win32 -->
<define>WIN32</define>
<define>_WINDOWS</define>
<define>_MBCS</define>
<if cond="FORMAT=='borland'">
<define>_NO_VCL</define>
<define>EILSEQ=2</define>
</if>
</template>
<!-- The template used by libxml2 test programs -->
<template id="xml2test" template="xml2">
<dirname>$(XMLTESTDIR)</dirname>
<app-type>console</app-type>
<library>libxml2</library>
<sys-lib>$(ICONV_LIB)</sys-lib>
<sys-lib>$(WSOCK32_LIB)</sys-lib>
<sys-lib>$(ZLIB_LIB)</sys-lib>
<sys-lib>$(POSIX_LIB)</sys-lib>
</template>
<!-- -->
<!-- LIBXML2 LIBRARY TARGET -->
<!-- -->
<lib id="libxml2" template="xml2">
<!-- this is useful only when using MSVC6PRJ -->
<if cond="FORMAT=='msvc6prj'">
<msvc-copy-setup-h/>
<msvc-file-group>Config headers:*config.h</msvc-file-group>
</if>
<if cond="FORMAT!='msvc6prj'">
<depends>setup</depends>
<depends>setuplibdir</depends>
</if>
<!-- output folder -->
<dirname>$(XMLBASEDIR)$(DIRSEP)lib</dirname>
<!-- The output name must be "libxml2.lib" with all compilers.
Since mingw format autoadds the "lib" prefix to the library
name, we must intercept that case to avoid to get "liblibxml2.a" -->
<if cond="FORMAT!='mingw'">
<libname>libxml2</libname>
</if>
<if cond="FORMAT=='mingw'">
<libname>xml2</libname>
</if>
<!-- the list of source files to compile -->
<sources>
$(XMLBASEDIR)$(DIRSEP)c14n.c
$(XMLBASEDIR)$(DIRSEP)catalog.c
$(XMLBASEDIR)$(DIRSEP)chvalid.c
$(XMLBASEDIR)$(DIRSEP)debugXML.c
$(XMLBASEDIR)$(DIRSEP)dict.c
$(XMLBASEDIR)$(DIRSEP)DOCBparser.c
$(XMLBASEDIR)$(DIRSEP)encoding.c
$(XMLBASEDIR)$(DIRSEP)entities.c
$(XMLBASEDIR)$(DIRSEP)error.c
$(XMLBASEDIR)$(DIRSEP)globals.c
$(XMLBASEDIR)$(DIRSEP)hash.c
$(XMLBASEDIR)$(DIRSEP)HTMLparser.c
$(XMLBASEDIR)$(DIRSEP)HTMLtree.c
$(XMLBASEDIR)$(DIRSEP)legacy.c
$(XMLBASEDIR)$(DIRSEP)list.c
$(XMLBASEDIR)$(DIRSEP)nanoftp.c
$(XMLBASEDIR)$(DIRSEP)nanohttp.c
$(XMLBASEDIR)$(DIRSEP)parser.c
$(XMLBASEDIR)$(DIRSEP)parserInternals.c
$(XMLBASEDIR)$(DIRSEP)pattern.c
$(XMLBASEDIR)$(DIRSEP)relaxng.c
$(XMLBASEDIR)$(DIRSEP)SAX2.c
$(XMLBASEDIR)$(DIRSEP)SAX.c
$(XMLBASEDIR)$(DIRSEP)threads.c
$(XMLBASEDIR)$(DIRSEP)tree.c
$(XMLBASEDIR)$(DIRSEP)uri.c
$(XMLBASEDIR)$(DIRSEP)valid.c
$(XMLBASEDIR)$(DIRSEP)xinclude.c
$(XMLBASEDIR)$(DIRSEP)xlink.c
$(XMLBASEDIR)$(DIRSEP)xmlIO.c
$(XMLBASEDIR)$(DIRSEP)xmlmemory.c
$(XMLBASEDIR)$(DIRSEP)xmlreader.c
$(XMLBASEDIR)$(DIRSEP)xmlregexp.c
$(XMLBASEDIR)$(DIRSEP)xmlsave.c
$(XMLBASEDIR)$(DIRSEP)xmlschemas.c
$(XMLBASEDIR)$(DIRSEP)xmlschemastypes.c
$(XMLBASEDIR)$(DIRSEP)xmlunicode.c
$(XMLBASEDIR)$(DIRSEP)xmlwriter.c
$(XMLBASEDIR)$(DIRSEP)xpath.c
$(XMLBASEDIR)$(DIRSEP)xpointer.c
$(XMLBASEDIR)$(DIRSEP)xmlstring.c
</sources>
<!-- the list of header files (for IDE projects) -->
<headers>
$(XMLINCLUDEDIR)c14n.h
$(XMLINCLUDEDIR)catalog.h
$(XMLINCLUDEDIR)chvalid.h
$(XMLINCLUDEDIR)debugXML.h
$(XMLINCLUDEDIR)dict.h
$(XMLINCLUDEDIR)DOCBparser.h
$(XMLINCLUDEDIR)encoding.h
$(XMLINCLUDEDIR)entities.h
$(XMLINCLUDEDIR)globals.h
$(XMLINCLUDEDIR)hash.h
$(XMLINCLUDEDIR)HTMLparser.h
$(XMLINCLUDEDIR)HTMLtree.h
$(XMLINCLUDEDIR)list.h
$(XMLINCLUDEDIR)nanoftp.h
$(XMLINCLUDEDIR)nanohttp.h
$(XMLINCLUDEDIR)parser.h
$(XMLINCLUDEDIR)parserInternals.h
$(XMLINCLUDEDIR)pattern.h
$(XMLINCLUDEDIR)relaxng.h
$(XMLINCLUDEDIR)SAX.h
$(XMLINCLUDEDIR)SAX2.h
$(XMLINCLUDEDIR)schemasInternals.h
$(XMLINCLUDEDIR)threads.h
$(XMLINCLUDEDIR)tree.h
$(XMLINCLUDEDIR)uri.h
$(XMLINCLUDEDIR)valid.h
$(XMLINCLUDEDIR)xinclude.h
$(XMLINCLUDEDIR)xlink.h
$(XMLINCLUDEDIR)xmlautomata.h
$(XMLINCLUDEDIR)xmlerror.h
$(XMLINCLUDEDIR)xmlexports.h
$(XMLINCLUDEDIR)xmlIO.h
$(XMLINCLUDEDIR)xmlmemory.h
$(XMLINCLUDEDIR)xmlmodule.h
$(XMLINCLUDEDIR)xmlreader.h
$(XMLINCLUDEDIR)xmlregexp.h
$(XMLINCLUDEDIR)xmlsave.h
$(XMLINCLUDEDIR)xmlschemas.h
$(XMLINCLUDEDIR)xmlschemastypes.h
$(XMLINCLUDEDIR)xmlstring.h
$(XMLINCLUDEDIR)xmlunicode.h
$(XMLINCLUDEDIR)xmlversion.h
$(XMLINCLUDEDIR)xmlwriter.h
$(XMLINCLUDEDIR)xpath.h
$(XMLINCLUDEDIR)xpathInternals.h
$(XMLINCLUDEDIR)xpointer.h
</headers>
<!-- these ones are not inside the include/libxml folder -->
<headers>
$(XMLBASEDIR)$(DIRSEP)libxml.h
$(XMLBASEDIR)$(DIRSEP)triodef.h
$(XMLBASEDIR)$(DIRSEP)trionan.h
$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)wsockcompat.h
</headers>
</lib>
<!-- -->
<!-- LIBXML2 test programs -->
<!-- -->
<set var="BUILD_ALL_TESTS">
<!-- when using full options support with MSVC6PRJ we should
avoid to create all the DSP files required for the test
programs: they would take a _lot_ of space !! -->
<if cond="FORMAT=='msvc6prj' and FULL_OPTIONS_SUPPORT=='1'">0</if>
<!-- when creating a makefile or using MSVC6PRJ with limited
options support, then we can build all the tests safely -->
<if cond="FORMAT!='msvc6prj' or FULL_OPTIONS_SUPPORT=='0'">1</if>
</set>
<if cond="BUILD_ALL_TESTS=='1'">
<exe id="testAutomata" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testAutomata.c</sources></exe>
<exe id="testC14N" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testC14N.c</sources></exe>
<exe id="testHTML" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testHTML.c</sources></exe>
<exe id="testReader" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testReader.c</sources></exe>
<exe id="testRegexp" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRegexp.c</sources></exe>
<exe id="testRelax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRelax.c</sources></exe>
<exe id="testSax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSax.c</sources></exe>
<exe id="testSchemas" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSchemas.c</sources></exe>
<exe id="testURI" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testURI.c</sources></exe>
<exe id="testXPath" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testXPath.c</sources></exe>
<exe id="xmllint" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)xmllint.c</sources></exe>
<if cond="FORMAT=='autoconf'">
<exe id="testdso" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testdso.c</sources></exe>
</if>
<!-- FIXME:
<exe id="testModule" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testModule.c</sources></exe>
<if cond="WITH_THREADS!='no'">
<exe id="testThreads" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreads.c</sources></exe>
</if>
-->
</if>
</makefile>

@ -1,221 +0,0 @@
#!/usr/bin/python
import sys
import time
import os
import string
sys.path.insert(0, "python")
import libxml2
#
# the testsuite description
#
DIR="xinclude-test-suite"
CONF="testdescr.xml"
LOG="check-xinclude-test-suite.log"
log = open(LOG, "w")
os.chdir(DIR)
test_nr = 0
test_succeed = 0
test_failed = 0
test_error = 0
#
# Error and warning handlers
#
error_nr = 0
error_msg = ''
def errorHandler(ctx, str):
global error_nr
global error_msg
if string.find(str, "error:") >= 0:
error_nr = error_nr + 1
if len(error_msg) < 300:
if len(error_msg) == 0 or error_msg[-1] == '\n':
error_msg = error_msg + " >>" + str
else:
error_msg = error_msg + str
libxml2.registerErrorHandler(errorHandler, None)
def testXInclude(filename, id):
global error_nr
global error_msg
global log
error_nr = 0
error_msg = ''
print "testXInclude(%s, %s)" % (filename, id)
return 1
def runTest(test, basedir):
global test_nr
global test_failed
global test_error
global test_succeed
global error_msg
global log
fatal_error = 0
uri = test.prop('href')
id = test.prop('id')
type = test.prop('type')
if uri == None:
print "Test without ID:", uri
return -1
if id == None:
print "Test without URI:", id
return -1
if type == None:
print "Test without URI:", id
return -1
if basedir != None:
URI = basedir + "/" + uri
else:
URI = uri
if os.access(URI, os.R_OK) == 0:
print "Test %s missing: base %s uri %s" % (URI, basedir, uri)
return -1
expected = None
outputfile = None
diff = None
if type != 'error':
output = test.xpathEval('string(output)')
if output == 'No output file.':
output = None
if output == '':
output = None
if output != None:
if basedir != None:
output = basedir + "/" + output
if os.access(output, os.R_OK) == 0:
print "Result for %s missing: %s" % (id, output)
output = None
else:
try:
f = open(output)
expected = f.read()
outputfile = output
except:
print "Result for %s unreadable: %s" % (id, output)
try:
# print "testing %s" % (URI)
doc = libxml2.parseFile(URI)
except:
doc = None
if doc != None:
res = doc.xincludeProcess()
if res >= 0 and expected != None:
result = doc.serialize()
if result != expected:
print "Result for %s differs" % (id)
open("xinclude.res", "w").write(result)
diff = os.popen("diff %s xinclude.res" % outputfile).read()
doc.freeDoc()
else:
print "Failed to parse %s" % (URI)
res = -1
test_nr = test_nr + 1
if type == 'success':
if res > 0:
test_succeed = test_succeed + 1
elif res == 0:
test_failed = test_failed + 1
print "Test %s: no substitution done ???" % (id)
elif res < 0:
test_error = test_error + 1
print "Test %s: failed valid XInclude processing" % (id)
elif type == 'error':
if res > 0:
test_error = test_error + 1
print "Test %s: failed to detect invalid XInclude processing" % (id)
elif res == 0:
test_failed = test_failed + 1
print "Test %s: Invalid but no substitution done" % (id)
elif res < 0:
test_succeed = test_succeed + 1
elif type == 'optional':
if res > 0:
test_succeed = test_succeed + 1
else:
print "Test %s: failed optional test" % (id)
# Log the ontext
if res != 1:
log.write("Test ID %s\n" % (id))
log.write(" File: %s\n" % (URI))
content = string.strip(test.content)
while content[-1] == '\n':
content = content[0:-1]
log.write(" %s:%s\n\n" % (type, content))
if error_msg != '':
log.write(" ----\n%s ----\n" % (error_msg))
error_msg = ''
log.write("\n")
if diff != None:
log.write("diff from test %s:\n" %(id))
log.write(" -----------\n%s\n -----------\n" % (diff));
return 0
def runTestCases(case):
creator = case.prop('creator')
if creator != None:
print "=>", creator
base = case.getBase(None)
basedir = case.prop('basedir')
if basedir != None:
base = libxml2.buildURI(basedir, base)
test = case.children
while test != None:
if test.name == 'testcase':
runTest(test, base)
if test.name == 'testcases':
runTestCases(test)
test = test.next
conf = libxml2.parseFile(CONF)
if conf == None:
print "Unable to load %s" % CONF
sys.exit(1)
testsuite = conf.getRootElement()
if testsuite.name != 'testsuite':
print "Expecting TESTSUITE root element: aborting"
sys.exit(1)
profile = testsuite.prop('PROFILE')
if profile != None:
print profile
start = time.time()
case = testsuite.children
while case != None:
if case.name == 'testcases':
old_test_nr = test_nr
old_test_succeed = test_succeed
old_test_failed = test_failed
old_test_error = test_error
runTestCases(case)
print " Ran %d tests: %d succeeded, %d failed and %d generated an error" % (
test_nr - old_test_nr, test_succeed - old_test_succeed,
test_failed - old_test_failed, test_error - old_test_error)
case = case.next
conf.freeDoc()
log.close()
print "Ran %d tests: %d succeeded, %d failed and %d generated an error in %.2f s." % (
test_nr, test_succeed, test_failed, test_error, time.time() - start)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,49 +0,0 @@
#!/bin/awk -f
function translate(str) {
while (sub(/&/, "#amp;", str) == 1);
while (sub(/#amp;/, "\\&amp;", str) == 1); # fun isn't it ?
while (sub(/</, "\\&lt;", str) == 1);
while (sub(/>/, "\\&gt;", str) == 1);
sub(/[0-9][0-9][0-9][0-9][0-9]+/, "<bug number='&'/>", str)
return(str)
}
BEGIN {
nb_entry = 0
in_entry = 0
in_item = 0
print "<?xml version='1.0' encoding='ISO-8859-1'?>"
print "<log>"
}
END {
if (in_item == 1) printf("%s</item>\n", translate(item))
if (in_entry == 1) print " </entry>"
print "</log>"
}
/^[ \t]*$/ { next }
/^[A-Za-z0-9]/ {
match($0, "\(.*\) \([A-Z]+\) \([0-9][0-9][0-9][0-9]\) \(.*\) <\(.*\)>", loge)
if (in_item == 1) printf("%s</item>\n", translate(item))
if (in_entry == 1) print " </entry>"
nb_entry = nb_entry + 1
if (nb_entry > 50) {
in_entry = 0
in_item = 0
exit
}
in_entry = 1
in_item = 0
printf(" <entry date='%s' timezone='%s' year='%s'\n who='%s' email='%s'>\n", loge[1], loge[2], loge[3], loge[4], loge[5])
}
/^[ \t]*\*/ {
if (in_item == 1) printf("%s</item>\n", translate(item))
in_item = 1
printf(" <item>")
match($0, "[ \t]*. *\(.*\)", loge)
item = loge[1]
}
/^[ \t]*[a-zA-Z0-9\#]/ {
if (in_item == 1) {
match($0, "[ \t]*\(.*\)[ \t]*", loge)
item = sprintf("%s %s", item, loge[1])
}
}

@ -1,117 +0,0 @@
<?xml version="1.0"?>
<!-- this stylesheet builds the ChangeLog.html -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Import the rest of the site stylesheets -->
<xsl:import href="site.xsl"/>
<!-- Generate XHTML-1.0 transitional -->
<xsl:output method="xml" encoding="UTF-8" indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:param name="module">libxml2</xsl:param>
<!-- The table of content for the HTML page -->
<xsl:variable name="menu_name">API Menu</xsl:variable>
<xsl:variable name="develtoc">
<form action="../search.php"
enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="20" value=""/>
<input name="submit" type="submit" value="Search ..."/>
</form>
<ul><!-- style="margin-left: -1em" -->
<li><a style="font-weight:bold"
href="{$href_base}index.html">Main Menu</a></li>
<li><a style="font-weight:bold"
href="{$href_base}docs.html">Developer Menu</a></li>
<li><a style="font-weight:bold"
href="{$href_base}html/index.html">Modules Index</a></li>
<li><a style="font-weight:bold"
href="{$href_base}examples/index.html">Code Examples</a></li>
<li><a style="font-weight:bold"
href="index.html">API Menu</a></li>
<li><a href="html/libxml-parser.html">Parser API</a></li>
<li><a href="html/libxml-tree.html">Tree API</a></li>
<li><a href="html/libxml-xmlreader.html">Reader API</a></li>
<li><a href="{$href_base}guidelines.html">XML Guidelines</a></li>
</ul>
</xsl:variable>
<xsl:template match="bug">
<a href="http://bugzilla.gnome.org/show_bug.cgi?id={@number}">
<xsl:value-of select="@number"/></a>
</xsl:template>
<xsl:template match="item">
<li><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="entry">
<p>
<b><xsl:value-of select="@who"/></b>
<xsl:text> </xsl:text>
<xsl:value-of select="@date"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@timezone"/>
<ul>
<xsl:apply-templates select="item"/>
</ul>
</p>
</xsl:template>
<xsl:template match="log">
<xsl:variable name="title">ChangeLog last entries of <xsl:value-of select="$module"/></xsl:variable>
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates select="entry"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

@ -1,64 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
825 1125 2625 1125 2625 3375 825 3375 825 1125
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
4125 1125 5925 1125 5925 3375 4125 3375 4125 1125
2 4 0 1 0 7 0 0 -1 0.000 0 0 7 0 0 5
2025 3075 2025 1650 1050 1650 1050 3075 2025 3075
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
1425 1875 1575 1875 1575 2025 1425 2025 1425 1875
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
1200 2175 1350 2175 1350 2325 1200 2325 1200 2175
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
1500 2175 1650 2175 1650 2325 1500 2325 1500 2175
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
1800 2175 1950 2175 1950 2325 1800 2325 1800 2175
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
1500 2475 1650 2475 1650 2625 1500 2625 1500 2475
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
1725 2700 1875 2700 1875 2850 1725 2850 1725 2700
2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
1275 2700 1425 2700 1425 2850 1275 2850 1275 2700
2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
1500 2025 1350 2175
2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
1500 2025 1575 2175
2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
1500 2025 1875 2175
2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
1575 2325 1575 2475
2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
1650 2625 1725 2700
2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
1500 2625 1425 2700
2 3 0 2 0 7 0 0 -1 6.000 0 0 -1 0 0 5
2550 1725 2175 1950 2175 2850 2550 3075 2550 1725
2 3 0 2 0 7 0 0 -1 6.000 0 0 -1 0 0 5
4575 1725 4200 1950 4200 2850 4575 3075 4575 1725
2 2 0 1 0 7 0 0 -1 4.000 0 0 -1 0 0 5
2700 2025 4050 2025 4050 2775 2700 2775 2700 2025
2 1 0 2 0 7 0 0 -1 6.000 0 0 -1 0 0 2
5025 2025 4575 2175
2 1 1 2 0 7 0 0 -1 6.000 0 0 -1 1 0 3
1 1 2.00 120.00 240.00
4575 2175 4200 2250 2025 2250
2 1 1 2 0 7 0 0 -1 6.000 0 0 -1 0 0 3
2025 2475 4200 2475 4575 2550
2 1 0 2 0 7 0 0 -1 6.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
4575 2550 5025 2625
4 0 0 0 0 0 18 0.0000 4 255 1155 1050 825 Program 1\001
4 0 0 0 0 0 18 0.0000 4 255 1155 4425 900 Program 2\001
4 0 0 0 0 0 18 0.0000 4 195 585 1350 1500 XML\001
4 0 0 0 0 0 18 0.0000 4 195 975 3000 3075 CORBA\001
4 0 0 0 0 0 18 0.0000 4 195 735 3000 3375 ORBit\001
4 0 0 0 0 0 18 0.0000 4 195 1395 2175 1575 DOM server\001
4 0 0 0 0 0 18 0.0000 4 195 1335 4200 1650 DOM client\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

@ -1,299 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="https://gitlab.gnome.org/GNOME/libxml2/issues">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul>
<li><a href="FAQ.html#License">License(s)</a></li>
<li><a href="FAQ.html#Installati">Installation</a></li>
<li><a href="FAQ.html#Compilatio">Compilation</a></li>
<li><a href="FAQ.html#Developer">Developer corner</a></li>
</ul><h3><a name="License" id="License">License</a>(s)</h3><ol>
<li><em>Licensing Terms for libxml</em>
<p>libxml2 is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
License</a>; see the file Copyright in the distribution for the precise
wording</p>
</li>
<li><em>Can I embed libxml2 in a proprietary application ?</em>
<p>Yes. The MIT License allows you to keep proprietary the changes you
made to libxml, but it would be graceful to send-back bug fixes and
improvements as patches for possible incorporation in the main
development tree.</p>
</li>
</ol><h3><a name="Installati" id="Installati">Installation</a></h3><ol>
<li><strong><span style="background-color: #FF0000">Do Not Use
libxml1</span></strong>, use libxml2</li>
<p></p>
<li><em>Where can I get libxml</em> ?
<p>The original distribution comes from <a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> or <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">gnome.org</a></p>
<p>Most Linux and BSD distributions include libxml, this is probably the
safer way for end-users to use libxml.</p>
<p>David Doolin provides precompiled Windows versions at <a href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a></p>
</li>
<p></p>
<li><em>I see libxml and libxml2 releases, which one should I install ?</em>
<ul>
<li>If you are not constrained by backward compatibility issues with
existing applications, install libxml2 only</li>
<li>If you are not doing development, you can safely install both.
Usually the packages <a href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a> and <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a> are
compatible (this is not the case for development packages).</li>
<li>If you are a developer and your system provides separate packaging
for shared libraries and the development components, it is possible
to install libxml and libxml2, and also <a href="http://rpmfind.net/linux/RPM/libxml-devel.html">libxml-devel</a>
and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml2-devel</a>
too for libxml2 &gt;= 2.3.0</li>
<li>If you are developing a new application, please develop against
libxml2(-devel)</li>
</ul>
</li>
<li><em>I can't install the libxml package, it conflicts with libxml0</em>
<p>You probably have an old libxml0 package used to provide the shared
library for libxml.so.0, you can probably safely remove it. The libxml
packages provided on <a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> provide
libxml.so.0</p>
</li>
<li><em>I can't install the libxml(2) RPM package due to failed
dependencies</em>
<p>The most generic solution is to re-fetch the latest src.rpm , and
rebuild it locally with</p>
<p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code>.</p>
<p>If everything goes well it will generate two binary rpm packages (one
providing the shared libs and xmllint, and the other one, the -devel
package, providing includes, static libraries and scripts needed to build
applications with libxml(2)) that you can install locally.</p>
</li>
</ol><h3><a name="Compilatio" id="Compilatio">Compilation</a></h3><ol>
<li><em>What is the process to compile libxml2 ?</em>
<p>As most UNIX libraries libxml2 follows the "standard":</p>
<p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p>
<p><code>cd libxml-xxxx</code></p>
<p><code>./configure --help</code></p>
<p>to see the options, then the compilation/installation proper</p>
<p><code>./configure [possible options]</code></p>
<p><code>make</code></p>
<p><code>make install</code></p>
<p>At that point you may have to rerun ldconfig or a similar utility to
update your list of installed shared libs.</p>
</li>
<li><em>What other libraries are needed to compile/install libxml2 ?</em>
<p>Libxml2 does not require any other library, the normal C ANSI API
should be sufficient (please report any violation to this rule you may
find).</p>
<p>However if found at configuration time libxml2 will detect and use the
following libs:</p>
<ul>
<li><a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a
highly portable and available widely compression library.</li>
<li>iconv: a powerful character encoding conversion library. It is
included by default in recent glibc libraries, so it doesn't need to
be installed specifically on Linux. It now seems a <a href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">part
of the official UNIX</a> specification. Here is one <a href="http://www.gnu.org/software/libiconv/">implementation of the
library</a> which source can be found <a href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li>
</ul>
</li>
<p></p>
<li><em>Make check fails on some platforms</em>
<p>Sometimes the regression tests' results don't completely match the
value produced by the parser, and the makefile uses diff to print the
delta. On some platforms the diff return breaks the compilation process;
if the diff is small this is probably not a serious problem.</p>
<p>Sometimes (especially on Solaris) make checks fail due to limitations
in make. Try using GNU-make instead.</p>
</li>
<li><em>I use the SVN version and there is no configure script</em>
<p>The configure script (and other Makefiles) are generated. Use the
autogen.sh script to regenerate the configure script and Makefiles,
like:</p>
<p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
</li>
<li><em>I have troubles when running make tests with gcc-3.0</em>
<p>It seems the initial release of gcc-3.0 has a problem with the
optimizer which miscompiles the URI module. Please use another
compiler.</p>
</li>
</ol><h3><a name="Developer" id="Developer">Developer</a> corner</h3><ol>
<li><em>Troubles compiling or linking programs using libxml2</em>
<p>Usually the problem comes from the fact that the compiler doesn't get
the right compilation or linking flags. There is a small shell script
<code>xml2-config</code> which is installed as part of libxml2 usual
install process which provides those flags. Use</p>
<p><code>xml2-config --cflags</code></p>
<p>to get the compilation flags and</p>
<p><code>xml2-config --libs</code></p>
<p>to get the linker flags. Usually this is done directly from the
Makefile as:</p>
<p><code>CFLAGS=`xml2-config --cflags`</code></p>
<p><code>LIBS=`xml2-config --libs`</code></p>
</li>
<li><em>I want to install my own copy of libxml2 in my home directory and
link my programs against it, but it doesn't work</em>
<p>There are many different ways to accomplish this. Here is one way to
do this under Linux. Suppose your home directory is <code>/home/user.
</code>Then:</p>
<ul>
<li>Create a subdirectory, let's call it <code>myxml</code></li>
<li>unpack the libxml2 distribution into that subdirectory</li>
<li>chdir into the unpacked distribution
(<code>/home/user/myxml/libxml2 </code>)</li>
<li>configure the library using the "<code>--prefix</code>" switch,
specifying an installation subdirectory in
<code>/home/user/myxml</code>, e.g.
<p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other
configuration options}</p>
</li>
<li>now run <code>make</code> followed by <code>make install</code></li>
<li>At this point, the installation subdirectory contains the complete
"private" include files, library files and binary program files (e.g.
xmllint), located in
<p><code>/home/user/myxml/xmlinst/lib,
/home/user/myxml/xmlinst/include </code> and <code>
/home/user/myxml/xmlinst/bin</code></p>
respectively.</li>
<li>In order to use this "private" library, you should first add it to
the beginning of your default PATH (so that your own private program
files such as xmllint will be used instead of the normal system
ones). To do this, the Bash command would be
<p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p>
</li>
<li>Now suppose you have a program <code>test1.c</code> that you would
like to compile with your "private" library. Simply compile it using
the command
<p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p>
Note that, because your PATH has been set with <code>
/home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config
program which you just installed will be used instead of the system
default one, and this will <em>automatically</em> get the correct
libraries linked with your program.</li>
</ul>
</li>
<p></p>
<li><em>xmlDocDump() generates output on one line.</em>
<p>Libxml2 will not <strong>invent</strong> spaces in the content of a
document since <strong>all spaces in the content of a document are
significant</strong>. If you build a tree from the API and want
indentation:</p>
<ol>
<li>the correct way is to generate those yourself too.</li>
<li>the dangerous way is to ask libxml2 to add those blanks to your
content <strong>modifying the content of your document in the
process</strong>. The result may not be what you expect. There is
<strong>NO</strong> way to guarantee that such a modification won't
affect other parts of the content of your document. See <a href="http://xmlsoft.org/html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault
()</a> and <a href="http://xmlsoft.org/html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile
()</a></li>
</ol>
</li>
<p></p>
<li><em>Extra nodes in the document:</em>
<p><em>For an XML file as below:</em></p>
<pre>&lt;?xml version="1.0"?&gt;
&lt;PLAN xmlns="http://www.argus.ca/autotest/1.0/"&gt;
&lt;NODE CommFlag="0"/&gt;
&lt;NODE CommFlag="1"/&gt;
&lt;/PLAN&gt;</pre>
<p><em>after parsing it with the function
pxmlDoc=xmlParseFile(...);</em></p>
<p><em>I want to the get the content of the first node (node with the
CommFlag="0")</em></p>
<p><em>so I did it as following;</em></p>
<pre>xmlNodePtr pnode;
pnode=pxmlDoc-&gt;children-&gt;children;</pre>
<p><em>but it does not work. If I change it to</em></p>
<pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre>
<p><em>then it works. Can someone explain it to me.</em></p>
<p></p>
<p>In XML all characters in the content of the document are significant
<strong>including blanks and formatting line breaks</strong>.</p>
<p>The extra nodes you are wondering about are just that, text nodes with
the formatting spaces which are part of the document but that people tend
to forget. There is a function <a href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault
()</a> to remove those at parse time, but that's an heuristic, and its
use should be limited to cases where you are certain there is no
mixed-content in the document.</p>
</li>
<li><em>I get compilation errors of existing code like when accessing
<strong>root</strong> or <strong>child fields</strong> of nodes.</em>
<p>You are compiling code developed for libxml version 1 and using a
libxml2 development environment. Either switch back to libxml v1 devel or
even better fix the code to compile with libxml2 (or both) by <a href="upgrade.html">following the instructions</a>.</p>
</li>
<li><em>I get compilation errors about non existing
<strong>xmlRootNode</strong> or <strong>xmlChildrenNode</strong>
fields.</em>
<p>The source code you are using has been <a href="upgrade.html">upgraded</a> to be able to compile with both libxml
and libxml2, but you need to install a more recent version:
libxml(-devel) &gt;= 1.8.8 or libxml2(-devel) &gt;= 2.1.0</p>
</li>
<li><em>Random crashes in threaded applications</em>
<p>Read and follow all advices on the <a href="threads.html">thread
safety</a> page, and make 100% sure you never call xmlCleanupParser()
while the library or an XML document might still be in use by another
thread.</p>
</li>
<li><em>The example provided in the web page does not compile.</em>
<p>It's hard to maintain the documentation in sync with the code
&lt;grin/&gt; ...</p>
<p>Check the previous points 1/ and 2/ raised before, and please send
patches.</p>
</li>
<li><em>Where can I get more examples and information than provided on the
web page?</em>
<p>Ideally a libxml2 book would be nice. I have no such plan ... But you
can:</p>
<ul>
<li>check more deeply the <a href="html/libxml-lib.html">existing
generated doc</a></li>
<li>have a look at <a href="examples/index.html">the set of
examples</a>.</li>
<li>look for examples of use for libxml2 function using the Gnome code
or by asking on Google.</li>
<li><a href="http://svn.gnome.org/viewvc/libxml2/trunk/">Browse
the libxml2 source</a> , I try to write code as clean and documented
as possible, so looking at it may be helpful. In particular the code
of <a href="http://svn.gnome.org/viewvc/libxml2/trunk/xmllint.c?view=markup">xmllint.c</a> and of the various testXXX.c test programs should
provide good examples of how to do things with the library.</li>
</ul>
</li>
<p></p>
<li><em>What about C++ ?</em>
<p>libxml2 is written in pure C in order to allow easy reuse on a number
of platforms, including embedded systems. I don't intend to convert to
C++.</p>
<p>There is however a C++ wrapper which may fulfill your needs:</p>
<ul>
<li>by Ari Johnson &lt;ari@btigate.com&gt;:
<p>Website: <a href="http://libxmlplusplus.sourceforge.net/">http://libxmlplusplus.sourceforge.net/</a></p>
<p>Download: <a href="http://sourceforge.net/project/showfiles.php?group_id=12999">http://sourceforge.net/project/showfiles.php?group_id=12999</a></p>
</li>
</ul>
</li>
<li><em>How to validate a document a posteriori ?</em>
<p>It is possible to validate documents which had not been validated at
initial parsing time or documents which have been built from scratch
using the API. Use the <a href="http://xmlsoft.org/html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd()</a>
function. It is also possible to simply add a DTD to an existing
document:</p>
<pre>xmlDocPtr doc; /* your existing document */
xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
dtd-&gt;name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */
doc-&gt;intSubset = dtd;
if (doc-&gt;children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
else xmlAddPrevSibling(doc-&gt;children, (xmlNodePtr)dtd);
</pre>
</li>
<li><em>So what is this funky "xmlChar" used all the time?</em>
<p>It is a null terminated sequence of utf-8 characters. And only utf-8!
You need to convert strings encoded in different ways to utf-8 before
passing them to the API. This can be accomplished with the iconv library
for instance.</p>
</li>
<li>etc ...</li>
</ol><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

@ -1,356 +0,0 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = . devhelp examples
# The top-level SGML file.
DOC_MAIN_XML_FILE=gnome-xml.xml
# The directory containing the source code (if it contains documentation).
DOC_SOURCE_DIR=..
# A file in win32 depends upon one of the doc files
WIN32_DIR=$(top_srcdir)/win32
PAGES= architecture.html bugs.html contribs.html docs.html DOM.html \
downloads.html entities.html example.html help.html index.html \
interface.html intro.html library.html namespaces.html news.html \
tree.html xmldtd.html XMLinfo.html XSLT.html
APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
APIsymbols.html APIchunk0.html
if REBUILD_DOCS
EXTRA_DIST_wc = xmlcatalog_man.xml $(wildcard tutorial/*.html) \
$(wildcard tutorial/*.c) $(wildcard tutorial/*.pdf) \
$(wildcard tutorial/images/*.png) \
$(wildcard tutorial/images/callouts/*.png) $(wildcard API*.html) \
$(wildcard *.1) $(wildcard *.xsl) $(wildcard *.html) \
$(wildcard *.gif) w3c.png $(wildcard html/*.html) \
$(wildcard html/*.png) libxml2-api.xml index.py search.php \
apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \
README.docs symbols.xml
endif
# Expanded form of EXTRA_DIST_wc
#
EXTRA_DIST = \
APIchunk0.html \
APIchunk1.html \
APIchunk2.html \
APIchunk3.html \
APIchunk4.html \
APIchunk5.html \
APIchunk6.html \
APIchunk7.html \
APIchunk8.html \
APIchunk9.html \
APIchunk10.html \
APIchunk11.html \
APIchunk12.html \
APIchunk13.html \
APIchunk14.html \
APIchunk15.html \
APIchunk16.html \
APIchunk17.html \
APIchunk18.html \
APIchunk19.html \
APIchunk20.html \
APIchunk21.html \
APIchunk22.html \
APIchunk23.html \
APIchunk24.html \
APIchunk25.html \
APIchunk26.html \
APIchunk27.html \
APIchunk28.html \
APIchunk29.html \
APIconstructors.html \
APIfiles.html \
APIfunctions.html \
APIsymbols.html \
ChangeLog.xsl \
DOM.gif \
DOM.html \
FAQ.html \
Libxml2-Logo-180x168.gif \
Libxml2-Logo-90x34.gif \
README.docs \
XMLinfo.html \
XSLT.html \
api.xsl \
apibuild.py \
architecture.html \
bugs.html \
catalog.gif \
catalog.html \
checkapisym.xsl \
contribs.html \
docs.html \
downloads.html \
elfgcchack.xsl \
encoding.html \
entities.html \
example.html \
guidelines.html \
help.html \
html/book1.html \
html/home.png \
html/index.html \
html/left.png \
html/libxml-DOCBparser.html \
html/libxml-HTMLparser.html \
html/libxml-HTMLtree.html \
html/libxml-SAX.html \
html/libxml-SAX2.html \
html/libxml-c14n.html \
html/libxml-catalog.html \
html/libxml-chvalid.html \
html/libxml-debugXML.html \
html/libxml-dict.html \
html/libxml-encoding.html \
html/libxml-entities.html \
html/libxml-globals.html \
html/libxml-hash.html \
html/libxml-lib.html \
html/libxml-list.html \
html/libxml-nanoftp.html \
html/libxml-nanohttp.html \
html/libxml-parser.html \
html/libxml-parserInternals.html \
html/libxml-pattern.html \
html/libxml-relaxng.html \
html/libxml-schemasInternals.html \
html/libxml-schematron.html \
html/libxml-threads.html \
html/libxml-tree.html \
html/libxml-uri.html \
html/libxml-valid.html \
html/libxml-xinclude.html \
html/libxml-xlink.html \
html/libxml-xmlIO.html \
html/libxml-xmlautomata.html \
html/libxml-xmlerror.html \
html/libxml-xmlexports.html \
html/libxml-xmlmemory.html \
html/libxml-xmlmodule.html \
html/libxml-xmlreader.html \
html/libxml-xmlregexp.html \
html/libxml-xmlsave.html \
html/libxml-xmlschemas.html \
html/libxml-xmlschemastypes.html \
html/libxml-xmlstring.html \
html/libxml-xmlunicode.html \
html/libxml-xmlversion.html \
html/libxml-xmlwriter.html \
html/libxml-xpath.html \
html/libxml-xpathInternals.html \
html/libxml-xpointer.html \
html/right.png \
html/up.png \
index.html \
index.py \
interface.html \
intro.html \
library.html \
libxml.gif \
libxml2-api.xml \
libxml2.xsa \
namespaces.html \
newapi.xsl \
news.html \
news.xsl \
python.html \
redhat.gif \
search.php \
searches.html \
searches.xsl \
site.xsl \
smallfootonly.gif \
structure.gif \
symbols.xml \
syms.xsl \
threads.html \
tree.html \
tutorial/apa.html \
tutorial/apb.html \
tutorial/apc.html \
tutorial/apd.html \
tutorial/ape.html \
tutorial/apf.html \
tutorial/apg.html \
tutorial/aph.html \
tutorial/api.html \
tutorial/ar01s02.html \
tutorial/ar01s03.html \
tutorial/ar01s04.html \
tutorial/ar01s05.html \
tutorial/ar01s06.html \
tutorial/ar01s07.html \
tutorial/ar01s08.html \
tutorial/ar01s09.html \
tutorial/images/blank.png \
tutorial/images/callouts/1.png \
tutorial/images/callouts/10.png \
tutorial/images/callouts/2.png \
tutorial/images/callouts/3.png \
tutorial/images/callouts/4.png \
tutorial/images/callouts/5.png \
tutorial/images/callouts/6.png \
tutorial/images/callouts/7.png \
tutorial/images/callouts/8.png \
tutorial/images/callouts/9.png \
tutorial/images/caution.png \
tutorial/images/draft.png \
tutorial/images/home.png \
tutorial/images/important.png \
tutorial/images/next.png \
tutorial/images/note.png \
tutorial/images/prev.png \
tutorial/images/tip.png \
tutorial/images/toc-blank.png \
tutorial/images/toc-minus.png \
tutorial/images/toc-plus.png \
tutorial/images/up.png \
tutorial/images/warning.png \
tutorial/includeaddattribute.c \
tutorial/includeaddkeyword.c \
tutorial/includeconvert.c \
tutorial/includegetattribute.c \
tutorial/includekeyword.c \
tutorial/includexpath.c \
tutorial/index.html \
tutorial/ix01.html \
tutorial/xmltutorial.pdf \
upgrade.html \
w3c.png \
wiki.xsl \
xml.html \
xmlcatalog.1 \
xmlcatalog_man.html \
xmlcatalog_man.xml \
xmldtd.html \
xmlio.html \
xmllint.1 \
xmllint.html \
xmllint.xml \
xmlmem.html \
xmlreader.html \
xsa.xsl
man_MANS = xmllint.1 xmlcatalog.1
if REBUILD_DOCS
docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl
web: $(PAGES) xmllint.html xmlcatalog_man.html
../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the elfgcchack.h header" ; \
$(XSLTPROC) --nonet $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml > elfgcchack.h ; \
if [ "`diff -q elfgcchack.h ../elfgcchack.h`" ] ; then \
echo "updating ../elfgcchack.h"; \
cp elfgcchack.h ../elfgcchack.h; \
fi ; rm -f elfgcchack.h ; fi );
$(PAGES): xml.html $(srcdir)/site.xsl
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the HTML Web pages from xml.html" ; \
$(XSLTPROC) --nonet --html --path $(srcdir) $(srcdir)/site.xsl $(srcdir)/xml.html > index.html ; fi );
-@(if [ -x $(XMLLINT) ] ; then \
echo "Validating the HTML Web pages" ; \
$(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
$(top_builddir)/NEWS: $(srcdir)/news.xsl $(srcdir)/news.html
-@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet $(srcdir)/news.xsl $(srcdir)/news.html > $(top_builddir)/NEWS ; fi );
libxml2.xsa: $(srcdir)/xsa.xsl $(srcdir)/news.html
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the NEWS file" ; \
$(XSLTPROC) --nonet $(srcdir)/xsa.xsl $(srcdir)/news.html > libxml2.xsa ; fi );
$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(srcdir)/site.xsl $(srcdir)/api.xsl
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \
$(XSLTPROC) --nonet --html $(srcdir)/api.xsl \
$(srcdir)/xml.html ; fi );
-@(if [ -x $(XMLLINT) ] ; then \
echo "Validating the HTML API pages" ; \
$(XMLLINT) --nonet --valid --noout API*.html ; fi );
$(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the HTML pages from the XML API" ; \
$(XSLTPROC) --nonet $(srcdir)/newapi.xsl $(srcdir)/libxml2-api.xml ; fi )
-@(if [ -x $(XMLLINT) ] ; then \
echo "Validating the resulting XHTML pages" ; \
$(XMLLINT) --nonet --valid --noout html/*.html ; fi );
wiki: libxml2-api.xml $(srcdir)/wiki.xsl
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the wiki HTML pages from the XML API" ; \
$(XSLTPROC) --nonet $(srcdir)/wiki.xsl $(srcdir)/libxml2-api.xml; fi )
$(WIN32_DIR)/libxml2.def.src: libxml2-api.xml
-@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \
--nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi )
source_file_deps = \
$(filter-out %/xmlversion.h, $(wildcard $(top_srcdir)/include/libxml/*.h)) \
$(top_srcdir)/include/libxml/xmlversion.h.in \
$(wildcard $(top_srcdir)/*.c)
libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl $(source_file_deps)
test -f $(top_srcdir)/include/libxml/xmlversion.h
(cd $(srcdir) && ./apibuild.py)
($(XSLTPROC) $(srcdir)/checkapisym.xsl $(srcdir)/libxml2-api.xml)
($(XSLTPROC) -o ../libxml2.syms $(srcdir)/syms.xsl $(srcdir)/symbols.xml)
-@(cd .. ; $(MAKE) rebuild_testapi)
xmllint.1: xmllint.xml
-@($(XSLTPROC) --nonet xmllint.xml)
xmllint.html: xmllint.xml
-@($(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl xmllint.xml)
xmlcatalog.1: xmlcatalog_man.xml
-@($(XSLTPROC) --nonet xmlcatalog_man.xml)
xmlcatalog_man.html: xmlcatalog_man.xml
-@($(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl xmlcatalog_man.xml)
check-extra-dist:
for f in $(EXTRA_DIST_wc) ; do echo $$f; done | sort -u >tmp.EXTRA_DIST_wc
for f in $(EXTRA_DIST) ; do echo $$f; done | sort >tmp.EXTRA_DIST
diff -u tmp.EXTRA_DIST_wc tmp.EXTRA_DIST
rm -f tmp.EXTRA_DIST_wc tmp.EXTRA_DIST
endif
clean-local:
rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
maintainer-clean-local: clean-local
rm -rf libxml-decl-list.txt libxml-decl.txt
rebuild: api docs
install-data-local:
$(MKDIR_P) $(DESTDIR)$(HTML_DIR)
-$(INSTALL) -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
$(MKDIR_P) $(DESTDIR)$(HTML_DIR)/html
-$(INSTALL) -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
-$(INSTALL) -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
$(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial
-$(INSTALL) -m 0644 $(srcdir)/tutorial/*.* \
$(DESTDIR)$(HTML_DIR)/tutorial
$(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images
-$(INSTALL) -m 0644 $(srcdir)/tutorial/images/*.* \
$(DESTDIR)$(HTML_DIR)/tutorial/images
$(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
-$(INSTALL) -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
$(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
.PHONY: docs api web wiki rebuild

@ -1,24 +0,0 @@
XML toolkit from the GNOME project
Full documentation is available on-line at
http://xmlsoft.org/
This code is released under the MIT Licence see the Copyright file.
To report bugs, follow the instructions at:
http://xmlsoft.org/bugs.html
A mailing-list xml@gnome.org is available, to subscribe:
http://mail.gnome.org/mailman/listinfo/xml
The list archive is at:
http://mail.gnome.org/archives/xml/
All technical answers asked privately will be automatically answered on
the list and archived for public access unless pricacy is explicitly
required and justified.
Daniel Veillard
$Id$

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="https://gitlab.gnome.org/GNOME/libxml2/issues">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for
markup-based structured documents. Here is <a name="example" id="example">an example XML
document</a>:</p><pre>&lt;?xml version="1.0"?&gt;
&lt;EXAMPLE prop1="gnome is great" prop2="&amp;amp; linux too"&gt;
&lt;head&gt;
&lt;title&gt;Welcome to Gnome&lt;/title&gt;
&lt;/head&gt;
&lt;chapter&gt;
&lt;title&gt;The Linux adventure&lt;/title&gt;
&lt;p&gt;bla bla bla ...&lt;/p&gt;
&lt;image href="linus.gif"/&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;/chapter&gt;
&lt;/EXAMPLE&gt;</pre><p>The first line specifies that it is an XML document and gives useful
information about its encoding. Then the rest of the document is a text
format whose structure is specified by tags between brackets. <strong>Each
tag opened has to be closed</strong>. XML is pedantic about this. However, if
a tag is empty (no content), a single tag can serve as both the opening and
closing tag if it ends with <code>/&gt;</code> rather than with
<code>&gt;</code>. Note that, for example, the image tag has no content (just
an attribute) and is closed by ending the tag with <code>/&gt;</code>.</p><p>XML can be applied successfully to a wide range of tasks, ranging from
long term structured document maintenance (where it follows the steps of
SGML) to simple data encoding mechanisms like configuration file formatting
(glade), spreadsheets (gnumeric), or even shorter lived documents such as
WebDAV where it is used to encode remote calls between a client and a
server.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="https://gitlab.gnome.org/GNOME/libxml2/issues">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a
language for transforming XML documents into other XML documents (or
HTML/textual output).</p><p>A separate library called libxslt is available implementing XSLT-1.0 for
libxml2. This module "libxslt" too can be found in the Gnome SVN base.</p><p>You can check the progresses on the libxslt <a href="http://xmlsoft.org/XSLT/ChangeLog.html">Changelog</a>.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

@ -1,394 +0,0 @@
<?xml version="1.0"?>
<!-- this stylesheet builds the API*.html , it works based on libxml2-refs.xml
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
exclude-result-prefixes="exsl">
<!-- Import the rest of the site stylesheets -->
<xsl:import href="site.xsl"/>
<!-- Generate XHTML-1.0 transitional -->
<xsl:output method="xml" encoding="UTF-8" indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:variable name="href_base" select="''"/>
<xsl:variable name="apirefs" select="document('libxml2-refs.xml')"/>
<xsl:variable name="module" select="$apirefs/apirefs/@name"/>
<xsl:key name="refhref" match="reference" use="@name"/>
<xsl:template match="ref" mode="anchor">
<xsl:variable name="name" select="@name"/>
<xsl:for-each select="document('libxml2-refs.xml')">
<a href="{key('refhref', $name)/@href}"><xsl:value-of select="$name"/></a><br/>
</xsl:for-each>
</xsl:template>
<xsl:template match="type" mode="reflist">
<h2>Type <xsl:value-of select="@name"/>:</h2>
<p>
<xsl:for-each select="ref">
<xsl:apply-templates mode="anchor" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="letter" mode="reflist">
<h2>Letter <xsl:value-of select="@name"/>:</h2>
<p>
<xsl:for-each select="ref">
<xsl:apply-templates mode="anchor" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="file" mode="reflist">
<h2><a name="{@name}">Module <xsl:value-of select="@name"/></a>:</h2>
<p>
<xsl:for-each select="ref">
<xsl:apply-templates mode="anchor" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="letter" mode="wordlist">
<h2>Letter <xsl:value-of select="@name"/>:</h2>
<dl>
<xsl:for-each select="word">
<dt><xsl:value-of select="@name"/></dt>
<dd>
<xsl:for-each select="ref">
<xsl:apply-templates mode="anchor" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</dd>
</xsl:for-each>
</dl>
</xsl:template>
<xsl:template match="constructors">
<xsl:message>Generating API Constructors</xsl:message>
<xsl:variable name="title">List of constructors for <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="APIconstructors.html" method="xml" encoding="UTF-8"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates mode="reflist" select="type"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="files">
<xsl:message>Generating API List of synbols per file</xsl:message>
<xsl:variable name="title">List of Symbols per Module for <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="APIfiles.html" method="xml" encoding="UTF-8"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates mode="reflist" select="file"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="functions">
<xsl:message>Generating API Functions by Type</xsl:message>
<xsl:variable name="title">List of function manipulating types in <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="APIfunctions.html" method="xml" encoding="UTF-8"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates mode="reflist" select="type"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="alpha">
<xsl:message>Generating API Alphabetic list</xsl:message>
<xsl:variable name="title">Alphabetic List of Symbols in <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="APIsymbols.html" method="xml" encoding="UTF-8"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates mode="reflist" select="letter"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template name="apichunks">
<h2 align="center">
<xsl:for-each select="/apirefs/index/chunks/chunk">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="start" select="@start"/>
<xsl:variable name="end" select="@end"/>
<xsl:variable name="block" select="concat($start, '-', $end)"/>
<a href="API{$name}.html"><xsl:value-of select="$block"/></a>
<xsl:text>
</xsl:text>
</xsl:for-each>
</h2>
</xsl:template>
<xsl:template match="chunk">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="start" select="@start"/>
<xsl:variable name="end" select="@end"/>
<xsl:variable name="block" select="concat($start, '-', $end)"/>
<xsl:variable name="target" select="/apirefs/index/chunk[@name = $name]"/>
<xsl:variable name="title">API Alphabetic Index <xsl:value-of select="$block"/> for <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="API{$name}.html" method="xml" encoding="UTF-8"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:call-template name="apichunks"/>
<xsl:apply-templates mode="wordlist"
select="$target/letter"/>
<xsl:call-template name="apichunks"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="index">
<xsl:message>Generating API Index</xsl:message>
<xsl:apply-templates select="chunks/chunk"/>
</xsl:template>
<xsl:template match="apirefs">
<xsl:message>Generating API Cross References</xsl:message>
<xsl:apply-templates select="constructors"/>
<xsl:apply-templates select="functions"/>
<xsl:apply-templates select="alpha"/>
<xsl:apply-templates select="files"/>
<xsl:apply-templates select="index"/>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates select="$apirefs/apirefs"/>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because one or more lines are too long

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="https://gitlab.gnome.org/GNOME/libxml2/issues">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Well, bugs or missing features are always possible, and I will make a
point of fixing them in a timely fashion. The best way to report a bug is to
use the <a href="https://gitlab.gnome.org/GNOME/libxml2/issues">Gnome
bug tracking database</a> (make sure to use the "libxml2" module name). I
look at reports there regularly and it's good to have a reminder when a bug
is still open. Be sure to specify that the bug is for the package libxml2.</p><p>For small problems you can try to get help on IRC, the #xml channel on
irc.gnome.org (port 6667) usually has a few people subscribed which may help
(but there is no guarantee and if a real issue is raised it should go on the
mailing-list for archival).</p><p>There is also a mailing-list <a href="mailto:xml@gnome.org">xml@gnome.org</a> for libxml, with an <a href="http://mail.gnome.org/archives/xml/">on-line archive</a> (<a href="http://xmlsoft.org/messages">old</a>). To subscribe to this list,
please visit the <a href="http://mail.gnome.org/mailman/listinfo/xml">associated Web</a> page and
follow the instructions. <strong>Do not send code, I won't debug it</strong>
(but patches are really appreciated!).</p><p>Please note that with the current amount of virus and SPAM, sending mail
to the list without being subscribed won't work. There is *far too many
bounces* (in the order of a thousand a day !) I cannot approve them manually
anymore. If your mail to the list bounced waiting for administrator approval,
it is LOST ! Repost it and fix the problem triggering the error. Also please
note that <span style="color: #FF0000; background-color: #FFFFFF">emails with
a legal warning asking to not copy or redistribute freely the information
they contain</span> are <strong>NOT</strong> acceptable for the mailing-list,
such mail will as much as possible be discarded automatically, and are less
likely to be answered if they made it to the list, <strong>DO NOT</strong>
post to the list from an email address where such legal requirements are
automatically added, get private paying support if you can't share
information.</p><p>Check the following <strong><span style="color: #FF0000">before
posting</span></strong>:</p><ul>
<li>Read the <a href="FAQ.html">FAQ</a> and <a href="search.php">use the
search engine</a> to get information related to your problem.</li>
<li>Make sure you are <a href="ftp://xmlsoft.org/libxml2/">using a recent
version</a>, and that the problem still shows up in a recent version.</li>
<li>Check the <a href="http://mail.gnome.org/archives/xml/">list
archives</a> to see if the problem was reported already. In this case
there is probably a fix available, similarly check the <a href="https://gitlab.gnome.org/GNOME/libxml2/issues">registered
open bugs</a>.</li>
<li>Make sure you can reproduce the bug with xmllint or one of the test
programs found in source in the distribution.</li>
<li>Please send the command showing the error as well as the input (as an
attachment)</li>
</ul><p>Then send the bug with associated information to reproduce it to the <a href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
related I will approve it. Please do not send mail to me directly, it makes
things really hard to track and in some cases I am not the best person to
answer a given question, ask on the list.</p><p>To <span style="color: #E50000">be really clear about support</span>:</p><ul>
<li>Support or help <span style="color: #E50000">requests MUST be sent to
the list or the bug tracker</span> in case of problems, so that the Question
and Answers can be shared publicly. Failing to do so carries the implicit
message "I want free support but I don't want to share the benefits with
others" and is not welcome. I will automatically Carbon-Copy the
xml@gnome.org mailing list for any technical reply made about libxml2 or
libxslt.</li>
<li>There is <span style="color: #E50000">no guarantee of support</span>. If
your question remains unanswered after a week, repost it, making sure you
gave all the detail needed and the information requested.</li>
<li>Failing to provide information as requested or double checking first
for prior feedback also carries the implicit message "the time of the
library maintainers is less valuable than my time" and might not be
welcome.</li>
</ul><p>Of course, bugs reported with a suggested patch for fixing them will
probably be processed faster than those without.</p><p>If you're looking for help, a quick look at <a href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually
provide the answer. I usually send source samples when answering libxml2
usage questions. The <a href="http://xmlsoft.org/html/book1.html">auto-generated documentation</a> is
not as polished as I would like (i need to learn more about DocBook), but
it's a good starting point.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

@ -1,62 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 2587 1875 1312 300 1275 1575 3900 2175
1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 2587 3900 1312 300 1275 3600 3900 4200
1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 10987 1875 1312 300 9675 1575 12300 2175
1 2 0 1 0 7 50 0 -1 0.000 1 0.0000 10987 3900 1312 300 9675 3600 12300 4200
2 4 0 2 -1 7 50 0 -1 6.000 0 0 7 0 0 5
4350 5925 4350 4650 3375 4650 3375 5925 4350 5925
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
1275 1875 1275 3900
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
3900 1875 3900 3900
2 3 0 1 0 1 50 0 20 0.000 0 0 0 0 0 7
1685 3675 1945 3525 1945 3225 1685 3075 1425 3225 1425 3525
1685 3675
2 3 0 1 0 1 50 0 20 0.000 0 0 0 0 0 7
2250 3000 2510 2850 2510 2550 2250 2400 1990 2550 1990 2850
2250 3000
2 4 0 1 0 11 50 0 20 0.000 0 0 7 0 0 5
3375 2625 3000 2625 3000 2325 3375 2325 3375 2625
2 4 0 1 0 17 50 0 20 0.000 0 0 7 0 0 5
3375 3000 3000 3000 3000 2700 3375 2700 3375 3000
2 4 0 1 0 13 50 0 20 0.000 0 0 7 0 0 5
3825 2850 3450 2850 3450 2550 3825 2550 3825 2850
2 1 0 2 4 7 50 0 -1 6.000 0 0 -1 1 0 2
1 0 2.00 120.00 240.00
2550 2625 3000 2475
2 1 0 2 4 7 50 0 -1 6.000 0 0 -1 1 0 2
1 0 2.00 120.00 240.00
3811 5007 1875 3600
2 1 0 2 -1 7 50 0 -1 0.000 0 0 -1 1 0 4
1 0 2.00 120.00 240.00
3825 5025 5250 5025 9075 4125 11325 2625
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
9675 1875 9675 3900
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
12300 1875 12300 3900
2 4 0 1 0 11 50 0 20 0.000 0 0 7 0 0 5
11775 2625 11400 2625 11400 2325 11775 2325 11775 2625
2 4 0 1 0 17 50 0 20 0.000 0 0 7 0 0 5
11775 3000 11400 3000 11400 2700 11775 2700 11775 3000
2 4 0 1 0 13 50 0 20 0.000 0 0 7 0 0 5
12225 2850 11850 2850 11850 2550 12225 2550 12225 2850
3 3 0 1 -1 7 50 0 -1 4.000 0 0 0 11
7725 2625 6450 2700 5775 3525 5700 4200 5925 4800 6600 5475
7350 5625 8100 5400 8550 4725 8625 3975 8400 3075
-1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
-1.000 -1.000 -1.000
3 2 0 2 4 7 50 0 -1 6.000 0 1 0 3
1 0 2.00 120.00 240.00
1575 3150 1575 2775 1950 2700
0.000 -1.000 0.000
4 0 -1 50 0 2 35 0.0000 4 345 1740 6375 4200 Internet\001
4 0 0 50 0 0 18 0.0000 4 255 1770 2025 3450 /etc/xml/catalog\001
4 0 -1 50 0 0 22 0.0000 4 255 810 3825 4500 XML\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

@ -1,261 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Catalog support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="https://gitlab.gnome.org/GNOME/libxml2/issues">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol>
<li><a href="General2">General overview</a></li>
<li><a href="#definition">The definition</a></li>
<li><a href="#Simple">Using catalogs</a></li>
<li><a href="#Some">Some examples</a></li>
<li><a href="#reference">How to tune catalog usage</a></li>
<li><a href="#validate">How to debug catalog processing</a></li>
<li><a href="#Declaring">How to create and maintain catalogs</a></li>
<li><a href="#implemento">The implementor corner quick review of the
API</a></li>
<li><a href="#Other">Other resources</a></li>
</ol><h3><a name="General2" id="General2">General overview</a></h3><p>What is a catalog? Basically it's a lookup mechanism used when an entity
(a file or a remote resource) references another entity. The catalog lookup
is inserted between the moment the reference is recognized by the software
(XML parser, stylesheet processing, or even images referenced for inclusion
in a rendering) and the time where loading that resource is actually
started.</p><p>It is basically used for 3 things:</p><ul>
<li>mapping from "logical" names, the public identifiers and a more
concrete name usable for download (and URI). For example it can associate
the logical name
<p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p>
<p>of the DocBook 4.1.2 XML DTD with the actual URL where it can be
downloaded</p>
<p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p>
</li>
<li>remapping from a given URL to another one, like an HTTP indirection
saying that
<p>"http://www.oasis-open.org/committes/tr.xsl"</p>
<p>should really be looked at</p>
<p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p>
</li>
<li>providing a local cache mechanism allowing to load the entities
associated to public identifiers or remote resources, this is a really
important feature for any significant deployment of XML or SGML since it
allows to avoid the aleas and delays associated to fetching remote
resources.</li>
</ul><h3><a name="definition" id="definition">The definitions</a></h3><p>Libxml, as of 2.4.3 implements 2 kind of catalogs:</p><ul>
<li>the older SGML catalogs, the official spec is SGML Open Technical
Resolution TR9401:1997, but is better understood by reading <a href="http://www.jclark.com/sp/catalog.htm">the SP Catalog page</a> from
James Clark. This is relatively old and not the preferred mode of
operation of libxml.</li>
<li><a href="http://www.oasis-open.org/committees/entity/spec.html">XML
Catalogs</a> is far more flexible, more recent, uses an XML syntax and
should scale quite better. This is the default option of libxml.</li>
</ul><p></p><h3><a name="Simple" id="Simple">Using catalog</a></h3><p>In a normal environment libxml2 will by default check the presence of a
catalog in /etc/xml/catalog, and assuming it has been correctly populated,
the processing is completely transparent to the document user. To take a
concrete example, suppose you are authoring a DocBook document, this one
starts with the following DOCTYPE definition:</p><pre>&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN"
"http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd"&gt;</pre><p>When validating the document with libxml, the catalog will be
automatically consulted to lookup the public identifier "-//Norman Walsh//DTD
DocBk XML V3.1.4//EN" and the system identifier
"http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd", and if these entities have
been installed on your system and the catalogs actually point to them, libxml
will fetch them from the local disk.</p><p style="font-size: 10pt"><strong>Note</strong>: Really don't use this
DOCTYPE example it's a really old version, but is fine as an example.</p><p>Libxml2 will check the catalog each time that it is requested to load an
entity, this includes DTD, external parsed entities, stylesheets, etc ... If
your system is correctly configured all the authoring phase and processing
should use only local files, even if your document stays portable because it
uses the canonical public and system ID, referencing the remote document.</p><h3><a name="Some" id="Some">Some examples:</a></h3><p>Here is a couple of fragments from XML Catalogs used in libxml2 early
regression tests in <code>test/catalogs</code> :</p><pre>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE catalog PUBLIC
"-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
&lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
...</pre><p>This is the beginning of a catalog for DocBook 4.1.2, XML Catalogs are
written in XML, there is a specific namespace for catalog elements
"urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry in this
catalog is a <code>public</code> mapping it allows to associate a Public
Identifier with an URI.</p><pre>...
&lt;rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/"
rewritePrefix="file:///usr/share/xml/docbook/"/&gt;
...</pre><p>A <code>rewriteSystem</code> is a very powerful instruction, it says that
any URI starting with a given prefix should be looked at another URI
constructed by replacing the prefix with an new one. In effect this acts like
a cache system for a full area of the Web. In practice it is extremely useful
with a file prefix if you have installed a copy of those resources on your
local system.</p><pre>...
&lt;delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //"
catalog="file:///usr/share/xml/docbook.xml"/&gt;
&lt;delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML"
catalog="file:///usr/share/xml/docbook.xml"/&gt;
&lt;delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML"
catalog="file:///usr/share/xml/docbook.xml"/&gt;
&lt;delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/"
catalog="file:///usr/share/xml/docbook.xml"/&gt;
&lt;delegateURI uriStartString="http://www.oasis-open.org/docbook/"
catalog="file:///usr/share/xml/docbook.xml"/&gt;
...</pre><p>Delegation is the core features which allows to build a tree of catalogs,
easier to maintain than a single catalog, based on Public Identifier, System
Identifier or URI prefixes it instructs the catalog software to look up
entries in another resource. This feature allow to build hierarchies of
catalogs, the set of entries presented should be sufficient to redirect the
resolution of all DocBook references to the specific catalog in
<code>/usr/share/xml/docbook.xml</code> this one in turn could delegate all
references for DocBook 4.2.1 to a specific catalog installed at the same time
as the DocBook resources on the local machine.</p><h3><a name="reference" id="reference">How to tune catalog usage:</a></h3><p>The user can change the default catalog behaviour by redirecting queries
to its own set of catalogs, this can be done by setting the
<code>XML_CATALOG_FILES</code> environment variable to a list of catalogs, an
empty one should deactivate loading the default <code>/etc/xml/catalog</code>
default catalog</p><h3><a name="validate" id="validate">How to debug catalog processing:</a></h3><p>Setting up the <code>XML_DEBUG_CATALOG</code> environment variable will
make libxml2 output debugging information for each catalog operations, for
example:</p><pre>orchis:~/XML -&gt; xmllint --memory --noout test/ent2
warning: failed to load external entity "title.xml"
orchis:~/XML -&gt; export XML_DEBUG_CATALOG=
orchis:~/XML -&gt; xmllint --memory --noout test/ent2
Failed to parse catalog /etc/xml/catalog
Failed to parse catalog /etc/xml/catalog
warning: failed to load external entity "title.xml"
Catalogs cleanup
orchis:~/XML -&gt; </pre><p>The test/ent2 references an entity, running the parser from memory makes
the base URI unavailable and the the "title.xml" entity cannot be loaded.
Setting up the debug environment variable allows to detect that an attempt is
made to load the <code>/etc/xml/catalog</code> but since it's not present the
resolution fails.</p><p>But the most advanced way to debug XML catalog processing is to use the
<strong>xmlcatalog</strong> command shipped with libxml2, it allows to load
catalogs and make resolution queries to see what is going on. This is also
used for the regression tests:</p><pre>orchis:~/XML -&gt; ./xmlcatalog test/catalogs/docbook.xml \
"-//OASIS//DTD DocBook XML V4.1.2//EN"
http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
orchis:~/XML -&gt; </pre><p>For debugging what is going on, adding one -v flags increase the verbosity
level to indicate the processing done (adding a second flag also indicate
what elements are recognized at parsing):</p><pre>orchis:~/XML -&gt; ./xmlcatalog -v test/catalogs/docbook.xml \
"-//OASIS//DTD DocBook XML V4.1.2//EN"
Parsing catalog test/catalogs/docbook.xml's content
Found public match -//OASIS//DTD DocBook XML V4.1.2//EN
http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
Catalogs cleanup
orchis:~/XML -&gt; </pre><p>A shell interface is also available to debug and process multiple queries
(and for regression tests):</p><pre>orchis:~/XML -&gt; ./xmlcatalog -shell test/catalogs/docbook.xml \
"-//OASIS//DTD DocBook XML V4.1.2//EN"
&gt; help
Commands available:
public PublicID: make a PUBLIC identifier lookup
system SystemID: make a SYSTEM identifier lookup
resolve PublicID SystemID: do a full resolver lookup
add 'type' 'orig' 'replace' : add an entry
del 'values' : remove values
dump: print the current catalog state
debug: increase the verbosity level
quiet: decrease the verbosity level
exit: quit the shell
&gt; public "-//OASIS//DTD DocBook XML V4.1.2//EN"
http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
&gt; quit
orchis:~/XML -&gt; </pre><p>This should be sufficient for most debugging purpose, this was actually
used heavily to debug the XML Catalog implementation itself.</p><h3><a name="Declaring" id="Declaring">How to create and maintain</a> catalogs:</h3><p>Basically XML Catalogs are XML files, you can either use XML tools to
manage them or use <strong>xmlcatalog</strong> for this. The basic step is
to create a catalog the -create option provide this facility:</p><pre>orchis:~/XML -&gt; ./xmlcatalog --create tst.xml
&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/&gt;
orchis:~/XML -&gt; </pre><p>By default xmlcatalog does not overwrite the original catalog and save the
result on the standard output, this can be overridden using the -noout
option. The <code>-add</code> command allows to add entries in the
catalog:</p><pre>orchis:~/XML -&gt; ./xmlcatalog --noout --create --add "public" \
"-//OASIS//DTD DocBook XML V4.1.2//EN" \
http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml
orchis:~/XML -&gt; cat tst.xml
&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
&lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
&lt;/catalog&gt;
orchis:~/XML -&gt; </pre><p>The <code>-add</code> option will always take 3 parameters even if some of
the XML Catalog constructs (like nextCatalog) will have only a single
argument, just pass a third empty string, it will be ignored.</p><p>Similarly the <code>-del</code> option remove matching entries from the
catalog:</p><pre>orchis:~/XML -&gt; ./xmlcatalog --del \
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml
&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/&gt;
orchis:~/XML -&gt; </pre><p>The catalog is now empty. Note that the matching of <code>-del</code> is
exact and would have worked in a similar fashion with the Public ID
string.</p><p>This is rudimentary but should be sufficient to manage a not too complex
catalog tree of resources.</p><h3><a name="implemento" id="implemento">The implementor corner quick review of the
API:</a></h3><p>First, and like for every other module of libxml, there is an
automatically generated <a href="html/libxml-catalog.html">API page for
catalog support</a>.</p><p>The header for the catalog interfaces should be included as:</p><pre>#include &lt;libxml/catalog.h&gt;</pre><p>The API is voluntarily kept very simple. First it is not obvious that
applications really need access to it since it is the default behaviour of
libxml2 (Note: it is possible to completely override libxml2 default catalog
by using <a href="html/libxml-parser.html">xmlSetExternalEntityLoader</a> to
plug an application specific resolver).</p><p>Basically libxml2 support 2 catalog lists:</p><ul>
<li>the default one, global shared by all the application</li>
<li>a per-document catalog, this one is built if the document uses the
<code>oasis-xml-catalog</code> PIs to specify its own catalog list, it is
associated to the parser context and destroyed when the parsing context
is destroyed.</li>
</ul><p>the document one will be used first if it exists.</p><h4>Initialization routines:</h4><p>xmlInitializeCatalog(), xmlLoadCatalog() and xmlLoadCatalogs() should be
used at startup to initialize the catalog, if the catalog should be
initialized with specific values xmlLoadCatalog() or xmlLoadCatalogs()
should be called before xmlInitializeCatalog() which would otherwise do a
default initialization first.</p><p>The xmlCatalogAddLocal() call is used by the parser to grow the document
own catalog list if needed.</p><h4>Preferences setup:</h4><p>The XML Catalog spec requires the possibility to select default
preferences between public and system delegation,
xmlCatalogSetDefaultPrefer() allows this, xmlCatalogSetDefaults() and
xmlCatalogGetDefaults() allow to control if XML Catalogs resolution should
be forbidden, allowed for global catalog, for document catalog or both, the
default is to allow both.</p><p>And of course xmlCatalogSetDebug() allows to generate debug messages
(through the xmlGenericError() mechanism).</p><h4>Querying routines:</h4><p>xmlCatalogResolve(), xmlCatalogResolveSystem(), xmlCatalogResolvePublic()
and xmlCatalogResolveURI() are relatively explicit if you read the XML
Catalog specification they correspond to section 7 algorithms, they should
also work if you have loaded an SGML catalog with a simplified semantic.</p><p>xmlCatalogLocalResolve() and xmlCatalogLocalResolveURI() are the same but
operate on the document catalog list</p><h4>Cleanup and Miscellaneous:</h4><p>xmlCatalogCleanup() free-up the global catalog, xmlCatalogFreeLocal() is
the per-document equivalent.</p><p>xmlCatalogAdd() and xmlCatalogRemove() are used to dynamically modify the
first catalog in the global list, and xmlCatalogDump() allows to dump a
catalog state, those routines are primarily designed for xmlcatalog, I'm not
sure that exposing more complex interfaces (like navigation ones) would be
really useful.</p><p>The xmlParseCatalogFile() is a function used to load XML Catalog files,
it's similar as xmlParseFile() except it bypass all catalog lookups, it's
provided because this functionality may be useful for client tools.</p><h4>threaded environments:</h4><p>Since the catalog tree is built progressively, some care has been taken to
try to avoid troubles in multithreaded environments. The code is now thread
safe assuming that the libxml2 library has been compiled with threads
support.</p><p></p><h3><a name="Other" id="Other">Other resources</a></h3><p>The XML Catalog specification is relatively recent so there isn't much
literature to point at:</p><ul>
<li>You can find a good rant from Norm Walsh about <a href="http://www.arbortext.com/Think_Tank/XML_Resources/Issue_Three/issue_three.html">the
need for catalogs</a>, it provides a lot of context information even if
I don't agree with everything presented. Norm also wrote a more recent
article <a href="http://wwws.sun.com/software/xml/developers/resolver/article/">XML
entities and URI resolvers</a> describing them.</li>
<li>An <a href="http://home.ccil.org/~cowan/XML/XCatalog.html">old XML
catalog proposal</a> from John Cowan</li>
<li>The <a href="http://www.rddl.org/">Resource Directory Description
Language</a> (RDDL) another catalog system but more oriented toward
providing metadata for XML namespaces.</li>
<li>the page from the OASIS Technical <a href="http://www.oasis-open.org/committees/entity/">Committee on Entity
Resolution</a> who maintains XML Catalog, you will find pointers to the
specification update, some background and pointers to others tools
providing XML Catalog support</li>
<li>There is a <a href="buildDocBookCatalog">shell script</a> to generate
XML Catalogs for DocBook 4.1.2 . If it can write to the /etc/xml/
directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on
the resources found on the system. Otherwise it will just create
~/xmlcatalog and ~/dbkxmlcatalog and doing:
<p><code>export XML_CATALOG_FILES=$HOME/xmlcatalog</code></p>
<p>should allow to process DocBook documentations without requiring
network accesses for the DTD or stylesheets</p>
</li>
<li>I have uploaded <a href="ftp://xmlsoft.org/libxml2/test/dbk412catalog.tar.gz">a
small tarball</a> containing XML Catalogs for DocBook 4.1.2 which seems
to work fine for me too</li>
<li>The <a href="http://www.xmlsoft.org/xmlcatalog_man.html">xmlcatalog
manual page</a></li>
</ul><p>If you have suggestions for corrections or additions, simply contact
me:</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>Contributions</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Contributions</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="https://gitlab.gnome.org/GNOME/libxml2/issues">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><ul>
<li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of
patches, Gary Pennington worked on the validation API, threading support
and Solaris port.</li>
<li>John Fleck helps maintaining the documentation and man pages.</li>
<li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a> is now the
maintainer of the Windows port, <a href="http://www.zlatkovic.com/projects/libxml/index.html">he provides
binaries</a></li>
<li><a href="mailto:Gary.Pennington@sun.com">Gary Pennington</a> provides
<a href="http://garypennington.net/libxml2/">Solaris binaries</a></li>
<li><a href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt
Sergeant</a> developed <a href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for
libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML
application server</a></li>
<li><a href="mailto:fnatter@gmx.net">Felix Natter</a> and <a href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a> provide <a href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions
documentation</li>
<li><a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a> provided <a href="http://xmlsoft.org/messages/0488.html">man pages</a></li>
<li>there is a module for <a href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support
in OpenNSD/AOLServer</a></li>
<li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provided the
first version of libxml/libxslt <a href="http://www.rexx.com/~dkuhlman">wrappers for Python</a></li>
<li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
libxml2</a> with Kylix and Delphi and other Pascal compilers</li>
<li><a href="mailto:aleksey@aleksey.com">Aleksey Sanin</a> implemented the
<a href="http://www.w3.org/Signature/">XML Canonicalization and XML
Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a></li>
<li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> and
contributors maintain <a href="http://tclxml.sourceforge.net/">tcl
bindings for libxml2 and libxslt</a>, as well as <a href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for
xmllint and <a href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a>
a GUI for xsltproc.</li>
</ul><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>libxml2: </title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="index.html" title="libxml2 Reference Manual"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="index.html" title="libxml2 Reference Manual"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="u" href="index.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-DOCBparser.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">libxml2 API Modules</span>
</h2>
<p><a href="libxml2-DOCBparser.html">DOCBparser</a> - old DocBook SGML parser<br/><a href="libxml2-HTMLparser.html">HTMLparser</a> - interface for an HTML 4.0 non-verifying parser<br/><a href="libxml2-HTMLtree.html">HTMLtree</a> - specific APIs to process HTML tree, especially serialization<br/><a href="libxml2-SAX.html">SAX</a> - Old SAX version 1 handler, deprecated<br/><a href="libxml2-SAX2.html">SAX2</a> - SAX2 parser interface used to build the DOM tree<br/><a href="libxml2-c14n.html">c14n</a> - Provide Canonical XML and Exclusive XML Canonicalization<br/><a href="libxml2-catalog.html">catalog</a> - interfaces to the Catalog handling system<br/><a href="libxml2-chvalid.html">chvalid</a> - Unicode character range checking<br/><a href="libxml2-debugXML.html">debugXML</a> - Tree debugging APIs<br/><a href="libxml2-dict.html">dict</a> - string dictionary<br/><a href="libxml2-encoding.html">encoding</a> - interface for the encoding conversion functions<br/><a href="libxml2-entities.html">entities</a> - interface for the XML entities handling<br/><a href="libxml2-globals.html">globals</a> - interface for all global variables of the library<br/><a href="libxml2-hash.html">hash</a> - Chained hash tables<br/><a href="libxml2-list.html">list</a> - lists interfaces<br/><a href="libxml2-nanoftp.html">nanoftp</a> - minimal FTP implementation<br/><a href="libxml2-nanohttp.html">nanohttp</a> - minimal HTTP implementation<br/><a href="libxml2-parser.html">parser</a> - the core parser module<br/><a href="libxml2-parserInternals.html">parserInternals</a> - internals routines and limits exported by the parser.<br/><a href="libxml2-pattern.html">pattern</a> - pattern expression handling<br/><a href="libxml2-relaxng.html">relaxng</a> - implementation of the Relax-NG validation<br/><a href="libxml2-schemasInternals.html">schemasInternals</a> - internal interfaces for XML Schemas<br/><a href="libxml2-schematron.html">schematron</a> - XML Schemastron implementation<br/><a href="libxml2-threads.html">threads</a> - interfaces for thread handling<br/><a href="libxml2-tree.html">tree</a> - interfaces for tree manipulation<br/><a href="libxml2-uri.html">uri</a> - library of generic URI related routines<br/><a href="libxml2-valid.html">valid</a> - The DTD validation<br/><a href="libxml2-xinclude.html">xinclude</a> - implementation of XInclude<br/><a href="libxml2-xlink.html">xlink</a> - unfinished XLink detection module<br/><a href="libxml2-xmlIO.html">xmlIO</a> - interface for the I/O interfaces used by the parser<br/><a href="libxml2-xmlautomata.html">xmlautomata</a> - API to build regexp automata<br/><a href="libxml2-xmlerror.html">xmlerror</a> - error handling<br/><a href="libxml2-xmlexports.html">xmlexports</a> - macros for marking symbols as exportable/importable.<br/><a href="libxml2-xmlmemory.html">xmlmemory</a> - interface for the memory allocator<br/><a href="libxml2-xmlmodule.html">xmlmodule</a> - dynamic module loading<br/><a href="libxml2-xmlreader.html">xmlreader</a> - the XMLReader implementation<br/><a href="libxml2-xmlregexp.html">xmlregexp</a> - regular expressions handling<br/><a href="libxml2-xmlsave.html">xmlsave</a> - the XML document serializer<br/><a href="libxml2-xmlschemas.html">xmlschemas</a> - incomplete XML Schemas structure implementation<br/><a href="libxml2-xmlschemastypes.html">xmlschemastypes</a> - implementation of XML Schema Datatypes<br/><a href="libxml2-xmlstring.html">xmlstring</a> - set of routines to process strings<br/><a href="libxml2-xmlunicode.html">xmlunicode</a> - Unicode character APIs<br/><a href="libxml2-xmlversion.html">xmlversion</a> - compile-time version information<br/><a href="libxml2-xmlwriter.html">xmlwriter</a> - text writing API for XML<br/><a href="libxml2-xpath.html">xpath</a> - XML Path Language implementation<br/><a href="libxml2-xpathInternals.html">xpathInternals</a> - internal interfaces for XML Path Language implementation<br/><a href="libxml2-xpointer.html">xpointer</a> - API to handle XML Pointers<br/></p>
</body>
</html>

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>libxml2 Reference Manual</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="general.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">libxml2 Reference Manual</span>
</h2>
<p>Libxml2 is the XML C parser and toolkit developed for the Gnome project
(but usable outside of the Gnome platform), it is free software available
under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
License</a>. XML itself is a metalanguage to design markup languages, i.e.
text language where semantic and structure are added to the content using
extra "markup" information enclosed between angle brackets. HTML is the most
well-known markup language. Though the library is written in C <a href="http://xmlsoft.org/python.html">a variety of language bindings</a> make it available in
other environments.</p>
<p>Libxml2 implements a number of existing standards related to markup
languages:</p>
<ul>
<li>the XML standard: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li>
<li>Namespaces in XML: <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li>
<li>XML Base: <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li>
<li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
Uniform Resource Identifiers <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li>
<li>XML Path Language (XPath) 1.0: <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li>
<li>HTML4 parser: <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li>
<li>XML Pointer Language (XPointer) Version 1.0: <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li>
<li>XML Inclusions (XInclude) Version 1.0: <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li>
<li>ISO-8859-x encodings, as well as <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
[UTF-16] Unicode encodings, and more if using iconv support</li>
<li>part of SGML Open Technical Resolution TR9401:1997</li>
<li>XML Catalogs Working Draft 06 August 2001: <a href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html</a></li>
<li>Canonical XML Version 1.0: <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
and the Exclusive XML Canonicalization CR draft <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li>
<li>Relax NG, ISO/IEC 19757-2:2003, <a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html</a></li>
<li>W3C XML Schemas Part 2: Datatypes <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
2001</a></li>
<li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7
April 2004</li>
</ul>
<p> As a result the <a href="general.html">libxml2 API</a> is very
large. If you get lost searching for some specific API use
<a href="http://xmlsoft.org/search.php">the online search
engine</a> hosted on <a href="http://xmlsoft.org/">xmlsoft.org</a>
the libxml2 and libxslt project page. </p>
</body>
</html>

@ -1,138 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>DOCBparser: old DocBook SGML parser</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-HTMLparser.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">DOCBparser</span>
</h2>
<p>DOCBparser - old DocBook SGML parser</p>
<p>interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore. </p>
<p> WARNING: this module is deprecated !</p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">typedef <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#docbParserInputPtr">docbParserInputPtr</a>;
typedef <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> <a href="#docbParserCtxt">docbParserCtxt</a>;
typedef <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#docbParserCtxtPtr">docbParserCtxtPtr</a>;
typedef <a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> <a href="#docbParserInput">docbParserInput</a>;
typedef <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#docbDocPtr">docbDocPtr</a>;
typedef <a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> <a href="#docbSAXHandler">docbSAXHandler</a>;
typedef <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> <a href="#docbSAXHandlerPtr">docbSAXHandlerPtr</a>;
void <a href="#docbFreeParserCtxt">docbFreeParserCtxt</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt);
<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbParseDoc">docbParseDoc</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding);
<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> <a href="#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a> (const char * filename, <br/> const char * encoding);
<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbSAXParseFile">docbSAXParseFile</a> (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData);
<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbSAXParseDoc">docbSAXParseDoc</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData);
<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> <a href="#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a> (<a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
int <a href="#docbEncodeEntities">docbEncodeEntities</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar);
<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbParseFile">docbParseFile</a> (const char * filename, <br/> const char * encoding);
int <a href="#docbParseDocument">docbParseDocument</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt);
int <a href="#docbParseChunk">docbParseChunk</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="docbDocPtr">Typedef </a>docbDocPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> docbDocPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParserCtxt">Typedef </a>docbParserCtxt</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> docbParserCtxt;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParserCtxtPtr">Typedef </a>docbParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> docbParserCtxtPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParserInput">Typedef </a>docbParserInput</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> docbParserInput;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParserInputPtr">Typedef </a>docbParserInputPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> docbParserInputPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbSAXHandler">Typedef </a>docbSAXHandler</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> docbSAXHandler;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbSAXHandlerPtr">Typedef </a>docbSAXHandlerPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> docbSAXHandlerPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbCreateFileParserCtxt"/>docbCreateFileParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> docbCreateFileParserCtxt (const char * filename, <br/> const char * encoding)<br/>
</pre><p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbCreatePushParserCtxt"/>docbCreatePushParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> docbCreatePushParserCtxt (<a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
</pre><p>Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, @size should be &gt;= 4 The value of @filename is used for fetching external entities and error/warning reports.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbEncodeEntities"/>docbEncodeEntities ()</h3><pre class="programlisting">int docbEncodeEntities (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar)<br/>
</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>quoteChar</tt></i>:</span></td><td>the quote character to escape (' or ") or zero.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbFreeParserCtxt"/>docbFreeParserCtxt ()</h3><pre class="programlisting">void docbFreeParserCtxt (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)<br/>
</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an SGML parser context</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParseChunk"/>docbParseChunk ()</h3><pre class="programlisting">int docbParseChunk (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate)<br/>
</pre><p>Parse a Chunk of memory</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml2-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParseDoc"/>docbParseDoc ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbParseDoc (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding)<br/>
</pre><p>parse an SGML in-memory document and build a tree.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParseDocument"/>docbParseDocument ()</h3><pre class="programlisting">int docbParseDocument (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)<br/>
</pre><p>parse an SGML document (and build a tree if using the standard SAX interface).</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an SGML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParseFile"/>docbParseFile ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbParseFile (const char * filename, <br/> const char * encoding)<br/>
</pre><p>parse a Docbook SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbSAXParseDoc"/>docbSAXParseDoc ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbSAXParseDoc (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
</pre><p>parse an SGML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbSAXParseFile"/>docbSAXParseFile ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbSAXParseFile (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
</pre><p>parse an SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

@ -1,373 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>HTMLparser: interface for an HTML 4.0 non-verifying parser</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libxml2-DOCBparser.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-HTMLtree.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">HTMLparser</span>
</h2>
<p>HTMLparser - interface for an HTML 4.0 non-verifying parser</p>
<p>this module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse "real world" HTML, even if severely broken from a specification point of view. </p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">#define <a href="#htmlDefaultSubelement">htmlDefaultSubelement</a>(elt);
#define <a href="#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a>(parent, elt);
#define <a href="#htmlRequiredAttrs">htmlRequiredAttrs</a>(elt);
typedef <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> <a href="#htmlParserNodeInfo">htmlParserNodeInfo</a>;
typedef <a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> <a href="#htmlParserInput">htmlParserInput</a>;
typedef <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#htmlParserCtxtPtr">htmlParserCtxtPtr</a>;
typedef struct _htmlEntityDesc <a href="#htmlEntityDesc">htmlEntityDesc</a>;
typedef <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#htmlDocPtr">htmlDocPtr</a>;
typedef <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> <a href="#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a>;
typedef enum <a href="#htmlStatus">htmlStatus</a>;
typedef <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#htmlNodePtr">htmlNodePtr</a>;
typedef <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * <a href="#htmlElemDescPtr">htmlElemDescPtr</a>;
typedef struct _htmlElemDesc <a href="#htmlElemDesc">htmlElemDesc</a>;
typedef <a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> <a href="#htmlSAXHandler">htmlSAXHandler</a>;
typedef <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#htmlParserInputPtr">htmlParserInputPtr</a>;
typedef enum <a href="#htmlParserOption">htmlParserOption</a>;
typedef <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityDescPtr">htmlEntityDescPtr</a>;
typedef <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> <a href="#htmlParserCtxt">htmlParserCtxt</a>;
int <a href="#htmlIsScriptAttribute">htmlIsScriptAttribute</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
int <a href="#htmlHandleOmittedElem">htmlHandleOmittedElem</a> (int val);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadFd">htmlReadFd</a> (int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadIO">htmlReadIO</a> (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlParseFile">htmlParseFile</a> (const char * filename, <br/> const char * encoding);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadDoc">htmlCtxtReadDoc</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
int <a href="#htmlAutoCloseTag">htmlAutoCloseTag</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem);
int <a href="#htmlParseChunk">htmlParseChunk</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate);
const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * <a href="#htmlTagLookup">htmlTagLookup</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * tag);
<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreateMemoryParserCtxt">htmlCreateMemoryParserCtxt</a> (const char * buffer, <br/> int size);
void <a href="#htmlCtxtReset">htmlCtxtReset</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
int <a href="#htmlElementAllowedHere">htmlElementAllowedHere</a> (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elt);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadIO">htmlCtxtReadIO</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a> (<a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadMemory">htmlReadMemory</a> (const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
int <a href="#htmlIsAutoClosed">htmlIsAutoClosed</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem);
int <a href="#htmlParseCharRef">htmlParseCharRef</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadDoc">htmlReadDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
int <a href="#htmlEncodeEntities">htmlEncodeEntities</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar);
<a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlNodeStatus">htmlNodeStatus</a> (const <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> node, <br/> int legacy);
<a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlAttrAllowed">htmlAttrAllowed</a> (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * attr, <br/> int legacy);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlSAXParseFile">htmlSAXParseFile</a> (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * userData);
const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlParseEntityRef">htmlParseEntityRef</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** str);
<a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlElementStatusHere">htmlElementStatusHere</a> (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br/> const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt);
const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityValueLookup">htmlEntityValueLookup</a> (unsigned int value);
void <a href="#htmlParseElement">htmlParseElement</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
int <a href="#UTF8ToHtml">UTF8ToHtml</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen);
const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityLookup">htmlEntityLookup</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
void <a href="#htmlFreeParserCtxt">htmlFreeParserCtxt</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadMemory">htmlCtxtReadMemory</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadFd">htmlCtxtReadFd</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadFile">htmlReadFile</a> (const char * filename, <br/> const char * encoding, <br/> int options);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadFile">htmlCtxtReadFile</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * filename, <br/> const char * encoding, <br/> int options);
int <a href="#htmlParseDocument">htmlParseDocument</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlNewParserCtxt">htmlNewParserCtxt</a> (void);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlSAXParseDoc">htmlSAXParseDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * userData);
int <a href="#htmlCtxtUseOptions">htmlCtxtUseOptions</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> int options);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlParseDoc">htmlParseDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="htmlDefaultSubelement">Macro </a>htmlDefaultSubelement</h3><pre class="programlisting">#define <a href="#htmlDefaultSubelement">htmlDefaultSubelement</a>(elt);
</pre><p>Returns the default subelement for this element</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlElementAllowedHereDesc">Macro </a>htmlElementAllowedHereDesc</h3><pre class="programlisting">#define <a href="#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a>(parent, elt);
</pre><p>Checks whether an HTML element description may be a direct child of the specified element. Returns 1 if allowed; 0 otherwise.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>HTML parent element</td></tr><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlRequiredAttrs">Macro </a>htmlRequiredAttrs</h3><pre class="programlisting">#define <a href="#htmlRequiredAttrs">htmlRequiredAttrs</a>(elt);
</pre><p>Returns the attributes required for the specified element.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlDocPtr">Typedef </a>htmlDocPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> htmlDocPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlElemDesc">Structure </a>htmlElemDesc</h3><pre class="programlisting">struct _htmlElemDesc {
const char * name : The tag name
char startTag : Whether the start tag can be implied
char endTag : Whether the end tag can be implied
char saveEndTag : Whether the end tag should be saved
char empty : Is this an empty element ?
char depr : Is this a deprecated element ?
char dtd : 1: only in Loose DTD, 2: only Frameset one
char isinline : is this a block 0 or inline 1 element
const char * desc : the description NRK Jan.2003 * New fields encapsulating HTML structur
const char ** subelts : allowed sub-elements of this element
const char * defaultsubelt : subelement for suggested auto-repair if necessary or NULL
const char ** attrs_opt : Optional Attributes
const char ** attrs_depr : Additional deprecated attributes
const char ** attrs_req : Required attributes
} htmlElemDesc;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlElemDescPtr">Typedef </a>htmlElemDescPtr</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * htmlElemDescPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlEntityDesc">Structure </a>htmlEntityDesc</h3><pre class="programlisting">struct _htmlEntityDesc {
unsigned int value : the UNICODE value for the character
const char * name : The entity name
const char * desc : the description
} htmlEntityDesc;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlEntityDescPtr">Typedef </a>htmlEntityDescPtr</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlEntityDescPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNodePtr">Typedef </a>htmlNodePtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> htmlNodePtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParserCtxt">Typedef </a>htmlParserCtxt</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> htmlParserCtxt;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParserCtxtPtr">Typedef </a>htmlParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> htmlParserCtxtPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParserInput">Typedef </a>htmlParserInput</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> htmlParserInput;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParserInputPtr">Typedef </a>htmlParserInputPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> htmlParserInputPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParserNodeInfo">Typedef </a>htmlParserNodeInfo</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> htmlParserNodeInfo;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParserOption">Enum </a>htmlParserOption</h3><pre class="programlisting">enum <a href="#htmlParserOption">htmlParserOption</a> {
<a name="HTML_PARSE_RECOVER">HTML_PARSE_RECOVER</a> = 1 /* Relaxed parsing */
<a name="HTML_PARSE_NODEFDTD">HTML_PARSE_NODEFDTD</a> = 4 /* do not default a doctype if not found */
<a name="HTML_PARSE_NOERROR">HTML_PARSE_NOERROR</a> = 32 /* suppress error reports */
<a name="HTML_PARSE_NOWARNING">HTML_PARSE_NOWARNING</a> = 64 /* suppress warning reports */
<a name="HTML_PARSE_PEDANTIC">HTML_PARSE_PEDANTIC</a> = 128 /* pedantic error reporting */
<a name="HTML_PARSE_NOBLANKS">HTML_PARSE_NOBLANKS</a> = 256 /* remove blank nodes */
<a name="HTML_PARSE_NONET">HTML_PARSE_NONET</a> = 2048 /* Forbid network access */
<a name="HTML_PARSE_NOIMPLIED">HTML_PARSE_NOIMPLIED</a> = 8192 /* Do not add implied html/body... elements */
<a name="HTML_PARSE_COMPACT">HTML_PARSE_COMPACT</a> = 65536 /* compact small text nodes */
<a name="HTML_PARSE_IGNORE_ENC">HTML_PARSE_IGNORE_ENC</a> = 2097152 /* ignore internal document encoding hint */
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlSAXHandler">Typedef </a>htmlSAXHandler</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> htmlSAXHandler;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlSAXHandlerPtr">Typedef </a>htmlSAXHandlerPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> htmlSAXHandlerPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlStatus">Enum </a>htmlStatus</h3><pre class="programlisting">enum <a href="#htmlStatus">htmlStatus</a> {
<a name="HTML_NA">HTML_NA</a> = 0 /* something we don't check at all */
<a name="HTML_INVALID">HTML_INVALID</a> = 1
<a name="HTML_DEPRECATED">HTML_DEPRECATED</a> = 2
<a name="HTML_VALID">HTML_VALID</a> = 4
<a name="HTML_REQUIRED">HTML_REQUIRED</a> = 12 /* VALID bit set so ( &amp; HTML_VALID ) is TRUE */
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="UTF8ToHtml"/>UTF8ToHtml ()</h3><pre class="programlisting">int UTF8ToHtml (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen)<br/>
</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlAttrAllowed"/>htmlAttrAllowed ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> htmlAttrAllowed (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * attr, <br/> int legacy)<br/>
</pre><p>Checks whether an <a href="libxml2-SAX.html#attribute">attribute</a> is valid for an element Has full knowledge of Required and Deprecated attributes</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>HTML <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>legacy</tt></i>:</span></td><td>whether to allow deprecated attributes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of HTML_REQUIRED, HTML_VALID, HTML_DEPRECATED, <a href="libxml2-HTMLparser.html#HTML_INVALID">HTML_INVALID</a></td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlAutoCloseTag"/>htmlAutoCloseTag ()</h3><pre class="programlisting">int htmlAutoCloseTag (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)<br/>
</pre><p>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.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the HTML document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The tag name</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if autoclose, 0 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCreateMemoryParserCtxt"/>htmlCreateMemoryParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreateMemoryParserCtxt (const char * buffer, <br/> int size)<br/>
</pre><p>Create a parser context for an HTML in-memory document.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCreatePushParserCtxt"/>htmlCreatePushParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreatePushParserCtxt (<a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
</pre><p>Create a parser context for using the HTML parser in push mode The value of @filename is used for fetching external entities and error/warning reports.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCtxtReadDoc"/>htmlCtxtReadDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadDoc (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCtxtReadFd"/>htmlCtxtReadFd ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadFd (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCtxtReadFile"/>htmlCtxtReadFile ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadFile (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * filename, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCtxtReadIO"/>htmlCtxtReadIO ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadIO (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an HTML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCtxtReadMemory"/>htmlCtxtReadMemory ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadMemory (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCtxtReset"/>htmlCtxtReset ()</h3><pre class="programlisting">void htmlCtxtReset (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
</pre><p>Reset a parser context</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlCtxtUseOptions"/>htmlCtxtUseOptions ()</h3><pre class="programlisting">int htmlCtxtUseOptions (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> int options)<br/>
</pre><p>Applies the options to the parser context</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, the set of unknown or unimplemented options in case of error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlElementAllowedHere"/>htmlElementAllowedHere ()</h3><pre class="programlisting">int htmlElementAllowedHere (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elt)<br/>
</pre><p>Checks whether an HTML element may be a direct child of a parent element. Note - doesn't check for deprecated elements</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>HTML parent element</td></tr><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if allowed; 0 otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlElementStatusHere"/>htmlElementStatusHere ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> htmlElementStatusHere (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br/> const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt)<br/>
</pre><p>Checks whether an HTML element may be a direct child of a parent element. and if so whether it is valid or deprecated.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>HTML parent element</td></tr><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of HTML_VALID, HTML_DEPRECATED, <a href="libxml2-HTMLparser.html#HTML_INVALID">HTML_INVALID</a></td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlEncodeEntities"/>htmlEncodeEntities ()</h3><pre class="programlisting">int htmlEncodeEntities (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar)<br/>
</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>quoteChar</tt></i>:</span></td><td>the quote character to escape (' or ") or zero.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlEntityLookup"/>htmlEntityLookup ()</h3><pre class="programlisting">const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlEntityLookup (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml2-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, NULL otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlEntityValueLookup"/>htmlEntityValueLookup ()</h3><pre class="programlisting">const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlEntityValueLookup (unsigned int value)<br/>
</pre><p>Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the entity's unicode value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml2-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, NULL otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlFreeParserCtxt"/>htmlFreeParserCtxt ()</h3><pre class="programlisting">void htmlFreeParserCtxt (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlHandleOmittedElem"/>htmlHandleOmittedElem ()</h3><pre class="programlisting">int htmlHandleOmittedElem (int val)<br/>
</pre><p>Set and return the previous value for handling HTML omitted tags.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no handling, 1 for auto insertion.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlIsAutoClosed"/>htmlIsAutoClosed ()</h3><pre class="programlisting">int htmlIsAutoClosed (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)<br/>
</pre><p>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</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the HTML document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if autoclosed, 0 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlIsScriptAttribute"/>htmlIsScriptAttribute ()</h3><pre class="programlisting">int htmlIsScriptAttribute (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>Check if an <a href="libxml2-SAX.html#attribute">attribute</a> is of content type Script</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 is the <a href="libxml2-SAX.html#attribute">attribute</a> is a script 0 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNewParserCtxt"/>htmlNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlNewParserCtxt (void)<br/>
</pre><p>Allocate and initialize a new parser context.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> or NULL in case of allocation error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNodeStatus"/>htmlNodeStatus ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> htmlNodeStatus (const <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> node, <br/> int legacy)<br/>
</pre><p>Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser)</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>an <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> in a tree</td></tr><tr><td><span class="term"><i><tt>legacy</tt></i>:</span></td><td>whether to allow deprecated elements (YES is faster here for Element nodes)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>for Element nodes, a return from <a href="libxml2-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a> (if legacy allowed) or <a href="libxml2-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a> (otherwise). for Attribute nodes, a return from <a href="libxml2-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a> for other nodes, <a href="libxml2-HTMLparser.html#HTML_NA">HTML_NA</a> (no checks performed)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParseCharRef"/>htmlParseCharRef ()</h3><pre class="programlisting">int htmlParseCharRef (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
</pre><p>parse Reference declarations [66] CharRef ::= '&amp;#' [0-9]+ ';' | '&amp;#x' [0-9a-fA-F]+ ';'</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value parsed (as an int)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParseChunk"/>htmlParseChunk ()</h3><pre class="programlisting">int htmlParseChunk (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate)<br/>
</pre><p>Parse a Chunk of memory</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml2-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParseDoc"/>htmlParseDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlParseDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding)<br/>
</pre><p>parse an HTML in-memory document and build a tree.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParseDocument"/>htmlParseDocument ()</h3><pre class="programlisting">int htmlParseDocument (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
</pre><p>parse an HTML document (and build a tree if using the standard SAX interface).</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParseElement"/>htmlParseElement ()</h3><pre class="programlisting">void htmlParseElement (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
</pre><p>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</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParseEntityRef"/>htmlParseEntityRef ()</h3><pre class="programlisting">const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlParseEntityRef (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** str)<br/>
</pre><p>parse an HTML ENTITY references [68] EntityRef ::= '&amp;' Name ';'</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>location to store the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml2-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, or NULL otherwise, if non-NULL *str will have to be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlParseFile"/>htmlParseFile ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlParseFile (const char * filename, <br/> const char * encoding)<br/>
</pre><p>parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlReadDoc"/>htmlReadDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an XML in-memory document and build a tree.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlReadFd"/>htmlReadFd ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadFd (int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an XML from a file descriptor and build a tree.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlReadFile"/>htmlReadFile ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadFile (const char * filename, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an XML file from the filesystem or the network.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlReadIO"/>htmlReadIO ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadIO (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an HTML document from I/O functions and source and build a tree.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlReadMemory"/>htmlReadMemory ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadMemory (const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
</pre><p>parse an XML in-memory document and build a tree.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlSAXParseDoc"/>htmlSAXParseDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlSAXParseDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
</pre><p>Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks to handle parse events. If sax is NULL, fallback to the default DOM behavior and return a tree.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree unless SAX is NULL or the document is not well formed.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlSAXParseFile"/>htmlSAXParseFile ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlSAXParseFile (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
</pre><p>parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree unless SAX is NULL or the document is not well formed.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlTagLookup"/>htmlTagLookup ()</h3><pre class="programlisting">const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * htmlTagLookup (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * tag)<br/>
</pre><p>Lookup the HTML tag in the ElementTable</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tag</tt></i>:</span></td><td>The tag name in lowercase</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the related <a href="libxml2-HTMLparser.html#htmlElemDescPtr">htmlElemDescPtr</a> or NULL if not found.</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

@ -1,172 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>HTMLtree: specific APIs to process HTML tree, especially serialization</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libxml2-HTMLparser.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-SAX.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">HTMLtree</span>
</h2>
<p>HTMLtree - specific APIs to process HTML tree, especially serialization</p>
<p>this module implements a few function needed to process tree in an HTML specific way. </p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">#define <a href="#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a>;
#define <a href="#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a>;
#define <a href="#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a>;
#define <a href="#HTML_TEXT_NODE">HTML_TEXT_NODE</a>;
#define <a href="#HTML_PI_NODE">HTML_PI_NODE</a>;
int <a href="#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a> (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format);
void <a href="#htmlDocDumpMemory">htmlDocDumpMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size);
int <a href="#htmlSaveFile">htmlSaveFile</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
int <a href="#htmlDocDump">htmlDocDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
void <a href="#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format);
int <a href="#htmlIsBooleanAttr">htmlIsBooleanAttr</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
int <a href="#htmlSaveFileFormat">htmlSaveFileFormat</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format);
void <a href="#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format);
int <a href="#htmlSetMetaEncoding">htmlSetMetaEncoding</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding);
int <a href="#htmlSaveFileEnc">htmlSaveFileEnc</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
void <a href="#htmlNodeDumpOutput">htmlNodeDumpOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding);
int <a href="#htmlNodeDump">htmlNodeDump</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDoc">htmlNewDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#htmlGetMetaEncoding">htmlGetMetaEncoding</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc);
void <a href="#htmlNodeDumpFile">htmlNodeDumpFile</a> (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
void <a href="#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format);
<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDocNoDtD">htmlNewDocNoDtD</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID);
void <a href="#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="HTML_COMMENT_NODE">Macro </a>HTML_COMMENT_NODE</h3><pre class="programlisting">#define <a href="#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a>;
</pre><p>Macro. A <a href="libxml2-SAX.html#comment">comment</a> in a HTML document is really implemented the same way as a <a href="libxml2-SAX.html#comment">comment</a> in an XML document.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="HTML_ENTITY_REF_NODE">Macro </a>HTML_ENTITY_REF_NODE</h3><pre class="programlisting">#define <a href="#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a>;
</pre><p>Macro. An entity <a href="libxml2-SAX.html#reference">reference</a> in a HTML document is really implemented the same way as an entity <a href="libxml2-SAX.html#reference">reference</a> in an XML document.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="HTML_PI_NODE">Macro </a>HTML_PI_NODE</h3><pre class="programlisting">#define <a href="#HTML_PI_NODE">HTML_PI_NODE</a>;
</pre><p>Macro. A processing instruction in a HTML document is really implemented the same way as a processing instruction in an XML document.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="HTML_PRESERVE_NODE">Macro </a>HTML_PRESERVE_NODE</h3><pre class="programlisting">#define <a href="#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a>;
</pre><p>Macro. A preserved node in a HTML document is really implemented the same way as a CDATA section in an XML document.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="HTML_TEXT_NODE">Macro </a>HTML_TEXT_NODE</h3><pre class="programlisting">#define <a href="#HTML_TEXT_NODE">HTML_TEXT_NODE</a>;
</pre><p>Macro. A text node in a HTML document is really implemented the same way as a text node in an XML document.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlDocContentDumpFormatOutput"/>htmlDocContentDumpFormatOutput ()</h3><pre class="programlisting">void htmlDocContentDumpFormatOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
</pre><p>Dump an HTML document.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string (unused)</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlDocContentDumpOutput"/>htmlDocContentDumpOutput ()</h3><pre class="programlisting">void htmlDocContentDumpOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding)<br/>
</pre><p>Dump an HTML document. Formatting return/spaces are added.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string (unused)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlDocDump"/>htmlDocDump ()</h3><pre class="programlisting">int htmlDocDump (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
</pre><p>Dump an HTML document to an open FILE.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlDocDumpMemory"/>htmlDocDumpMemory ()</h3><pre class="programlisting">void htmlDocDumpMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size)<br/>
</pre><p>Dump an HTML document in memory and return the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlDocDumpMemoryFormat"/>htmlDocDumpMemoryFormat ()</h3><pre class="programlisting">void htmlDocDumpMemoryFormat (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format)<br/>
</pre><p>Dump an HTML document in memory and return the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlGetMetaEncoding"/>htmlGetMetaEncoding ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * htmlGetMetaEncoding (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br/>
</pre><p>Encoding definition lookup in the Meta tags</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current encoding as flagged in the HTML source</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlIsBooleanAttr"/>htmlIsBooleanAttr ()</h3><pre class="programlisting">int htmlIsBooleanAttr (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>Determine if a given <a href="libxml2-SAX.html#attribute">attribute</a> is a boolean attribute.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a> to check</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>false if the <a href="libxml2-SAX.html#attribute">attribute</a> is not boolean, true otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNewDoc"/>htmlNewDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlNewDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)<br/>
</pre><p>Creates a new HTML document</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>URI for the dtd, or NULL</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID of the DTD, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNewDocNoDtD"/>htmlNewDocNoDtD ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlNewDocNoDtD (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)<br/>
</pre><p>Creates a new HTML document without a DTD node if @URI and @ExternalID are NULL</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>URI for the dtd, or NULL</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID of the DTD, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document, do not initialize the DTD if not provided</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNodeDump"/>htmlNodeDump ()</h3><pre class="programlisting">int htmlNodeDump (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFile"/>htmlNodeDumpFile ()</h3><pre class="programlisting">void htmlNodeDumpFile (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the FILE pointer</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFileFormat"/>htmlNodeDumpFileFormat ()</h3><pre class="programlisting">int htmlNodeDumpFileFormat (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
</pre><p>Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the FILE pointer</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFormatOutput"/>htmlNodeDumpFormatOutput ()</h3><pre class="programlisting">void htmlNodeDumpFormatOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
</pre><p>Dump an HTML node, recursive behaviour,children are printed too.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string (unused)</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlNodeDumpOutput"/>htmlNodeDumpOutput ()</h3><pre class="programlisting">void htmlNodeDumpOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding)<br/>
</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string (unused)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlSaveFile"/>htmlSaveFile ()</h3><pre class="programlisting">int htmlSaveFile (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
</pre><p>Dump an HTML document to a file. If @filename is "-" the stdout file is used.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlSaveFileEnc"/>htmlSaveFileEnc ()</h3><pre class="programlisting">int htmlSaveFileEnc (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding)<br/>
</pre><p>Dump an HTML document to a file using a given encoding and formatting returns/spaces are added.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlSaveFileFormat"/>htmlSaveFileFormat ()</h3><pre class="programlisting">int htmlSaveFileFormat (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
</pre><p>Dump an HTML document to a file using a given encoding.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlSetMetaEncoding"/>htmlSetMetaEncoding ()</h3><pre class="programlisting">int htmlSetMetaEncoding (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding)<br/>
</pre><p>Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

@ -1,243 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>SAX: Old SAX version 1 handler, deprecated</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libxml2-HTMLtree.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-SAX2.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">SAX</span>
</h2>
<p>SAX - Old SAX version 1 handler, deprecated</p>
<p>DEPRECATED set of SAX version 1 interfaces used to build the DOM tree. </p>
<p> WARNING: this module is deprecated !</p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">void <a href="#comment">comment</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
int <a href="#checkNamespace">checkNamespace</a> (void * ctx, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespace);
int <a href="#getColumnNumber">getColumnNumber</a> (void * ctx);
void <a href="#entityDecl">entityDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
void <a href="#attribute">attribute</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#getNamespace">getNamespace</a> (void * ctx);
void <a href="#setDocumentLocator">setDocumentLocator</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc);
void <a href="#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a> (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr, <br/> int warning);
void <a href="#ignorableWhitespace">ignorableWhitespace</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
int <a href="#hasExternalSubset">hasExternalSubset</a> (void * ctx);
void <a href="#unparsedEntityDecl">unparsedEntityDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName);
void <a href="#globalNamespace">globalNamespace</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
int <a href="#hasInternalSubset">hasInternalSubset</a> (void * ctx);
void <a href="#reference">reference</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
void <a href="#notationDecl">notationDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#getSystemId">getSystemId</a> (void * ctx);
void <a href="#externalSubset">externalSubset</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#resolveEntity">resolveEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
void <a href="#startDocument">startDocument</a> (void * ctx);
void <a href="#setNamespace">setNamespace</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
void <a href="#cdataBlock">cdataBlock</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#getPublicId">getPublicId</a> (void * ctx);
void <a href="#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a> (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr);
void <a href="#processingInstruction">processingInstruction</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data);
void <a href="#endElement">endElement</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
void <a href="#namespaceDecl">namespaceDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
void <a href="#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a> (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr);
<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getEntity">getEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
void <a href="#characters">characters</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
void <a href="#elementDecl">elementDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);
void <a href="#startElement">startElement</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts);
<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getParameterEntity">getParameterEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
void <a href="#attributeDecl">attributeDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);
int <a href="#isStandalone">isStandalone</a> (void * ctx);
void <a href="#internalSubset">internalSubset</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
void <a href="#endDocument">endDocument</a> (void * ctx);
int <a href="#getLineNumber">getLineNumber</a> (void * ctx);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="attribute"/>attribute ()</h3><pre class="programlisting">void attribute (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
</pre><p>Handle an <a href="libxml2-SAX.html#attribute">attribute</a> that has been read by the parser. The default handling is to convert the <a href="libxml2-SAX.html#attribute">attribute</a> into an DOM subtree and past it in a new <a href="libxml2-tree.html#xmlAttr">xmlAttr</a> element added to the element. DEPRECATED: use xmlSAX2Attribute()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The <a href="libxml2-SAX.html#attribute">attribute</a> name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="attributeDecl"/>attributeDecl ()</h3><pre class="programlisting">void attributeDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br/>
</pre><p>An <a href="libxml2-SAX.html#attribute">attribute</a> definition has been parsed DEPRECATED: use xmlSAX2AttributeDecl()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the name of the element</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the type of default value</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the tree of enumerated value set</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="cdataBlock"/>cdataBlock ()</h3><pre class="programlisting">void cdataBlock (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len)<br/>
</pre><p>called when a pcdata block has been parsed DEPRECATED: use xmlSAX2CDataBlock()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The pcdata content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the block length</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="characters"/>characters ()</h3><pre class="programlisting">void characters (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
</pre><p>receiving some chars from the parser. DEPRECATED: use xmlSAX2Characters()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="checkNamespace"/>checkNamespace ()</h3><pre class="programlisting">int checkNamespace (void * ctx, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespace)<br/>
</pre><p>Check that the current element namespace is the same as the one read upon parsing. DEPRECATED</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>namespace</tt></i>:</span></td><td>the namespace to check against</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="comment"/>comment ()</h3><pre class="programlisting">void comment (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
</pre><p>A <a href="libxml2-SAX.html#comment">comment</a> has been parsed. DEPRECATED: use xmlSAX2Comment()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#comment">comment</a> content</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="elementDecl"/>elementDecl ()</h3><pre class="programlisting">void elementDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br/>
</pre><p>An element definition has been parsed DEPRECATED: use xmlSAX2ElementDecl()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element value tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="endDocument"/>endDocument ()</h3><pre class="programlisting">void endDocument (void * ctx)<br/>
</pre><p>called when the document end has been detected. DEPRECATED: use xmlSAX2EndDocument()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="endElement"/>endElement ()</h3><pre class="programlisting">void endElement (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>called when the end of an element has been detected. DEPRECATED: use xmlSAX2EndElement()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="entityDecl"/>entityDecl ()</h3><pre class="programlisting">void entityDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
</pre><p>An entity definition has been parsed DEPRECATED: use xmlSAX2EntityDecl()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity value (without processing).</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="externalSubset"/>externalSubset ()</h3><pre class="programlisting">void externalSubset (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
</pre><p>Callback on external subset declaration. DEPRECATED: use xmlSAX2ExternalSubset()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="getColumnNumber"/>getColumnNumber ()</h3><pre class="programlisting">int getColumnNumber (void * ctx)<br/>
</pre><p>Provide the column number of the current parsing point. DEPRECATED: use xmlSAX2GetColumnNumber()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="getEntity"/>getEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> getEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>Get an entity by name DEPRECATED: use xmlSAX2GetEntity()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="getLineNumber"/>getLineNumber ()</h3><pre class="programlisting">int getLineNumber (void * ctx)<br/>
</pre><p>Provide the line number of the current parsing point. DEPRECATED: use xmlSAX2GetLineNumber()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="getNamespace"/>getNamespace ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> getNamespace (void * ctx)<br/>
</pre><p>Get the current element namespace. DEPRECATED</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> or NULL if none</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="getParameterEntity"/>getParameterEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> getParameterEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>Get a parameter entity by name DEPRECATED: use xmlSAX2GetParameterEntity()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="getPublicId"/>getPublicId ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * getPublicId (void * ctx)<br/>
</pre><p>Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" DEPRECATED: use xmlSAX2GetPublicId()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="getSystemId"/>getSystemId ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * getSystemId (void * ctx)<br/>
</pre><p>Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd DEPRECATED: use xmlSAX2GetSystemId()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="globalNamespace"/>globalNamespace ()</h3><pre class="programlisting">void globalNamespace (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
</pre><p>An old global namespace has been parsed. DEPRECATED</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace associated URN</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="hasExternalSubset"/>hasExternalSubset ()</h3><pre class="programlisting">int hasExternalSubset (void * ctx)<br/>
</pre><p>Does this document has an external subset DEPRECATED: use xmlSAX2HasExternalSubset()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="hasInternalSubset"/>hasInternalSubset ()</h3><pre class="programlisting">int hasInternalSubset (void * ctx)<br/>
</pre><p>Does this document has an internal subset DEPRECATED: use xmlSAX2HasInternalSubset()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="ignorableWhitespace"/>ignorableWhitespace ()</h3><pre class="programlisting">void ignorableWhitespace (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
</pre><p>receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use <a href="libxml2-SAX.html#characters">characters</a> DEPRECATED: use xmlSAX2IgnorableWhitespace()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="initdocbDefaultSAXHandler"/>initdocbDefaultSAXHandler ()</h3><pre class="programlisting">void initdocbDefaultSAXHandler (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr)<br/>
</pre><p>Initialize the default DocBook SAX version 1 handler DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="inithtmlDefaultSAXHandler"/>inithtmlDefaultSAXHandler ()</h3><pre class="programlisting">void inithtmlDefaultSAXHandler (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr)<br/>
</pre><p>Initialize the default HTML SAX version 1 handler DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="initxmlDefaultSAXHandler"/>initxmlDefaultSAXHandler ()</h3><pre class="programlisting">void initxmlDefaultSAXHandler (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr, <br/> int warning)<br/>
</pre><p>Initialize the default XML SAX version 1 handler DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>warning</tt></i>:</span></td><td>flag if non-zero sets the handler warning procedure</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="internalSubset"/>internalSubset ()</h3><pre class="programlisting">void internalSubset (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
</pre><p>Callback on internal subset declaration. DEPRECATED: use xmlSAX2InternalSubset()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="isStandalone"/>isStandalone ()</h3><pre class="programlisting">int isStandalone (void * ctx)<br/>
</pre><p>Is this document tagged standalone ? DEPRECATED: use xmlSAX2IsStandalone()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="namespaceDecl"/>namespaceDecl ()</h3><pre class="programlisting">void namespaceDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
</pre><p>A namespace has been parsed. DEPRECATED</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace associated URN</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="notationDecl"/>notationDecl ()</h3><pre class="programlisting">void notationDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
</pre><p>What to do when a notation declaration has been parsed. DEPRECATED: use xmlSAX2NotationDecl()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the notation</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="processingInstruction"/>processingInstruction ()</h3><pre class="programlisting">void processingInstruction (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data)<br/>
</pre><p>A processing instruction has been parsed. DEPRECATED: use xmlSAX2ProcessingInstruction()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the target name</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the PI data's</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="reference"/>reference ()</h3><pre class="programlisting">void reference (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>called when an entity <a href="libxml2-SAX.html#reference">reference</a> is detected. DEPRECATED: use xmlSAX2Reference()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="resolveEntity"/>resolveEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> resolveEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
</pre><p>The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine DEPRECATED: use xmlSAX2ResolveEntity()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> if inlined or NULL for DOM behaviour.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="setDocumentLocator"/>setDocumentLocator ()</h3><pre class="programlisting">void setDocumentLocator (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)<br/>
</pre><p>Receive the document locator at startup, actually <a href="libxml2-globals.html#xmlDefaultSAXLocator">xmlDefaultSAXLocator</a> Everything is available on the context, so this is useless in our case. DEPRECATED</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>:</span></td><td>A SAX Locator</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="setNamespace"/>setNamespace ()</h3><pre class="programlisting">void setNamespace (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>Set the current element namespace. DEPRECATED</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="startDocument"/>startDocument ()</h3><pre class="programlisting">void startDocument (void * ctx)<br/>
</pre><p>called when the document start being processed. DEPRECATED: use xmlSAX2StartDocument()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="startElement"/>startElement ()</h3><pre class="programlisting">void startElement (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts)<br/>
</pre><p>called when an opening tag has been processed. DEPRECATED: use xmlSAX2StartElement()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The element name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>:</span></td><td>An array of name/value attributes pairs, NULL terminated</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="unparsedEntityDecl"/>unparsedEntityDecl ()</h3><pre class="programlisting">void unparsedEntityDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br/>
</pre><p>What to do when an unparsed entity declaration is parsed DEPRECATED: use xmlSAX2UnparsedEntityDecl()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the entity</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the name of the notation</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

@ -1,247 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>SAX2: SAX2 parser interface used to build the DOM tree</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libxml2-SAX.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-c14n.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">SAX2</span>
</h2>
<p>SAX2 - SAX2 parser interface used to build the DOM tree</p>
<p>those are the default SAX2 interfaces used by the library when building DOM tree. </p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">void <a href="#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
void <a href="#xmlSAX2Reference">xmlSAX2Reference</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
void <a href="#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);
void <a href="#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);
void <a href="#xmlSAX2Comment">xmlSAX2Comment</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
int <a href="#xmlSAX2GetColumnNumber">xmlSAX2GetColumnNumber</a> (void * ctx);
<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlSAX2GetEntity">xmlSAX2GetEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
void <a href="#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName);
void <a href="#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a> (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr);
int <a href="#xmlSAXVersion">xmlSAXVersion</a> (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br/> int version);
void <a href="#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
void <a href="#xmlSAX2NotationDecl">xmlSAX2NotationDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
void <a href="#xmlSAX2StartDocument">xmlSAX2StartDocument</a> (void * ctx);
void <a href="#xmlSAX2EndElement">xmlSAX2EndElement</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
void <a href="#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a> (void * ctx);
int <a href="#xmlSAX2IsStandalone">xmlSAX2IsStandalone</a> (void * ctx);
void <a href="#xmlSAX2EndDocument">xmlSAX2EndDocument</a> (void * ctx);
void <a href="#xmlSAX2ProcessingInstruction">xmlSAX2ProcessingInstruction</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data);
void <a href="#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
void <a href="#xmlSAX2Characters">xmlSAX2Characters</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
int <a href="#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a> (int version);
void <a href="#xmlSAX2StartElement">xmlSAX2StartElement</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts);
void <a href="#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc);
void <a href="#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len);
void <a href="#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> int nb_namespaces, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br/> int nb_attributes, <br/> int nb_defaulted, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** attributes);
int <a href="#xmlSAX2HasExternalSubset">xmlSAX2HasExternalSubset</a> (void * ctx);
void <a href="#htmlDefaultSAXHandlerInit">htmlDefaultSAXHandlerInit</a> (void);
int <a href="#xmlSAX2GetLineNumber">xmlSAX2GetLineNumber</a> (void * ctx);
int <a href="#xmlSAX2HasInternalSubset">xmlSAX2HasInternalSubset</a> (void * ctx);
void <a href="#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a> (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr);
void <a href="#docbDefaultSAXHandlerInit">docbDefaultSAXHandlerInit</a> (void);
void <a href="#xmlDefaultSAXHandlerInit">xmlDefaultSAXHandlerInit</a> (void);
void <a href="#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a> (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br/> int warning);
<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a> (void * ctx);
void <a href="#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="docbDefaultSAXHandlerInit"/>docbDefaultSAXHandlerInit ()</h3><pre class="programlisting">void docbDefaultSAXHandlerInit (void)<br/>
</pre><p>Initialize the default SAX handler</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="htmlDefaultSAXHandlerInit"/>htmlDefaultSAXHandlerInit ()</h3><pre class="programlisting">void htmlDefaultSAXHandlerInit (void)<br/>
</pre><p>Initialize the default SAX handler</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlDefaultSAXHandlerInit"/>xmlDefaultSAXHandlerInit ()</h3><pre class="programlisting">void xmlDefaultSAXHandlerInit (void)<br/>
</pre><p>Initialize the default SAX2 handler</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2AttributeDecl"/>xmlSAX2AttributeDecl ()</h3><pre class="programlisting">void xmlSAX2AttributeDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br/>
</pre><p>An <a href="libxml2-SAX.html#attribute">attribute</a> definition has been parsed</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the name of the element</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the type of default value</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the tree of enumerated value set</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2CDataBlock"/>xmlSAX2CDataBlock ()</h3><pre class="programlisting">void xmlSAX2CDataBlock (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len)<br/>
</pre><p>called when a pcdata block has been parsed</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The pcdata content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the block length</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2Characters"/>xmlSAX2Characters ()</h3><pre class="programlisting">void xmlSAX2Characters (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
</pre><p>receiving some chars from the parser.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2Comment"/>xmlSAX2Comment ()</h3><pre class="programlisting">void xmlSAX2Comment (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
</pre><p>A <a href="libxml2-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a> has been parsed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a> content</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2ElementDecl"/>xmlSAX2ElementDecl ()</h3><pre class="programlisting">void xmlSAX2ElementDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br/>
</pre><p>An element definition has been parsed</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element value tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2EndDocument"/>xmlSAX2EndDocument ()</h3><pre class="programlisting">void xmlSAX2EndDocument (void * ctx)<br/>
</pre><p>called when the document end has been detected.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2EndElement"/>xmlSAX2EndElement ()</h3><pre class="programlisting">void xmlSAX2EndElement (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>called when the end of an element has been detected.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2EndElementNs"/>xmlSAX2EndElementNs ()</h3><pre class="programlisting">void xmlSAX2EndElementNs (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
</pre><p>SAX2 callback when an element end has been detected by the parser. It provides the namespace information for the element.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2EntityDecl"/>xmlSAX2EntityDecl ()</h3><pre class="programlisting">void xmlSAX2EntityDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
</pre><p>An entity definition has been parsed</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity value (without processing).</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2ExternalSubset"/>xmlSAX2ExternalSubset ()</h3><pre class="programlisting">void xmlSAX2ExternalSubset (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
</pre><p>Callback on external subset declaration.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2GetColumnNumber"/>xmlSAX2GetColumnNumber ()</h3><pre class="programlisting">int xmlSAX2GetColumnNumber (void * ctx)<br/>
</pre><p>Provide the column number of the current parsing point.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2GetEntity"/>xmlSAX2GetEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlSAX2GetEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>Get an entity by name</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2GetLineNumber"/>xmlSAX2GetLineNumber ()</h3><pre class="programlisting">int xmlSAX2GetLineNumber (void * ctx)<br/>
</pre><p>Provide the line number of the current parsing point.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2GetParameterEntity"/>xmlSAX2GetParameterEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlSAX2GetParameterEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>Get a parameter entity by name</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2GetPublicId"/>xmlSAX2GetPublicId ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSAX2GetPublicId (void * ctx)<br/>
</pre><p>Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2GetSystemId"/>xmlSAX2GetSystemId ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSAX2GetSystemId (void * ctx)<br/>
</pre><p>Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2HasExternalSubset"/>xmlSAX2HasExternalSubset ()</h3><pre class="programlisting">int xmlSAX2HasExternalSubset (void * ctx)<br/>
</pre><p>Does this document has an external subset</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2HasInternalSubset"/>xmlSAX2HasInternalSubset ()</h3><pre class="programlisting">int xmlSAX2HasInternalSubset (void * ctx)<br/>
</pre><p>Does this document has an internal subset</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2IgnorableWhitespace"/>xmlSAX2IgnorableWhitespace ()</h3><pre class="programlisting">void xmlSAX2IgnorableWhitespace (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
</pre><p>receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use <a href="libxml2-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a></p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2InitDefaultSAXHandler"/>xmlSAX2InitDefaultSAXHandler ()</h3><pre class="programlisting">void xmlSAX2InitDefaultSAXHandler (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br/> int warning)<br/>
</pre><p>Initialize the default XML SAX2 handler</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>warning</tt></i>:</span></td><td>flag if non-zero sets the handler warning procedure</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2InitDocbDefaultSAXHandler"/>xmlSAX2InitDocbDefaultSAXHandler ()</h3><pre class="programlisting">void xmlSAX2InitDocbDefaultSAXHandler (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr)<br/>
</pre><p>Initialize the default DocBook SAX2 handler</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2InitHtmlDefaultSAXHandler"/>xmlSAX2InitHtmlDefaultSAXHandler ()</h3><pre class="programlisting">void xmlSAX2InitHtmlDefaultSAXHandler (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr)<br/>
</pre><p>Initialize the default HTML SAX2 handler</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2InternalSubset"/>xmlSAX2InternalSubset ()</h3><pre class="programlisting">void xmlSAX2InternalSubset (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
</pre><p>Callback on internal subset declaration.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2IsStandalone"/>xmlSAX2IsStandalone ()</h3><pre class="programlisting">int xmlSAX2IsStandalone (void * ctx)<br/>
</pre><p>Is this document tagged standalone ?</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2NotationDecl"/>xmlSAX2NotationDecl ()</h3><pre class="programlisting">void xmlSAX2NotationDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
</pre><p>What to do when a notation declaration has been parsed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the notation</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2ProcessingInstruction"/>xmlSAX2ProcessingInstruction ()</h3><pre class="programlisting">void xmlSAX2ProcessingInstruction (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data)<br/>
</pre><p>A processing instruction has been parsed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the target name</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the PI data's</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2Reference"/>xmlSAX2Reference ()</h3><pre class="programlisting">void xmlSAX2Reference (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
</pre><p>called when an entity <a href="libxml2-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a> is detected.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2ResolveEntity"/>xmlSAX2ResolveEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlSAX2ResolveEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
</pre><p>The entity loader, to control the loading of external entities, the application can either: - override this xmlSAX2ResolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> if inlined or NULL for DOM behaviour.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2SetDocumentLocator"/>xmlSAX2SetDocumentLocator ()</h3><pre class="programlisting">void xmlSAX2SetDocumentLocator (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)<br/>
</pre><p>Receive the document locator at startup, actually <a href="libxml2-globals.html#xmlDefaultSAXLocator">xmlDefaultSAXLocator</a> Everything is available on the context, so this is useless in our case.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>:</span></td><td>A SAX Locator</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2StartDocument"/>xmlSAX2StartDocument ()</h3><pre class="programlisting">void xmlSAX2StartDocument (void * ctx)<br/>
</pre><p>called when the document start being processed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2StartElement"/>xmlSAX2StartElement ()</h3><pre class="programlisting">void xmlSAX2StartElement (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts)<br/>
</pre><p>called when an opening tag has been processed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The element name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>:</span></td><td>An array of name/value attributes pairs, NULL terminated</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2StartElementNs"/>xmlSAX2StartElementNs ()</h3><pre class="programlisting">void xmlSAX2StartElementNs (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> int nb_namespaces, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br/> int nb_attributes, <br/> int nb_defaulted, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** attributes)<br/>
</pre><p>SAX2 callback when an element start has been detected by the parser. It provides the namespace information for the element, as well as the new namespace declarations on the element.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr><tr><td><span class="term"><i><tt>nb_namespaces</tt></i>:</span></td><td>number of namespace definitions on that node</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>pointer to the array of prefix/URI pairs namespace definitions</td></tr><tr><td><span class="term"><i><tt>nb_attributes</tt></i>:</span></td><td>the number of attributes on that node</td></tr><tr><td><span class="term"><i><tt>nb_defaulted</tt></i>:</span></td><td>the number of defaulted attributes.</td></tr><tr><td><span class="term"><i><tt>attributes</tt></i>:</span></td><td>pointer to the array of (localname/prefix/URI/value/end) <a href="libxml2-SAX.html#attribute">attribute</a> values.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAX2UnparsedEntityDecl"/>xmlSAX2UnparsedEntityDecl ()</h3><pre class="programlisting">void xmlSAX2UnparsedEntityDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br/>
</pre><p>What to do when an unparsed entity declaration is parsed</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the entity</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the name of the notation</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAXDefaultVersion"/>xmlSAXDefaultVersion ()</h3><pre class="programlisting">int xmlSAXDefaultVersion (int version)<br/>
</pre><p>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.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the version, 1 or 2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSAXVersion"/>xmlSAXVersion ()</h3><pre class="programlisting">int xmlSAXVersion (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br/> int version)<br/>
</pre><p>Initialize the default XML SAX handler according to the version</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the version, 1 or 2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>c14n: Provide Canonical XML and Exclusive XML Canonicalization</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libxml2-SAX2.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-catalog.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">c14n</span>
</h2>
<p>c14n - Provide Canonical XML and Exclusive XML Canonicalization</p>
<p>the c14n modules provides a "Canonical XML" implementation</p>
<p>Author(s): Aleksey Sanin &lt;aleksey@aleksey.com&gt; </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">typedef enum <a href="#xmlC14NMode">xmlC14NMode</a>;
int <a href="#xmlC14NExecute">xmlC14NExecute</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback, <br/> void * user_data, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);
int <a href="#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);
typedef int <a href="#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> (void * user_data, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
int <a href="#xmlC14NDocSave">xmlC14NDocSave</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> const char * filename, <br/> int compression);
int <a href="#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="xmlC14NMode">Enum </a>xmlC14NMode</h3><pre class="programlisting">enum <a href="#xmlC14NMode">xmlC14NMode</a> {
<a name="XML_C14N_1_0">XML_C14N_1_0</a> = 0 /* Original C14N 1.0 spec */
<a name="XML_C14N_EXCLUSIVE_1_0">XML_C14N_EXCLUSIVE_1_0</a> = 1 /* Exclusive C14N 1.0 spec */
<a name="XML_C14N_1_1">XML_C14N_1_1</a> = 2 /* C14N 1.1 spec */
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlC14NIsVisibleCallback"/>Function type xmlC14NIsVisibleCallback</h3><pre class="programlisting">int xmlC14NIsVisibleCallback (void * user_data, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
</pre><p>Signature for a C14N callback on visible nodes</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>user data</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node should be included</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlC14NDocDumpMemory"/>xmlC14NDocDumpMemory ()</h3><pre class="programlisting">int xmlC14NDocDumpMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr)<br/>
</pre><p>Dumps the canonized image of given XML document into memory. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written on success or a negative value on fail</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlC14NDocSave"/>xmlC14NDocSave ()</h3><pre class="programlisting">int xmlC14NDocSave (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> const char * filename, <br/> int compression)<br/>
</pre><p>Dumps the canonized image of given XML document into the file. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename to store canonical XML image</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>the compression level (zlib required): -1 - libxml default, 0 - uncompressed, &gt;0 - compression level</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written success or a negative value on fail</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlC14NDocSaveTo"/>xmlC14NDocSaveTo ()</h3><pre class="programlisting">int xmlC14NDocSaveTo (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)<br/>
</pre><p>Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>non-negative value on success or a negative value on fail</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlC14NExecute"/>xmlC14NExecute ()</h3><pre class="programlisting">int xmlC14NExecute (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback, <br/> void * user_data, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)<br/>
</pre><p>Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>is_visible_callback</tt></i>:</span></td><td>the function to use to determine is node visible or not</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the first parameter for @is_visible_callback function (in most cases, it is nodes set)</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>non-negative value on success or a negative value on fail</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

@ -1,278 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>catalog: interfaces to the Catalog handling system</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libxml2-c14n.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-chvalid.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">catalog</span>
</h2>
<p>catalog - interfaces to the Catalog handling system</p>
<p>the catalog module implements the support for XML Catalogs and SGML catalogs </p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">#define <a href="#XML_CATALOG_PI">XML_CATALOG_PI</a>;
#define <a href="#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a>;
typedef enum <a href="#xmlCatalogAllow">xmlCatalogAllow</a>;
typedef enum <a href="#xmlCatalogPrefer">xmlCatalogPrefer</a>;
typedef struct _xmlCatalog <a href="#xmlCatalog">xmlCatalog</a>;
typedef <a href="libxml2-catalog.html#xmlCatalog">xmlCatalog</a> * <a href="#xmlCatalogPtr">xmlCatalogPtr</a>;
void <a href="#xmlFreeCatalog">xmlFreeCatalog</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
void <a href="#xmlLoadCatalogs">xmlLoadCatalogs</a> (const char * pathss);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
int <a href="#xmlACatalogAdd">xmlACatalogAdd</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
<a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> <a href="#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a> (void);
int <a href="#xmlACatalogRemove">xmlACatalogRemove</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
<a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> <a href="#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a> (<a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> prefer);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolveURI">xmlACatalogResolveURI</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
int <a href="#xmlCatalogAdd">xmlCatalogAdd</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogGetSystem">xmlCatalogGetSystem</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
void <a href="#xmlInitializeCatalog">xmlInitializeCatalog</a> (void);
int <a href="#xmlLoadCatalog">xmlLoadCatalog</a> (const char * filename);
int <a href="#xmlCatalogRemove">xmlCatalogRemove</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
int <a href="#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
void <a href="#xmlACatalogDump">xmlACatalogDump</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> FILE * out);
void <a href="#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a> (void * catalogs);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolve">xmlACatalogResolve</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a> (const char * filename);
int <a href="#xmlCatalogConvert">xmlCatalogConvert</a> (void);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogGetPublic">xmlCatalogGetPublic</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlLoadACatalog">xmlLoadACatalog</a> (const char * filename);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
int <a href="#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
void * <a href="#xmlCatalogAddLocal">xmlCatalogAddLocal</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL);
<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlNewCatalog">xmlNewCatalog</a> (int sgml);
<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseCatalogFile">xmlParseCatalogFile</a> (const char * filename);
int <a href="#xmlCatalogSetDebug">xmlCatalogSetDebug</a> (int level);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolve">xmlCatalogResolve</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
void <a href="#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a> (<a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> allow);
void <a href="#xmlCatalogDump">xmlCatalogDump</a> (FILE * out);
void <a href="#xmlCatalogCleanup">xmlCatalogCleanup</a> (void);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolveURI">xmlCatalogResolveURI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="XML_CATALOGS_NAMESPACE">Macro </a>XML_CATALOGS_NAMESPACE</h3><pre class="programlisting">#define <a href="#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a>;
</pre><p>The namespace for the XML Catalogs elements.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="XML_CATALOG_PI">Macro </a>XML_CATALOG_PI</h3><pre class="programlisting">#define <a href="#XML_CATALOG_PI">XML_CATALOG_PI</a>;
</pre><p>The specific XML Catalog Processing Instruction name.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalog">Structure </a>xmlCatalog</h3><pre class="programlisting">struct _xmlCatalog {
The content of this structure is not made public by the API.
} xmlCatalog;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogAllow">Enum </a>xmlCatalogAllow</h3><pre class="programlisting">enum <a href="#xmlCatalogAllow">xmlCatalogAllow</a> {
<a name="XML_CATA_ALLOW_NONE">XML_CATA_ALLOW_NONE</a> = 0
<a name="XML_CATA_ALLOW_GLOBAL">XML_CATA_ALLOW_GLOBAL</a> = 1
<a name="XML_CATA_ALLOW_DOCUMENT">XML_CATA_ALLOW_DOCUMENT</a> = 2
<a name="XML_CATA_ALLOW_ALL">XML_CATA_ALLOW_ALL</a> = 3
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogPrefer">Enum </a>xmlCatalogPrefer</h3><pre class="programlisting">enum <a href="#xmlCatalogPrefer">xmlCatalogPrefer</a> {
<a name="XML_CATA_PREFER_NONE">XML_CATA_PREFER_NONE</a> = 0
<a name="XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a> = 1
<a name="XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a> = 2
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogPtr">Typedef </a>xmlCatalogPtr</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalog">xmlCatalog</a> * xmlCatalogPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlACatalogAdd"/>xmlACatalogAdd ()</h3><pre class="programlisting">int xmlACatalogAdd (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace)<br/>
</pre><p>Add an entry in the catalog, it may overwrite existing but different entries.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlACatalogDump"/>xmlACatalogDump ()</h3><pre class="programlisting">void xmlACatalogDump (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> FILE * out)<br/>
</pre><p>Dump the given catalog to the given file.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlACatalogRemove"/>xmlACatalogRemove ()</h3><pre class="programlisting">int xmlACatalogRemove (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
</pre><p>Remove an entry from the catalog</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlACatalogResolve"/>xmlACatalogResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolve (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
</pre><p>Do a complete resolution lookup of an External Identifier</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlACatalogResolvePublic"/>xmlACatalogResolvePublic ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolvePublic (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
</pre><p>Try to lookup the catalog local <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID in that catalog</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlACatalogResolveSystem"/>xmlACatalogResolveSystem ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolveSystem (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
</pre><p>Try to lookup the catalog resource for a system ID</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlACatalogResolveURI"/>xmlACatalogResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolveURI (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
</pre><p>Do a complete resolution lookup of an URI</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogAdd"/>xmlCatalogAdd ()</h3><pre class="programlisting">int xmlCatalogAdd (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace)<br/>
</pre><p>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();</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogAddLocal"/>xmlCatalogAddLocal ()</h3><pre class="programlisting">void * xmlCatalogAddLocal (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL)<br/>
</pre><p>Add the new entry to the catalog list</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL to a new local catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the updated list</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogCleanup"/>xmlCatalogCleanup ()</h3><pre class="programlisting">void xmlCatalogCleanup (void)<br/>
</pre><p>Free up all the memory associated with catalogs</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogConvert"/>xmlCatalogConvert ()</h3><pre class="programlisting">int xmlCatalogConvert (void)<br/>
</pre><p>Convert all the SGML catalog entries as XML ones</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogDump"/>xmlCatalogDump ()</h3><pre class="programlisting">void xmlCatalogDump (FILE * out)<br/>
</pre><p>Dump all the global catalog content to the given file.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogFreeLocal"/>xmlCatalogFreeLocal ()</h3><pre class="programlisting">void xmlCatalogFreeLocal (void * catalogs)<br/>
</pre><p>Free up the memory associated to the catalog list</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogGetDefaults"/>xmlCatalogGetDefaults ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> xmlCatalogGetDefaults (void)<br/>
</pre><p>Used to get the user preference w.r.t. to what catalogs should be accepted</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current <a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> value</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogGetPublic"/>xmlCatalogGetPublic ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogGetPublic (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
</pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogGetSystem"/>xmlCatalogGetSystem ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogGetSystem (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
</pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a system ID DEPRECATED, use xmlCatalogResolveSystem()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogIsEmpty"/>xmlCatalogIsEmpty ()</h3><pre class="programlisting">int xmlCatalogIsEmpty (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
</pre><p>Check is a catalog is empty</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>should this create an SGML catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the catalog is empty, 0 if not, amd -1 in case of error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogLocalResolve"/>xmlCatalogLocalResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogLocalResolve (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
</pre><p>Do a complete resolution lookup of an External Identifier using a document's private catalog list</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogLocalResolveURI"/>xmlCatalogLocalResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogLocalResolveURI (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
</pre><p>Do a complete resolution lookup of an URI using a document's private catalog list</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogRemove"/>xmlCatalogRemove ()</h3><pre class="programlisting">int xmlCatalogRemove (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
</pre><p>Remove an entry from the catalog</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogResolve"/>xmlCatalogResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolve (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
</pre><p>Do a complete resolution lookup of an External Identifier</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogResolvePublic"/>xmlCatalogResolvePublic ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolvePublic (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
</pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogResolveSystem"/>xmlCatalogResolveSystem ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolveSystem (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
</pre><p>Try to lookup the catalog resource for a system ID</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogResolveURI"/>xmlCatalogResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolveURI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
</pre><p>Do a complete resolution lookup of an URI</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDebug"/>xmlCatalogSetDebug ()</h3><pre class="programlisting">int xmlCatalogSetDebug (int level)<br/>
</pre><p>Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the debug level of catalogs required</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the catalog debugging level</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDefaultPrefer"/>xmlCatalogSetDefaultPrefer ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> xmlCatalogSetDefaultPrefer (<a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> prefer)<br/>
</pre><p>Allows to set the preference between public and system for deletion in XML Catalog resolution. C.f. section 4.1.1 of the spec Values accepted are <a href="libxml2-catalog.html#XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a> or <a href="libxml2-catalog.html#XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a></p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>prefer</tt></i>:</span></td><td>the default preference for delegation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the default preference for delegation</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDefaults"/>xmlCatalogSetDefaults ()</h3><pre class="programlisting">void xmlCatalogSetDefaults (<a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> allow)<br/>
</pre><p>Used to set the user preference w.r.t. to what catalogs should be accepted</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>allow</tt></i>:</span></td><td>what catalogs should be accepted</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlConvertSGMLCatalog"/>xmlConvertSGMLCatalog ()</h3><pre class="programlisting">int xmlConvertSGMLCatalog (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
</pre><p>Convert all the SGML catalog entries as XML ones</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>the catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlFreeCatalog"/>xmlFreeCatalog ()</h3><pre class="programlisting">void xmlFreeCatalog (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
</pre><p>Free the memory allocated to a Catalog</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlInitializeCatalog"/>xmlInitializeCatalog ()</h3><pre class="programlisting">void xmlInitializeCatalog (void)<br/>
</pre><p>Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlLoadACatalog"/>xmlLoadACatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlLoadACatalog (const char * filename)<br/>
</pre><p>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.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the catalog parsed or NULL in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlLoadCatalog"/>xmlLoadCatalog ()</h3><pre class="programlisting">int xmlLoadCatalog (const char * filename)<br/>
</pre><p>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</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success -1 in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlLoadCatalogs"/>xmlLoadCatalogs ()</h3><pre class="programlisting">void xmlLoadCatalogs (const char * pathss)<br/>
</pre><p>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</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pathss</tt></i>:</span></td><td>a list of directories separated by a colon or a space.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlLoadSGMLSuperCatalog"/>xmlLoadSGMLSuperCatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlLoadSGMLSuperCatalog (const char * filename)<br/>
</pre><p>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.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the catalog parsed or NULL in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlNewCatalog"/>xmlNewCatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlNewCatalog (int sgml)<br/>
</pre><p>create a new Catalog.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sgml</tt></i>:</span></td><td>should this create an SGML catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlParseCatalogFile"/>xmlParseCatalogFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseCatalogFile (const char * filename)<br/>
</pre><p>parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of error</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

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

Loading…
Cancel
Save