mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-13 13:17:36 +03:00
integrated the xmlDocWalker API given by Alfred Mickautsch, and providing
* Makefile.am configure.in xmldwalk.c include/libxml/Makefile.am include/libxml/xmldwalk.h include/libxml/xmlversion.h.in: integrated the xmlDocWalker API given by Alfred Mickautsch, and providing an xmlReader like API but working on a xmlDocPtr. Daniel
This commit is contained in:
parent
bb5ababa28
commit
1ae42d653e
@ -1,3 +1,10 @@
|
||||
Sat Oct 4 01:58:27 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* Makefile.am configure.in xmldwalk.c include/libxml/Makefile.am
|
||||
include/libxml/xmldwalk.h include/libxml/xmlversion.h.in:
|
||||
integrated the xmlDocWalker API given by Alfred Mickautsch,
|
||||
and providing an xmlReader like API but working on a xmlDocPtr.
|
||||
|
||||
Sat Oct 4 00:18:29 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* Makefile.am: more cleanup in make tests
|
||||
|
@ -27,7 +27,7 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
|
||||
catalog.c globals.c threads.c c14n.c \
|
||||
xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
|
||||
triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \
|
||||
legacy.c
|
||||
legacy.c walker.c
|
||||
else
|
||||
libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
|
||||
parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
|
||||
@ -36,7 +36,7 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
|
||||
catalog.c globals.c threads.c c14n.c \
|
||||
xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
|
||||
xmlreader.c relaxng.c dict.c SAX2.c \
|
||||
legacy.c
|
||||
legacy.c xmldwalk.c
|
||||
endif
|
||||
|
||||
DEPS = $(top_builddir)/libxml2.la
|
||||
|
17
configure.in
17
configure.in
@ -637,6 +637,23 @@ fi
|
||||
AC_SUBST(WITH_SAX1)
|
||||
AC_SUBST(TEST_SAX)
|
||||
|
||||
AC_ARG_WITH(walker,
|
||||
[ --with-walker add the xmlDocWalker interface (on)])
|
||||
if test "$with_minimum" = "yes" -a "$with_walker" = ""
|
||||
then
|
||||
with_walker=no
|
||||
fi
|
||||
if test "$with_walker" = "no" ; then
|
||||
echo Disabling the xmlDocWalker interface
|
||||
WITH_WALKER=0
|
||||
TEST_WALKER=
|
||||
else
|
||||
WITH_WALKER=1
|
||||
TEST_WALKER=WALKERtests
|
||||
fi
|
||||
AC_SUBST(WITH_WALKER)
|
||||
AC_SUBST(TEST_WALKER)
|
||||
|
||||
AC_ARG_WITH(push,
|
||||
[ --with-push add the PUSH parser interfaces (on)])
|
||||
if test "$with_minimum" = "yes" -a "$with_push" = ""
|
||||
|
@ -42,7 +42,8 @@ xmlinc_HEADERS = \
|
||||
relaxng.h \
|
||||
dict.h \
|
||||
SAX2.h \
|
||||
xmlexports.h
|
||||
xmlexports.h \
|
||||
xmldwalk.h
|
||||
|
||||
install-exec-hook:
|
||||
$(mkinstalldirs) $(DESTDIR)$(xmlincdir)
|
||||
|
116
include/libxml/xmldwalk.h
Normal file
116
include/libxml/xmldwalk.h
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* xmldwalk.h : Interfaces, constants and types of the document traversing API.for XML
|
||||
*
|
||||
* this is heavily based upon the xmlTextReader streaming node API
|
||||
* of libxml2 by Daniel Veillard (daniel@veillard.com). In fact I
|
||||
* just copied and modified xmlreader.h
|
||||
*
|
||||
* So for license and disclaimer see the license and disclaimer of
|
||||
* libxml2.
|
||||
*
|
||||
* alfred@mickautsch.de
|
||||
*/
|
||||
|
||||
#ifndef __XML_XMLDWALK_H__
|
||||
#define __XML_XMLDWALK_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
XML_DWALK_NONE = 0,
|
||||
XML_DWALK_START,
|
||||
XML_DWALK_BACKTRACK,
|
||||
XML_DWALK_END
|
||||
} xmlDocWalkerState;
|
||||
|
||||
typedef struct _xmlDocWalker xmlDocWalker;
|
||||
typedef xmlDocWalker *xmlDocWalkerPtr;
|
||||
|
||||
/*
|
||||
* Constructor & Destructor
|
||||
*/
|
||||
XMLPUBFUN xmlDocWalkerPtr XMLCALL
|
||||
xmlNewDocWalker (xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeDocWalker (xmlDocWalkerPtr iter);
|
||||
|
||||
/*
|
||||
* Iterator Functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerRewind (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerStep (xmlDocWalkerPtr iter);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerAttributeCount (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerDepth (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerHasAttributes (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerHasValue (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerIsEmptyElement (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerLocalName (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerName (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerNodeType (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerPrefix (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerNamespaceUri (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerBaseUri (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerValue (xmlDocWalkerPtr iter);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerGetAttributeNo (xmlDocWalkerPtr iter,
|
||||
int no);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerGetAttribute (xmlDocWalkerPtr iter,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerGetAttributeNs (xmlDocWalkerPtr iter,
|
||||
const xmlChar *localName,
|
||||
const xmlChar *namespaceURI);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDocWalkerLookupNamespace (xmlDocWalkerPtr iter,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerMoveToAttributeNo (xmlDocWalkerPtr iter,
|
||||
int no);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerMoveToAttribute (xmlDocWalkerPtr iter,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerMoveToAttributeNs (xmlDocWalkerPtr iter,
|
||||
const xmlChar *localName,
|
||||
const xmlChar *namespaceURI);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerMoveToFirstAttribute(xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerMoveToNextAttribute (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerMoveToElement (xmlDocWalkerPtr iter);
|
||||
|
||||
xmlNodePtr
|
||||
xmlDocWalkerCurrentNode (xmlDocWalkerPtr iter);
|
||||
xmlDocPtr
|
||||
xmlDocWalkerCurrentDoc (xmlDocWalkerPtr iter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocWalkerNext (xmlDocWalkerPtr iter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_XMLDWALK_H__ */
|
@ -128,6 +128,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
#define LIBXML_SAX1_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_WALKER_ENABLED:
|
||||
*
|
||||
* Whether the xmlDocWalker interface is configured in
|
||||
*/
|
||||
#if @WITH_WALKER@
|
||||
#define LIBXML_WALKER_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_FTP_ENABLED:
|
||||
*
|
||||
|
1197
xmldwalk.c
Normal file
1197
xmldwalk.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user