Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK!>㮆libxml2-config.cmakenu[# libxml2-config.cmake # -------------------- # # Libxml2 cmake module. # This module sets the following variables: # # :: # # LIBXML2_FOUND - True if libxml2 headers and libraries were found # LIBXML2_INCLUDE_DIR - Directory where LibXml2 headers are located. # LIBXML2_INCLUDE_DIRS - list of the include directories needed to use LibXml2. # LIBXML2_LIBRARY - path to the LibXml2 library. # LIBXML2_LIBRARIES - xml2 libraries to link against. # LIBXML2_DEFINITIONS - the compiler switches required for using LibXml2. # LIBXML2_VERSION_MAJOR - The major version of libxml2. # LIBXML2_VERSION_MINOR - The minor version of libxml2. # LIBXML2_VERSION_PATCH - The patch version of libxml2. # LIBXML2_VERSION_STRING - version number as a string (ex: "2.3.4") # LIBXML2_MODULES - whether libxml2 has dso support # LIBXML2_XMLLINT_EXECUTABLE - path to the XML checking tool xmllint coming with LibXml2 # # The following targets are defined: # # LibXml2::LibXml2 - the LibXml2 library # LibXml2::xmllint - the xmllint command-line executable set(LIBXML2_VERSION_MAJOR 2) set(LIBXML2_VERSION_MINOR 15) set(LIBXML2_VERSION_MICRO 3) set(LIBXML2_VERSION_STRING "2.15.3") set(LIBXML2_DEFINITIONS "") set(LIBXML2_INCLUDE_DIR /opt/cpanel/ea-libxml2/include/libxml2) set(LIBXML2_LIBRARY_DIR /opt/cpanel/ea-libxml2/lib64) find_library(LIBXML2_LIBRARY NAMES xml2 HINTS ${LIBXML2_LIBRARY_DIR} NO_DEFAULT_PATH) find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS /opt/cpanel/ea-libxml2/bin NO_DEFAULT_PATH) find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS /opt/cpanel/ea-libxml2/bin NO_DEFAULT_PATH) set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY}) set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR}) unset(LIBXML2_INTERFACE_LINK_LIBRARIES) include(CMakeFindDependencyMacro) set(LIBXML2_SHARED 1) set(LIBXML2_WITH_ICONV 1) set(LIBXML2_WITH_THREADS 1) set(LIBXML2_WITH_ICU 0) set(LIBXML2_WITH_ZLIB 0) if(NOT LIBXML2_SHARED) set(LIBXML2_DEFINITIONS -DLIBXML_STATIC) if(LIBXML2_WITH_ICONV) find_dependency(Iconv) list(APPEND LIBXML2_LIBRARIES ${Iconv_LIBRARIES}) list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") if(NOT Iconv_FOUND) set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "Iconv dependency was not found") return() endif() endif() if(LIBXML2_WITH_THREADS) find_dependency(Threads) list(APPEND LIBXML2_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") if(NOT Threads_FOUND) set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "Threads dependency was not found") return() endif() endif() if(LIBXML2_WITH_ICU) find_dependency(ICU COMPONENTS data i18n uc) list(APPEND LIBXML2_LIBRARIES ${ICU_LIBRARIES}) list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$;\$;\$") if(NOT ICU_FOUND) set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "ICU dependency was not found") return() endif() endif() if(LIBXML2_WITH_ZLIB) find_dependency(ZLIB) list(APPEND LIBXML2_LIBRARIES ${ZLIB_LIBRARIES}) list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") if(NOT ZLIB_FOUND) set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "ZLIB dependency was not found") return() endif() endif() if(UNIX) list(APPEND LIBXML2_LIBRARIES m) list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") endif() if(WIN32) list(APPEND LIBXML2_LIBRARIES Bcrypt) list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") endif() endif() # whether libxml2 has dso support set(LIBXML2_MODULES 1) mark_as_advanced(LIBXML2_LIBRARY LIBXML2_XMLCATALOG_EXECUTABLE LIBXML2_XMLLINT_EXECUTABLE) if(DEFINED LIBXML2_LIBRARY AND DEFINED LIBXML2_INCLUDE_DIRS) set(LIBXML2_FOUND TRUE) endif() if(NOT TARGET LibXml2::LibXml2 AND DEFINED LIBXML2_LIBRARY AND DEFINED LIBXML2_INCLUDE_DIRS) add_library(LibXml2::LibXml2 UNKNOWN IMPORTED) set_target_properties(LibXml2::LibXml2 PROPERTIES IMPORTED_LOCATION "${LIBXML2_LIBRARY}") set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_COMPILE_OPTIONS "${LIBXML2_DEFINITIONS}") set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBXML2_INCLUDE_DIRS}") set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_LINK_LIBRARIES "${LIBXML2_INTERFACE_LINK_LIBRARIES}") endif() if(NOT TARGET LibXml2::xmlcatalog AND DEFINED LIBXML2_XMLCATALOG_EXECUTABLE) add_executable(LibXml2::xmlcatalog IMPORTED) set_target_properties(LibXml2::xmlcatalog PROPERTIES IMPORTED_LOCATION "${LIBXML2_XMLCATALOG_EXECUTABLE}") endif() if(NOT TARGET LibXml2::xmllint AND DEFINED LIBXML2_XMLLINT_EXECUTABLE) add_executable(LibXml2::xmllint IMPORTED) set_target_properties(LibXml2::xmllint PROPERTIES IMPORTED_LOCATION "${LIBXML2_XMLLINT_EXECUTABLE}") endif() PK!$J libxml/tree.hnu[/* * Summary: interfaces for tree manipulation * Description: this module describes the structures found in an tree resulting * from an XML or HTML parsing, as well as the API provided for * various processing on that tree * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_TREE_H__ #define __XML_TREE_H__ #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* * Some of the basic types pointer to structures: */ /* xmlIO.h */ typedef struct _xmlParserInputBuffer xmlParserInputBuffer; typedef xmlParserInputBuffer *xmlParserInputBufferPtr; typedef struct _xmlOutputBuffer xmlOutputBuffer; typedef xmlOutputBuffer *xmlOutputBufferPtr; /* parser.h */ typedef struct _xmlParserInput xmlParserInput; typedef xmlParserInput *xmlParserInputPtr; typedef struct _xmlParserCtxt xmlParserCtxt; typedef xmlParserCtxt *xmlParserCtxtPtr; typedef struct _xmlSAXLocator xmlSAXLocator; typedef xmlSAXLocator *xmlSAXLocatorPtr; typedef struct _xmlSAXHandler xmlSAXHandler; typedef xmlSAXHandler *xmlSAXHandlerPtr; /* entities.h */ typedef struct _xmlEntity xmlEntity; typedef xmlEntity *xmlEntityPtr; /** * BASE_BUFFER_SIZE: * * default buffer size 4000. */ #define BASE_BUFFER_SIZE 4096 /** * LIBXML_NAMESPACE_DICT: * * Defines experimental behaviour: * 1) xmlNs gets an additional field @context (a xmlDoc) * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc. */ /* #define LIBXML_NAMESPACE_DICT */ /** * xmlBufferAllocationScheme: * * A buffer allocation scheme can be defined to either match exactly the * need or double it's allocated size each time it is found too small. */ typedef enum { XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */ XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */ XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */ XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */ } xmlBufferAllocationScheme; /** * xmlBuffer: * * A buffer structure, this old construct is limited to 2GB and * is being deprecated, use API with xmlBuf instead */ typedef struct _xmlBuffer xmlBuffer; typedef xmlBuffer *xmlBufferPtr; struct _xmlBuffer { xmlChar *content; /* The buffer content UTF8 */ unsigned int use; /* The buffer size used */ unsigned int size; /* The buffer size */ xmlBufferAllocationScheme alloc; /* The realloc method */ xmlChar *contentIO; /* in IO mode we may have a different base */ }; /** * xmlBuf: * * A buffer structure, new one, the actual structure internals are not public */ typedef struct _xmlBuf xmlBuf; /** * xmlBufPtr: * * A pointer to a buffer structure, the actual structure internals are not * public */ typedef xmlBuf *xmlBufPtr; /* * A few public routines for xmlBuf. As those are expected to be used * mostly internally the bulk of the routines are internal in buf.h */ XMLPUBFUN xmlChar* XMLCALL xmlBufContent (const xmlBuf* buf); XMLPUBFUN xmlChar* XMLCALL xmlBufEnd (xmlBufPtr buf); XMLPUBFUN size_t XMLCALL xmlBufUse (const xmlBufPtr buf); XMLPUBFUN size_t XMLCALL xmlBufShrink (xmlBufPtr buf, size_t len); /* * LIBXML2_NEW_BUFFER: * * Macro used to express that the API use the new buffers for * xmlParserInputBuffer and xmlOutputBuffer. The change was * introduced in 2.9.0. */ #define LIBXML2_NEW_BUFFER /** * XML_XML_NAMESPACE: * * This is the namespace for the special xml: prefix predefined in the * XML Namespace specification. */ #define XML_XML_NAMESPACE \ (const xmlChar *) "http://www.w3.org/XML/1998/namespace" /** * XML_XML_ID: * * This is the name for the special xml:id attribute */ #define XML_XML_ID (const xmlChar *) "xml:id" /* * The different element types carried by an XML tree. * * NOTE: This is synchronized with DOM Level1 values * See http://www.w3.org/TR/REC-DOM-Level-1/ * * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should * be deprecated to use an XML_DTD_NODE. */ typedef enum { XML_ELEMENT_NODE= 1, XML_ATTRIBUTE_NODE= 2, XML_TEXT_NODE= 3, XML_CDATA_SECTION_NODE= 4, XML_ENTITY_REF_NODE= 5, XML_ENTITY_NODE= 6, XML_PI_NODE= 7, XML_COMMENT_NODE= 8, XML_DOCUMENT_NODE= 9, XML_DOCUMENT_TYPE_NODE= 10, XML_DOCUMENT_FRAG_NODE= 11, XML_NOTATION_NODE= 12, XML_HTML_DOCUMENT_NODE= 13, XML_DTD_NODE= 14, XML_ELEMENT_DECL= 15, XML_ATTRIBUTE_DECL= 16, XML_ENTITY_DECL= 17, XML_NAMESPACE_DECL= 18, XML_XINCLUDE_START= 19, XML_XINCLUDE_END= 20 /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */ } xmlElementType; /* For backward compatibility */ #define XML_DOCB_DOCUMENT_NODE 21 /** * xmlNotation: * * A DTD Notation definition. */ typedef struct _xmlNotation xmlNotation; typedef xmlNotation *xmlNotationPtr; struct _xmlNotation { const xmlChar *name; /* Notation name */ const xmlChar *PublicID; /* Public identifier, if any */ const xmlChar *SystemID; /* System identifier, if any */ }; /** * xmlAttributeType: * * A DTD Attribute type definition. */ typedef enum { XML_ATTRIBUTE_CDATA = 1, XML_ATTRIBUTE_ID, XML_ATTRIBUTE_IDREF , XML_ATTRIBUTE_IDREFS, XML_ATTRIBUTE_ENTITY, XML_ATTRIBUTE_ENTITIES, XML_ATTRIBUTE_NMTOKEN, XML_ATTRIBUTE_NMTOKENS, XML_ATTRIBUTE_ENUMERATION, XML_ATTRIBUTE_NOTATION } xmlAttributeType; /** * xmlAttributeDefault: * * A DTD Attribute default definition. */ typedef enum { XML_ATTRIBUTE_NONE = 1, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED, XML_ATTRIBUTE_FIXED } xmlAttributeDefault; /** * xmlEnumeration: * * List structure used when there is an enumeration in DTDs. */ typedef struct _xmlEnumeration xmlEnumeration; typedef xmlEnumeration *xmlEnumerationPtr; struct _xmlEnumeration { struct _xmlEnumeration *next; /* next one */ const xmlChar *name; /* Enumeration name */ }; /** * xmlAttribute: * * An Attribute declaration in a DTD. */ typedef struct _xmlAttribute xmlAttribute; typedef xmlAttribute *xmlAttributePtr; struct _xmlAttribute { void *_private; /* application data */ xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ const xmlChar *name; /* Attribute name */ struct _xmlNode *children; /* NULL */ struct _xmlNode *last; /* NULL */ struct _xmlDtd *parent; /* -> DTD */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* the containing document */ struct _xmlAttribute *nexth; /* next in hash table */ xmlAttributeType atype; /* The attribute type */ xmlAttributeDefault def; /* the default */ const xmlChar *defaultValue; /* or the default value */ xmlEnumerationPtr tree; /* or the enumeration tree if any */ const xmlChar *prefix; /* the namespace prefix if any */ const xmlChar *elem; /* Element holding the attribute */ }; /** * xmlElementContentType: * * Possible definitions of element content types. */ typedef enum { XML_ELEMENT_CONTENT_PCDATA = 1, XML_ELEMENT_CONTENT_ELEMENT, XML_ELEMENT_CONTENT_SEQ, XML_ELEMENT_CONTENT_OR } xmlElementContentType; /** * xmlElementContentOccur: * * Possible definitions of element content occurrences. */ typedef enum { XML_ELEMENT_CONTENT_ONCE = 1, XML_ELEMENT_CONTENT_OPT, XML_ELEMENT_CONTENT_MULT, XML_ELEMENT_CONTENT_PLUS } xmlElementContentOccur; /** * xmlElementContent: * * An XML Element content as stored after parsing an element definition * in a DTD. */ typedef struct _xmlElementContent xmlElementContent; typedef xmlElementContent *xmlElementContentPtr; struct _xmlElementContent { xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ const xmlChar *name; /* Element name */ struct _xmlElementContent *c1; /* first child */ struct _xmlElementContent *c2; /* second child */ struct _xmlElementContent *parent; /* parent */ const xmlChar *prefix; /* Namespace prefix */ }; /** * xmlElementTypeVal: * * The different possibilities for an element content type. */ typedef enum { XML_ELEMENT_TYPE_UNDEFINED = 0, XML_ELEMENT_TYPE_EMPTY = 1, XML_ELEMENT_TYPE_ANY, XML_ELEMENT_TYPE_MIXED, XML_ELEMENT_TYPE_ELEMENT } xmlElementTypeVal; #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif /** * xmlElement: * * An XML Element declaration from a DTD. */ typedef struct _xmlElement xmlElement; typedef xmlElement *xmlElementPtr; struct _xmlElement { void *_private; /* application data */ xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ const xmlChar *name; /* Element name */ struct _xmlNode *children; /* NULL */ struct _xmlNode *last; /* NULL */ struct _xmlDtd *parent; /* -> DTD */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* the containing document */ xmlElementTypeVal etype; /* The type */ xmlElementContentPtr content; /* the allowed element content */ xmlAttributePtr attributes; /* List of the declared attributes */ const xmlChar *prefix; /* the namespace prefix if any */ #ifdef LIBXML_REGEXP_ENABLED xmlRegexpPtr contModel; /* the validating regexp */ #else void *contModel; #endif }; /** * XML_LOCAL_NAMESPACE: * * A namespace declaration node. */ #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL typedef xmlElementType xmlNsType; /** * xmlNs: * * An XML namespace. * Note that prefix == NULL is valid, it defines the default namespace * within the subtree (until overridden). * * xmlNsType is unified with xmlElementType. */ typedef struct _xmlNs xmlNs; typedef xmlNs *xmlNsPtr; struct _xmlNs { struct _xmlNs *next; /* next Ns link for this node */ xmlNsType type; /* global or local */ const xmlChar *href; /* URL for the namespace */ const xmlChar *prefix; /* prefix for the namespace */ void *_private; /* application data */ struct _xmlDoc *context; /* normally an xmlDoc */ }; /** * xmlDtd: * * An XML DTD, as defined by parent link */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* the containing document */ /* End of common part */ void *notations; /* Hash table for notations if any */ void *elements; /* Hash table for elements if any */ void *attributes; /* Hash table for attributes if any */ void *entities; /* Hash table for entities if any */ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ void *pentities; /* Hash table for param entities if any */ }; /** * xmlAttr: * * An attribute on an XML node. */ typedef struct _xmlAttr xmlAttr; typedef xmlAttr *xmlAttrPtr; struct _xmlAttr { void *_private; /* application data */ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ const xmlChar *name; /* the name of the property */ struct _xmlNode *children; /* the value of the property */ struct _xmlNode *last; /* NULL */ struct _xmlNode *parent; /* child->parent link */ struct _xmlAttr *next; /* next sibling link */ struct _xmlAttr *prev; /* previous sibling link */ struct _xmlDoc *doc; /* the containing document */ xmlNs *ns; /* pointer to the associated namespace */ xmlAttributeType atype; /* the attribute type if validating */ void *psvi; /* for type/PSVI information */ }; /** * xmlID: * * An XML ID instance. */ typedef struct _xmlID xmlID; typedef xmlID *xmlIDPtr; struct _xmlID { struct _xmlID *next; /* next ID */ const xmlChar *value; /* The ID name */ xmlAttrPtr attr; /* The attribute holding it */ const xmlChar *name; /* The attribute if attr is not available */ int lineno; /* The line number if attr is not available */ struct _xmlDoc *doc; /* The document holding the ID */ }; /** * xmlRef: * * An XML IDREF instance. */ typedef struct _xmlRef xmlRef; typedef xmlRef *xmlRefPtr; struct _xmlRef { struct _xmlRef *next; /* next Ref */ const xmlChar *value; /* The Ref name */ xmlAttrPtr attr; /* The attribute holding it */ const xmlChar *name; /* The attribute if attr is not available */ int lineno; /* The line number if attr is not available */ }; /** * xmlNode: * * A node in an XML tree. */ typedef struct _xmlNode xmlNode; typedef xmlNode *xmlNodePtr; struct _xmlNode { void *_private; /* application data */ xmlElementType type; /* type number, must be second ! */ const xmlChar *name; /* the name of the node, or the entity */ struct _xmlNode *children; /* parent->childs link */ struct _xmlNode *last; /* last child link */ struct _xmlNode *parent; /* child->parent link */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* the containing document */ /* End of common part */ xmlNs *ns; /* pointer to the associated namespace */ xmlChar *content; /* the content */ struct _xmlAttr *properties;/* properties list */ xmlNs *nsDef; /* namespace definitions on this node */ void *psvi; /* for type/PSVI information */ unsigned short line; /* line number */ unsigned short extra; /* extra data for XPath/XSLT */ }; /** * XML_GET_CONTENT: * * Macro to extract the content pointer of a node. */ #define XML_GET_CONTENT(n) \ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) /** * XML_GET_LINE: * * Macro to extract the line number of an element node. */ #define XML_GET_LINE(n) \ (xmlGetLineNo(n)) /** * xmlDocProperty * * Set of properties of the document as found by the parser * Some of them are linked to similarly named xmlParserOption */ typedef enum { XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */ XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */ XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */ XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */ XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */ XML_DOC_USERBUILT = 1<<5, /* Document was built using the API and not by parsing an instance */ XML_DOC_INTERNAL = 1<<6, /* built for internal processing */ XML_DOC_HTML = 1<<7 /* parsed or built HTML document */ } xmlDocProperties; /** * xmlDoc: * * An XML document. */ typedef struct _xmlDoc xmlDoc; typedef xmlDoc *xmlDocPtr; struct _xmlDoc { void *_private; /* application data */ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ char *name; /* name/filename/URI of the document */ struct _xmlNode *children; /* the document tree */ struct _xmlNode *last; /* last child link */ struct _xmlNode *parent; /* child->parent link */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* autoreference to itself */ /* End of common part */ int compression;/* level of zlib compression */ int standalone; /* standalone document (no external refs) 1 if standalone="yes" 0 if standalone="no" -1 if there is no XML declaration -2 if there is an XML declaration, but no standalone attribute was specified */ struct _xmlDtd *intSubset; /* the document internal subset */ struct _xmlDtd *extSubset; /* the document external subset */ struct _xmlNs *oldNs; /* Global namespace, the old way */ const xmlChar *version; /* the XML version string */ const xmlChar *encoding; /* external initial encoding, if any */ void *ids; /* Hash table for ID attributes if any */ void *refs; /* Hash table for IDREFs attributes if any */ const xmlChar *URL; /* The URI for that document */ int charset; /* Internal flag for charset handling, actually an xmlCharEncoding */ struct _xmlDict *dict; /* dict used to allocate names or NULL */ void *psvi; /* for type/PSVI information */ int parseFlags; /* set of xmlParserOption used to parse the document */ int properties; /* set of xmlDocProperties for this document set at the end of parsing */ }; typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt; typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr; /** * xmlDOMWrapAcquireNsFunction: * @ctxt: a DOM wrapper context * @node: the context node (element or attribute) * @nsName: the requested namespace name * @nsPrefix: the requested namespace prefix * * A function called to acquire namespaces (xmlNs) from the wrapper. * * Returns an xmlNsPtr or NULL in case of an error. */ typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt, xmlNodePtr node, const xmlChar *nsName, const xmlChar *nsPrefix); /** * xmlDOMWrapCtxt: * * Context for DOM wrapper-operations. */ struct _xmlDOMWrapCtxt { void * _private; /* * The type of this context, just in case we need specialized * contexts in the future. */ int type; /* * Internal namespace map used for various operations. */ void * namespaceMap; /* * Use this one to acquire an xmlNsPtr intended for node->ns. * (Note that this is not intended for elem->nsDef). */ xmlDOMWrapAcquireNsFunction getNsForNodeFunc; }; /** * xmlChildrenNode: * * Macro for compatibility naming layer with libxml1. Maps * to "children." */ #ifndef xmlChildrenNode #define xmlChildrenNode children #endif /** * xmlRootNode: * * Macro for compatibility naming layer with libxml1. Maps * to "children". */ #ifndef xmlRootNode #define xmlRootNode children #endif /* * Variables. */ /* * Some helper functions */ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \ defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \ defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \ defined(LIBXML_LEGACY_ENABLED) XMLPUBFUN int XMLCALL xmlValidateNCName (const xmlChar *value, int space); #endif #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) XMLPUBFUN int XMLCALL xmlValidateQName (const xmlChar *value, int space); XMLPUBFUN int XMLCALL xmlValidateName (const xmlChar *value, int space); XMLPUBFUN int XMLCALL xmlValidateNMToken (const xmlChar *value, int space); #endif XMLPUBFUN xmlChar * XMLCALL xmlBuildQName (const xmlChar *ncname, const xmlChar *prefix, xmlChar *memory, int len); XMLPUBFUN xmlChar * XMLCALL xmlSplitQName2 (const xmlChar *name, xmlChar **prefix); XMLPUBFUN const xmlChar * XMLCALL xmlSplitQName3 (const xmlChar *name, int *len); /* * Handling Buffers, the old ones see @xmlBuf for the new ones. */ XMLPUBFUN void XMLCALL xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme); XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlGetBufferAllocationScheme(void); XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreate (void); XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreateSize (size_t size); XMLPUBFUN xmlBufferPtr XMLCALL xmlBufferCreateStatic (void *mem, size_t size); XMLPUBFUN int XMLCALL xmlBufferResize (xmlBufferPtr buf, unsigned int size); XMLPUBFUN void XMLCALL xmlBufferFree (xmlBufferPtr buf); XMLPUBFUN int XMLCALL xmlBufferDump (FILE *file, xmlBufferPtr buf); XMLPUBFUN int XMLCALL xmlBufferAdd (xmlBufferPtr buf, const xmlChar *str, int len); XMLPUBFUN int XMLCALL xmlBufferAddHead (xmlBufferPtr buf, const xmlChar *str, int len); XMLPUBFUN int XMLCALL xmlBufferCat (xmlBufferPtr buf, const xmlChar *str); XMLPUBFUN int XMLCALL xmlBufferCCat (xmlBufferPtr buf, const char *str); XMLPUBFUN int XMLCALL xmlBufferShrink (xmlBufferPtr buf, unsigned int len); XMLPUBFUN int XMLCALL xmlBufferGrow (xmlBufferPtr buf, unsigned int len); XMLPUBFUN void XMLCALL xmlBufferEmpty (xmlBufferPtr buf); XMLPUBFUN const xmlChar* XMLCALL xmlBufferContent (const xmlBuffer *buf); XMLPUBFUN xmlChar* XMLCALL xmlBufferDetach (xmlBufferPtr buf); XMLPUBFUN void XMLCALL xmlBufferSetAllocationScheme(xmlBufferPtr buf, xmlBufferAllocationScheme scheme); XMLPUBFUN int XMLCALL xmlBufferLength (const xmlBuffer *buf); /* * Creating/freeing new structures. */ XMLPUBFUN xmlDtdPtr XMLCALL xmlCreateIntSubset (xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); XMLPUBFUN xmlDtdPtr XMLCALL xmlNewDtd (xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); XMLPUBFUN xmlDtdPtr XMLCALL xmlGetIntSubset (const xmlDoc *doc); XMLPUBFUN void XMLCALL xmlFreeDtd (xmlDtdPtr cur); #ifdef LIBXML_LEGACY_ENABLED XML_DEPRECATED XMLPUBFUN xmlNsPtr XMLCALL xmlNewGlobalNs (xmlDocPtr doc, const xmlChar *href, const xmlChar *prefix); #endif /* LIBXML_LEGACY_ENABLED */ XMLPUBFUN xmlNsPtr XMLCALL xmlNewNs (xmlNodePtr node, const xmlChar *href, const xmlChar *prefix); XMLPUBFUN void XMLCALL xmlFreeNs (xmlNsPtr cur); XMLPUBFUN void XMLCALL xmlFreeNsList (xmlNsPtr cur); XMLPUBFUN xmlDocPtr XMLCALL xmlNewDoc (const xmlChar *version); XMLPUBFUN void XMLCALL xmlFreeDoc (xmlDocPtr cur); XMLPUBFUN xmlAttrPtr XMLCALL xmlNewDocProp (xmlDocPtr doc, const xmlChar *name, const xmlChar *value); #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ defined(LIBXML_SCHEMAS_ENABLED) XMLPUBFUN xmlAttrPtr XMLCALL xmlNewProp (xmlNodePtr node, const xmlChar *name, const xmlChar *value); #endif XMLPUBFUN xmlAttrPtr XMLCALL xmlNewNsProp (xmlNodePtr node, xmlNsPtr ns, const xmlChar *name, const xmlChar *value); XMLPUBFUN xmlAttrPtr XMLCALL xmlNewNsPropEatName (xmlNodePtr node, xmlNsPtr ns, xmlChar *name, const xmlChar *value); XMLPUBFUN void XMLCALL xmlFreePropList (xmlAttrPtr cur); XMLPUBFUN void XMLCALL xmlFreeProp (xmlAttrPtr cur); XMLPUBFUN xmlAttrPtr XMLCALL xmlCopyProp (xmlNodePtr target, xmlAttrPtr cur); XMLPUBFUN xmlAttrPtr XMLCALL xmlCopyPropList (xmlNodePtr target, xmlAttrPtr cur); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN xmlDtdPtr XMLCALL xmlCopyDtd (xmlDtdPtr dtd); #endif /* LIBXML_TREE_ENABLED */ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) XMLPUBFUN xmlDocPtr XMLCALL xmlCopyDoc (xmlDocPtr doc, int recursive); #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */ /* * Creating new nodes. */ XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNode (xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNodeEatName (xmlDocPtr doc, xmlNsPtr ns, xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewNode (xmlNsPtr ns, const xmlChar *name); XMLPUBFUN xmlNodePtr XMLCALL xmlNewNodeEatName (xmlNsPtr ns, xmlChar *name); #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) XMLPUBFUN xmlNodePtr XMLCALL xmlNewChild (xmlNodePtr parent, xmlNsPtr ns, const xmlChar *name, const xmlChar *content); #endif XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocText (const xmlDoc *doc, const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewText (const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocPI (xmlDocPtr doc, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewPI (const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocTextLen (xmlDocPtr doc, const xmlChar *content, int len); XMLPUBFUN xmlNodePtr XMLCALL xmlNewTextLen (const xmlChar *content, int len); XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocComment (xmlDocPtr doc, const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewComment (const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewCDataBlock (xmlDocPtr doc, const xmlChar *content, int len); XMLPUBFUN xmlNodePtr XMLCALL xmlNewCharRef (xmlDocPtr doc, const xmlChar *name); XMLPUBFUN xmlNodePtr XMLCALL xmlNewReference (const xmlDoc *doc, const xmlChar *name); XMLPUBFUN xmlNodePtr XMLCALL xmlCopyNode (xmlNodePtr node, int recursive); XMLPUBFUN xmlNodePtr XMLCALL xmlDocCopyNode (xmlNodePtr node, xmlDocPtr doc, int recursive); XMLPUBFUN xmlNodePtr XMLCALL xmlDocCopyNodeList (xmlDocPtr doc, xmlNodePtr node); XMLPUBFUN xmlNodePtr XMLCALL xmlCopyNodeList (xmlNodePtr node); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN xmlNodePtr XMLCALL xmlNewTextChild (xmlNodePtr parent, xmlNsPtr ns, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocRawNode (xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocFragment (xmlDocPtr doc); #endif /* LIBXML_TREE_ENABLED */ /* * Navigating. */ XMLPUBFUN long XMLCALL xmlGetLineNo (const xmlNode *node); #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) XMLPUBFUN xmlChar * XMLCALL xmlGetNodePath (const xmlNode *node); #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */ XMLPUBFUN xmlNodePtr XMLCALL xmlDocGetRootElement (const xmlDoc *doc); XMLPUBFUN xmlNodePtr XMLCALL xmlGetLastChild (const xmlNode *parent); XMLPUBFUN int XMLCALL xmlNodeIsText (const xmlNode *node); XMLPUBFUN int XMLCALL xmlIsBlankNode (const xmlNode *node); /* * Changing the structure. */ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) XMLPUBFUN xmlNodePtr XMLCALL xmlDocSetRootElement (xmlDocPtr doc, xmlNodePtr root); #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */ #ifdef LIBXML_TREE_ENABLED XMLPUBFUN void XMLCALL xmlNodeSetName (xmlNodePtr cur, const xmlChar *name); #endif /* LIBXML_TREE_ENABLED */ XMLPUBFUN xmlNodePtr XMLCALL xmlAddChild (xmlNodePtr parent, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlAddChildList (xmlNodePtr parent, xmlNodePtr cur); #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) XMLPUBFUN xmlNodePtr XMLCALL xmlReplaceNode (xmlNodePtr old, xmlNodePtr cur); #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) XMLPUBFUN xmlNodePtr XMLCALL xmlAddPrevSibling (xmlNodePtr cur, xmlNodePtr elem); #endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */ XMLPUBFUN xmlNodePtr XMLCALL xmlAddSibling (xmlNodePtr cur, xmlNodePtr elem); XMLPUBFUN xmlNodePtr XMLCALL xmlAddNextSibling (xmlNodePtr cur, xmlNodePtr elem); XMLPUBFUN void XMLCALL xmlUnlinkNode (xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlTextMerge (xmlNodePtr first, xmlNodePtr second); XMLPUBFUN int XMLCALL xmlTextConcat (xmlNodePtr node, const xmlChar *content, int len); XMLPUBFUN void XMLCALL xmlFreeNodeList (xmlNodePtr cur); XMLPUBFUN void XMLCALL xmlFreeNode (xmlNodePtr cur); XMLPUBFUN void XMLCALL xmlSetTreeDoc (xmlNodePtr tree, xmlDocPtr doc); XMLPUBFUN void XMLCALL xmlSetListDoc (xmlNodePtr list, xmlDocPtr doc); /* * Namespaces. */ XMLPUBFUN xmlNsPtr XMLCALL xmlSearchNs (xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace); XMLPUBFUN xmlNsPtr XMLCALL xmlSearchNsByHref (xmlDocPtr doc, xmlNodePtr node, const xmlChar *href); #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \ defined(LIBXML_SCHEMAS_ENABLED) XMLPUBFUN xmlNsPtr * XMLCALL xmlGetNsList (const xmlDoc *doc, const xmlNode *node); #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */ XMLPUBFUN void XMLCALL xmlSetNs (xmlNodePtr node, xmlNsPtr ns); XMLPUBFUN xmlNsPtr XMLCALL xmlCopyNamespace (xmlNsPtr cur); XMLPUBFUN xmlNsPtr XMLCALL xmlCopyNamespaceList (xmlNsPtr cur); /* * Changing the content. */ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) XMLPUBFUN xmlAttrPtr XMLCALL xmlSetProp (xmlNodePtr node, const xmlChar *name, const xmlChar *value); XMLPUBFUN xmlAttrPtr XMLCALL xmlSetNsProp (xmlNodePtr node, xmlNsPtr ns, const xmlChar *name, const xmlChar *value); #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */ XMLPUBFUN xmlChar * XMLCALL xmlGetNoNsProp (const xmlNode *node, const xmlChar *name); XMLPUBFUN xmlChar * XMLCALL xmlGetProp (const xmlNode *node, const xmlChar *name); XMLPUBFUN xmlAttrPtr XMLCALL xmlHasProp (const xmlNode *node, const xmlChar *name); XMLPUBFUN xmlAttrPtr XMLCALL xmlHasNsProp (const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace); XMLPUBFUN xmlChar * XMLCALL xmlGetNsProp (const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace); XMLPUBFUN xmlNodePtr XMLCALL xmlStringGetNodeList (const xmlDoc *doc, const xmlChar *value); XMLPUBFUN xmlNodePtr XMLCALL xmlStringLenGetNodeList (const xmlDoc *doc, const xmlChar *value, int len); XMLPUBFUN xmlChar * XMLCALL xmlNodeListGetString (xmlDocPtr doc, const xmlNode *list, int inLine); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN xmlChar * XMLCALL xmlNodeListGetRawString (const xmlDoc *doc, const xmlNode *list, int inLine); #endif /* LIBXML_TREE_ENABLED */ XMLPUBFUN void XMLCALL xmlNodeSetContent (xmlNodePtr cur, const xmlChar *content); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN void XMLCALL xmlNodeSetContentLen (xmlNodePtr cur, const xmlChar *content, int len); #endif /* LIBXML_TREE_ENABLED */ XMLPUBFUN void XMLCALL xmlNodeAddContent (xmlNodePtr cur, const xmlChar *content); XMLPUBFUN void XMLCALL xmlNodeAddContentLen (xmlNodePtr cur, const xmlChar *content, int len); XMLPUBFUN xmlChar * XMLCALL xmlNodeGetContent (const xmlNode *cur); XMLPUBFUN int XMLCALL xmlNodeBufGetContent (xmlBufferPtr buffer, const xmlNode *cur); XMLPUBFUN int XMLCALL xmlBufGetNodeContent (xmlBufPtr buf, const xmlNode *cur); XMLPUBFUN xmlChar * XMLCALL xmlNodeGetLang (const xmlNode *cur); XMLPUBFUN int XMLCALL xmlNodeGetSpacePreserve (const xmlNode *cur); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN void XMLCALL xmlNodeSetLang (xmlNodePtr cur, const xmlChar *lang); XMLPUBFUN void XMLCALL xmlNodeSetSpacePreserve (xmlNodePtr cur, int val); #endif /* LIBXML_TREE_ENABLED */ XMLPUBFUN xmlChar * XMLCALL xmlNodeGetBase (const xmlDoc *doc, const xmlNode *cur); #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) XMLPUBFUN void XMLCALL xmlNodeSetBase (xmlNodePtr cur, const xmlChar *uri); #endif /* * Removing content. */ XMLPUBFUN int XMLCALL xmlRemoveProp (xmlAttrPtr cur); #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) XMLPUBFUN int XMLCALL xmlUnsetNsProp (xmlNodePtr node, xmlNsPtr ns, const xmlChar *name); XMLPUBFUN int XMLCALL xmlUnsetProp (xmlNodePtr node, const xmlChar *name); #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */ /* * Internal, don't use. */ XMLPUBFUN void XMLCALL xmlBufferWriteCHAR (xmlBufferPtr buf, const xmlChar *string); XMLPUBFUN void XMLCALL xmlBufferWriteChar (xmlBufferPtr buf, const char *string); XMLPUBFUN void XMLCALL xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr attr, const xmlChar *string); #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef LIBXML_TREE_ENABLED /* * Namespace handling. */ XMLPUBFUN int XMLCALL xmlReconciliateNs (xmlDocPtr doc, xmlNodePtr tree); #endif #ifdef LIBXML_OUTPUT_ENABLED /* * Saving. */ XMLPUBFUN void XMLCALL xmlDocDumpFormatMemory (xmlDocPtr cur, xmlChar **mem, int *size, int format); XMLPUBFUN void XMLCALL xmlDocDumpMemory (xmlDocPtr cur, xmlChar **mem, int *size); XMLPUBFUN void XMLCALL xmlDocDumpMemoryEnc (xmlDocPtr out_doc, xmlChar **doc_txt_ptr, int * doc_txt_len, const char *txt_encoding); XMLPUBFUN void XMLCALL xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr, int * doc_txt_len, const char *txt_encoding, int format); XMLPUBFUN int XMLCALL xmlDocFormatDump (FILE *f, xmlDocPtr cur, int format); XMLPUBFUN int XMLCALL xmlDocDump (FILE *f, xmlDocPtr cur); XMLPUBFUN void XMLCALL xmlElemDump (FILE *f, xmlDocPtr doc, xmlNodePtr cur); XMLPUBFUN int XMLCALL xmlSaveFile (const char *filename, xmlDocPtr cur); XMLPUBFUN int XMLCALL xmlSaveFormatFile (const char *filename, xmlDocPtr cur, int format); XMLPUBFUN size_t XMLCALL xmlBufNodeDump (xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, int format); XMLPUBFUN int XMLCALL xmlNodeDump (xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, int format); XMLPUBFUN int XMLCALL xmlSaveFileTo (xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding); XMLPUBFUN int XMLCALL xmlSaveFormatFileTo (xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding, int format); XMLPUBFUN void XMLCALL xmlNodeDumpOutput (xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, int format, const char *encoding); XMLPUBFUN int XMLCALL xmlSaveFormatFileEnc (const char *filename, xmlDocPtr cur, const char *encoding, int format); XMLPUBFUN int XMLCALL xmlSaveFileEnc (const char *filename, xmlDocPtr cur, const char *encoding); #endif /* LIBXML_OUTPUT_ENABLED */ /* * XHTML */ XMLPUBFUN int XMLCALL xmlIsXHTML (const xmlChar *systemID, const xmlChar *publicID); /* * Compression. */ XMLPUBFUN int XMLCALL xmlGetDocCompressMode (const xmlDoc *doc); XMLPUBFUN void XMLCALL xmlSetDocCompressMode (xmlDocPtr doc, int mode); XMLPUBFUN int XMLCALL xmlGetCompressMode (void); XMLPUBFUN void XMLCALL xmlSetCompressMode (int mode); /* * DOM-wrapper helper functions. */ XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL xmlDOMWrapNewCtxt (void); XMLPUBFUN void XMLCALL xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt, xmlNodePtr elem, int options); XMLPUBFUN int XMLCALL xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt, xmlDocPtr sourceDoc, xmlNodePtr node, xmlDocPtr destDoc, xmlNodePtr destParent, int options); XMLPUBFUN int XMLCALL xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr node, int options); XMLPUBFUN int XMLCALL xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt, xmlDocPtr sourceDoc, xmlNodePtr node, xmlNodePtr *clonedNode, xmlDocPtr destDoc, xmlNodePtr destParent, int deep, int options); #ifdef LIBXML_TREE_ENABLED /* * 5 interfaces from DOM ElementTraversal, but different in entities * traversal. */ XMLPUBFUN unsigned long XMLCALL xmlChildElementCount (xmlNodePtr parent); XMLPUBFUN xmlNodePtr XMLCALL xmlNextElementSibling (xmlNodePtr node); XMLPUBFUN xmlNodePtr XMLCALL xmlFirstElementChild (xmlNodePtr parent); XMLPUBFUN xmlNodePtr XMLCALL xmlLastElementChild (xmlNodePtr parent); XMLPUBFUN xmlNodePtr XMLCALL xmlPreviousElementSibling (xmlNodePtr node); #endif #ifdef __cplusplus } #endif #ifndef __XML_PARSER_H__ #include #endif #endif /* __XML_TREE_H__ */ PK!e  libxml/list.hnu[/* * Summary: lists interfaces * Description: this module implement the list support used in * various place in the library. * * Copy: See Copyright for the status of this software. * * Author: Gary Pennington */ #ifndef __XML_LINK_INCLUDE__ #define __XML_LINK_INCLUDE__ #include #ifdef __cplusplus extern "C" { #endif typedef struct _xmlLink xmlLink; typedef xmlLink *xmlLinkPtr; typedef struct _xmlList xmlList; typedef xmlList *xmlListPtr; /** * xmlListDeallocator: * @lk: the data to deallocate * * Callback function used to free data from a list. */ typedef void (*xmlListDeallocator) (xmlLinkPtr lk); /** * xmlListDataCompare: * @data0: the first data * @data1: the second data * * Callback function used to compare 2 data. * * Returns 0 is equality, -1 or 1 otherwise depending on the ordering. */ typedef int (*xmlListDataCompare) (const void *data0, const void *data1); /** * xmlListWalker: * @data: the data found in the list * @user: extra user provided data to the walker * * Callback function used when walking a list with xmlListWalk(). * * Returns 0 to stop walking the list, 1 otherwise. */ typedef int (*xmlListWalker) (const void *data, void *user); /* Creation/Deletion */ XMLPUBFUN xmlListPtr XMLCALL xmlListCreate (xmlListDeallocator deallocator, xmlListDataCompare compare); XMLPUBFUN void XMLCALL xmlListDelete (xmlListPtr l); /* Basic Operators */ XMLPUBFUN void * XMLCALL xmlListSearch (xmlListPtr l, void *data); XMLPUBFUN void * XMLCALL xmlListReverseSearch (xmlListPtr l, void *data); XMLPUBFUN int XMLCALL xmlListInsert (xmlListPtr l, void *data) ; XMLPUBFUN int XMLCALL xmlListAppend (xmlListPtr l, void *data) ; XMLPUBFUN int XMLCALL xmlListRemoveFirst (xmlListPtr l, void *data); XMLPUBFUN int XMLCALL xmlListRemoveLast (xmlListPtr l, void *data); XMLPUBFUN int XMLCALL xmlListRemoveAll (xmlListPtr l, void *data); XMLPUBFUN void XMLCALL xmlListClear (xmlListPtr l); XMLPUBFUN int XMLCALL xmlListEmpty (xmlListPtr l); XMLPUBFUN xmlLinkPtr XMLCALL xmlListFront (xmlListPtr l); XMLPUBFUN xmlLinkPtr XMLCALL xmlListEnd (xmlListPtr l); XMLPUBFUN int XMLCALL xmlListSize (xmlListPtr l); XMLPUBFUN void XMLCALL xmlListPopFront (xmlListPtr l); XMLPUBFUN void XMLCALL xmlListPopBack (xmlListPtr l); XMLPUBFUN int XMLCALL xmlListPushFront (xmlListPtr l, void *data); XMLPUBFUN int XMLCALL xmlListPushBack (xmlListPtr l, void *data); /* Advanced Operators */ XMLPUBFUN void XMLCALL xmlListReverse (xmlListPtr l); XMLPUBFUN void XMLCALL xmlListSort (xmlListPtr l); XMLPUBFUN void XMLCALL xmlListWalk (xmlListPtr l, xmlListWalker walker, void *user); XMLPUBFUN void XMLCALL xmlListReverseWalk (xmlListPtr l, xmlListWalker walker, void *user); XMLPUBFUN void XMLCALL xmlListMerge (xmlListPtr l1, xmlListPtr l2); XMLPUBFUN xmlListPtr XMLCALL xmlListDup (const xmlListPtr old); XMLPUBFUN int XMLCALL xmlListCopy (xmlListPtr cur, const xmlListPtr old); /* Link operators */ XMLPUBFUN void * XMLCALL xmlLinkGetData (xmlLinkPtr lk); /* xmlListUnique() */ /* xmlListSwap */ #ifdef __cplusplus } #endif #endif /* __XML_LINK_INCLUDE__ */ PK!@hԇlibxml/xmlstring.hnu[/* * Summary: set of routines to process strings * Description: type and interfaces needed for the internal string handling * of the library, especially UTF8 processing. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_STRING_H__ #define __XML_STRING_H__ #include #include #ifdef __cplusplus extern "C" { #endif /** * xmlChar: * * This is a basic byte in an UTF-8 encoded string. * It's unsigned allowing to pinpoint case where char * are assigned * to xmlChar * (possibly making serialization back impossible). */ typedef unsigned char xmlChar; /** * BAD_CAST: * * Macro to cast a string to an xmlChar * when one know its safe. */ #define BAD_CAST (xmlChar *) /* * xmlChar handling */ XMLPUBFUN xmlChar * XMLCALL xmlStrdup (const xmlChar *cur); XMLPUBFUN xmlChar * XMLCALL xmlStrndup (const xmlChar *cur, int len); XMLPUBFUN xmlChar * XMLCALL xmlCharStrndup (const char *cur, int len); XMLPUBFUN xmlChar * XMLCALL xmlCharStrdup (const char *cur); XMLPUBFUN xmlChar * XMLCALL xmlStrsub (const xmlChar *str, int start, int len); XMLPUBFUN const xmlChar * XMLCALL xmlStrchr (const xmlChar *str, xmlChar val); XMLPUBFUN const xmlChar * XMLCALL xmlStrstr (const xmlChar *str, const xmlChar *val); XMLPUBFUN const xmlChar * XMLCALL xmlStrcasestr (const xmlChar *str, const xmlChar *val); XMLPUBFUN int XMLCALL xmlStrcmp (const xmlChar *str1, const xmlChar *str2); XMLPUBFUN int XMLCALL xmlStrncmp (const xmlChar *str1, const xmlChar *str2, int len); XMLPUBFUN int XMLCALL xmlStrcasecmp (const xmlChar *str1, const xmlChar *str2); XMLPUBFUN int XMLCALL xmlStrncasecmp (const xmlChar *str1, const xmlChar *str2, int len); XMLPUBFUN int XMLCALL xmlStrEqual (const xmlChar *str1, const xmlChar *str2); XMLPUBFUN int XMLCALL xmlStrQEqual (const xmlChar *pref, const xmlChar *name, const xmlChar *str); XMLPUBFUN int XMLCALL xmlStrlen (const xmlChar *str); XMLPUBFUN xmlChar * XMLCALL xmlStrcat (xmlChar *cur, const xmlChar *add); XMLPUBFUN xmlChar * XMLCALL xmlStrncat (xmlChar *cur, const xmlChar *add, int len); XMLPUBFUN xmlChar * XMLCALL xmlStrncatNew (const xmlChar *str1, const xmlChar *str2, int len); XMLPUBFUN int XMLCALL xmlStrPrintf (xmlChar *buf, int len, const char *msg, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlStrVPrintf (xmlChar *buf, int len, const char *msg, va_list ap) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlGetUTF8Char (const unsigned char *utf, int *len); XMLPUBFUN int XMLCALL xmlCheckUTF8 (const unsigned char *utf); XMLPUBFUN int XMLCALL xmlUTF8Strsize (const xmlChar *utf, int len); XMLPUBFUN xmlChar * XMLCALL xmlUTF8Strndup (const xmlChar *utf, int len); XMLPUBFUN const xmlChar * XMLCALL xmlUTF8Strpos (const xmlChar *utf, int pos); XMLPUBFUN int XMLCALL xmlUTF8Strloc (const xmlChar *utf, const xmlChar *utfchar); XMLPUBFUN xmlChar * XMLCALL xmlUTF8Strsub (const xmlChar *utf, int start, int len); XMLPUBFUN int XMLCALL xmlUTF8Strlen (const xmlChar *utf); XMLPUBFUN int XMLCALL xmlUTF8Size (const xmlChar *utf); XMLPUBFUN int XMLCALL xmlUTF8Charcmp (const xmlChar *utf1, const xmlChar *utf2); #ifdef __cplusplus } #endif #endif /* __XML_STRING_H__ */ PK!bc libxml/SAX2.hnu[/* * Summary: SAX2 parser interface used to build the DOM tree * Description: those are the default SAX2 interfaces used by * the library when building DOM tree. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_SAX2_H__ #define __XML_SAX2_H__ #include #include #include #include #ifdef __cplusplus extern "C" { #endif XMLPUBFUN const xmlChar * XMLCALL xmlSAX2GetPublicId (void *ctx); XMLPUBFUN const xmlChar * XMLCALL xmlSAX2GetSystemId (void *ctx); XMLPUBFUN void XMLCALL xmlSAX2SetDocumentLocator (void *ctx, xmlSAXLocatorPtr loc); XMLPUBFUN int XMLCALL xmlSAX2GetLineNumber (void *ctx); XMLPUBFUN int XMLCALL xmlSAX2GetColumnNumber (void *ctx); XMLPUBFUN int XMLCALL xmlSAX2IsStandalone (void *ctx); XMLPUBFUN int XMLCALL xmlSAX2HasInternalSubset (void *ctx); XMLPUBFUN int XMLCALL xmlSAX2HasExternalSubset (void *ctx); XMLPUBFUN void XMLCALL xmlSAX2InternalSubset (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); XMLPUBFUN void XMLCALL xmlSAX2ExternalSubset (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); XMLPUBFUN xmlEntityPtr XMLCALL xmlSAX2GetEntity (void *ctx, const xmlChar *name); XMLPUBFUN xmlEntityPtr XMLCALL xmlSAX2GetParameterEntity (void *ctx, const xmlChar *name); XMLPUBFUN xmlParserInputPtr XMLCALL xmlSAX2ResolveEntity (void *ctx, const xmlChar *publicId, const xmlChar *systemId); XMLPUBFUN void XMLCALL xmlSAX2EntityDecl (void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content); XMLPUBFUN void XMLCALL xmlSAX2AttributeDecl (void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree); XMLPUBFUN void XMLCALL xmlSAX2ElementDecl (void *ctx, const xmlChar *name, int type, xmlElementContentPtr content); XMLPUBFUN void XMLCALL xmlSAX2NotationDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); XMLPUBFUN void XMLCALL xmlSAX2UnparsedEntityDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName); XMLPUBFUN void XMLCALL xmlSAX2StartDocument (void *ctx); XMLPUBFUN void XMLCALL xmlSAX2EndDocument (void *ctx); #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) XMLPUBFUN void XMLCALL xmlSAX2StartElement (void *ctx, const xmlChar *fullname, const xmlChar **atts); XMLPUBFUN void XMLCALL xmlSAX2EndElement (void *ctx, const xmlChar *name); #endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */ XMLPUBFUN void XMLCALL xmlSAX2StartElementNs (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes); XMLPUBFUN void XMLCALL xmlSAX2EndElementNs (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI); XMLPUBFUN void XMLCALL xmlSAX2Reference (void *ctx, const xmlChar *name); XMLPUBFUN void XMLCALL xmlSAX2Characters (void *ctx, const xmlChar *ch, int len); XMLPUBFUN void XMLCALL xmlSAX2IgnorableWhitespace (void *ctx, const xmlChar *ch, int len); XMLPUBFUN void XMLCALL xmlSAX2ProcessingInstruction (void *ctx, const xmlChar *target, const xmlChar *data); XMLPUBFUN void XMLCALL xmlSAX2Comment (void *ctx, const xmlChar *value); XMLPUBFUN void XMLCALL xmlSAX2CDataBlock (void *ctx, const xmlChar *value, int len); #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN int XMLCALL xmlSAXDefaultVersion (int version); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN int XMLCALL xmlSAXVersion (xmlSAXHandler *hdlr, int version); XMLPUBFUN void XMLCALL xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr, int warning); #ifdef LIBXML_HTML_ENABLED XMLPUBFUN void XMLCALL xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr); XML_DEPRECATED XMLPUBFUN void XMLCALL htmlDefaultSAXHandlerInit (void); #endif XML_DEPRECATED XMLPUBFUN void XMLCALL xmlDefaultSAXHandlerInit (void); #ifdef __cplusplus } #endif #endif /* __XML_SAX2_H__ */ PK!Llibxml/xmlschemas.hnu[/* * Summary: incomplete XML Schemas structure implementation * Description: interface to the XML Schemas handling and schema validity * checking, it is incomplete right now. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_SCHEMA_H__ #define __XML_SCHEMA_H__ #include #ifdef LIBXML_SCHEMAS_ENABLED #include #ifdef __cplusplus extern "C" { #endif /** * This error codes are obsolete; not used any more. */ typedef enum { XML_SCHEMAS_ERR_OK = 0, XML_SCHEMAS_ERR_NOROOT = 1, XML_SCHEMAS_ERR_UNDECLAREDELEM, XML_SCHEMAS_ERR_NOTTOPLEVEL, XML_SCHEMAS_ERR_MISSING, XML_SCHEMAS_ERR_WRONGELEM, XML_SCHEMAS_ERR_NOTYPE, XML_SCHEMAS_ERR_NOROLLBACK, XML_SCHEMAS_ERR_ISABSTRACT, XML_SCHEMAS_ERR_NOTEMPTY, XML_SCHEMAS_ERR_ELEMCONT, XML_SCHEMAS_ERR_HAVEDEFAULT, XML_SCHEMAS_ERR_NOTNILLABLE, XML_SCHEMAS_ERR_EXTRACONTENT, XML_SCHEMAS_ERR_INVALIDATTR, XML_SCHEMAS_ERR_INVALIDELEM, XML_SCHEMAS_ERR_NOTDETERMINIST, XML_SCHEMAS_ERR_CONSTRUCT, XML_SCHEMAS_ERR_INTERNAL, XML_SCHEMAS_ERR_NOTSIMPLE, XML_SCHEMAS_ERR_ATTRUNKNOWN, XML_SCHEMAS_ERR_ATTRINVALID, XML_SCHEMAS_ERR_VALUE, XML_SCHEMAS_ERR_FACET, XML_SCHEMAS_ERR_, XML_SCHEMAS_ERR_XXX } xmlSchemaValidError; /* * ATTENTION: Change xmlSchemaSetValidOptions's check * for invalid values, if adding to the validation * options below. */ /** * xmlSchemaValidOption: * * This is the set of XML Schema validation options. */ typedef enum { XML_SCHEMA_VAL_VC_I_CREATE = 1<<0 /* Default/fixed: create an attribute node * or an element's text node on the instance. */ } xmlSchemaValidOption; /* XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1, * assemble schemata using * xsi:schemaLocation and * xsi:noNamespaceSchemaLocation */ /** * The schemas related types are kept internal */ typedef struct _xmlSchema xmlSchema; typedef xmlSchema *xmlSchemaPtr; /** * xmlSchemaValidityErrorFunc: * @ctx: the validation context * @msg: the message * @...: extra arguments * * Signature of an error callback from an XSD validation */ typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * xmlSchemaValidityWarningFunc: * @ctx: the validation context * @msg: the message * @...: extra arguments * * Signature of a warning callback from an XSD validation */ typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * A schemas validation context */ typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt; typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr; typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt; typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr; /** * xmlSchemaValidityLocatorFunc: * @ctx: user provided context * @file: returned file information * @line: returned line information * * A schemas validation locator, a callback called by the validator. * This is used when file or node information are not available * to find out what file and line number are affected * * Returns: 0 in case of success and -1 in case of error */ typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx, const char **file, unsigned long *line); /* * Interfaces for parsing. */ XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL xmlSchemaNewParserCtxt (const char *URL); XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL xmlSchemaNewMemParserCtxt (const char *buffer, int size); XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL xmlSchemaNewDocParserCtxt (xmlDocPtr doc); XMLPUBFUN void XMLCALL xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt, xmlSchemaValidityErrorFunc err, xmlSchemaValidityWarningFunc warn, void *ctx); XMLPUBFUN void XMLCALL xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt, xmlStructuredErrorFunc serror, void *ctx); XMLPUBFUN int XMLCALL xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, xmlSchemaValidityErrorFunc * err, xmlSchemaValidityWarningFunc * warn, void **ctx); XMLPUBFUN int XMLCALL xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt); XMLPUBFUN xmlSchemaPtr XMLCALL xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlSchemaFree (xmlSchemaPtr schema); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlSchemaDump (FILE *output, xmlSchemaPtr schema); #endif /* LIBXML_OUTPUT_ENABLED */ /* * Interfaces for validating */ XMLPUBFUN void XMLCALL xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidityErrorFunc err, xmlSchemaValidityWarningFunc warn, void *ctx); XMLPUBFUN void XMLCALL xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, xmlStructuredErrorFunc serror, void *ctx); XMLPUBFUN int XMLCALL xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidityErrorFunc *err, xmlSchemaValidityWarningFunc *warn, void **ctx); XMLPUBFUN int XMLCALL xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt, int options); XMLPUBFUN void XMLCALL xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt, const char *filename); XMLPUBFUN int XMLCALL xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt); XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL xmlSchemaNewValidCtxt (xmlSchemaPtr schema); XMLPUBFUN void XMLCALL xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt, xmlDocPtr instance); XMLPUBFUN int XMLCALL xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem); XMLPUBFUN int XMLCALL xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc, xmlSAXHandlerPtr sax, void *user_data); XMLPUBFUN int XMLCALL xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt, const char * filename, int options); XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt); /* * Interface to insert Schemas SAX validation in a SAX stream */ typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct; typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr; XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt, xmlSAXHandlerPtr *sax, void **user_data); XMLPUBFUN int XMLCALL xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug); XMLPUBFUN void XMLCALL xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt, xmlSchemaValidityLocatorFunc f, void *ctxt); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMAS_ENABLED */ #endif /* __XML_SCHEMA_H__ */ PK!Qulibxml/xmlmodule.hnu[/* * Summary: dynamic module loading * Description: basic API for dynamic module loading, used by * libexslt added in 2.6.17 * * Copy: See Copyright for the status of this software. * * Author: Joel W. Reed */ #ifndef __XML_MODULE_H__ #define __XML_MODULE_H__ #include #ifdef LIBXML_MODULES_ENABLED #ifdef __cplusplus extern "C" { #endif /** * xmlModulePtr: * * A handle to a dynamically loaded module */ typedef struct _xmlModule xmlModule; typedef xmlModule *xmlModulePtr; /** * xmlModuleOption: * * enumeration of options that can be passed down to xmlModuleOpen() */ typedef enum { XML_MODULE_LAZY = 1, /* lazy binding */ XML_MODULE_LOCAL= 2 /* local binding */ } xmlModuleOption; XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename, int options); XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module, const char* name, void **result); XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module); XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module); #ifdef __cplusplus } #endif #endif /* LIBXML_MODULES_ENABLED */ #endif /*__XML_MODULE_H__ */ PK!L! ! libxml/xmlsave.hnu[/* * Summary: the XML document serializer * Description: API to save document or subtree of document * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XMLSAVE_H__ #define __XML_XMLSAVE_H__ #include #include #include #include #ifdef LIBXML_OUTPUT_ENABLED #ifdef __cplusplus extern "C" { #endif /** * xmlSaveOption: * * This is the set of XML save options that can be passed down * to the xmlSaveToFd() and similar calls. */ typedef enum { XML_SAVE_FORMAT = 1<<0, /* format save output */ XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */ XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */ XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */ XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */ XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */ XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */ XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */ } xmlSaveOption; typedef struct _xmlSaveCtxt xmlSaveCtxt; typedef xmlSaveCtxt *xmlSaveCtxtPtr; XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToFd (int fd, const char *encoding, int options); XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToFilename (const char *filename, const char *encoding, int options); XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToBuffer (xmlBufferPtr buffer, const char *encoding, int options); XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToIO (xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, void *ioctx, const char *encoding, int options); XMLPUBFUN long XMLCALL xmlSaveDoc (xmlSaveCtxtPtr ctxt, xmlDocPtr doc); XMLPUBFUN long XMLCALL xmlSaveTree (xmlSaveCtxtPtr ctxt, xmlNodePtr node); XMLPUBFUN int XMLCALL xmlSaveFlush (xmlSaveCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlSaveClose (xmlSaveCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlSaveSetEscape (xmlSaveCtxtPtr ctxt, xmlCharEncodingOutputFunc escape); XMLPUBFUN int XMLCALL xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt, xmlCharEncodingOutputFunc escape); #ifdef __cplusplus } #endif #endif /* LIBXML_OUTPUT_ENABLED */ #endif /* __XML_XMLSAVE_H__ */ PK!<  libxml/pattern.hnu[/* * Summary: pattern expression handling * Description: allows to compile and test pattern expressions for nodes * either in a tree or based on a parser state. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_PATTERN_H__ #define __XML_PATTERN_H__ #include #include #include #ifdef LIBXML_PATTERN_ENABLED #ifdef __cplusplus extern "C" { #endif /** * xmlPattern: * * A compiled (XPath based) pattern to select nodes */ typedef struct _xmlPattern xmlPattern; typedef xmlPattern *xmlPatternPtr; /** * xmlPatternFlags: * * This is the set of options affecting the behaviour of pattern * matching with this module * */ typedef enum { XML_PATTERN_DEFAULT = 0, /* simple pattern match */ XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */ XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */ XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */ } xmlPatternFlags; XMLPUBFUN void XMLCALL xmlFreePattern (xmlPatternPtr comp); XMLPUBFUN void XMLCALL xmlFreePatternList (xmlPatternPtr comp); XMLPUBFUN xmlPatternPtr XMLCALL xmlPatterncompile (const xmlChar *pattern, xmlDict *dict, int flags, const xmlChar **namespaces); XMLPUBFUN int XMLCALL xmlPatternMatch (xmlPatternPtr comp, xmlNodePtr node); /* streaming interfaces */ typedef struct _xmlStreamCtxt xmlStreamCtxt; typedef xmlStreamCtxt *xmlStreamCtxtPtr; XMLPUBFUN int XMLCALL xmlPatternStreamable (xmlPatternPtr comp); XMLPUBFUN int XMLCALL xmlPatternMaxDepth (xmlPatternPtr comp); XMLPUBFUN int XMLCALL xmlPatternMinDepth (xmlPatternPtr comp); XMLPUBFUN int XMLCALL xmlPatternFromRoot (xmlPatternPtr comp); XMLPUBFUN xmlStreamCtxtPtr XMLCALL xmlPatternGetStreamCtxt (xmlPatternPtr comp); XMLPUBFUN void XMLCALL xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); XMLPUBFUN int XMLCALL xmlStreamPushNode (xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns, int nodeType); XMLPUBFUN int XMLCALL xmlStreamPush (xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns); XMLPUBFUN int XMLCALL xmlStreamPushAttr (xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns); XMLPUBFUN int XMLCALL xmlStreamPop (xmlStreamCtxtPtr stream); XMLPUBFUN int XMLCALL xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream); #ifdef __cplusplus } #endif #endif /* LIBXML_PATTERN_ENABLED */ #endif /* __XML_PATTERN_H__ */ PK!HftKKlibxml/xpathInternals.hnu[/* * Summary: internal interfaces for XML Path Language implementation * Description: internal interfaces for XML Path Language implementation * used to build new modules on top of XPath like XPointer and * XSLT * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XPATH_INTERNALS_H__ #define __XML_XPATH_INTERNALS_H__ #include #include #ifdef LIBXML_XPATH_ENABLED #ifdef __cplusplus extern "C" { #endif /************************************************************************ * * * Helpers * * * ************************************************************************/ /* * Many of these macros may later turn into functions. They * shouldn't be used in #ifdef's preprocessor instructions. */ /** * xmlXPathSetError: * @ctxt: an XPath parser context * @err: an xmlXPathError code * * Raises an error. */ #define xmlXPathSetError(ctxt, err) \ { xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \ if ((ctxt) != NULL) (ctxt)->error = (err); } /** * xmlXPathSetArityError: * @ctxt: an XPath parser context * * Raises an XPATH_INVALID_ARITY error. */ #define xmlXPathSetArityError(ctxt) \ xmlXPathSetError((ctxt), XPATH_INVALID_ARITY) /** * xmlXPathSetTypeError: * @ctxt: an XPath parser context * * Raises an XPATH_INVALID_TYPE error. */ #define xmlXPathSetTypeError(ctxt) \ xmlXPathSetError((ctxt), XPATH_INVALID_TYPE) /** * xmlXPathGetError: * @ctxt: an XPath parser context * * Get the error code of an XPath context. * * Returns the context error. */ #define xmlXPathGetError(ctxt) ((ctxt)->error) /** * xmlXPathCheckError: * @ctxt: an XPath parser context * * Check if an XPath error was raised. * * Returns true if an error has been raised, false otherwise. */ #define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK) /** * xmlXPathGetDocument: * @ctxt: an XPath parser context * * Get the document of an XPath context. * * Returns the context document. */ #define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc) /** * xmlXPathGetContextNode: * @ctxt: an XPath parser context * * Get the context node of an XPath context. * * Returns the context node. */ #define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node) XMLPUBFUN int XMLCALL xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt); XMLPUBFUN double XMLCALL xmlXPathPopNumber (xmlXPathParserContextPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlXPathPopString (xmlXPathParserContextPtr ctxt); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt); XMLPUBFUN void * XMLCALL xmlXPathPopExternal (xmlXPathParserContextPtr ctxt); /** * xmlXPathReturnBoolean: * @ctxt: an XPath parser context * @val: a boolean * * Pushes the boolean @val on the context stack. */ #define xmlXPathReturnBoolean(ctxt, val) \ valuePush((ctxt), xmlXPathNewBoolean(val)) /** * xmlXPathReturnTrue: * @ctxt: an XPath parser context * * Pushes true on the context stack. */ #define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1) /** * xmlXPathReturnFalse: * @ctxt: an XPath parser context * * Pushes false on the context stack. */ #define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0) /** * xmlXPathReturnNumber: * @ctxt: an XPath parser context * @val: a double * * Pushes the double @val on the context stack. */ #define xmlXPathReturnNumber(ctxt, val) \ valuePush((ctxt), xmlXPathNewFloat(val)) /** * xmlXPathReturnString: * @ctxt: an XPath parser context * @str: a string * * Pushes the string @str on the context stack. */ #define xmlXPathReturnString(ctxt, str) \ valuePush((ctxt), xmlXPathWrapString(str)) /** * xmlXPathReturnEmptyString: * @ctxt: an XPath parser context * * Pushes an empty string on the stack. */ #define xmlXPathReturnEmptyString(ctxt) \ valuePush((ctxt), xmlXPathNewCString("")) /** * xmlXPathReturnNodeSet: * @ctxt: an XPath parser context * @ns: a node-set * * Pushes the node-set @ns on the context stack. */ #define xmlXPathReturnNodeSet(ctxt, ns) \ valuePush((ctxt), xmlXPathWrapNodeSet(ns)) /** * xmlXPathReturnEmptyNodeSet: * @ctxt: an XPath parser context * * Pushes an empty node-set on the context stack. */ #define xmlXPathReturnEmptyNodeSet(ctxt) \ valuePush((ctxt), xmlXPathNewNodeSet(NULL)) /** * xmlXPathReturnExternal: * @ctxt: an XPath parser context * @val: user data * * Pushes user data on the context stack. */ #define xmlXPathReturnExternal(ctxt, val) \ valuePush((ctxt), xmlXPathWrapExternal(val)) /** * xmlXPathStackIsNodeSet: * @ctxt: an XPath parser context * * Check if the current value on the XPath stack is a node set or * an XSLT value tree. * * Returns true if the current object on the stack is a node-set. */ #define xmlXPathStackIsNodeSet(ctxt) \ (((ctxt)->value != NULL) \ && (((ctxt)->value->type == XPATH_NODESET) \ || ((ctxt)->value->type == XPATH_XSLT_TREE))) /** * xmlXPathStackIsExternal: * @ctxt: an XPath parser context * * Checks if the current value on the XPath stack is an external * object. * * Returns true if the current object on the stack is an external * object. */ #define xmlXPathStackIsExternal(ctxt) \ ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS)) /** * xmlXPathEmptyNodeSet: * @ns: a node-set * * Empties a node-set. */ #define xmlXPathEmptyNodeSet(ns) \ { while ((ns)->nodeNr > 0) (ns)->nodeTab[--(ns)->nodeNr] = NULL; } /** * CHECK_ERROR: * * Macro to return from the function if an XPath error was detected. */ #define CHECK_ERROR \ if (ctxt->error != XPATH_EXPRESSION_OK) return /** * CHECK_ERROR0: * * Macro to return 0 from the function if an XPath error was detected. */ #define CHECK_ERROR0 \ if (ctxt->error != XPATH_EXPRESSION_OK) return(0) /** * XP_ERROR: * @X: the error code * * Macro to raise an XPath error and return. */ #define XP_ERROR(X) \ { xmlXPathErr(ctxt, X); return; } /** * XP_ERROR0: * @X: the error code * * Macro to raise an XPath error and return 0. */ #define XP_ERROR0(X) \ { xmlXPathErr(ctxt, X); return(0); } /** * CHECK_TYPE: * @typeval: the XPath type * * Macro to check that the value on top of the XPath stack is of a given * type. */ #define CHECK_TYPE(typeval) \ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \ XP_ERROR(XPATH_INVALID_TYPE) /** * CHECK_TYPE0: * @typeval: the XPath type * * Macro to check that the value on top of the XPath stack is of a given * type. Return(0) in case of failure */ #define CHECK_TYPE0(typeval) \ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \ XP_ERROR0(XPATH_INVALID_TYPE) /** * CHECK_ARITY: * @x: the number of expected args * * Macro to check that the number of args passed to an XPath function matches. */ #define CHECK_ARITY(x) \ if (ctxt == NULL) return; \ if (nargs != (x)) \ XP_ERROR(XPATH_INVALID_ARITY); \ if (ctxt->valueNr < ctxt->valueFrame + (x)) \ XP_ERROR(XPATH_STACK_ERROR); /** * CAST_TO_STRING: * * Macro to try to cast the value on the top of the XPath stack to a string. */ #define CAST_TO_STRING \ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \ xmlXPathStringFunction(ctxt, 1); /** * CAST_TO_NUMBER: * * Macro to try to cast the value on the top of the XPath stack to a number. */ #define CAST_TO_NUMBER \ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \ xmlXPathNumberFunction(ctxt, 1); /** * CAST_TO_BOOLEAN: * * Macro to try to cast the value on the top of the XPath stack to a boolean. */ #define CAST_TO_BOOLEAN \ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \ xmlXPathBooleanFunction(ctxt, 1); /* * Variable Lookup forwarding. */ XMLPUBFUN void XMLCALL xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt, xmlXPathVariableLookupFunc f, void *data); /* * Function Lookup forwarding. */ XMLPUBFUN void XMLCALL xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt, xmlXPathFuncLookupFunc f, void *funcCtxt); /* * Error reporting. */ XMLPUBFUN void XMLCALL xmlXPatherror (xmlXPathParserContextPtr ctxt, const char *file, int line, int no); XMLPUBFUN void XMLCALL xmlXPathErr (xmlXPathParserContextPtr ctxt, int error); #ifdef LIBXML_DEBUG_ENABLED XMLPUBFUN void XMLCALL xmlXPathDebugDumpObject (FILE *output, xmlXPathObjectPtr cur, int depth); XMLPUBFUN void XMLCALL xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp, int depth); #endif /** * NodeSet handling. */ XMLPUBFUN int XMLCALL xmlXPathNodeSetContains (xmlNodeSetPtr cur, xmlNodePtr val); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathDifference (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathIntersection (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathDistinctSorted (xmlNodeSetPtr nodes); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathDistinct (xmlNodeSetPtr nodes); XMLPUBFUN int XMLCALL xmlXPathHasSameNodes (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes, xmlNodePtr node); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathLeadingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathNodeLeading (xmlNodeSetPtr nodes, xmlNodePtr node); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathLeading (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes, xmlNodePtr node); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathTrailingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathNodeTrailing (xmlNodeSetPtr nodes, xmlNodePtr node); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathTrailing (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); /** * Extending a context. */ XMLPUBFUN int XMLCALL xmlXPathRegisterNs (xmlXPathContextPtr ctxt, const xmlChar *prefix, const xmlChar *ns_uri); XMLPUBFUN const xmlChar * XMLCALL xmlXPathNsLookup (xmlXPathContextPtr ctxt, const xmlChar *prefix); XMLPUBFUN void XMLCALL xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt); XMLPUBFUN int XMLCALL xmlXPathRegisterFunc (xmlXPathContextPtr ctxt, const xmlChar *name, xmlXPathFunction f); XMLPUBFUN int XMLCALL xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathFunction f); XMLPUBFUN int XMLCALL xmlXPathRegisterVariable (xmlXPathContextPtr ctxt, const xmlChar *name, xmlXPathObjectPtr value); XMLPUBFUN int XMLCALL xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathObjectPtr value); XMLPUBFUN xmlXPathFunction XMLCALL xmlXPathFunctionLookup (xmlXPathContextPtr ctxt, const xmlChar *name); XMLPUBFUN xmlXPathFunction XMLCALL xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri); XMLPUBFUN void XMLCALL xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathVariableLookup (xmlXPathContextPtr ctxt, const xmlChar *name); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri); XMLPUBFUN void XMLCALL xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt); /** * Utilities to extend XPath. */ XMLPUBFUN xmlXPathParserContextPtr XMLCALL xmlXPathNewParserContext (const xmlChar *str, xmlXPathContextPtr ctxt); XMLPUBFUN void XMLCALL xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt); /* TODO: remap to xmlXPathValuePop and Push. */ XMLPUBFUN xmlXPathObjectPtr XMLCALL valuePop (xmlXPathParserContextPtr ctxt); XMLPUBFUN int XMLCALL valuePush (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathNewString (const xmlChar *val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathNewCString (const char *val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathWrapString (xmlChar *val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathWrapCString (char * val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathNewFloat (double val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathNewBoolean (int val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathNewNodeSet (xmlNodePtr val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathNewValueTree (xmlNodePtr val); XMLPUBFUN int XMLCALL xmlXPathNodeSetAdd (xmlNodeSetPtr cur, xmlNodePtr val); XMLPUBFUN int XMLCALL xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur, xmlNodePtr val); XMLPUBFUN int XMLCALL xmlXPathNodeSetAddNs (xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns); XMLPUBFUN void XMLCALL xmlXPathNodeSetSort (xmlNodeSetPtr set); XMLPUBFUN void XMLCALL xmlXPathRoot (xmlXPathParserContextPtr ctxt); XMLPUBFUN void XMLCALL xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlXPathParseName (xmlXPathParserContextPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlXPathParseNCName (xmlXPathParserContextPtr ctxt); /* * Existing functions. */ XMLPUBFUN double XMLCALL xmlXPathStringEvalNumber (const xmlChar *str); XMLPUBFUN int XMLCALL xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res); XMLPUBFUN void XMLCALL xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathNodeSetMerge (xmlNodeSetPtr val1, xmlNodeSetPtr val2); XMLPUBFUN void XMLCALL xmlXPathNodeSetDel (xmlNodeSetPtr cur, xmlNodePtr val); XMLPUBFUN void XMLCALL xmlXPathNodeSetRemove (xmlNodeSetPtr cur, int val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathNewNodeSetList (xmlNodeSetPtr val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathWrapNodeSet (xmlNodeSetPtr val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathWrapExternal (void *val); XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt); XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt); XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict); XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt); XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt); XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt); XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt); XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt); XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt); XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name); /* * Some of the axis navigation routines. */ XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur); /* * The official core of XPath functions. */ XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs); XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs); /** * Really internal functions */ XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns); #ifdef __cplusplus } #endif #endif /* LIBXML_XPATH_ENABLED */ #endif /* ! __XML_XPATH_INTERNALS_H__ */ PK!*Lh h libxml/uri.hnu[/** * Summary: library of generic URI related routines * Description: library of generic URI related routines * Implements RFC 2396 * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_URI_H__ #define __XML_URI_H__ #include #include #ifdef __cplusplus extern "C" { #endif /** * xmlURI: * * A parsed URI reference. This is a struct containing the various fields * as described in RFC 2396 but separated for further processing. * * Note: query is a deprecated field which is incorrectly unescaped. * query_raw takes precedence over query if the former is set. * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127 */ typedef struct _xmlURI xmlURI; typedef xmlURI *xmlURIPtr; struct _xmlURI { char *scheme; /* the URI scheme */ char *opaque; /* opaque part */ char *authority; /* the authority part */ char *server; /* the server part */ char *user; /* the user part */ int port; /* the port number */ char *path; /* the path string */ char *query; /* the query string (deprecated - use with caution) */ char *fragment; /* the fragment identifier */ int cleanup; /* parsing potentially unclean URI */ char *query_raw; /* the query string (as it appears in the URI) */ }; /* * This function is in tree.h: * xmlChar * xmlNodeGetBase (xmlDocPtr doc, * xmlNodePtr cur); */ XMLPUBFUN xmlURIPtr XMLCALL xmlCreateURI (void); XMLPUBFUN xmlChar * XMLCALL xmlBuildURI (const xmlChar *URI, const xmlChar *base); XMLPUBFUN xmlChar * XMLCALL xmlBuildRelativeURI (const xmlChar *URI, const xmlChar *base); XMLPUBFUN xmlURIPtr XMLCALL xmlParseURI (const char *str); XMLPUBFUN xmlURIPtr XMLCALL xmlParseURIRaw (const char *str, int raw); XMLPUBFUN int XMLCALL xmlParseURIReference (xmlURIPtr uri, const char *str); XMLPUBFUN xmlChar * XMLCALL xmlSaveUri (xmlURIPtr uri); XMLPUBFUN void XMLCALL xmlPrintURI (FILE *stream, xmlURIPtr uri); XMLPUBFUN xmlChar * XMLCALL xmlURIEscapeStr (const xmlChar *str, const xmlChar *list); XMLPUBFUN char * XMLCALL xmlURIUnescapeString (const char *str, int len, char *target); XMLPUBFUN int XMLCALL xmlNormalizeURIPath (char *path); XMLPUBFUN xmlChar * XMLCALL xmlURIEscape (const xmlChar *str); XMLPUBFUN void XMLCALL xmlFreeURI (xmlURIPtr uri); XMLPUBFUN xmlChar* XMLCALL xmlCanonicPath (const xmlChar *path); XMLPUBFUN xmlChar* XMLCALL xmlPathToURI (const xmlChar *path); #ifdef __cplusplus } #endif #endif /* __XML_URI_H__ */ PK!libxml/xmlschemastypes.hnu[/* * Summary: implementation of XML Schema Datatypes * Description: module providing the XML Schema Datatypes implementation * both definition and validity checking * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_SCHEMA_TYPES_H__ #define __XML_SCHEMA_TYPES_H__ #include #ifdef LIBXML_SCHEMAS_ENABLED #include #include #ifdef __cplusplus extern "C" { #endif typedef enum { XML_SCHEMA_WHITESPACE_UNKNOWN = 0, XML_SCHEMA_WHITESPACE_PRESERVE = 1, XML_SCHEMA_WHITESPACE_REPLACE = 2, XML_SCHEMA_WHITESPACE_COLLAPSE = 3 } xmlSchemaWhitespaceValueType; XMLPUBFUN void XMLCALL xmlSchemaInitTypes (void); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlSchemaCleanupTypes (void); XMLPUBFUN xmlSchemaTypePtr XMLCALL xmlSchemaGetPredefinedType (const xmlChar *name, const xmlChar *ns); XMLPUBFUN int XMLCALL xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type, const xmlChar *value, xmlSchemaValPtr *val); XMLPUBFUN int XMLCALL xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type, const xmlChar *value, xmlSchemaValPtr *val, xmlNodePtr node); XMLPUBFUN int XMLCALL xmlSchemaValidateFacet (xmlSchemaTypePtr base, xmlSchemaFacetPtr facet, const xmlChar *value, xmlSchemaValPtr val); XMLPUBFUN int XMLCALL xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet, xmlSchemaWhitespaceValueType fws, xmlSchemaValType valType, const xmlChar *value, xmlSchemaValPtr val, xmlSchemaWhitespaceValueType ws); XMLPUBFUN void XMLCALL xmlSchemaFreeValue (xmlSchemaValPtr val); XMLPUBFUN xmlSchemaFacetPtr XMLCALL xmlSchemaNewFacet (void); XMLPUBFUN int XMLCALL xmlSchemaCheckFacet (xmlSchemaFacetPtr facet, xmlSchemaTypePtr typeDecl, xmlSchemaParserCtxtPtr ctxt, const xmlChar *name); XMLPUBFUN void XMLCALL xmlSchemaFreeFacet (xmlSchemaFacetPtr facet); XMLPUBFUN int XMLCALL xmlSchemaCompareValues (xmlSchemaValPtr x, xmlSchemaValPtr y); XMLPUBFUN xmlSchemaTypePtr XMLCALL xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type); XMLPUBFUN int XMLCALL xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet, const xmlChar *value, unsigned long actualLen, unsigned long *expectedLen); XMLPUBFUN xmlSchemaTypePtr XMLCALL xmlSchemaGetBuiltInType (xmlSchemaValType type); XMLPUBFUN int XMLCALL xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type, int facetType); XMLPUBFUN xmlChar * XMLCALL xmlSchemaCollapseString (const xmlChar *value); XMLPUBFUN xmlChar * XMLCALL xmlSchemaWhiteSpaceReplace (const xmlChar *value); XMLPUBFUN unsigned long XMLCALL xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet); XMLPUBFUN int XMLCALL xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type, xmlSchemaFacetPtr facet, const xmlChar *value, xmlSchemaValPtr val, unsigned long *length); XMLPUBFUN int XMLCALL xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet, xmlSchemaValType valType, const xmlChar *value, xmlSchemaValPtr val, unsigned long *length, xmlSchemaWhitespaceValueType ws); XMLPUBFUN int XMLCALL xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type, const xmlChar *value, xmlSchemaValPtr *val, xmlNodePtr node); XMLPUBFUN int XMLCALL xmlSchemaGetCanonValue (xmlSchemaValPtr val, const xmlChar **retValue); XMLPUBFUN int XMLCALL xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val, const xmlChar **retValue, xmlSchemaWhitespaceValueType ws); XMLPUBFUN int XMLCALL xmlSchemaValueAppend (xmlSchemaValPtr prev, xmlSchemaValPtr cur); XMLPUBFUN xmlSchemaValPtr XMLCALL xmlSchemaValueGetNext (xmlSchemaValPtr cur); XMLPUBFUN const xmlChar * XMLCALL xmlSchemaValueGetAsString (xmlSchemaValPtr val); XMLPUBFUN int XMLCALL xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val); XMLPUBFUN xmlSchemaValPtr XMLCALL xmlSchemaNewStringValue (xmlSchemaValType type, const xmlChar *value); XMLPUBFUN xmlSchemaValPtr XMLCALL xmlSchemaNewNOTATIONValue (const xmlChar *name, const xmlChar *ns); XMLPUBFUN xmlSchemaValPtr XMLCALL xmlSchemaNewQNameValue (const xmlChar *namespaceName, const xmlChar *localName); XMLPUBFUN int XMLCALL xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x, xmlSchemaWhitespaceValueType xws, xmlSchemaValPtr y, xmlSchemaWhitespaceValueType yws); XMLPUBFUN xmlSchemaValPtr XMLCALL xmlSchemaCopyValue (xmlSchemaValPtr val); XMLPUBFUN xmlSchemaValType XMLCALL xmlSchemaGetValType (xmlSchemaValPtr val); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMAS_ENABLED */ #endif /* __XML_SCHEMA_TYPES_H__ */ PK!libxml/schematron.hnu[/* * Summary: XML Schematron implementation * Description: interface to the XML Schematron validity checking. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_SCHEMATRON_H__ #define __XML_SCHEMATRON_H__ #include #ifdef LIBXML_SCHEMATRON_ENABLED #include #ifdef __cplusplus extern "C" { #endif typedef enum { XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */ XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */ XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */ XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */ XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */ XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */ XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */ } xmlSchematronValidOptions; /** * The schemas related types are kept internal */ typedef struct _xmlSchematron xmlSchematron; typedef xmlSchematron *xmlSchematronPtr; /** * xmlSchematronValidityErrorFunc: * @ctx: the validation context * @msg: the message * @...: extra arguments * * Signature of an error callback from a Schematron validation */ typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...); /** * xmlSchematronValidityWarningFunc: * @ctx: the validation context * @msg: the message * @...: extra arguments * * Signature of a warning callback from a Schematron validation */ typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...); /** * A schemas validation context */ typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt; typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr; typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt; typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr; /* * Interfaces for parsing. */ XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL xmlSchematronNewParserCtxt (const char *URL); XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL xmlSchematronNewMemParserCtxt(const char *buffer, int size); XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL xmlSchematronNewDocParserCtxt(xmlDocPtr doc); XMLPUBFUN void XMLCALL xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt); /***** XMLPUBFUN void XMLCALL xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt, xmlSchematronValidityErrorFunc err, xmlSchematronValidityWarningFunc warn, void *ctx); XMLPUBFUN int XMLCALL xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt, xmlSchematronValidityErrorFunc * err, xmlSchematronValidityWarningFunc * warn, void **ctx); XMLPUBFUN int XMLCALL xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt); *****/ XMLPUBFUN xmlSchematronPtr XMLCALL xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlSchematronFree (xmlSchematronPtr schema); /* * Interfaces for validating */ XMLPUBFUN void XMLCALL xmlSchematronSetValidStructuredErrors( xmlSchematronValidCtxtPtr ctxt, xmlStructuredErrorFunc serror, void *ctx); /****** XMLPUBFUN void XMLCALL xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt, xmlSchematronValidityErrorFunc err, xmlSchematronValidityWarningFunc warn, void *ctx); XMLPUBFUN int XMLCALL xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt, xmlSchematronValidityErrorFunc *err, xmlSchematronValidityWarningFunc *warn, void **ctx); XMLPUBFUN int XMLCALL xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt, int options); XMLPUBFUN int XMLCALL xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt, xmlNodePtr elem); *******/ XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL xmlSchematronNewValidCtxt (xmlSchematronPtr schema, int options); XMLPUBFUN void XMLCALL xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMATRON_ENABLED */ #endif /* __XML_SCHEMATRON_H__ */ PK!f?ttlibxml/xmlautomata.hnu[/* * Summary: API to build regexp automata * Description: the API to build regexp automata * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_AUTOMATA_H__ #define __XML_AUTOMATA_H__ #include #include #ifdef LIBXML_REGEXP_ENABLED #ifdef LIBXML_AUTOMATA_ENABLED #include #ifdef __cplusplus extern "C" { #endif /** * xmlAutomataPtr: * * A libxml automata description, It can be compiled into a regexp */ typedef struct _xmlAutomata xmlAutomata; typedef xmlAutomata *xmlAutomataPtr; /** * xmlAutomataStatePtr: * * A state int the automata description, */ typedef struct _xmlAutomataState xmlAutomataState; typedef xmlAutomataState *xmlAutomataStatePtr; /* * Building API */ XMLPUBFUN xmlAutomataPtr XMLCALL xmlNewAutomata (void); XMLPUBFUN void XMLCALL xmlFreeAutomata (xmlAutomataPtr am); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataGetInitState (xmlAutomataPtr am); XMLPUBFUN int XMLCALL xmlAutomataSetFinalState (xmlAutomataPtr am, xmlAutomataStatePtr state); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewState (xmlAutomataPtr am); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewTransition (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, void *data); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewTransition2 (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, const xmlChar *token2, void *data); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewNegTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, const xmlChar *token2, void *data); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewCountTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, int min, int max, void *data); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewCountTrans2 (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, const xmlChar *token2, int min, int max, void *data); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewOnceTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, int min, int max, void *data); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewOnceTrans2 (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, const xmlChar *token2, int min, int max, void *data); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewAllTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int lax); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewEpsilon (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewCountedTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int counter); XMLPUBFUN xmlAutomataStatePtr XMLCALL xmlAutomataNewCounterTrans (xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, int counter); XMLPUBFUN int XMLCALL xmlAutomataNewCounter (xmlAutomataPtr am, int min, int max); XMLPUBFUN xmlRegexpPtr XMLCALL xmlAutomataCompile (xmlAutomataPtr am); XMLPUBFUN int XMLCALL xmlAutomataIsDeterminist (xmlAutomataPtr am); #ifdef __cplusplus } #endif #endif /* LIBXML_AUTOMATA_ENABLED */ #endif /* LIBXML_REGEXP_ENABLED */ #endif /* __XML_AUTOMATA_H__ */ PK! .nnlibxml/encoding.hnu[/* * Summary: interface for the encoding conversion functions * Description: interface for the encoding conversion functions needed for * XML basic encoding and iconv() support. * * Related specs are * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies * [ISO-10646] UTF-8 and UTF-16 in Annexes * [ISO-8859-1] ISO Latin-1 characters codes. * [UNICODE] The Unicode Consortium, "The Unicode Standard -- * Worldwide Character Encoding -- Version 1.0", Addison- * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is * described in Unicode Technical Report #4. * [US-ASCII] Coded Character Set--7-bit American Standard Code for * Information Interchange, ANSI X3.4-1986. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_CHAR_ENCODING_H__ #define __XML_CHAR_ENCODING_H__ #include #ifdef LIBXML_ICONV_ENABLED #include #endif #ifdef __cplusplus extern "C" { #endif /* * xmlCharEncoding: * * Predefined values for some standard encodings. * Libxml does not do beforehand translation on UTF8 and ISOLatinX. * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default. * * Anything else would have to be translated to UTF8 before being * given to the parser itself. The BOM for UTF16 and the encoding * declaration are looked at and a converter is looked for at that * point. If not found the parser stops here as asked by the XML REC. A * converter can be registered by the user using xmlRegisterCharEncodingHandler * but the current form doesn't allow stateful transcoding (a serious * problem agreed !). If iconv has been found it will be used * automatically and allow stateful transcoding, the simplest is then * to be sure to enable iconv and to provide iconv libs for the encoding * support needed. * * Note that the generic "UTF-16" is not a predefined value. Instead, only * the specific UTF-16LE and UTF-16BE are present. */ typedef enum { XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */ XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */ } xmlCharEncoding; /** * xmlCharEncodingInputFunc: * @out: a pointer to an array of bytes to store the UTF-8 result * @outlen: the length of @out * @in: a pointer to an array of chars in the original encoding * @inlen: the length of @in * * Take a block of chars in the original encoding and try to convert * it to an UTF-8 block of chars out. * * Returns the number of bytes written, -1 if lack of space, or -2 * if the transcoding failed. * The value of @inlen after return is the number of octets consumed * if the return value is positive, else unpredictiable. * The value of @outlen after return is the number of octets consumed. */ typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen); /** * xmlCharEncodingOutputFunc: * @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 * * Take a block of UTF-8 chars in and try to convert it to another * encoding. * Note: a first call designed to produce heading info is called with * in = NULL. If stateful this should also initialize the encoder state. * * Returns the number of bytes written, -1 if lack of space, or -2 * if the transcoding failed. * The value of @inlen after return is the number of octets consumed * if the return value is positive, else unpredictiable. * The value of @outlen after return is the number of octets produced. */ typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen); /* * Block defining the handlers for non UTF-8 encodings. * If iconv is supported, there are two extra fields. */ typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; struct _xmlCharEncodingHandler { char *name; xmlCharEncodingInputFunc input; xmlCharEncodingOutputFunc output; #ifdef LIBXML_ICONV_ENABLED iconv_t iconv_in; iconv_t iconv_out; #endif /* LIBXML_ICONV_ENABLED */ #ifdef LIBXML_ICU_ENABLED struct _uconv_t *uconv_in; struct _uconv_t *uconv_out; #endif /* LIBXML_ICU_ENABLED */ }; #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif /* * Interfaces for encoding handlers. */ XML_DEPRECATED XMLPUBFUN void XMLCALL xmlInitCharEncodingHandlers (void); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlCleanupCharEncodingHandlers (void); XMLPUBFUN void XMLCALL xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlGetCharEncodingHandler (xmlCharEncoding enc); XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlFindCharEncodingHandler (const char *name); XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlNewCharEncodingHandler (const char *name, xmlCharEncodingInputFunc input, xmlCharEncodingOutputFunc output); /* * Interfaces for encoding names and aliases. */ XMLPUBFUN int XMLCALL xmlAddEncodingAlias (const char *name, const char *alias); XMLPUBFUN int XMLCALL xmlDelEncodingAlias (const char *alias); XMLPUBFUN const char * XMLCALL xmlGetEncodingAlias (const char *alias); XMLPUBFUN void XMLCALL xmlCleanupEncodingAliases (void); XMLPUBFUN xmlCharEncoding XMLCALL xmlParseCharEncoding (const char *name); XMLPUBFUN const char * XMLCALL xmlGetCharEncodingName (xmlCharEncoding enc); /* * Interfaces directly used by the parsers. */ XMLPUBFUN xmlCharEncoding XMLCALL xmlDetectCharEncoding (const unsigned char *in, int len); XMLPUBFUN int XMLCALL xmlCharEncOutFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); XMLPUBFUN int XMLCALL xmlCharEncInFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); XMLPUBFUN int XMLCALL xmlCharEncFirstLine (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); XMLPUBFUN int XMLCALL xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); /* * Export a few useful functions */ #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN int XMLCALL UTF8Toisolat1 (unsigned char *out, int *outlen, const unsigned char *in, int *inlen); #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN int XMLCALL isolat1ToUTF8 (unsigned char *out, int *outlen, const unsigned char *in, int *inlen); #ifdef __cplusplus } #endif #endif /* __XML_CHAR_ENCODING_H__ */ PK!#S))libxml/xmlIO.hnu[/* * Summary: interface for the I/O interfaces used by the parser * Description: interface for the I/O interfaces used by the parser * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_IO_H__ #define __XML_IO_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* * Those are the functions and datatypes for the parser input * I/O structures. */ /** * xmlInputMatchCallback: * @filename: the filename or URI * * Callback used in the I/O Input API to detect if the current handler * can provide input functionality for this resource. * * Returns 1 if yes and 0 if another Input module should be used */ typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename); /** * xmlInputOpenCallback: * @filename: the filename or URI * * Callback used in the I/O Input API to open the resource * * Returns an Input context or NULL in case or error */ typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename); /** * xmlInputReadCallback: * @context: an Input context * @buffer: the buffer to store data read * @len: the length of the buffer in bytes * * Callback used in the I/O Input API to read the resource * * Returns the number of bytes read or -1 in case of error */ typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len); /** * xmlInputCloseCallback: * @context: an Input context * * Callback used in the I/O Input API to close the resource * * Returns 0 or -1 in case of error */ typedef int (XMLCALL *xmlInputCloseCallback) (void * context); #ifdef LIBXML_OUTPUT_ENABLED /* * Those are the functions and datatypes for the library output * I/O structures. */ /** * xmlOutputMatchCallback: * @filename: the filename or URI * * Callback used in the I/O Output API to detect if the current handler * can provide output functionality for this resource. * * Returns 1 if yes and 0 if another Output module should be used */ typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename); /** * xmlOutputOpenCallback: * @filename: the filename or URI * * Callback used in the I/O Output API to open the resource * * Returns an Output context or NULL in case or error */ typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename); /** * xmlOutputWriteCallback: * @context: an Output context * @buffer: the buffer of data to write * @len: the length of the buffer in bytes * * Callback used in the I/O Output API to write to the resource * * Returns the number of bytes written or -1 in case of error */ typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer, int len); /** * xmlOutputCloseCallback: * @context: an Output context * * Callback used in the I/O Output API to close the resource * * Returns 0 or -1 in case of error */ typedef int (XMLCALL *xmlOutputCloseCallback) (void * context); #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef __cplusplus } #endif #include #include #include #include #ifdef __cplusplus extern "C" { #endif struct _xmlParserInputBuffer { void* context; xmlInputReadCallback readcallback; xmlInputCloseCallback closecallback; xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */ xmlBufPtr raw; /* if encoder != NULL buffer for raw input */ int compressed; /* -1=unknown, 0=not compressed, 1=compressed */ int error; unsigned long rawconsumed;/* amount consumed from raw */ }; #ifdef LIBXML_OUTPUT_ENABLED struct _xmlOutputBuffer { void* context; xmlOutputWriteCallback writecallback; xmlOutputCloseCallback closecallback; xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */ xmlBufPtr conv; /* if encoder != NULL buffer for output */ int written; /* total number of byte written */ int error; }; #endif /* LIBXML_OUTPUT_ENABLED */ /* * Interfaces for input */ XMLPUBFUN void XMLCALL xmlCleanupInputCallbacks (void); XMLPUBFUN int XMLCALL xmlPopInputCallbacks (void); XMLPUBFUN void XMLCALL xmlRegisterDefaultInputCallbacks (void); XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlAllocParserInputBuffer (xmlCharEncoding enc); XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateFilename (const char *URI, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateFile (FILE *file, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateFd (int fd, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateMem (const char *mem, int size, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateStatic (const char *mem, int size, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc); XMLPUBFUN int XMLCALL xmlParserInputBufferRead (xmlParserInputBufferPtr in, int len); XMLPUBFUN int XMLCALL xmlParserInputBufferGrow (xmlParserInputBufferPtr in, int len); XMLPUBFUN int XMLCALL xmlParserInputBufferPush (xmlParserInputBufferPtr in, int len, const char *buf); XMLPUBFUN void XMLCALL xmlFreeParserInputBuffer (xmlParserInputBufferPtr in); XMLPUBFUN char * XMLCALL xmlParserGetDirectory (const char *filename); XMLPUBFUN int XMLCALL xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc, xmlInputOpenCallback openFunc, xmlInputReadCallback readFunc, xmlInputCloseCallback closeFunc); xmlParserInputBufferPtr __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc); #ifdef LIBXML_OUTPUT_ENABLED /* * Interfaces for output */ XMLPUBFUN void XMLCALL xmlCleanupOutputCallbacks (void); XMLPUBFUN int XMLCALL xmlPopOutputCallbacks (void); XMLPUBFUN void XMLCALL xmlRegisterDefaultOutputCallbacks(void); XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder); XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateFilename (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression); XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateFile (FILE *file, xmlCharEncodingHandlerPtr encoder); XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateBuffer (xmlBufferPtr buffer, xmlCharEncodingHandlerPtr encoder); XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateFd (int fd, xmlCharEncodingHandlerPtr encoder); XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, void *ioctx, xmlCharEncodingHandlerPtr encoder); /* Couple of APIs to get the output without digging into the buffers */ XMLPUBFUN const xmlChar * XMLCALL xmlOutputBufferGetContent (xmlOutputBufferPtr out); XMLPUBFUN size_t XMLCALL xmlOutputBufferGetSize (xmlOutputBufferPtr out); XMLPUBFUN int XMLCALL xmlOutputBufferWrite (xmlOutputBufferPtr out, int len, const char *buf); XMLPUBFUN int XMLCALL xmlOutputBufferWriteString (xmlOutputBufferPtr out, const char *str); XMLPUBFUN int XMLCALL xmlOutputBufferWriteEscape (xmlOutputBufferPtr out, const xmlChar *str, xmlCharEncodingOutputFunc escaping); XMLPUBFUN int XMLCALL xmlOutputBufferFlush (xmlOutputBufferPtr out); XMLPUBFUN int XMLCALL xmlOutputBufferClose (xmlOutputBufferPtr out); XMLPUBFUN int XMLCALL xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc, xmlOutputOpenCallback openFunc, xmlOutputWriteCallback writeFunc, xmlOutputCloseCallback closeFunc); xmlOutputBufferPtr __xmlOutputBufferCreateFilename(const char *URI, xmlCharEncodingHandlerPtr encoder, int compression); #ifdef LIBXML_HTTP_ENABLED /* This function only exists if HTTP support built into the library */ XMLPUBFUN void XMLCALL xmlRegisterHTTPPostCallbacks (void ); #endif /* LIBXML_HTTP_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN xmlParserInputPtr XMLCALL xmlCheckHTTPInput (xmlParserCtxtPtr ctxt, xmlParserInputPtr ret); /* * A predefined entity loader disabling network accesses */ XMLPUBFUN xmlParserInputPtr XMLCALL xmlNoNetExternalEntityLoader (const char *URL, const char *ID, xmlParserCtxtPtr ctxt); /* * xmlNormalizeWindowsPath is obsolete, don't use it. * Check xmlCanonicPath in uri.h for a better alternative. */ XMLPUBFUN xmlChar * XMLCALL xmlNormalizeWindowsPath (const xmlChar *path); XMLPUBFUN int XMLCALL xmlCheckFilename (const char *path); /** * Default 'file://' protocol callbacks */ XMLPUBFUN int XMLCALL xmlFileMatch (const char *filename); XMLPUBFUN void * XMLCALL xmlFileOpen (const char *filename); XMLPUBFUN int XMLCALL xmlFileRead (void * context, char * buffer, int len); XMLPUBFUN int XMLCALL xmlFileClose (void * context); /** * Default 'http://' protocol callbacks */ #ifdef LIBXML_HTTP_ENABLED XMLPUBFUN int XMLCALL xmlIOHTTPMatch (const char *filename); XMLPUBFUN void * XMLCALL xmlIOHTTPOpen (const char *filename); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void * XMLCALL xmlIOHTTPOpenW (const char * post_uri, int compression ); #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN int XMLCALL xmlIOHTTPRead (void * context, char * buffer, int len); XMLPUBFUN int XMLCALL xmlIOHTTPClose (void * context); #endif /* LIBXML_HTTP_ENABLED */ /** * Default 'ftp://' protocol callbacks */ #ifdef LIBXML_FTP_ENABLED XMLPUBFUN int XMLCALL xmlIOFTPMatch (const char *filename); XMLPUBFUN void * XMLCALL xmlIOFTPOpen (const char *filename); XMLPUBFUN int XMLCALL xmlIOFTPRead (void * context, char * buffer, int len); XMLPUBFUN int XMLCALL xmlIOFTPClose (void * context); #endif /* LIBXML_FTP_ENABLED */ #ifdef __cplusplus } #endif #endif /* __XML_IO_H__ */ PK!ڃ libxml/hash.hnu[/* * Summary: Chained hash tables * Description: This module implements the hash table support used in * various places in the library. * * Copy: See Copyright for the status of this software. * * Author: Bjorn Reese */ #ifndef __XML_HASH_H__ #define __XML_HASH_H__ #ifdef __cplusplus extern "C" { #endif /* * The hash table. */ typedef struct _xmlHashTable xmlHashTable; typedef xmlHashTable *xmlHashTablePtr; #ifdef __cplusplus } #endif #include #include #include #ifdef __cplusplus extern "C" { #endif /* * Recent version of gcc produce a warning when a function pointer is assigned * to an object pointer, or vice versa. The following macro is a dirty hack * to allow suppression of the warning. If your architecture has function * pointers which are a different size than a void pointer, there may be some * serious trouble within the library. */ /** * XML_CAST_FPTR: * @fptr: pointer to a function * * Macro to do a casting from an object pointer to a * function pointer without encountering a warning from * gcc * * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) * This macro violated ISO C aliasing rules (gcc4 on s390 broke) * so it is disabled now */ #define XML_CAST_FPTR(fptr) fptr /* * function types: */ /** * xmlHashDeallocator: * @payload: the data in the hash * @name: the name associated * * Callback to free data from a hash. */ typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name); /** * xmlHashCopier: * @payload: the data in the hash * @name: the name associated * * Callback to copy data from a hash. * * Returns a copy of the data or NULL in case of error. */ typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name); /** * xmlHashScanner: * @payload: the data in the hash * @data: extra scanner data * @name: the name associated * * Callback when scanning data in a hash with the simple scanner. */ typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name); /** * xmlHashScannerFull: * @payload: the data in the hash * @data: extra scanner data * @name: the name associated * @name2: the second name associated * @name3: the third name associated * * Callback when scanning data in a hash with the full scanner. */ typedef void (*xmlHashScannerFull)(void *payload, void *data, const xmlChar *name, const xmlChar *name2, const xmlChar *name3); /* * Constructor and destructor. */ XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCreate (int size); XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCreateDict(int size, xmlDictPtr dict); XMLPUBFUN void XMLCALL xmlHashFree (xmlHashTablePtr table, xmlHashDeallocator f); XMLPUBFUN void XMLCALL xmlHashDefaultDeallocator(void *entry, const xmlChar *name); /* * Add a new entry to the hash table. */ XMLPUBFUN int XMLCALL xmlHashAddEntry (xmlHashTablePtr table, const xmlChar *name, void *userdata); XMLPUBFUN int XMLCALL xmlHashUpdateEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata, xmlHashDeallocator f); XMLPUBFUN int XMLCALL xmlHashAddEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata); XMLPUBFUN int XMLCALL xmlHashUpdateEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata, xmlHashDeallocator f); XMLPUBFUN int XMLCALL xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata); XMLPUBFUN int XMLCALL xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata, xmlHashDeallocator f); /* * Remove an entry from the hash table. */ XMLPUBFUN int XMLCALL xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, xmlHashDeallocator f); XMLPUBFUN int XMLCALL xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, xmlHashDeallocator f); XMLPUBFUN int XMLCALL xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashDeallocator f); /* * Retrieve the userdata. */ XMLPUBFUN void * XMLCALL xmlHashLookup (xmlHashTablePtr table, const xmlChar *name); XMLPUBFUN void * XMLCALL xmlHashLookup2 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2); XMLPUBFUN void * XMLCALL xmlHashLookup3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3); XMLPUBFUN void * XMLCALL xmlHashQLookup (xmlHashTablePtr table, const xmlChar *name, const xmlChar *prefix); XMLPUBFUN void * XMLCALL xmlHashQLookup2 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *prefix, const xmlChar *name2, const xmlChar *prefix2); XMLPUBFUN void * XMLCALL xmlHashQLookup3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *prefix, const xmlChar *name2, const xmlChar *prefix2, const xmlChar *name3, const xmlChar *prefix3); /* * Helpers. */ XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCopy (xmlHashTablePtr table, xmlHashCopier f); XMLPUBFUN int XMLCALL xmlHashSize (xmlHashTablePtr table); XMLPUBFUN void XMLCALL xmlHashScan (xmlHashTablePtr table, xmlHashScanner f, void *data); XMLPUBFUN void XMLCALL xmlHashScan3 (xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScanner f, void *data); XMLPUBFUN void XMLCALL xmlHashScanFull (xmlHashTablePtr table, xmlHashScannerFull f, void *data); XMLPUBFUN void XMLCALL xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScannerFull f, void *data); #ifdef __cplusplus } #endif #endif /* ! __XML_HASH_H__ */ PK! libxml/threads.hnu[/** * Summary: interfaces for thread handling * Description: set of generic threading related routines * should work with pthreads, Windows native or TLS threads * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_THREADS_H__ #define __XML_THREADS_H__ #include #ifdef __cplusplus extern "C" { #endif /* * xmlMutex are a simple mutual exception locks. */ typedef struct _xmlMutex xmlMutex; typedef xmlMutex *xmlMutexPtr; /* * xmlRMutex are reentrant mutual exception locks. */ typedef struct _xmlRMutex xmlRMutex; typedef xmlRMutex *xmlRMutexPtr; #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif XMLPUBFUN xmlMutexPtr XMLCALL xmlNewMutex (void); XMLPUBFUN void XMLCALL xmlMutexLock (xmlMutexPtr tok); XMLPUBFUN void XMLCALL xmlMutexUnlock (xmlMutexPtr tok); XMLPUBFUN void XMLCALL xmlFreeMutex (xmlMutexPtr tok); XMLPUBFUN xmlRMutexPtr XMLCALL xmlNewRMutex (void); XMLPUBFUN void XMLCALL xmlRMutexLock (xmlRMutexPtr tok); XMLPUBFUN void XMLCALL xmlRMutexUnlock (xmlRMutexPtr tok); XMLPUBFUN void XMLCALL xmlFreeRMutex (xmlRMutexPtr tok); /* * Library wide APIs. */ XML_DEPRECATED XMLPUBFUN void XMLCALL xmlInitThreads (void); XMLPUBFUN void XMLCALL xmlLockLibrary (void); XMLPUBFUN void XMLCALL xmlUnlockLibrary(void); XMLPUBFUN int XMLCALL xmlGetThreadId (void); XMLPUBFUN int XMLCALL xmlIsMainThread (void); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlCleanupThreads(void); XMLPUBFUN xmlGlobalStatePtr XMLCALL xmlGetGlobalState(void); #ifdef HAVE_PTHREAD_H #elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) #if defined(LIBXML_STATIC_FOR_DLL) int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved); #endif #endif #ifdef __cplusplus } #endif #endif /* __XML_THREADS_H__ */ PK!)$$libxml/HTMLparser.hnu[/* * Summary: interface for an HTML 4.0 non-verifying parser * Description: 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. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __HTML_PARSER_H__ #define __HTML_PARSER_H__ #include #include #ifdef LIBXML_HTML_ENABLED #ifdef __cplusplus extern "C" { #endif /* * Most of the back-end structures from XML and HTML are shared. */ typedef xmlParserCtxt htmlParserCtxt; typedef xmlParserCtxtPtr htmlParserCtxtPtr; typedef xmlParserNodeInfo htmlParserNodeInfo; typedef xmlSAXHandler htmlSAXHandler; typedef xmlSAXHandlerPtr htmlSAXHandlerPtr; typedef xmlParserInput htmlParserInput; typedef xmlParserInputPtr htmlParserInputPtr; typedef xmlDocPtr htmlDocPtr; typedef xmlNodePtr htmlNodePtr; /* * Internal description of an HTML element, representing HTML 4.01 * and XHTML 1.0 (which share the same structure). */ typedef struct _htmlElemDesc htmlElemDesc; typedef htmlElemDesc *htmlElemDescPtr; 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 structure * * Bugs: * This is a very limited representation. It fails to tell us when * an element *requires* subelements (we only have whether they're * allowed or not), and it doesn't tell us where CDATA and PCDATA * are allowed. Some element relationships are not fully represented: * these are flagged with the word MODIFIER */ 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 */ }; /* * Internal description of an HTML entity. */ typedef struct _htmlEntityDesc htmlEntityDesc; typedef htmlEntityDesc *htmlEntityDescPtr; struct _htmlEntityDesc { unsigned int value; /* the UNICODE value for the character */ const char *name; /* The entity name */ const char *desc; /* the description */ }; /* * There is only few public functions. */ XMLPUBFUN const htmlElemDesc * XMLCALL htmlTagLookup (const xmlChar *tag); XMLPUBFUN const htmlEntityDesc * XMLCALL htmlEntityLookup(const xmlChar *name); XMLPUBFUN const htmlEntityDesc * XMLCALL htmlEntityValueLookup(unsigned int value); XMLPUBFUN int XMLCALL htmlIsAutoClosed(htmlDocPtr doc, htmlNodePtr elem); XMLPUBFUN int XMLCALL htmlAutoCloseTag(htmlDocPtr doc, const xmlChar *name, htmlNodePtr elem); XMLPUBFUN const htmlEntityDesc * XMLCALL htmlParseEntityRef(htmlParserCtxtPtr ctxt, const xmlChar **str); XMLPUBFUN int XMLCALL htmlParseCharRef(htmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL htmlParseElement(htmlParserCtxtPtr ctxt); XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlNewParserCtxt(void); XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateMemoryParserCtxt(const char *buffer, int size); XMLPUBFUN int XMLCALL htmlParseDocument(htmlParserCtxtPtr ctxt); XMLPUBFUN htmlDocPtr XMLCALL htmlSAXParseDoc (const xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData); XMLPUBFUN htmlDocPtr XMLCALL htmlParseDoc (const xmlChar *cur, const char *encoding); XMLPUBFUN htmlDocPtr XMLCALL htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr sax, void *userData); XMLPUBFUN htmlDocPtr XMLCALL htmlParseFile (const char *filename, const char *encoding); XMLPUBFUN int XMLCALL UTF8ToHtml (unsigned char *out, int *outlen, const unsigned char *in, int *inlen); XMLPUBFUN int XMLCALL htmlEncodeEntities(unsigned char *out, int *outlen, const unsigned char *in, int *inlen, int quoteChar); XMLPUBFUN int XMLCALL htmlIsScriptAttribute(const xmlChar *name); XMLPUBFUN int XMLCALL htmlHandleOmittedElem(int val); #ifdef LIBXML_PUSH_ENABLED /** * Interfaces for the Push mode. */ XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, const char *chunk, int size, const char *filename, xmlCharEncoding enc); XMLPUBFUN int XMLCALL htmlParseChunk (htmlParserCtxtPtr ctxt, const char *chunk, int size, int terminate); #endif /* LIBXML_PUSH_ENABLED */ XMLPUBFUN void XMLCALL htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); /* * New set of simpler/more flexible APIs */ /** * xmlParserOption: * * This is the set of XML parser options that can be passed down * to the xmlReadDoc() and similar calls. */ typedef enum { HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */ HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */ HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */ HTML_PARSE_NONET = 1<<11,/* Forbid network access */ HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */ HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */ HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */ } htmlParserOption; XMLPUBFUN void XMLCALL htmlCtxtReset (htmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL htmlCtxtUseOptions (htmlParserCtxtPtr ctxt, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlReadDoc (const xmlChar *cur, const char *URL, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlReadFile (const char *URL, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlReadMemory (const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlReadFd (int fd, const char *URL, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlReadIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlCtxtReadDoc (xmlParserCtxtPtr ctxt, const xmlChar *cur, const char *URL, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlCtxtReadFile (xmlParserCtxtPtr ctxt, const char *filename, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlCtxtReadMemory (xmlParserCtxtPtr ctxt, const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlCtxtReadFd (xmlParserCtxtPtr ctxt, int fd, const char *URL, const char *encoding, int options); XMLPUBFUN htmlDocPtr XMLCALL htmlCtxtReadIO (xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); /* NRK/Jan2003: further knowledge of HTML structure */ typedef enum { HTML_NA = 0 , /* something we don't check at all */ HTML_INVALID = 0x1 , HTML_DEPRECATED = 0x2 , HTML_VALID = 0x4 , HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */ } htmlStatus ; /* Using htmlElemDesc rather than name here, to emphasise the fact that otherwise there's a lookup overhead */ XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ; XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ; XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ; XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ; /** * htmlDefaultSubelement: * @elt: HTML element * * Returns the default subelement for this element */ #define htmlDefaultSubelement(elt) elt->defaultsubelt /** * htmlElementAllowedHereDesc: * @parent: HTML parent element * @elt: HTML element * * Checks whether an HTML element description may be a * direct child of the specified element. * * Returns 1 if allowed; 0 otherwise. */ #define htmlElementAllowedHereDesc(parent,elt) \ htmlElementAllowedHere((parent), (elt)->name) /** * htmlRequiredAttrs: * @elt: HTML element * * Returns the attributes required for the specified element. */ #define htmlRequiredAttrs(elt) (elt)->attrs_req #ifdef __cplusplus } #endif #endif /* LIBXML_HTML_ENABLED */ #endif /* __HTML_PARSER_H__ */ PK! Ř,,libxml/nanoftp.hnu[/* * Summary: minimal FTP implementation * Description: minimal FTP implementation allowing to fetch resources * like external subset. This module is DEPRECATED, do not * use any of its functions. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __NANO_FTP_H__ #define __NANO_FTP_H__ #include #ifdef LIBXML_FTP_ENABLED /* Needed for portability to Windows 64 bits */ #if defined(_WIN32) #include #else /** * SOCKET: * * macro used to provide portability of code to windows sockets */ #define SOCKET int /** * INVALID_SOCKET: * * macro used to provide portability of code to windows sockets * the value to be used when the socket is not valid */ #undef INVALID_SOCKET #define INVALID_SOCKET (-1) #endif #ifdef __cplusplus extern "C" { #endif /** * ftpListCallback: * @userData: user provided data for the callback * @filename: the file name (including "->" when links are shown) * @attrib: the attribute string * @owner: the owner string * @group: the group string * @size: the file size * @links: the link count * @year: the year * @month: the month * @day: the day * @hour: the hour * @minute: the minute * * A callback for the xmlNanoFTPList command. * Note that only one of year and day:minute are specified. */ typedef void (*ftpListCallback) (void *userData, const char *filename, const char *attrib, const char *owner, const char *group, unsigned long size, int links, int year, const char *month, int day, int hour, int minute); /** * ftpDataCallback: * @userData: the user provided context * @data: the data received * @len: its size in bytes * * A callback for the xmlNanoFTPGet command. */ typedef void (*ftpDataCallback) (void *userData, const char *data, int len); /* * Init */ XML_DEPRECATED XMLPUBFUN void XMLCALL xmlNanoFTPInit (void); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlNanoFTPCleanup (void); /* * Creating/freeing contexts. */ XML_DEPRECATED XMLPUBFUN void * XMLCALL xmlNanoFTPNewCtxt (const char *URL); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlNanoFTPFreeCtxt (void * ctx); XML_DEPRECATED XMLPUBFUN void * XMLCALL xmlNanoFTPConnectTo (const char *server, int port); /* * Opening/closing session connections. */ XML_DEPRECATED XMLPUBFUN void * XMLCALL xmlNanoFTPOpen (const char *URL); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPConnect (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPClose (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPQuit (void *ctx); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlNanoFTPScanProxy (const char *URL); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlNanoFTPProxy (const char *host, int port, const char *user, const char *passwd, int type); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPUpdateURL (void *ctx, const char *URL); /* * Rather internal commands. */ XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPGetResponse (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPCheckResponse (void *ctx); /* * CD/DIR/GET handlers. */ XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPCwd (void *ctx, const char *directory); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPDele (void *ctx, const char *file); XML_DEPRECATED XMLPUBFUN SOCKET XMLCALL xmlNanoFTPGetConnection (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPCloseConnection(void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPList (void *ctx, ftpListCallback callback, void *userData, const char *filename); XML_DEPRECATED XMLPUBFUN SOCKET XMLCALL xmlNanoFTPGetSocket (void *ctx, const char *filename); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPGet (void *ctx, ftpDataCallback callback, void *userData, const char *filename); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlNanoFTPRead (void *ctx, void *dest, int len); #ifdef __cplusplus } #endif #endif /* LIBXML_FTP_ENABLED */ #endif /* __NANO_FTP_H__ */ PK!1B/{{libxml/relaxng.hnu[/* * Summary: implementation of the Relax-NG validation * Description: implementation of the Relax-NG validation * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_RELAX_NG__ #define __XML_RELAX_NG__ #include #include #include #ifdef LIBXML_SCHEMAS_ENABLED #ifdef __cplusplus extern "C" { #endif typedef struct _xmlRelaxNG xmlRelaxNG; typedef xmlRelaxNG *xmlRelaxNGPtr; /** * xmlRelaxNGValidityErrorFunc: * @ctx: the validation context * @msg: the message * @...: extra arguments * * Signature of an error callback from a Relax-NG validation */ typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * xmlRelaxNGValidityWarningFunc: * @ctx: the validation context * @msg: the message * @...: extra arguments * * Signature of a warning callback from a Relax-NG validation */ typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * A schemas validation context */ typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt; typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr; typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt; typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr; /* * xmlRelaxNGValidErr: * * List of possible Relax NG validation errors */ typedef enum { XML_RELAXNG_OK = 0, XML_RELAXNG_ERR_MEMORY, XML_RELAXNG_ERR_TYPE, XML_RELAXNG_ERR_TYPEVAL, XML_RELAXNG_ERR_DUPID, XML_RELAXNG_ERR_TYPECMP, XML_RELAXNG_ERR_NOSTATE, XML_RELAXNG_ERR_NODEFINE, XML_RELAXNG_ERR_LISTEXTRA, XML_RELAXNG_ERR_LISTEMPTY, XML_RELAXNG_ERR_INTERNODATA, XML_RELAXNG_ERR_INTERSEQ, XML_RELAXNG_ERR_INTEREXTRA, XML_RELAXNG_ERR_ELEMNAME, XML_RELAXNG_ERR_ATTRNAME, XML_RELAXNG_ERR_ELEMNONS, XML_RELAXNG_ERR_ATTRNONS, XML_RELAXNG_ERR_ELEMWRONGNS, XML_RELAXNG_ERR_ATTRWRONGNS, XML_RELAXNG_ERR_ELEMEXTRANS, XML_RELAXNG_ERR_ATTREXTRANS, XML_RELAXNG_ERR_ELEMNOTEMPTY, XML_RELAXNG_ERR_NOELEM, XML_RELAXNG_ERR_NOTELEM, XML_RELAXNG_ERR_ATTRVALID, XML_RELAXNG_ERR_CONTENTVALID, XML_RELAXNG_ERR_EXTRACONTENT, XML_RELAXNG_ERR_INVALIDATTR, XML_RELAXNG_ERR_DATAELEM, XML_RELAXNG_ERR_VALELEM, XML_RELAXNG_ERR_LISTELEM, XML_RELAXNG_ERR_DATATYPE, XML_RELAXNG_ERR_VALUE, XML_RELAXNG_ERR_LIST, XML_RELAXNG_ERR_NOGRAMMAR, XML_RELAXNG_ERR_EXTRADATA, XML_RELAXNG_ERR_LACKDATA, XML_RELAXNG_ERR_INTERNAL, XML_RELAXNG_ERR_ELEMWRONG, XML_RELAXNG_ERR_TEXTWRONG } xmlRelaxNGValidErr; /* * xmlRelaxNGParserFlags: * * List of possible Relax NG Parser flags */ typedef enum { XML_RELAXNGP_NONE = 0, XML_RELAXNGP_FREE_DOC = 1, XML_RELAXNGP_CRNG = 2 } xmlRelaxNGParserFlag; XMLPUBFUN int XMLCALL xmlRelaxNGInitTypes (void); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlRelaxNGCleanupTypes (void); /* * Interfaces for parsing. */ XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL xmlRelaxNGNewParserCtxt (const char *URL); XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL xmlRelaxNGNewMemParserCtxt (const char *buffer, int size); XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc); XMLPUBFUN int XMLCALL xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt, int flag); XMLPUBFUN void XMLCALL xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGValidityErrorFunc err, xmlRelaxNGValidityWarningFunc warn, void *ctx); XMLPUBFUN int XMLCALL xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGValidityErrorFunc *err, xmlRelaxNGValidityWarningFunc *warn, void **ctx); XMLPUBFUN void XMLCALL xmlRelaxNGSetParserStructuredErrors( xmlRelaxNGParserCtxtPtr ctxt, xmlStructuredErrorFunc serror, void *ctx); XMLPUBFUN xmlRelaxNGPtr XMLCALL xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlRelaxNGFree (xmlRelaxNGPtr schema); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlRelaxNGDump (FILE *output, xmlRelaxNGPtr schema); XMLPUBFUN void XMLCALL xmlRelaxNGDumpTree (FILE * output, xmlRelaxNGPtr schema); #endif /* LIBXML_OUTPUT_ENABLED */ /* * Interfaces for validating */ XMLPUBFUN void XMLCALL xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidityErrorFunc err, xmlRelaxNGValidityWarningFunc warn, void *ctx); XMLPUBFUN int XMLCALL xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidityErrorFunc *err, xmlRelaxNGValidityWarningFunc *warn, void **ctx); XMLPUBFUN void XMLCALL xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt, xmlStructuredErrorFunc serror, void *ctx); XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema); XMLPUBFUN void XMLCALL xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc); /* * Interfaces for progressive validation when possible */ XMLPUBFUN int XMLCALL xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem); XMLPUBFUN int XMLCALL xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt, const xmlChar *data, int len); XMLPUBFUN int XMLCALL xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem); XMLPUBFUN int XMLCALL xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMAS_ENABLED */ #endif /* __XML_RELAX_NG__ */ PK!W44 libxml/dict.hnu[/* * Summary: string dictionary * Description: dictionary of reusable strings, just used to avoid allocation * and freeing operations. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_DICT_H__ #define __XML_DICT_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* * The dictionary. */ typedef struct _xmlDict xmlDict; typedef xmlDict *xmlDictPtr; /* * Initializer */ XML_DEPRECATED XMLPUBFUN int XMLCALL xmlInitializeDict(void); /* * Constructor and destructor. */ XMLPUBFUN xmlDictPtr XMLCALL xmlDictCreate (void); XMLPUBFUN size_t XMLCALL xmlDictSetLimit (xmlDictPtr dict, size_t limit); XMLPUBFUN size_t XMLCALL xmlDictGetUsage (xmlDictPtr dict); XMLPUBFUN xmlDictPtr XMLCALL xmlDictCreateSub(xmlDictPtr sub); XMLPUBFUN int XMLCALL xmlDictReference(xmlDictPtr dict); XMLPUBFUN void XMLCALL xmlDictFree (xmlDictPtr dict); /* * Lookup of entry in the dictionary. */ XMLPUBFUN const xmlChar * XMLCALL xmlDictLookup (xmlDictPtr dict, const xmlChar *name, int len); XMLPUBFUN const xmlChar * XMLCALL xmlDictExists (xmlDictPtr dict, const xmlChar *name, int len); XMLPUBFUN const xmlChar * XMLCALL xmlDictQLookup (xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name); XMLPUBFUN int XMLCALL xmlDictOwns (xmlDictPtr dict, const xmlChar *str); XMLPUBFUN int XMLCALL xmlDictSize (xmlDictPtr dict); /* * Cleanup function */ XML_DEPRECATED XMLPUBFUN void XMLCALL xmlDictCleanup (void); #ifdef __cplusplus } #endif #endif /* ! __XML_DICT_H__ */ PK!XM5M5libxml/valid.hnu[/* * Summary: The DTD validation * Description: API for the DTD handling and the validity checking * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_VALID_H__ #define __XML_VALID_H__ #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* * Validation state added for non-determinist content model. */ typedef struct _xmlValidState xmlValidState; typedef xmlValidState *xmlValidStatePtr; /** * xmlValidityErrorFunc: * @ctx: usually an xmlValidCtxtPtr to a validity error context, * but comes from ctxt->userData (which normally contains such * a pointer); ctxt->userData can be changed by the user. * @msg: the string to format *printf like vararg * @...: remaining arguments to the format * * Callback called when a validity error is found. This is a message * oriented function similar to an *printf function. */ typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * xmlValidityWarningFunc: * @ctx: usually an xmlValidCtxtPtr to a validity error context, * but comes from ctxt->userData (which normally contains such * a pointer); ctxt->userData can be changed by the user. * @msg: the string to format *printf like vararg * @...: remaining arguments to the format * * Callback called when a validity warning is found. This is a message * oriented function similar to an *printf function. */ typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); #ifdef IN_LIBXML /** * XML_VCTXT_DTD_VALIDATED: * * Set after xmlValidateDtdFinal was called. */ #define XML_VCTXT_DTD_VALIDATED (1u << 0) /** * XML_VCTXT_USE_PCTXT: * * Set if the validation context is part of a parser context. */ #define XML_VCTXT_USE_PCTXT (1u << 1) #endif /* * xmlValidCtxt: * An xmlValidCtxt is used for error reporting when validating. */ typedef struct _xmlValidCtxt xmlValidCtxt; typedef xmlValidCtxt *xmlValidCtxtPtr; struct _xmlValidCtxt { void *userData; /* user specific data block */ xmlValidityErrorFunc error; /* the callback in case of errors */ xmlValidityWarningFunc warning; /* the callback in case of warning */ /* Node analysis stack used when validating within entities */ xmlNodePtr node; /* Current parsed Node */ int nodeNr; /* Depth of the parsing stack */ int nodeMax; /* Max depth of the parsing stack */ xmlNodePtr *nodeTab; /* array of nodes */ unsigned int flags; /* internal flags */ xmlDocPtr doc; /* the document */ int valid; /* temporary validity check result */ /* state state used for non-determinist content validation */ xmlValidState *vstate; /* current state */ int vstateNr; /* Depth of the validation stack */ int vstateMax; /* Max depth of the validation stack */ xmlValidState *vstateTab; /* array of validation states */ #ifdef LIBXML_REGEXP_ENABLED xmlAutomataPtr am; /* the automata */ xmlAutomataStatePtr state; /* used to build the automata */ #else void *am; void *state; #endif }; /* * ALL notation declarations are stored in a table. * There is one table per DTD. */ typedef struct _xmlHashTable xmlNotationTable; typedef xmlNotationTable *xmlNotationTablePtr; /* * ALL element declarations are stored in a table. * There is one table per DTD. */ typedef struct _xmlHashTable xmlElementTable; typedef xmlElementTable *xmlElementTablePtr; /* * ALL attribute declarations are stored in a table. * There is one table per DTD. */ typedef struct _xmlHashTable xmlAttributeTable; typedef xmlAttributeTable *xmlAttributeTablePtr; /* * ALL IDs attributes are stored in a table. * There is one table per document. */ typedef struct _xmlHashTable xmlIDTable; typedef xmlIDTable *xmlIDTablePtr; /* * ALL Refs attributes are stored in a table. * There is one table per document. */ typedef struct _xmlHashTable xmlRefTable; typedef xmlRefTable *xmlRefTablePtr; /* Notation */ XMLPUBFUN xmlNotationPtr XMLCALL xmlAddNotationDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, const xmlChar *PublicID, const xmlChar *SystemID); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN xmlNotationTablePtr XMLCALL xmlCopyNotationTable (xmlNotationTablePtr table); #endif /* LIBXML_TREE_ENABLED */ XMLPUBFUN void XMLCALL xmlFreeNotationTable (xmlNotationTablePtr table); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlDumpNotationDecl (xmlBufferPtr buf, xmlNotationPtr nota); XMLPUBFUN void XMLCALL xmlDumpNotationTable (xmlBufferPtr buf, xmlNotationTablePtr table); #endif /* LIBXML_OUTPUT_ENABLED */ /* Element Content */ /* the non Doc version are being deprecated */ XMLPUBFUN xmlElementContentPtr XMLCALL xmlNewElementContent (const xmlChar *name, xmlElementContentType type); XMLPUBFUN xmlElementContentPtr XMLCALL xmlCopyElementContent (xmlElementContentPtr content); XMLPUBFUN void XMLCALL xmlFreeElementContent (xmlElementContentPtr cur); /* the new versions with doc argument */ XMLPUBFUN xmlElementContentPtr XMLCALL xmlNewDocElementContent (xmlDocPtr doc, const xmlChar *name, xmlElementContentType type); XMLPUBFUN xmlElementContentPtr XMLCALL xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr content); XMLPUBFUN void XMLCALL xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur); XMLPUBFUN void XMLCALL xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int englob); #ifdef LIBXML_OUTPUT_ENABLED /* DEPRECATED */ XMLPUBFUN void XMLCALL xmlSprintfElementContent(char *buf, xmlElementContentPtr content, int englob); #endif /* LIBXML_OUTPUT_ENABLED */ /* DEPRECATED */ /* Element */ XMLPUBFUN xmlElementPtr XMLCALL xmlAddElementDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, xmlElementTypeVal type, xmlElementContentPtr content); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN xmlElementTablePtr XMLCALL xmlCopyElementTable (xmlElementTablePtr table); #endif /* LIBXML_TREE_ENABLED */ XMLPUBFUN void XMLCALL xmlFreeElementTable (xmlElementTablePtr table); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlDumpElementTable (xmlBufferPtr buf, xmlElementTablePtr table); XMLPUBFUN void XMLCALL xmlDumpElementDecl (xmlBufferPtr buf, xmlElementPtr elem); #endif /* LIBXML_OUTPUT_ENABLED */ /* Enumeration */ XMLPUBFUN xmlEnumerationPtr XMLCALL xmlCreateEnumeration (const xmlChar *name); XMLPUBFUN void XMLCALL xmlFreeEnumeration (xmlEnumerationPtr cur); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN xmlEnumerationPtr XMLCALL xmlCopyEnumeration (xmlEnumerationPtr cur); #endif /* LIBXML_TREE_ENABLED */ /* Attribute */ XMLPUBFUN xmlAttributePtr XMLCALL xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name, const xmlChar *ns, xmlAttributeType type, xmlAttributeDefault def, const xmlChar *defaultValue, xmlEnumerationPtr tree); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN xmlAttributeTablePtr XMLCALL xmlCopyAttributeTable (xmlAttributeTablePtr table); #endif /* LIBXML_TREE_ENABLED */ XMLPUBFUN void XMLCALL xmlFreeAttributeTable (xmlAttributeTablePtr table); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlDumpAttributeTable (xmlBufferPtr buf, xmlAttributeTablePtr table); XMLPUBFUN void XMLCALL xmlDumpAttributeDecl (xmlBufferPtr buf, xmlAttributePtr attr); #endif /* LIBXML_OUTPUT_ENABLED */ /* IDs */ XMLPUBFUN xmlIDPtr XMLCALL xmlAddID (xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr); XMLPUBFUN void XMLCALL xmlFreeIDTable (xmlIDTablePtr table); XMLPUBFUN xmlAttrPtr XMLCALL xmlGetID (xmlDocPtr doc, const xmlChar *ID); XMLPUBFUN int XMLCALL xmlIsID (xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr); XMLPUBFUN int XMLCALL xmlRemoveID (xmlDocPtr doc, xmlAttrPtr attr); /* IDREFs */ XML_DEPRECATED XMLPUBFUN xmlRefPtr XMLCALL xmlAddRef (xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlFreeRefTable (xmlRefTablePtr table); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlIsRef (xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlRemoveRef (xmlDocPtr doc, xmlAttrPtr attr); XML_DEPRECATED XMLPUBFUN xmlListPtr XMLCALL xmlGetRefs (xmlDocPtr doc, const xmlChar *ID); /** * The public function calls related to validity checking. */ #ifdef LIBXML_VALID_ENABLED /* Allocate/Release Validation Contexts */ XMLPUBFUN xmlValidCtxtPtr XMLCALL xmlNewValidCtxt(void); XMLPUBFUN void XMLCALL xmlFreeValidCtxt(xmlValidCtxtPtr); XMLPUBFUN int XMLCALL xmlValidateRoot (xmlValidCtxtPtr ctxt, xmlDocPtr doc); XMLPUBFUN int XMLCALL xmlValidateElementDecl (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlElementPtr elem); XMLPUBFUN xmlChar * XMLCALL xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem, const xmlChar *name, const xmlChar *value); XMLPUBFUN xmlChar * XMLCALL xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem, const xmlChar *name, const xmlChar *value); XMLPUBFUN int XMLCALL xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlAttributePtr attr); XMLPUBFUN int XMLCALL xmlValidateAttributeValue(xmlAttributeType type, const xmlChar *value); XMLPUBFUN int XMLCALL xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNotationPtr nota); XMLPUBFUN int XMLCALL xmlValidateDtd (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd); XMLPUBFUN int XMLCALL xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, xmlDocPtr doc); XMLPUBFUN int XMLCALL xmlValidateDocument (xmlValidCtxtPtr ctxt, xmlDocPtr doc); XMLPUBFUN int XMLCALL xmlValidateElement (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem); XMLPUBFUN int XMLCALL xmlValidateOneElement (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem); XMLPUBFUN int XMLCALL xmlValidateOneAttribute (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr, const xmlChar *value); XMLPUBFUN int XMLCALL xmlValidateOneNamespace (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value); XMLPUBFUN int XMLCALL xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc); #endif /* LIBXML_VALID_ENABLED */ #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) XMLPUBFUN int XMLCALL xmlValidateNotationUse (xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *notationName); #endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */ XMLPUBFUN int XMLCALL xmlIsMixedElement (xmlDocPtr doc, const xmlChar *name); XMLPUBFUN xmlAttributePtr XMLCALL xmlGetDtdAttrDesc (xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name); XMLPUBFUN xmlAttributePtr XMLCALL xmlGetDtdQAttrDesc (xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name, const xmlChar *prefix); XMLPUBFUN xmlNotationPtr XMLCALL xmlGetDtdNotationDesc (xmlDtdPtr dtd, const xmlChar *name); XMLPUBFUN xmlElementPtr XMLCALL xmlGetDtdQElementDesc (xmlDtdPtr dtd, const xmlChar *name, const xmlChar *prefix); XMLPUBFUN xmlElementPtr XMLCALL xmlGetDtdElementDesc (xmlDtdPtr dtd, const xmlChar *name); #ifdef LIBXML_VALID_ENABLED XMLPUBFUN int XMLCALL xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **names, int *len, int max); XMLPUBFUN int XMLCALL xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names, int max); XMLPUBFUN int XMLCALL xmlValidateNameValue (const xmlChar *value); XMLPUBFUN int XMLCALL xmlValidateNamesValue (const xmlChar *value); XMLPUBFUN int XMLCALL xmlValidateNmtokenValue (const xmlChar *value); XMLPUBFUN int XMLCALL xmlValidateNmtokensValue(const xmlChar *value); #ifdef LIBXML_REGEXP_ENABLED /* * Validation based on the regexp support */ XMLPUBFUN int XMLCALL xmlValidBuildContentModel(xmlValidCtxtPtr ctxt, xmlElementPtr elem); XMLPUBFUN int XMLCALL xmlValidatePushElement (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem, const xmlChar *qname); XMLPUBFUN int XMLCALL xmlValidatePushCData (xmlValidCtxtPtr ctxt, const xmlChar *data, int len); XMLPUBFUN int XMLCALL xmlValidatePopElement (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem, const xmlChar *qname); #endif /* LIBXML_REGEXP_ENABLED */ #endif /* LIBXML_VALID_ENABLED */ #ifdef __cplusplus } #endif #endif /* __XML_VALID_H__ */ PK!6SSlibxml/xmlwriter.hnu[/* * Summary: text writing API for XML * Description: text writing API for XML * * Copy: See Copyright for the status of this software. * * Author: Alfred Mickautsch */ #ifndef __XML_XMLWRITER_H__ #define __XML_XMLWRITER_H__ #include #ifdef LIBXML_WRITER_ENABLED #include #include #include #include #ifdef __cplusplus extern "C" { #endif typedef struct _xmlTextWriter xmlTextWriter; typedef xmlTextWriter *xmlTextWriterPtr; /* * Constructors & Destructor */ XMLPUBFUN xmlTextWriterPtr XMLCALL xmlNewTextWriter(xmlOutputBufferPtr out); XMLPUBFUN xmlTextWriterPtr XMLCALL xmlNewTextWriterFilename(const char *uri, int compression); XMLPUBFUN xmlTextWriterPtr XMLCALL xmlNewTextWriterMemory(xmlBufferPtr buf, int compression); XMLPUBFUN xmlTextWriterPtr XMLCALL xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression); XMLPUBFUN xmlTextWriterPtr XMLCALL xmlNewTextWriterDoc(xmlDocPtr * doc, int compression); XMLPUBFUN xmlTextWriterPtr XMLCALL xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node, int compression); XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer); /* * Functions */ /* * Document */ XMLPUBFUN int XMLCALL xmlTextWriterStartDocument(xmlTextWriterPtr writer, const char *version, const char *encoding, const char *standalone); XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr writer); /* * Comments */ XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr writer); XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer); XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer, const char *format, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr writer, const xmlChar * content); /* * Elements */ XMLPUBFUN int XMLCALL xmlTextWriterStartElement(xmlTextWriterPtr writer, const xmlChar * name); XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI); XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer); XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr writer); /* * Elements conveniency functions */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * content); XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const char *format, ...) LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const xmlChar * content); /* * Text */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer, const char *format, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteRawLen(xmlTextWriterPtr writer, const xmlChar * content, int len); XMLPUBFUN int XMLCALL xmlTextWriterWriteRaw(xmlTextWriterPtr writer, const xmlChar * content); XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr writer, const char *format, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr writer, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer, const xmlChar * content); XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer, const char *data, int start, int len); XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer, const char *data, int start, int len); /* * Attributes */ XMLPUBFUN int XMLCALL xmlTextWriterStartAttribute(xmlTextWriterPtr writer, const xmlChar * name); XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI); XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr writer); /* * Attributes conveniency functions */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * content); XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const char *format, ...) LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const xmlChar * content); /* * PI's */ XMLPUBFUN int XMLCALL xmlTextWriterStartPI(xmlTextWriterPtr writer, const xmlChar * target); XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer); /* * PI conveniency functions */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer, const xmlChar * target, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer, const xmlChar * target, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWritePI(xmlTextWriterPtr writer, const xmlChar * target, const xmlChar * content); /** * xmlTextWriterWriteProcessingInstruction: * * This macro maps to xmlTextWriterWritePI */ #define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI /* * CDATA */ XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer); XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer); /* * CDATA conveniency functions */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer, const char *format, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteCDATA(xmlTextWriterPtr writer, const xmlChar * content); /* * DTD */ XMLPUBFUN int XMLCALL xmlTextWriterStartDTD(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid); XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer); /* * DTD conveniency functions */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const char *format, ...) LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTD(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const xmlChar * subset); /** * xmlTextWriterWriteDocType: * * this macro maps to xmlTextWriterWriteDTD */ #define xmlTextWriterWriteDocType xmlTextWriterWriteDTD /* * DTD element definition */ XMLPUBFUN int XMLCALL xmlTextWriterStartDTDElement(xmlTextWriterPtr writer, const xmlChar * name); XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr writer); /* * DTD element definition conveniency functions */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * content); /* * DTD attribute list definition */ XMLPUBFUN int XMLCALL xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer, const xmlChar * name); XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr writer); /* * DTD attribute list definition conveniency functions */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * content); /* * DTD entity definition */ XMLPUBFUN int XMLCALL xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer, int pe, const xmlChar * name); XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr writer); /* * DTD entity definition conveniency functions */ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer, int pe, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(4,5); XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer, int pe, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(4,0); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer, int pe, const xmlChar * name, const xmlChar * content); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer, int pe, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const xmlChar * ndataid); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr writer, const xmlChar * pubid, const xmlChar * sysid, const xmlChar * ndataid); XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr writer, int pe, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const xmlChar * ndataid, const xmlChar * content); /* * DTD notation definition */ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid); /* * Indentation */ XMLPUBFUN int XMLCALL xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent); XMLPUBFUN int XMLCALL xmlTextWriterSetIndentString(xmlTextWriterPtr writer, const xmlChar * str); XMLPUBFUN int XMLCALL xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar); /* * misc */ XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer); #ifdef __cplusplus } #endif #endif /* LIBXML_WRITER_ENABLED */ #endif /* __XML_XMLWRITER_H__ */ PK!M⻿DDlibxml/parserInternals.hnu[/* * Summary: internals routines and limits exported by the parser. * Description: this module exports a number of internal parsing routines * they are not really all intended for applications but * can prove useful doing low level processing. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_PARSER_INTERNALS_H__ #define __XML_PARSER_INTERNALS_H__ #include #include #include #include #ifdef __cplusplus extern "C" { #endif /** * xmlParserMaxDepth: * * arbitrary depth limit for the XML documents that we allow to * process. This is not a limitation of the parser but a safety * boundary feature, use XML_PARSE_HUGE option to override it. */ XMLPUBVAR unsigned int xmlParserMaxDepth; /** * XML_MAX_TEXT_LENGTH: * * Maximum size allowed for a single text node when building a tree. * This is not a limitation of the parser but a safety boundary feature, * use XML_PARSE_HUGE option to override it. * Introduced in 2.9.0 */ #define XML_MAX_TEXT_LENGTH 10000000 /** * XML_MAX_NAME_LENGTH: * * Maximum size allowed for a markup identifier. * This is not a limitation of the parser but a safety boundary feature, * use XML_PARSE_HUGE option to override it. * Note that with the use of parsing dictionaries overriding the limit * may result in more runtime memory usage in face of "unfriendly' content * Introduced in 2.9.0 */ #define XML_MAX_NAME_LENGTH 50000 /** * XML_MAX_DICTIONARY_LIMIT: * * Maximum size allowed by the parser for a dictionary by default * This is not a limitation of the parser but a safety boundary feature, * use XML_PARSE_HUGE option to override it. * Introduced in 2.9.0 */ #define XML_MAX_DICTIONARY_LIMIT 10000000 /** * XML_MAX_LOOKUP_LIMIT: * * Maximum size allowed by the parser for ahead lookup * This is an upper boundary enforced by the parser to avoid bad * behaviour on "unfriendly' content * Introduced in 2.9.0 */ #define XML_MAX_LOOKUP_LIMIT 10000000 /** * XML_MAX_NAMELEN: * * Identifiers can be longer, but this will be more costly * at runtime. */ #define XML_MAX_NAMELEN 100 /** * INPUT_CHUNK: * * The parser tries to always have that amount of input ready. * One of the point is providing context when reporting errors. */ #define INPUT_CHUNK 250 /************************************************************************ * * * UNICODE version of the macros. * * * ************************************************************************/ /** * IS_BYTE_CHAR: * @c: an byte value (int) * * Macro to check the following production in the XML spec: * * [2] Char ::= #x9 | #xA | #xD | [#x20...] * any byte character in the accepted range */ #define IS_BYTE_CHAR(c) xmlIsChar_ch(c) /** * IS_CHAR: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] * | [#x10000-#x10FFFF] * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */ #define IS_CHAR(c) xmlIsCharQ(c) /** * IS_CHAR_CH: * @c: an xmlChar (usually an unsigned char) * * Behaves like IS_CHAR on single-byte value */ #define IS_CHAR_CH(c) xmlIsChar_ch(c) /** * IS_BLANK: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * [3] S ::= (#x20 | #x9 | #xD | #xA)+ */ #define IS_BLANK(c) xmlIsBlankQ(c) /** * IS_BLANK_CH: * @c: an xmlChar value (normally unsigned char) * * Behaviour same as IS_BLANK */ #define IS_BLANK_CH(c) xmlIsBlank_ch(c) /** * IS_BASECHAR: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * [85] BaseChar ::= ... long list see REC ... */ #define IS_BASECHAR(c) xmlIsBaseCharQ(c) /** * IS_DIGIT: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * [88] Digit ::= ... long list see REC ... */ #define IS_DIGIT(c) xmlIsDigitQ(c) /** * IS_DIGIT_CH: * @c: an xmlChar value (usually an unsigned char) * * Behaves like IS_DIGIT but with a single byte argument */ #define IS_DIGIT_CH(c) xmlIsDigit_ch(c) /** * IS_COMBINING: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * [87] CombiningChar ::= ... long list see REC ... */ #define IS_COMBINING(c) xmlIsCombiningQ(c) /** * IS_COMBINING_CH: * @c: an xmlChar (usually an unsigned char) * * Always false (all combining chars > 0xff) */ #define IS_COMBINING_CH(c) 0 /** * IS_EXTENDER: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | * [#x309D-#x309E] | [#x30FC-#x30FE] */ #define IS_EXTENDER(c) xmlIsExtenderQ(c) /** * IS_EXTENDER_CH: * @c: an xmlChar value (usually an unsigned char) * * Behaves like IS_EXTENDER but with a single-byte argument */ #define IS_EXTENDER_CH(c) xmlIsExtender_ch(c) /** * IS_IDEOGRAPHIC: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] */ #define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c) /** * IS_LETTER: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * * [84] Letter ::= BaseChar | Ideographic */ #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c)) /** * IS_LETTER_CH: * @c: an xmlChar value (normally unsigned char) * * Macro behaves like IS_LETTER, but only check base chars * */ #define IS_LETTER_CH(c) xmlIsBaseChar_ch(c) /** * IS_ASCII_LETTER: * @c: an xmlChar value * * Macro to check [a-zA-Z] * */ #define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \ ((0x61 <= (c)) && ((c) <= 0x7a))) /** * IS_ASCII_DIGIT: * @c: an xmlChar value * * Macro to check [0-9] * */ #define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39)) /** * IS_PUBIDCHAR: * @c: an UNICODE value (int) * * Macro to check the following production in the XML spec: * * * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] */ #define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c) /** * IS_PUBIDCHAR_CH: * @c: an xmlChar value (normally unsigned char) * * Same as IS_PUBIDCHAR but for single-byte value */ #define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c) /** * SKIP_EOL: * @p: and UTF8 string pointer * * Skips the end of line chars. */ #define SKIP_EOL(p) \ if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \ if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; } /** * MOVETO_ENDTAG: * @p: and UTF8 string pointer * * Skips to the next '>' char. */ #define MOVETO_ENDTAG(p) \ while ((*p) && (*(p) != '>')) (p)++ /** * MOVETO_STARTTAG: * @p: and UTF8 string pointer * * Skips to the next '<' char. */ #define MOVETO_STARTTAG(p) \ while ((*p) && (*(p) != '<')) (p)++ /** * Global variables used for predefined strings. */ XMLPUBVAR const xmlChar xmlStringText[]; XMLPUBVAR const xmlChar xmlStringTextNoenc[]; XMLPUBVAR const xmlChar xmlStringComment[]; /* * Function to finish the work of the macros where needed. */ XMLPUBFUN int XMLCALL xmlIsLetter (int c); /** * Parser context. */ XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateFileParserCtxt (const char *filename); XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateURLParserCtxt (const char *filename, int options); XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateMemoryParserCtxt(const char *buffer, int size); XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID, const xmlChar *base); XMLPUBFUN int XMLCALL xmlSwitchEncoding (xmlParserCtxtPtr ctxt, xmlCharEncoding enc); XMLPUBFUN int XMLCALL xmlSwitchToEncoding (xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt, xmlParserInputPtr input, xmlCharEncodingHandlerPtr handler); #ifdef IN_LIBXML /* internal error reporting */ XMLPUBFUN void XMLCALL __xmlErrEncoding (xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr, const char *msg, const xmlChar * str1, const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0); #endif /** * Input Streams. */ XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewStringInputStream (xmlParserCtxtPtr ctxt, const xmlChar *buffer); XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewEntityInputStream (xmlParserCtxtPtr ctxt, xmlEntityPtr entity); XMLPUBFUN int XMLCALL xmlPushInput (xmlParserCtxtPtr ctxt, xmlParserInputPtr input); XMLPUBFUN xmlChar XMLCALL xmlPopInput (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlFreeInputStream (xmlParserInputPtr input); XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewInputFromFile (xmlParserCtxtPtr ctxt, const char *filename); XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewInputStream (xmlParserCtxtPtr ctxt); /** * Namespaces. */ XMLPUBFUN xmlChar * XMLCALL xmlSplitQName (xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix); /** * Generic production rules. */ XMLPUBFUN const xmlChar * XMLCALL xmlParseName (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlParseNmtoken (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlParseEntityValue (xmlParserCtxtPtr ctxt, xmlChar **orig); XMLPUBFUN xmlChar * XMLCALL xmlParseAttValue (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseCharData (xmlParserCtxtPtr ctxt, int cdata); XMLPUBFUN xmlChar * XMLCALL xmlParseExternalID (xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict); XMLPUBFUN void XMLCALL xmlParseComment (xmlParserCtxtPtr ctxt); XMLPUBFUN const xmlChar * XMLCALL xmlParsePITarget (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParsePI (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseNotationDecl (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseEntityDecl (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlParseDefaultDecl (xmlParserCtxtPtr ctxt, xmlChar **value); XMLPUBFUN xmlEnumerationPtr XMLCALL xmlParseNotationType (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlEnumerationPtr XMLCALL xmlParseEnumerationType (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlParseEnumeratedType (xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree); XMLPUBFUN int XMLCALL xmlParseAttributeType (xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree); XMLPUBFUN void XMLCALL xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt); XMLPUBFUN xmlElementContentPtr XMLCALL xmlParseElementMixedContentDecl (xmlParserCtxtPtr ctxt, int inputchk); XMLPUBFUN xmlElementContentPtr XMLCALL xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk); XMLPUBFUN int XMLCALL xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlElementContentPtr *result); XMLPUBFUN int XMLCALL xmlParseElementDecl (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlParseCharRef (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlEntityPtr XMLCALL xmlParseEntityRef (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseReference (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParsePEReference (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN const xmlChar * XMLCALL xmlParseAttribute (xmlParserCtxtPtr ctxt, xmlChar **value); XMLPUBFUN const xmlChar * XMLCALL xmlParseStartTag (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseEndTag (xmlParserCtxtPtr ctxt); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN void XMLCALL xmlParseCDSect (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseContent (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseElement (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlParseVersionNum (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlParseVersionInfo (xmlParserCtxtPtr ctxt); XMLPUBFUN xmlChar * XMLCALL xmlParseEncName (xmlParserCtxtPtr ctxt); XMLPUBFUN const xmlChar * XMLCALL xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlParseSDDecl (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseXMLDecl (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseTextDecl (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseMisc (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParseExternalSubset (xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, const xmlChar *SystemID); /** * XML_SUBSTITUTE_NONE: * * If no entities need to be substituted. */ #define XML_SUBSTITUTE_NONE 0 /** * XML_SUBSTITUTE_REF: * * Whether general entities need to be substituted. */ #define XML_SUBSTITUTE_REF 1 /** * XML_SUBSTITUTE_PEREF: * * Whether parameter entities need to be substituted. */ #define XML_SUBSTITUTE_PEREF 2 /** * XML_SUBSTITUTE_BOTH: * * Both general and parameter entities need to be substituted. */ #define XML_SUBSTITUTE_BOTH 3 XMLPUBFUN xmlChar * XMLCALL xmlStringDecodeEntities (xmlParserCtxtPtr ctxt, const xmlChar *str, int what, xmlChar end, xmlChar end2, xmlChar end3); XMLPUBFUN xmlChar * XMLCALL xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt, const xmlChar *str, int len, int what, xmlChar end, xmlChar end2, xmlChar end3); /* * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP. */ XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt, xmlNodePtr value); XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt, xmlParserInputPtr value); XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt); XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt, const xmlChar *value); /* * other commodities shared between parser.c and parserInternals. */ XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt, const xmlChar *cur, int *len); XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang); /* * Really core function shared with HTML parser. */ XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt, int *len); XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out, int val); XMLPUBFUN int XMLCALL xmlCopyChar (int len, xmlChar *out, int val); XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in); #ifdef LIBXML_HTML_ENABLED /* * Actually comes from the HTML parser but launched from the init stuff. */ XML_DEPRECATED XMLPUBFUN void XMLCALL htmlInitAutoClose (void); XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename, const char *encoding); #endif /* * Specific function to keep track of entities references * and used by the XSLT debugger. */ #ifdef LIBXML_LEGACY_ENABLED /** * xmlEntityReferenceFunc: * @ent: the entity * @firstNode: the fist node in the chunk * @lastNode: the last nod in the chunk * * Callback function used when one needs to be able to track back the * provenance of a chunk of nodes inherited from an entity replacement. */ typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent, xmlNodePtr firstNode, xmlNodePtr lastNode); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func); XML_DEPRECATED XMLPUBFUN xmlChar * XMLCALL xmlParseQuotedString (xmlParserCtxtPtr ctxt); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlParseNamespace (xmlParserCtxtPtr ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * XMLCALL xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * XMLCALL xmlScanName (xmlParserCtxtPtr ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * XMLCALL xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * XMLCALL xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, xmlChar **prefix); /** * Entities */ XML_DEPRECATED XMLPUBFUN xmlChar * XMLCALL xmlDecodeEntities (xmlParserCtxtPtr ctxt, int len, int what, xmlChar end, xmlChar end2, xmlChar end3); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlHandleEntity (xmlParserCtxtPtr ctxt, xmlEntityPtr entity); #endif /* LIBXML_LEGACY_ENABLED */ #ifdef IN_LIBXML /* * internal only */ XMLPUBFUN void XMLCALL xmlErrMemory (xmlParserCtxtPtr ctxt, const char *extra); #endif #ifdef __cplusplus } #endif #endif /* __XML_PARSER_INTERNALS_H__ */ PK!, ?1?1libxml/xmlreader.hnu[/* * Summary: the XMLReader implementation * Description: API of the XML streaming API based on C# interfaces. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XMLREADER_H__ #define __XML_XMLREADER_H__ #include #include #include #ifdef LIBXML_SCHEMAS_ENABLED #include #include #endif #ifdef __cplusplus extern "C" { #endif /** * xmlParserSeverities: * * How severe an error callback is when the per-reader error callback API * is used. */ typedef enum { XML_PARSER_SEVERITY_VALIDITY_WARNING = 1, XML_PARSER_SEVERITY_VALIDITY_ERROR = 2, XML_PARSER_SEVERITY_WARNING = 3, XML_PARSER_SEVERITY_ERROR = 4 } xmlParserSeverities; #ifdef LIBXML_READER_ENABLED /** * xmlTextReaderMode: * * Internal state values for the reader. */ typedef enum { XML_TEXTREADER_MODE_INITIAL = 0, XML_TEXTREADER_MODE_INTERACTIVE = 1, XML_TEXTREADER_MODE_ERROR = 2, XML_TEXTREADER_MODE_EOF =3, XML_TEXTREADER_MODE_CLOSED = 4, XML_TEXTREADER_MODE_READING = 5 } xmlTextReaderMode; /** * xmlParserProperties: * * Some common options to use with xmlTextReaderSetParserProp, but it * is better to use xmlParserOption and the xmlReaderNewxxx and * xmlReaderForxxx APIs now. */ typedef enum { XML_PARSER_LOADDTD = 1, XML_PARSER_DEFAULTATTRS = 2, XML_PARSER_VALIDATE = 3, XML_PARSER_SUBST_ENTITIES = 4 } xmlParserProperties; /** * xmlReaderTypes: * * Predefined constants for the different types of nodes. */ typedef enum { XML_READER_TYPE_NONE = 0, XML_READER_TYPE_ELEMENT = 1, XML_READER_TYPE_ATTRIBUTE = 2, XML_READER_TYPE_TEXT = 3, XML_READER_TYPE_CDATA = 4, XML_READER_TYPE_ENTITY_REFERENCE = 5, XML_READER_TYPE_ENTITY = 6, XML_READER_TYPE_PROCESSING_INSTRUCTION = 7, XML_READER_TYPE_COMMENT = 8, XML_READER_TYPE_DOCUMENT = 9, XML_READER_TYPE_DOCUMENT_TYPE = 10, XML_READER_TYPE_DOCUMENT_FRAGMENT = 11, XML_READER_TYPE_NOTATION = 12, XML_READER_TYPE_WHITESPACE = 13, XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14, XML_READER_TYPE_END_ELEMENT = 15, XML_READER_TYPE_END_ENTITY = 16, XML_READER_TYPE_XML_DECLARATION = 17 } xmlReaderTypes; /** * xmlTextReader: * * Structure for an xmlReader context. */ typedef struct _xmlTextReader xmlTextReader; /** * xmlTextReaderPtr: * * Pointer to an xmlReader context. */ typedef xmlTextReader *xmlTextReaderPtr; /* * Constructors & Destructor */ XMLPUBFUN xmlTextReaderPtr XMLCALL xmlNewTextReader (xmlParserInputBufferPtr input, const char *URI); XMLPUBFUN xmlTextReaderPtr XMLCALL xmlNewTextReaderFilename(const char *URI); XMLPUBFUN void XMLCALL xmlFreeTextReader (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderSetup(xmlTextReaderPtr reader, xmlParserInputBufferPtr input, const char *URL, const char *encoding, int options); /* * Iterators */ XMLPUBFUN int XMLCALL xmlTextReaderRead (xmlTextReaderPtr reader); #ifdef LIBXML_WRITER_ENABLED XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadInnerXml(xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadOuterXml(xmlTextReaderPtr reader); #endif XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadString (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader); /* * Attributes of the node */ XMLPUBFUN int XMLCALL xmlTextReaderAttributeCount(xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderDepth (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderHasAttributes(xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderHasValue(xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderIsDefault (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderNodeType (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderQuoteChar (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderReadState (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstBaseUri (xmlTextReaderPtr reader); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstLocalName (xmlTextReaderPtr reader); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstName (xmlTextReaderPtr reader); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstPrefix (xmlTextReaderPtr reader); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstXmlLang (xmlTextReaderPtr reader); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstString (xmlTextReaderPtr reader, const xmlChar *str); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstValue (xmlTextReaderPtr reader); /* * use the Const version of the routine for * better performance and simpler code */ XMLPUBFUN xmlChar * XMLCALL xmlTextReaderBaseUri (xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderLocalName (xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderName (xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderNamespaceUri(xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderPrefix (xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderXmlLang (xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderValue (xmlTextReaderPtr reader); /* * Methods of the XmlTextReader */ XMLPUBFUN int XMLCALL xmlTextReaderClose (xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader, int no); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderGetAttribute (xmlTextReaderPtr reader, const xmlChar *name); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader, const xmlChar *localName, const xmlChar *namespaceURI); XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlTextReaderGetRemainder (xmlTextReaderPtr reader); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderLookupNamespace(xmlTextReaderPtr reader, const xmlChar *prefix); XMLPUBFUN int XMLCALL xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader, int no); XMLPUBFUN int XMLCALL xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader, const xmlChar *name); XMLPUBFUN int XMLCALL xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader, const xmlChar *localName, const xmlChar *namespaceURI); XMLPUBFUN int XMLCALL xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderMoveToElement (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderNormalization (xmlTextReaderPtr reader); XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstEncoding (xmlTextReaderPtr reader); /* * Extensions */ XMLPUBFUN int XMLCALL xmlTextReaderSetParserProp (xmlTextReaderPtr reader, int prop, int value); XMLPUBFUN int XMLCALL xmlTextReaderGetParserProp (xmlTextReaderPtr reader, int prop); XMLPUBFUN xmlNodePtr XMLCALL xmlTextReaderCurrentNode (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader); XMLPUBFUN xmlNodePtr XMLCALL xmlTextReaderPreserve (xmlTextReaderPtr reader); #ifdef LIBXML_PATTERN_ENABLED XMLPUBFUN int XMLCALL xmlTextReaderPreservePattern(xmlTextReaderPtr reader, const xmlChar *pattern, const xmlChar **namespaces); #endif /* LIBXML_PATTERN_ENABLED */ XMLPUBFUN xmlDocPtr XMLCALL xmlTextReaderCurrentDoc (xmlTextReaderPtr reader); XMLPUBFUN xmlNodePtr XMLCALL xmlTextReaderExpand (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderNext (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderNextSibling (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderIsValid (xmlTextReaderPtr reader); #ifdef LIBXML_SCHEMAS_ENABLED XMLPUBFUN int XMLCALL xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng); XMLPUBFUN int XMLCALL xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader, xmlRelaxNGValidCtxtPtr ctxt, int options); XMLPUBFUN int XMLCALL xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, xmlRelaxNGPtr schema); XMLPUBFUN int XMLCALL xmlTextReaderSchemaValidate (xmlTextReaderPtr reader, const char *xsd); XMLPUBFUN int XMLCALL xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader, xmlSchemaValidCtxtPtr ctxt, int options); XMLPUBFUN int XMLCALL xmlTextReaderSetSchema (xmlTextReaderPtr reader, xmlSchemaPtr schema); #endif XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL xmlTextReaderStandalone (xmlTextReaderPtr reader); /* * Index lookup */ XMLPUBFUN long XMLCALL xmlTextReaderByteConsumed (xmlTextReaderPtr reader); /* * New more complete APIs for simpler creation and reuse of readers */ XMLPUBFUN xmlTextReaderPtr XMLCALL xmlReaderWalker (xmlDocPtr doc); XMLPUBFUN xmlTextReaderPtr XMLCALL xmlReaderForDoc (const xmlChar * cur, const char *URL, const char *encoding, int options); XMLPUBFUN xmlTextReaderPtr XMLCALL xmlReaderForFile (const char *filename, const char *encoding, int options); XMLPUBFUN xmlTextReaderPtr XMLCALL xmlReaderForMemory (const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN xmlTextReaderPtr XMLCALL xmlReaderForFd (int fd, const char *URL, const char *encoding, int options); XMLPUBFUN xmlTextReaderPtr XMLCALL xmlReaderForIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); XMLPUBFUN int XMLCALL xmlReaderNewWalker (xmlTextReaderPtr reader, xmlDocPtr doc); XMLPUBFUN int XMLCALL xmlReaderNewDoc (xmlTextReaderPtr reader, const xmlChar * cur, const char *URL, const char *encoding, int options); XMLPUBFUN int XMLCALL xmlReaderNewFile (xmlTextReaderPtr reader, const char *filename, const char *encoding, int options); XMLPUBFUN int XMLCALL xmlReaderNewMemory (xmlTextReaderPtr reader, const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN int XMLCALL xmlReaderNewFd (xmlTextReaderPtr reader, int fd, const char *URL, const char *encoding, int options); XMLPUBFUN int XMLCALL xmlReaderNewIO (xmlTextReaderPtr reader, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); /* * Error handling extensions */ typedef void * xmlTextReaderLocatorPtr; /** * xmlTextReaderErrorFunc: * @arg: the user argument * @msg: the message * @severity: the severity of the error * @locator: a locator indicating where the error occurred * * Signature of an error callback from a reader parser */ typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg, const char *msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator); XMLPUBFUN int XMLCALL xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator); XMLPUBFUN xmlChar * XMLCALL xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator); XMLPUBFUN void XMLCALL xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader, xmlTextReaderErrorFunc f, void *arg); XMLPUBFUN void XMLCALL xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader, xmlStructuredErrorFunc f, void *arg); XMLPUBFUN void XMLCALL xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader, xmlTextReaderErrorFunc *f, void **arg); #endif /* LIBXML_READER_ENABLED */ #ifdef __cplusplus } #endif #endif /* __XML_XMLREADER_H__ */ PK!䥽;;libxml/xmlexports.hnu[/* * Summary: macros for marking symbols as exportable/importable. * Description: macros for marking symbols as exportable/importable. * * Copy: See Copyright for the status of this software. */ #ifndef __XML_EXPORTS_H__ #define __XML_EXPORTS_H__ #if defined(_WIN32) || defined(__CYGWIN__) /** DOC_DISABLE */ #ifdef LIBXML_STATIC #define XMLPUBLIC #elif defined(IN_LIBXML) #define XMLPUBLIC __declspec(dllexport) #else #define XMLPUBLIC __declspec(dllimport) #endif #if defined(LIBXML_FASTCALL) #define XMLCALL __fastcall #else #define XMLCALL __cdecl #endif #define XMLCDECL __cdecl /** DOC_ENABLE */ #else /* not Windows */ /** * XMLPUBLIC: * * Macro which declares a public symbol */ #define XMLPUBLIC /** * XMLCALL: * * Macro which declares the calling convention for exported functions */ #define XMLCALL /** * XMLCDECL: * * Macro which declares the calling convention for exported functions that * use '...'. */ #define XMLCDECL #endif /* platform switch */ /* * XMLPUBFUN: * * Macro which declares an exportable function */ #define XMLPUBFUN XMLPUBLIC /** * XMLPUBVAR: * * Macro which declares an exportable variable */ #define XMLPUBVAR XMLPUBLIC extern /* Compatibility */ #if !defined(LIBXML_DLL_IMPORT) #define LIBXML_DLL_IMPORT XMLPUBVAR #endif #endif /* __XML_EXPORTS_H__ */ PK!TI''libxml/chvalid.hnu[/* * Summary: Unicode character range checking * Description: this module exports interfaces for the character * range validation APIs * * This file is automatically generated from the cvs source * definition files using the genChRanges.py Python script * * Generation date: Mon Mar 27 11:09:48 2006 * Sources: chvalid.def * Author: William Brack */ #ifndef __XML_CHVALID_H__ #define __XML_CHVALID_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* * Define our typedefs and structures * */ typedef struct _xmlChSRange xmlChSRange; typedef xmlChSRange *xmlChSRangePtr; struct _xmlChSRange { unsigned short low; unsigned short high; }; typedef struct _xmlChLRange xmlChLRange; typedef xmlChLRange *xmlChLRangePtr; struct _xmlChLRange { unsigned int low; unsigned int high; }; typedef struct _xmlChRangeGroup xmlChRangeGroup; typedef xmlChRangeGroup *xmlChRangeGroupPtr; struct _xmlChRangeGroup { int nbShortRange; int nbLongRange; const xmlChSRange *shortRange; /* points to an array of ranges */ const xmlChLRange *longRange; }; /** * Range checking routine */ XMLPUBFUN int XMLCALL xmlCharInRange(unsigned int val, const xmlChRangeGroup *group); /** * xmlIsBaseChar_ch: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \ ((0x61 <= (c)) && ((c) <= 0x7a)) || \ ((0xc0 <= (c)) && ((c) <= 0xd6)) || \ ((0xd8 <= (c)) && ((c) <= 0xf6)) || \ (0xf8 <= (c))) /** * xmlIsBaseCharQ: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsBaseCharQ(c) (((c) < 0x100) ? \ xmlIsBaseChar_ch((c)) : \ xmlCharInRange((c), &xmlIsBaseCharGroup)) XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup; /** * xmlIsBlank_ch: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsBlank_ch(c) (((c) == 0x20) || \ ((0x9 <= (c)) && ((c) <= 0xa)) || \ ((c) == 0xd)) /** * xmlIsBlankQ: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsBlankQ(c) (((c) < 0x100) ? \ xmlIsBlank_ch((c)) : 0) /** * xmlIsChar_ch: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \ ((c) == 0xd) || \ (0x20 <= (c))) /** * xmlIsCharQ: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsCharQ(c) (((c) < 0x100) ? \ xmlIsChar_ch((c)) :\ (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \ ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \ ((0x10000 <= (c)) && ((c) <= 0x10ffff)))) XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup; /** * xmlIsCombiningQ: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsCombiningQ(c) (((c) < 0x100) ? \ 0 : \ xmlCharInRange((c), &xmlIsCombiningGroup)) XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup; /** * xmlIsDigit_ch: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39))) /** * xmlIsDigitQ: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsDigitQ(c) (((c) < 0x100) ? \ xmlIsDigit_ch((c)) : \ xmlCharInRange((c), &xmlIsDigitGroup)) XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup; /** * xmlIsExtender_ch: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsExtender_ch(c) (((c) == 0xb7)) /** * xmlIsExtenderQ: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsExtenderQ(c) (((c) < 0x100) ? \ xmlIsExtender_ch((c)) : \ xmlCharInRange((c), &xmlIsExtenderGroup)) XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup; /** * xmlIsIdeographicQ: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsIdeographicQ(c) (((c) < 0x100) ? \ 0 :\ (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \ ((c) == 0x3007) || \ ((0x3021 <= (c)) && ((c) <= 0x3029)))) XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup; XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256]; /** * xmlIsPubidChar_ch: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)]) /** * xmlIsPubidCharQ: * @c: char to validate * * Automatically generated by genChRanges.py */ #define xmlIsPubidCharQ(c) (((c) < 0x100) ? \ xmlIsPubidChar_ch((c)) : 0) XMLPUBFUN int XMLCALL xmlIsBaseChar(unsigned int ch); XMLPUBFUN int XMLCALL xmlIsBlank(unsigned int ch); XMLPUBFUN int XMLCALL xmlIsChar(unsigned int ch); XMLPUBFUN int XMLCALL xmlIsCombining(unsigned int ch); XMLPUBFUN int XMLCALL xmlIsDigit(unsigned int ch); XMLPUBFUN int XMLCALL xmlIsExtender(unsigned int ch); XMLPUBFUN int XMLCALL xmlIsIdeographic(unsigned int ch); XMLPUBFUN int XMLCALL xmlIsPubidChar(unsigned int ch); #ifdef __cplusplus } #endif #endif /* __XML_CHVALID_H__ */ PK!libxml/nanohttp.hnu[/* * Summary: minimal HTTP implementation * Description: minimal HTTP implementation allowing to fetch resources * like external subset. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __NANO_HTTP_H__ #define __NANO_HTTP_H__ #include #ifdef LIBXML_HTTP_ENABLED #ifdef __cplusplus extern "C" { #endif XMLPUBFUN void XMLCALL xmlNanoHTTPInit (void); XMLPUBFUN void XMLCALL xmlNanoHTTPCleanup (void); XMLPUBFUN void XMLCALL xmlNanoHTTPScanProxy (const char *URL); XMLPUBFUN int XMLCALL xmlNanoHTTPFetch (const char *URL, const char *filename, char **contentType); XMLPUBFUN void * XMLCALL xmlNanoHTTPMethod (const char *URL, const char *method, const char *input, char **contentType, const char *headers, int ilen); XMLPUBFUN void * XMLCALL xmlNanoHTTPMethodRedir (const char *URL, const char *method, const char *input, char **contentType, char **redir, const char *headers, int ilen); XMLPUBFUN void * XMLCALL xmlNanoHTTPOpen (const char *URL, char **contentType); XMLPUBFUN void * XMLCALL xmlNanoHTTPOpenRedir (const char *URL, char **contentType, char **redir); XMLPUBFUN int XMLCALL xmlNanoHTTPReturnCode (void *ctx); XMLPUBFUN const char * XMLCALL xmlNanoHTTPAuthHeader (void *ctx); XMLPUBFUN const char * XMLCALL xmlNanoHTTPRedir (void *ctx); XMLPUBFUN int XMLCALL xmlNanoHTTPContentLength( void * ctx ); XMLPUBFUN const char * XMLCALL xmlNanoHTTPEncoding (void *ctx); XMLPUBFUN const char * XMLCALL xmlNanoHTTPMimeType (void *ctx); XMLPUBFUN int XMLCALL xmlNanoHTTPRead (void *ctx, void *dest, int len); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN int XMLCALL xmlNanoHTTPSave (void *ctxt, const char *filename); #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN void XMLCALL xmlNanoHTTPClose (void *ctx); #ifdef __cplusplus } #endif #endif /* LIBXML_HTTP_ENABLED */ #endif /* __NANO_HTTP_H__ */ PK!׹ libxml/xinclude.hnu[/* * Summary: implementation of XInclude * Description: API to handle XInclude processing, * implements the * World Wide Web Consortium Last Call Working Draft 10 November 2003 * http://www.w3.org/TR/2003/WD-xinclude-20031110 * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XINCLUDE_H__ #define __XML_XINCLUDE_H__ #include #include #ifdef LIBXML_XINCLUDE_ENABLED #ifdef __cplusplus extern "C" { #endif /** * XINCLUDE_NS: * * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude */ #define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude" /** * XINCLUDE_OLD_NS: * * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude */ #define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude" /** * XINCLUDE_NODE: * * Macro defining "include" */ #define XINCLUDE_NODE (const xmlChar *) "include" /** * XINCLUDE_FALLBACK: * * Macro defining "fallback" */ #define XINCLUDE_FALLBACK (const xmlChar *) "fallback" /** * XINCLUDE_HREF: * * Macro defining "href" */ #define XINCLUDE_HREF (const xmlChar *) "href" /** * XINCLUDE_PARSE: * * Macro defining "parse" */ #define XINCLUDE_PARSE (const xmlChar *) "parse" /** * XINCLUDE_PARSE_XML: * * Macro defining "xml" */ #define XINCLUDE_PARSE_XML (const xmlChar *) "xml" /** * XINCLUDE_PARSE_TEXT: * * Macro defining "text" */ #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text" /** * XINCLUDE_PARSE_ENCODING: * * Macro defining "encoding" */ #define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding" /** * XINCLUDE_PARSE_XPOINTER: * * Macro defining "xpointer" */ #define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer" typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt; typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr; /* * standalone processing */ XMLPUBFUN int XMLCALL xmlXIncludeProcess (xmlDocPtr doc); XMLPUBFUN int XMLCALL xmlXIncludeProcessFlags (xmlDocPtr doc, int flags); XMLPUBFUN int XMLCALL xmlXIncludeProcessFlagsData(xmlDocPtr doc, int flags, void *data); XMLPUBFUN int XMLCALL xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, int flags, void *data); XMLPUBFUN int XMLCALL xmlXIncludeProcessTree (xmlNodePtr tree); XMLPUBFUN int XMLCALL xmlXIncludeProcessTreeFlags(xmlNodePtr tree, int flags); /* * contextual processing */ XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL xmlXIncludeNewContext (xmlDocPtr doc); XMLPUBFUN int XMLCALL xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt, int flags); XMLPUBFUN void XMLCALL xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt, xmlNodePtr tree); #ifdef __cplusplus } #endif #endif /* LIBXML_XINCLUDE_ENABLED */ #endif /* __XML_XINCLUDE_H__ */ PK!McƲlibxml/xlink.hnu[/* * Summary: unfinished XLink detection module * Description: unfinished XLink detection module * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XLINK_H__ #define __XML_XLINK_H__ #include #include #ifdef LIBXML_XPTR_ENABLED #ifdef __cplusplus extern "C" { #endif /** * Various defines for the various Link properties. * * NOTE: the link detection layer will try to resolve QName expansion * of namespaces. If "foo" is the prefix for "http://foo.com/" * then the link detection layer will expand role="foo:myrole" * to "http://foo.com/:myrole". * NOTE: the link detection layer will expand URI-References found on * href attributes by using the base mechanism if found. */ typedef xmlChar *xlinkHRef; typedef xmlChar *xlinkRole; typedef xmlChar *xlinkTitle; typedef enum { XLINK_TYPE_NONE = 0, XLINK_TYPE_SIMPLE, XLINK_TYPE_EXTENDED, XLINK_TYPE_EXTENDED_SET } xlinkType; typedef enum { XLINK_SHOW_NONE = 0, XLINK_SHOW_NEW, XLINK_SHOW_EMBED, XLINK_SHOW_REPLACE } xlinkShow; typedef enum { XLINK_ACTUATE_NONE = 0, XLINK_ACTUATE_AUTO, XLINK_ACTUATE_ONREQUEST } xlinkActuate; /** * xlinkNodeDetectFunc: * @ctx: user data pointer * @node: the node to check * * This is the prototype for the link detection routine. * It calls the default link detection callbacks upon link detection. */ typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node); /* * The link detection module interact with the upper layers using * a set of callback registered at parsing time. */ /** * xlinkSimpleLinkFunk: * @ctx: user data pointer * @node: the node carrying the link * @href: the target of the link * @role: the role string * @title: the link title * * This is the prototype for a simple link detection callback. */ typedef void (*xlinkSimpleLinkFunk) (void *ctx, xmlNodePtr node, const xlinkHRef href, const xlinkRole role, const xlinkTitle title); /** * xlinkExtendedLinkFunk: * @ctx: user data pointer * @node: the node carrying the link * @nbLocators: the number of locators detected on the link * @hrefs: pointer to the array of locator hrefs * @roles: pointer to the array of locator roles * @nbArcs: the number of arcs detected on the link * @from: pointer to the array of source roles found on the arcs * @to: pointer to the array of target roles found on the arcs * @show: array of values for the show attributes found on the arcs * @actuate: array of values for the actuate attributes found on the arcs * @nbTitles: the number of titles detected on the link * @title: array of titles detected on the link * @langs: array of xml:lang values for the titles * * This is the prototype for a extended link detection callback. */ typedef void (*xlinkExtendedLinkFunk)(void *ctx, xmlNodePtr node, int nbLocators, const xlinkHRef *hrefs, const xlinkRole *roles, int nbArcs, const xlinkRole *from, const xlinkRole *to, xlinkShow *show, xlinkActuate *actuate, int nbTitles, const xlinkTitle *titles, const xmlChar **langs); /** * xlinkExtendedLinkSetFunk: * @ctx: user data pointer * @node: the node carrying the link * @nbLocators: the number of locators detected on the link * @hrefs: pointer to the array of locator hrefs * @roles: pointer to the array of locator roles * @nbTitles: the number of titles detected on the link * @title: array of titles detected on the link * @langs: array of xml:lang values for the titles * * This is the prototype for a extended link set detection callback. */ typedef void (*xlinkExtendedLinkSetFunk) (void *ctx, xmlNodePtr node, int nbLocators, const xlinkHRef *hrefs, const xlinkRole *roles, int nbTitles, const xlinkTitle *titles, const xmlChar **langs); /** * This is the structure containing a set of Links detection callbacks. * * There is no default xlink callbacks, if one want to get link * recognition activated, those call backs must be provided before parsing. */ typedef struct _xlinkHandler xlinkHandler; typedef xlinkHandler *xlinkHandlerPtr; struct _xlinkHandler { xlinkSimpleLinkFunk simple; xlinkExtendedLinkFunk extended; xlinkExtendedLinkSetFunk set; }; /* * The default detection routine, can be overridden, they call the default * detection callbacks. */ XMLPUBFUN xlinkNodeDetectFunc XMLCALL xlinkGetDefaultDetect (void); XMLPUBFUN void XMLCALL xlinkSetDefaultDetect (xlinkNodeDetectFunc func); /* * Routines to set/get the default handlers. */ XMLPUBFUN xlinkHandlerPtr XMLCALL xlinkGetDefaultHandler (void); XMLPUBFUN void XMLCALL xlinkSetDefaultHandler (xlinkHandlerPtr handler); /* * Link detection module itself. */ XMLPUBFUN xlinkType XMLCALL xlinkIsLink (xmlDocPtr doc, xmlNodePtr node); #ifdef __cplusplus } #endif #endif /* LIBXML_XPTR_ENABLED */ #endif /* __XML_XLINK_H__ */ PK!d4RRlibxml/xmlregexp.hnu[/* * Summary: regular expressions handling * Description: basic API for libxml regular expressions handling used * for XML Schemas and validation. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_REGEXP_H__ #define __XML_REGEXP_H__ #include #ifdef LIBXML_REGEXP_ENABLED #ifdef __cplusplus extern "C" { #endif /** * xmlRegexpPtr: * * A libxml regular expression, they can actually be far more complex * thank the POSIX regex expressions. */ typedef struct _xmlRegexp xmlRegexp; typedef xmlRegexp *xmlRegexpPtr; /** * xmlRegExecCtxtPtr: * * A libxml progressive regular expression evaluation context */ typedef struct _xmlRegExecCtxt xmlRegExecCtxt; typedef xmlRegExecCtxt *xmlRegExecCtxtPtr; #ifdef __cplusplus } #endif #include #include #ifdef __cplusplus extern "C" { #endif /* * The POSIX like API */ XMLPUBFUN xmlRegexpPtr XMLCALL xmlRegexpCompile (const xmlChar *regexp); XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp); XMLPUBFUN int XMLCALL xmlRegexpExec (xmlRegexpPtr comp, const xmlChar *value); XMLPUBFUN void XMLCALL xmlRegexpPrint (FILE *output, xmlRegexpPtr regexp); XMLPUBFUN int XMLCALL xmlRegexpIsDeterminist(xmlRegexpPtr comp); /** * xmlRegExecCallbacks: * @exec: the regular expression context * @token: the current token string * @transdata: transition data * @inputdata: input data * * Callback function when doing a transition in the automata */ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec, const xmlChar *token, void *transdata, void *inputdata); /* * The progressive API */ XMLPUBFUN xmlRegExecCtxtPtr XMLCALL xmlRegNewExecCtxt (xmlRegexpPtr comp, xmlRegExecCallbacks callback, void *data); XMLPUBFUN void XMLCALL xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec); XMLPUBFUN int XMLCALL xmlRegExecPushString(xmlRegExecCtxtPtr exec, const xmlChar *value, void *data); XMLPUBFUN int XMLCALL xmlRegExecPushString2(xmlRegExecCtxtPtr exec, const xmlChar *value, const xmlChar *value2, void *data); XMLPUBFUN int XMLCALL xmlRegExecNextValues(xmlRegExecCtxtPtr exec, int *nbval, int *nbneg, xmlChar **values, int *terminal); XMLPUBFUN int XMLCALL xmlRegExecErrInfo (xmlRegExecCtxtPtr exec, const xmlChar **string, int *nbval, int *nbneg, xmlChar **values, int *terminal); #ifdef LIBXML_EXPR_ENABLED /* * Formal regular expression handling * Its goal is to do some formal work on content models */ /* expressions are used within a context */ typedef struct _xmlExpCtxt xmlExpCtxt; typedef xmlExpCtxt *xmlExpCtxtPtr; XMLPUBFUN void XMLCALL xmlExpFreeCtxt (xmlExpCtxtPtr ctxt); XMLPUBFUN xmlExpCtxtPtr XMLCALL xmlExpNewCtxt (int maxNodes, xmlDictPtr dict); XMLPUBFUN int XMLCALL xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt); /* Expressions are trees but the tree is opaque */ typedef struct _xmlExpNode xmlExpNode; typedef xmlExpNode *xmlExpNodePtr; typedef enum { XML_EXP_EMPTY = 0, XML_EXP_FORBID = 1, XML_EXP_ATOM = 2, XML_EXP_SEQ = 3, XML_EXP_OR = 4, XML_EXP_COUNT = 5 } xmlExpNodeType; /* * 2 core expressions shared by all for the empty language set * and for the set with just the empty token */ XMLPUBVAR xmlExpNodePtr forbiddenExp; XMLPUBVAR xmlExpNodePtr emptyExp; /* * Expressions are reference counted internally */ XMLPUBFUN void XMLCALL xmlExpFree (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr); XMLPUBFUN void XMLCALL xmlExpRef (xmlExpNodePtr expr); /* * constructors can be either manual or from a string */ XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpParse (xmlExpCtxtPtr ctxt, const char *expr); XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpNewAtom (xmlExpCtxtPtr ctxt, const xmlChar *name, int len); XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpNewOr (xmlExpCtxtPtr ctxt, xmlExpNodePtr left, xmlExpNodePtr right); XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpNewSeq (xmlExpCtxtPtr ctxt, xmlExpNodePtr left, xmlExpNodePtr right); XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpNewRange (xmlExpCtxtPtr ctxt, xmlExpNodePtr subset, int min, int max); /* * The really interesting APIs */ XMLPUBFUN int XMLCALL xmlExpIsNillable(xmlExpNodePtr expr); XMLPUBFUN int XMLCALL xmlExpMaxToken (xmlExpNodePtr expr); XMLPUBFUN int XMLCALL xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, const xmlChar**langList, int len); XMLPUBFUN int XMLCALL xmlExpGetStart (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, const xmlChar**tokList, int len); XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpStringDerive(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, const xmlChar *str, int len); XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpExpDerive (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, xmlExpNodePtr sub); XMLPUBFUN int XMLCALL xmlExpSubsume (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, xmlExpNodePtr sub); XMLPUBFUN void XMLCALL xmlExpDump (xmlBufferPtr buf, xmlExpNodePtr expr); #endif /* LIBXML_EXPR_ENABLED */ #ifdef __cplusplus } #endif #endif /* LIBXML_REGEXP_ENABLED */ #endif /*__XML_REGEXP_H__ */ PK!y**libxml/catalog.hnu[/** * Summary: interfaces to the Catalog handling system * Description: the catalog module implements the support for * XML Catalogs and SGML catalogs * * SGML Open Technical Resolution TR9401:1997. * http://www.jclark.com/sp/catalog.htm * * XML Catalogs Working Draft 06 August 2001 * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_CATALOG_H__ #define __XML_CATALOG_H__ #include #include #include #include #ifdef LIBXML_CATALOG_ENABLED #ifdef __cplusplus extern "C" { #endif /** * XML_CATALOGS_NAMESPACE: * * The namespace for the XML Catalogs elements. */ #define XML_CATALOGS_NAMESPACE \ (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" /** * XML_CATALOG_PI: * * The specific XML Catalog Processing Instruction name. */ #define XML_CATALOG_PI \ (const xmlChar *) "oasis-xml-catalog" /* * The API is voluntarily limited to general cataloging. */ typedef enum { XML_CATA_PREFER_NONE = 0, XML_CATA_PREFER_PUBLIC = 1, XML_CATA_PREFER_SYSTEM } xmlCatalogPrefer; typedef enum { XML_CATA_ALLOW_NONE = 0, XML_CATA_ALLOW_GLOBAL = 1, XML_CATA_ALLOW_DOCUMENT = 2, XML_CATA_ALLOW_ALL = 3 } xmlCatalogAllow; typedef struct _xmlCatalog xmlCatalog; typedef xmlCatalog *xmlCatalogPtr; /* * Operations on a given catalog. */ XMLPUBFUN xmlCatalogPtr XMLCALL xmlNewCatalog (int sgml); XMLPUBFUN xmlCatalogPtr XMLCALL xmlLoadACatalog (const char *filename); XMLPUBFUN xmlCatalogPtr XMLCALL xmlLoadSGMLSuperCatalog (const char *filename); XMLPUBFUN int XMLCALL xmlConvertSGMLCatalog (xmlCatalogPtr catal); XMLPUBFUN int XMLCALL xmlACatalogAdd (xmlCatalogPtr catal, const xmlChar *type, const xmlChar *orig, const xmlChar *replace); XMLPUBFUN int XMLCALL xmlACatalogRemove (xmlCatalogPtr catal, const xmlChar *value); XMLPUBFUN xmlChar * XMLCALL xmlACatalogResolve (xmlCatalogPtr catal, const xmlChar *pubID, const xmlChar *sysID); XMLPUBFUN xmlChar * XMLCALL xmlACatalogResolveSystem(xmlCatalogPtr catal, const xmlChar *sysID); XMLPUBFUN xmlChar * XMLCALL xmlACatalogResolvePublic(xmlCatalogPtr catal, const xmlChar *pubID); XMLPUBFUN xmlChar * XMLCALL xmlACatalogResolveURI (xmlCatalogPtr catal, const xmlChar *URI); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlACatalogDump (xmlCatalogPtr catal, FILE *out); #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN void XMLCALL xmlFreeCatalog (xmlCatalogPtr catal); XMLPUBFUN int XMLCALL xmlCatalogIsEmpty (xmlCatalogPtr catal); /* * Global operations. */ XMLPUBFUN void XMLCALL xmlInitializeCatalog (void); XMLPUBFUN int XMLCALL xmlLoadCatalog (const char *filename); XMLPUBFUN void XMLCALL xmlLoadCatalogs (const char *paths); XMLPUBFUN void XMLCALL xmlCatalogCleanup (void); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlCatalogDump (FILE *out); #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN xmlChar * XMLCALL xmlCatalogResolve (const xmlChar *pubID, const xmlChar *sysID); XMLPUBFUN xmlChar * XMLCALL xmlCatalogResolveSystem (const xmlChar *sysID); XMLPUBFUN xmlChar * XMLCALL xmlCatalogResolvePublic (const xmlChar *pubID); XMLPUBFUN xmlChar * XMLCALL xmlCatalogResolveURI (const xmlChar *URI); XMLPUBFUN int XMLCALL xmlCatalogAdd (const xmlChar *type, const xmlChar *orig, const xmlChar *replace); XMLPUBFUN int XMLCALL xmlCatalogRemove (const xmlChar *value); XMLPUBFUN xmlDocPtr XMLCALL xmlParseCatalogFile (const char *filename); XMLPUBFUN int XMLCALL xmlCatalogConvert (void); /* * Strictly minimal interfaces for per-document catalogs used * by the parser. */ XMLPUBFUN void XMLCALL xmlCatalogFreeLocal (void *catalogs); XMLPUBFUN void * XMLCALL xmlCatalogAddLocal (void *catalogs, const xmlChar *URL); XMLPUBFUN xmlChar * XMLCALL xmlCatalogLocalResolve (void *catalogs, const xmlChar *pubID, const xmlChar *sysID); XMLPUBFUN xmlChar * XMLCALL xmlCatalogLocalResolveURI(void *catalogs, const xmlChar *URI); /* * Preference settings. */ XMLPUBFUN int XMLCALL xmlCatalogSetDebug (int level); XMLPUBFUN xmlCatalogPrefer XMLCALL xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer); XMLPUBFUN void XMLCALL xmlCatalogSetDefaults (xmlCatalogAllow allow); XMLPUBFUN xmlCatalogAllow XMLCALL xmlCatalogGetDefaults (void); /* DEPRECATED interfaces */ XMLPUBFUN const xmlChar * XMLCALL xmlCatalogGetSystem (const xmlChar *sysID); XMLPUBFUN const xmlChar * XMLCALL xmlCatalogGetPublic (const xmlChar *pubID); #ifdef __cplusplus } #endif #endif /* LIBXML_CATALOG_ENABLED */ #endif /* __XML_CATALOG_H__ */ PK!m>>libxml/HTMLtree.hnu[/* * Summary: specific APIs to process HTML tree, especially serialization * Description: this module implements a few function needed to process * tree in an HTML specific way. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __HTML_TREE_H__ #define __HTML_TREE_H__ #include #include #include #include #ifdef LIBXML_HTML_ENABLED #ifdef __cplusplus extern "C" { #endif /** * HTML_TEXT_NODE: * * Macro. A text node in a HTML document is really implemented * the same way as a text node in an XML document. */ #define HTML_TEXT_NODE XML_TEXT_NODE /** * HTML_ENTITY_REF_NODE: * * Macro. An entity reference in a HTML document is really implemented * the same way as an entity reference in an XML document. */ #define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE /** * HTML_COMMENT_NODE: * * Macro. A comment in a HTML document is really implemented * the same way as a comment in an XML document. */ #define HTML_COMMENT_NODE XML_COMMENT_NODE /** * HTML_PRESERVE_NODE: * * Macro. A preserved node in a HTML document is really implemented * the same way as a CDATA section in an XML document. */ #define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE /** * HTML_PI_NODE: * * Macro. A processing instruction in a HTML document is really implemented * the same way as a processing instruction in an XML document. */ #define HTML_PI_NODE XML_PI_NODE XMLPUBFUN htmlDocPtr XMLCALL htmlNewDoc (const xmlChar *URI, const xmlChar *ExternalID); XMLPUBFUN htmlDocPtr XMLCALL htmlNewDocNoDtD (const xmlChar *URI, const xmlChar *ExternalID); XMLPUBFUN const xmlChar * XMLCALL htmlGetMetaEncoding (htmlDocPtr doc); XMLPUBFUN int XMLCALL htmlSetMetaEncoding (htmlDocPtr doc, const xmlChar *encoding); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL htmlDocDumpMemory (xmlDocPtr cur, xmlChar **mem, int *size); XMLPUBFUN void XMLCALL htmlDocDumpMemoryFormat (xmlDocPtr cur, xmlChar **mem, int *size, int format); XMLPUBFUN int XMLCALL htmlDocDump (FILE *f, xmlDocPtr cur); XMLPUBFUN int XMLCALL htmlSaveFile (const char *filename, xmlDocPtr cur); XMLPUBFUN int XMLCALL htmlNodeDump (xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur); XMLPUBFUN void XMLCALL htmlNodeDumpFile (FILE *out, xmlDocPtr doc, xmlNodePtr cur); XMLPUBFUN int XMLCALL htmlNodeDumpFileFormat (FILE *out, xmlDocPtr doc, xmlNodePtr cur, const char *encoding, int format); XMLPUBFUN int XMLCALL htmlSaveFileEnc (const char *filename, xmlDocPtr cur, const char *encoding); XMLPUBFUN int XMLCALL htmlSaveFileFormat (const char *filename, xmlDocPtr cur, const char *encoding, int format); XMLPUBFUN void XMLCALL htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, const char *encoding, int format); XMLPUBFUN void XMLCALL htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding); XMLPUBFUN void XMLCALL htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding, int format); XMLPUBFUN void XMLCALL htmlNodeDumpOutput (xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, const char *encoding); #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN int XMLCALL htmlIsBooleanAttr (const xmlChar *name); #ifdef __cplusplus } #endif #endif /* LIBXML_HTML_ENABLED */ #endif /* __HTML_TREE_H__ */ PK!:-5  libxml/debugXML.hnu[/* * Summary: Tree debugging APIs * Description: Interfaces to a set of routines used for debugging the tree * produced by the XML parser. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __DEBUG_XML__ #define __DEBUG_XML__ #include #include #include #ifdef LIBXML_DEBUG_ENABLED #include #ifdef __cplusplus extern "C" { #endif /* * The standard Dump routines. */ XMLPUBFUN void XMLCALL xmlDebugDumpString (FILE *output, const xmlChar *str); XMLPUBFUN void XMLCALL xmlDebugDumpAttr (FILE *output, xmlAttrPtr attr, int depth); XMLPUBFUN void XMLCALL xmlDebugDumpAttrList (FILE *output, xmlAttrPtr attr, int depth); XMLPUBFUN void XMLCALL xmlDebugDumpOneNode (FILE *output, xmlNodePtr node, int depth); XMLPUBFUN void XMLCALL xmlDebugDumpNode (FILE *output, xmlNodePtr node, int depth); XMLPUBFUN void XMLCALL xmlDebugDumpNodeList (FILE *output, xmlNodePtr node, int depth); XMLPUBFUN void XMLCALL xmlDebugDumpDocumentHead(FILE *output, xmlDocPtr doc); XMLPUBFUN void XMLCALL xmlDebugDumpDocument (FILE *output, xmlDocPtr doc); XMLPUBFUN void XMLCALL xmlDebugDumpDTD (FILE *output, xmlDtdPtr dtd); XMLPUBFUN void XMLCALL xmlDebugDumpEntities (FILE *output, xmlDocPtr doc); /**************************************************************** * * * Checking routines * * * ****************************************************************/ XMLPUBFUN int XMLCALL xmlDebugCheckDocument (FILE * output, xmlDocPtr doc); /**************************************************************** * * * XML shell helpers * * * ****************************************************************/ XMLPUBFUN void XMLCALL xmlLsOneNode (FILE *output, xmlNodePtr node); XMLPUBFUN int XMLCALL xmlLsCountNode (xmlNodePtr node); XMLPUBFUN const char * XMLCALL xmlBoolToText (int boolval); /**************************************************************** * * * The XML shell related structures and functions * * * ****************************************************************/ #ifdef LIBXML_XPATH_ENABLED /** * xmlShellReadlineFunc: * @prompt: a string prompt * * This is a generic signature for the XML shell input function. * * Returns a string which will be freed by the Shell. */ typedef char * (* xmlShellReadlineFunc)(char *prompt); /** * xmlShellCtxt: * * A debugging shell context. * TODO: add the defined function tables. */ typedef struct _xmlShellCtxt xmlShellCtxt; typedef xmlShellCtxt *xmlShellCtxtPtr; struct _xmlShellCtxt { char *filename; xmlDocPtr doc; xmlNodePtr node; xmlXPathContextPtr pctxt; int loaded; FILE *output; xmlShellReadlineFunc input; }; /** * xmlShellCmd: * @ctxt: a shell context * @arg: a string argument * @node: a first node * @node2: a second node * * This is a generic signature for the XML shell functions. * * Returns an int, negative returns indicating errors. */ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node, xmlNodePtr node2); XMLPUBFUN void XMLCALL xmlShellPrintXPathError (int errorType, const char *arg); XMLPUBFUN void XMLCALL xmlShellPrintXPathResult(xmlXPathObjectPtr list); XMLPUBFUN int XMLCALL xmlShellList (xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node, xmlNodePtr node2); XMLPUBFUN int XMLCALL xmlShellBase (xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node, xmlNodePtr node2); XMLPUBFUN int XMLCALL xmlShellDir (xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node, xmlNodePtr node2); XMLPUBFUN int XMLCALL xmlShellLoad (xmlShellCtxtPtr ctxt, char *filename, xmlNodePtr node, xmlNodePtr node2); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlShellPrintNode (xmlNodePtr node); XMLPUBFUN int XMLCALL xmlShellCat (xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node, xmlNodePtr node2); XMLPUBFUN int XMLCALL xmlShellWrite (xmlShellCtxtPtr ctxt, char *filename, xmlNodePtr node, xmlNodePtr node2); XMLPUBFUN int XMLCALL xmlShellSave (xmlShellCtxtPtr ctxt, char *filename, xmlNodePtr node, xmlNodePtr node2); #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef LIBXML_VALID_ENABLED XMLPUBFUN int XMLCALL xmlShellValidate (xmlShellCtxtPtr ctxt, char *dtd, xmlNodePtr node, xmlNodePtr node2); #endif /* LIBXML_VALID_ENABLED */ XMLPUBFUN int XMLCALL xmlShellDu (xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr tree, xmlNodePtr node2); XMLPUBFUN int XMLCALL xmlShellPwd (xmlShellCtxtPtr ctxt, char *buffer, xmlNodePtr node, xmlNodePtr node2); /* * The Shell interface. */ XMLPUBFUN void XMLCALL xmlShell (xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, FILE *output); #endif /* LIBXML_XPATH_ENABLED */ #ifdef __cplusplus } #endif #endif /* LIBXML_DEBUG_ENABLED */ #endif /* __DEBUG_XML__ */ PK!UT ' 'libxml/xmlunicode.hnu[/* * Summary: Unicode character APIs * Description: API for the Unicode character APIs * * This file is automatically generated from the * UCS description files of the Unicode Character Database * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html * using the genUnicode.py Python script. * * Generation date: Mon Mar 27 11:09:52 2006 * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt * Author: Daniel Veillard */ #ifndef __XML_UNICODE_H__ #define __XML_UNICODE_H__ #include #ifdef LIBXML_UNICODE_ENABLED #ifdef __cplusplus extern "C" { #endif XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code); XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code); XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code); XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code); XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code); XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code); XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code); XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code); XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code); XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code); XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code); XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code); XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code); XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code); XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code); XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code); XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code); XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code); XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code); XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code); XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code); XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code); XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code); XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code); XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code); XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code); XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code); XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code); XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code); XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code); XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code); XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code); XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code); XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code); XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code); XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code); XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code); XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code); XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code); XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code); XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code); XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code); XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code); XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code); XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code); XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code); XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code); XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code); XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code); XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code); XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code); XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code); XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code); XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code); XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code); XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code); XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsLao (int code); XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code); XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code); XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code); XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code); XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code); XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code); XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code); XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code); XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code); XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code); XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code); XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code); XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code); XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code); XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code); XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code); XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code); XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code); XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code); XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code); XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code); XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code); XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code); XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code); XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code); XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code); XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code); XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code); XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code); XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code); XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code); XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code); XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code); XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code); XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code); XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code); XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code); XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code); XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code); XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code); XMLPUBFUN int XMLCALL xmlUCSIsTags (int code); XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code); XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code); XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code); XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code); XMLPUBFUN int XMLCALL xmlUCSIsThai (int code); XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code); XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code); XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code); XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code); XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code); XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code); XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code); XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code); XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block); XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code); XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code); XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat); #ifdef __cplusplus } #endif #endif /* LIBXML_UNICODE_ENABLED */ #endif /* __XML_UNICODE_H__ */ PK!`[8[8libxml/globals.hnu[/* * Summary: interface for all global variables of the library * Description: all the global variables and thread handling for * those variables is handled by this module. * * The bottom of this file is automatically generated by build_glob.py * based on the description file global.data * * Copy: See Copyright for the status of this software. * * Author: Gary Pennington , Daniel Veillard */ #ifndef __XML_GLOBALS_H #define __XML_GLOBALS_H #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif XML_DEPRECATED XMLPUBFUN void XMLCALL xmlInitGlobals(void); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlCleanupGlobals(void); /** * xmlParserInputBufferCreateFilenameFunc: * @URI: the URI to read from * @enc: the requested source encoding * * Signature for the function doing the lookup for a suitable input method * corresponding to an URI. * * Returns the new xmlParserInputBufferPtr in case of success or NULL if no * method was found. */ typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc); /** * xmlOutputBufferCreateFilenameFunc: * @URI: the URI to write to * @enc: the requested target encoding * * Signature for the function doing the lookup for a suitable output method * corresponding to an URI. * * Returns the new xmlOutputBufferPtr in case of success or NULL if no * method was found. */ typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression); XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); /* * Externally global symbols which need to be protected for backwards * compatibility support. */ #undef htmlDefaultSAXHandler #undef oldXMLWDcompatibility #undef xmlBufferAllocScheme #undef xmlDefaultBufferSize #undef xmlDefaultSAXHandler #undef xmlDefaultSAXLocator #undef xmlDoValidityCheckingDefaultValue #undef xmlFree #undef xmlGenericError #undef xmlStructuredError #undef xmlGenericErrorContext #undef xmlStructuredErrorContext #undef xmlGetWarningsDefaultValue #undef xmlIndentTreeOutput #undef xmlTreeIndentString #undef xmlKeepBlanksDefaultValue #undef xmlLineNumbersDefaultValue #undef xmlLoadExtDtdDefaultValue #undef xmlMalloc #undef xmlMallocAtomic #undef xmlMemStrdup #undef xmlParserDebugEntities #undef xmlParserVersion #undef xmlPedanticParserDefaultValue #undef xmlRealloc #undef xmlSaveNoEmptyTags #undef xmlSubstituteEntitiesDefaultValue #undef xmlRegisterNodeDefaultValue #undef xmlDeregisterNodeDefaultValue #undef xmlLastError #undef xmlParserInputBufferCreateFilenameValue #undef xmlOutputBufferCreateFilenameValue /** * xmlRegisterNodeFunc: * @node: the current node * * Signature for the registration callback of a created node */ typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node); /** * xmlDeregisterNodeFunc: * @node: the current node * * Signature for the deregistration callback of a discarded node */ typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node); typedef struct _xmlGlobalState xmlGlobalState; typedef xmlGlobalState *xmlGlobalStatePtr; struct _xmlGlobalState { const char *xmlParserVersion; xmlSAXLocator xmlDefaultSAXLocator; xmlSAXHandlerV1 xmlDefaultSAXHandler; xmlSAXHandlerV1 docbDefaultSAXHandler; /* unused */ xmlSAXHandlerV1 htmlDefaultSAXHandler; xmlFreeFunc xmlFree; xmlMallocFunc xmlMalloc; xmlStrdupFunc xmlMemStrdup; xmlReallocFunc xmlRealloc; xmlGenericErrorFunc xmlGenericError; xmlStructuredErrorFunc xmlStructuredError; void *xmlGenericErrorContext; int oldXMLWDcompatibility; xmlBufferAllocationScheme xmlBufferAllocScheme; int xmlDefaultBufferSize; int xmlSubstituteEntitiesDefaultValue; int xmlDoValidityCheckingDefaultValue; int xmlGetWarningsDefaultValue; int xmlKeepBlanksDefaultValue; int xmlLineNumbersDefaultValue; int xmlLoadExtDtdDefaultValue; int xmlParserDebugEntities; int xmlPedanticParserDefaultValue; int xmlSaveNoEmptyTags; int xmlIndentTreeOutput; const char *xmlTreeIndentString; xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; xmlMallocFunc xmlMallocAtomic; xmlError xmlLastError; xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; void *xmlStructuredErrorContext; }; #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs); XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler); XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler); XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func); XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func); XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func); XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func); XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func); XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL xmlThrDefParserInputBufferCreateFilenameDefault( xmlParserInputBufferCreateFilenameFunc func); /** DOC_DISABLE */ /* * In general the memory allocation entry points are not kept * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED * - xmlMalloc * - xmlMallocAtomic * - xmlRealloc * - xmlMemStrdup * - xmlFree */ #ifdef LIBXML_THREAD_ALLOC_ENABLED #ifdef LIBXML_THREAD_ENABLED XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void); #define xmlMalloc \ (*(__xmlMalloc())) #else XMLPUBVAR xmlMallocFunc xmlMalloc; #endif #ifdef LIBXML_THREAD_ENABLED XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void); #define xmlMallocAtomic \ (*(__xmlMallocAtomic())) #else XMLPUBVAR xmlMallocFunc xmlMallocAtomic; #endif #ifdef LIBXML_THREAD_ENABLED XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void); #define xmlRealloc \ (*(__xmlRealloc())) #else XMLPUBVAR xmlReallocFunc xmlRealloc; #endif #ifdef LIBXML_THREAD_ENABLED XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void); #define xmlFree \ (*(__xmlFree())) #else XMLPUBVAR xmlFreeFunc xmlFree; #endif #ifdef LIBXML_THREAD_ENABLED XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void); #define xmlMemStrdup \ (*(__xmlMemStrdup())) #else XMLPUBVAR xmlStrdupFunc xmlMemStrdup; #endif #else /* !LIBXML_THREAD_ALLOC_ENABLED */ XMLPUBVAR xmlMallocFunc xmlMalloc; XMLPUBVAR xmlMallocFunc xmlMallocAtomic; XMLPUBVAR xmlReallocFunc xmlRealloc; XMLPUBVAR xmlFreeFunc xmlFree; XMLPUBVAR xmlStrdupFunc xmlMemStrdup; #endif /* LIBXML_THREAD_ALLOC_ENABLED */ #ifdef LIBXML_HTML_ENABLED XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void); #ifdef LIBXML_THREAD_ENABLED #define htmlDefaultSAXHandler \ (*(__htmlDefaultSAXHandler())) #else XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler; #endif #endif XMLPUBFUN xmlError * XMLCALL __xmlLastError(void); #ifdef LIBXML_THREAD_ENABLED #define xmlLastError \ (*(__xmlLastError())) #else XMLPUBVAR xmlError xmlLastError; #endif /* * Everything starting from the line below is * Automatically generated by build_glob.py. * Do not modify the previous line. */ XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void); #ifdef LIBXML_THREAD_ENABLED #define oldXMLWDcompatibility \ (*(__oldXMLWDcompatibility())) #else XMLPUBVAR int oldXMLWDcompatibility; #endif XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void); #ifdef LIBXML_THREAD_ENABLED #define xmlBufferAllocScheme \ (*(__xmlBufferAllocScheme())) #else XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme; #endif XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v); XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void); #ifdef LIBXML_THREAD_ENABLED #define xmlDefaultBufferSize \ (*(__xmlDefaultBufferSize())) #else XMLPUBVAR int xmlDefaultBufferSize; #endif XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v); XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void); #ifdef LIBXML_THREAD_ENABLED #define xmlDefaultSAXHandler \ (*(__xmlDefaultSAXHandler())) #else XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler; #endif XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void); #ifdef LIBXML_THREAD_ENABLED #define xmlDefaultSAXLocator \ (*(__xmlDefaultSAXLocator())) #else XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator; #endif XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlDoValidityCheckingDefaultValue \ (*(__xmlDoValidityCheckingDefaultValue())) #else XMLPUBVAR int xmlDoValidityCheckingDefaultValue; #endif XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v); XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void); #ifdef LIBXML_THREAD_ENABLED #define xmlGenericError \ (*(__xmlGenericError())) #else XMLPUBVAR xmlGenericErrorFunc xmlGenericError; #endif XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void); #ifdef LIBXML_THREAD_ENABLED #define xmlStructuredError \ (*(__xmlStructuredError())) #else XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError; #endif XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void); #ifdef LIBXML_THREAD_ENABLED #define xmlGenericErrorContext \ (*(__xmlGenericErrorContext())) #else XMLPUBVAR void * xmlGenericErrorContext; #endif XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void); #ifdef LIBXML_THREAD_ENABLED #define xmlStructuredErrorContext \ (*(__xmlStructuredErrorContext())) #else XMLPUBVAR void * xmlStructuredErrorContext; #endif XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlGetWarningsDefaultValue \ (*(__xmlGetWarningsDefaultValue())) #else XMLPUBVAR int xmlGetWarningsDefaultValue; #endif XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v); XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void); #ifdef LIBXML_THREAD_ENABLED #define xmlIndentTreeOutput \ (*(__xmlIndentTreeOutput())) #else XMLPUBVAR int xmlIndentTreeOutput; #endif XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v); XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void); #ifdef LIBXML_THREAD_ENABLED #define xmlTreeIndentString \ (*(__xmlTreeIndentString())) #else XMLPUBVAR const char * xmlTreeIndentString; #endif XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v); XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlKeepBlanksDefaultValue \ (*(__xmlKeepBlanksDefaultValue())) #else XMLPUBVAR int xmlKeepBlanksDefaultValue; #endif XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v); XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlLineNumbersDefaultValue \ (*(__xmlLineNumbersDefaultValue())) #else XMLPUBVAR int xmlLineNumbersDefaultValue; #endif XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v); XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlLoadExtDtdDefaultValue \ (*(__xmlLoadExtDtdDefaultValue())) #else XMLPUBVAR int xmlLoadExtDtdDefaultValue; #endif XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v); XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void); #ifdef LIBXML_THREAD_ENABLED #define xmlParserDebugEntities \ (*(__xmlParserDebugEntities())) #else XMLPUBVAR int xmlParserDebugEntities; #endif XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v); XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void); #ifdef LIBXML_THREAD_ENABLED #define xmlParserVersion \ (*(__xmlParserVersion())) #else XMLPUBVAR const char * xmlParserVersion; #endif XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlPedanticParserDefaultValue \ (*(__xmlPedanticParserDefaultValue())) #else XMLPUBVAR int xmlPedanticParserDefaultValue; #endif XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v); XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void); #ifdef LIBXML_THREAD_ENABLED #define xmlSaveNoEmptyTags \ (*(__xmlSaveNoEmptyTags())) #else XMLPUBVAR int xmlSaveNoEmptyTags; #endif XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v); XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlSubstituteEntitiesDefaultValue \ (*(__xmlSubstituteEntitiesDefaultValue())) #else XMLPUBVAR int xmlSubstituteEntitiesDefaultValue; #endif XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v); XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlRegisterNodeDefaultValue \ (*(__xmlRegisterNodeDefaultValue())) #else XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; #endif XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlDeregisterNodeDefaultValue \ (*(__xmlDeregisterNodeDefaultValue())) #else XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; #endif XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \ __xmlParserInputBufferCreateFilenameValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlParserInputBufferCreateFilenameValue \ (*(__xmlParserInputBufferCreateFilenameValue())) #else XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; #endif XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlOutputBufferCreateFilenameValue \ (*(__xmlOutputBufferCreateFilenameValue())) #else XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; #endif #ifdef __cplusplus } #endif #endif /* __XML_GLOBALS_H */ PK!P!渚libxml/entities.hnu[/* * Summary: interface for the XML entities handling * Description: this module provides some of the entity API needed * for the parser and applications. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_ENTITIES_H__ #define __XML_ENTITIES_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* * The different valid entity types. */ typedef enum { XML_INTERNAL_GENERAL_ENTITY = 1, XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, XML_INTERNAL_PARAMETER_ENTITY = 4, XML_EXTERNAL_PARAMETER_ENTITY = 5, XML_INTERNAL_PREDEFINED_ENTITY = 6 } xmlEntityType; /* * An unit of storage for an entity, contains the string, the value * and the linkind data needed for the linking in the hash table. */ struct _xmlEntity { void *_private; /* application data */ xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ const xmlChar *name; /* Entity name */ struct _xmlNode *children; /* First child link */ struct _xmlNode *last; /* Last child link */ struct _xmlDtd *parent; /* -> DTD */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* the containing document */ xmlChar *orig; /* content without ref substitution */ xmlChar *content; /* content or ndata if unparsed */ int length; /* the content length */ xmlEntityType etype; /* The entity type */ const xmlChar *ExternalID; /* External identifier for PUBLIC */ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ struct _xmlEntity *nexte; /* unused */ const xmlChar *URI; /* the full URI as computed */ int owner; /* does the entity own the childrens */ int checked; /* was the entity content checked */ /* this is also used to count entities * references done from that entity * and if it contains '<' */ }; /* * All entities are stored in an hash table. * There is 2 separate hash tables for global and parameter entities. */ typedef struct _xmlHashTable xmlEntitiesTable; typedef xmlEntitiesTable *xmlEntitiesTablePtr; /* * External functions: */ #ifdef LIBXML_LEGACY_ENABLED XML_DEPRECATED XMLPUBFUN void XMLCALL xmlInitializePredefinedEntities (void); #endif /* LIBXML_LEGACY_ENABLED */ XMLPUBFUN xmlEntityPtr XMLCALL xmlNewEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content); XMLPUBFUN xmlEntityPtr XMLCALL xmlAddDocEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content); XMLPUBFUN xmlEntityPtr XMLCALL xmlAddDtdEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content); XMLPUBFUN xmlEntityPtr XMLCALL xmlGetPredefinedEntity (const xmlChar *name); XMLPUBFUN xmlEntityPtr XMLCALL xmlGetDocEntity (const xmlDoc *doc, const xmlChar *name); XMLPUBFUN xmlEntityPtr XMLCALL xmlGetDtdEntity (xmlDocPtr doc, const xmlChar *name); XMLPUBFUN xmlEntityPtr XMLCALL xmlGetParameterEntity (xmlDocPtr doc, const xmlChar *name); #ifdef LIBXML_LEGACY_ENABLED XML_DEPRECATED XMLPUBFUN const xmlChar * XMLCALL xmlEncodeEntities (xmlDocPtr doc, const xmlChar *input); #endif /* LIBXML_LEGACY_ENABLED */ XMLPUBFUN xmlChar * XMLCALL xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input); XMLPUBFUN xmlChar * XMLCALL xmlEncodeSpecialChars (const xmlDoc *doc, const xmlChar *input); XMLPUBFUN xmlEntitiesTablePtr XMLCALL xmlCreateEntitiesTable (void); #ifdef LIBXML_TREE_ENABLED XMLPUBFUN xmlEntitiesTablePtr XMLCALL xmlCopyEntitiesTable (xmlEntitiesTablePtr table); #endif /* LIBXML_TREE_ENABLED */ XMLPUBFUN void XMLCALL xmlFreeEntitiesTable (xmlEntitiesTablePtr table); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void XMLCALL xmlDumpEntitiesTable (xmlBufferPtr buf, xmlEntitiesTablePtr table); XMLPUBFUN void XMLCALL xmlDumpEntityDecl (xmlBufferPtr buf, xmlEntityPtr ent); #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef LIBXML_LEGACY_ENABLED XMLPUBFUN void XMLCALL xmlCleanupPredefinedEntities(void); #endif /* LIBXML_LEGACY_ENABLED */ #ifdef __cplusplus } #endif # endif /* __XML_ENTITIES_H__ */ PK!DCClibxml/parser.hnu[/* * Summary: the core parser module * Description: Interfaces, constants and types related to the XML parser * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_PARSER_H__ #define __XML_PARSER_H__ #include #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /** * XML_DEFAULT_VERSION: * * The default version of XML used: 1.0 */ #define XML_DEFAULT_VERSION "1.0" /** * xmlParserInput: * * An xmlParserInput is an input flow for the XML processor. * Each entity parsed is associated an xmlParserInput (except the * few predefined ones). This is the case both for internal entities * - in which case the flow is already completely in memory - or * external entities - in which case we use the buf structure for * progressive reading and I18N conversions to the internal UTF-8 format. */ /** * xmlParserInputDeallocate: * @str: the string to deallocate * * Callback for freeing some parser input allocations. */ typedef void (* xmlParserInputDeallocate)(xmlChar *str); struct _xmlParserInput { /* Input buffer */ xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */ const char *filename; /* The file analyzed, if any */ const char *directory; /* the directory/base of the file */ const xmlChar *base; /* Base of the array to parse */ const xmlChar *cur; /* Current char being parsed */ const xmlChar *end; /* end of the array to parse */ int length; /* length if known */ int line; /* Current line */ int col; /* Current column */ /* * NOTE: consumed is only tested for equality in the parser code, * so even if there is an overflow this should not give troubles * for parsing very large instances. */ unsigned long consumed; /* How many xmlChars already consumed */ xmlParserInputDeallocate free; /* function to deallocate the base */ const xmlChar *encoding; /* the encoding string for entity */ const xmlChar *version; /* the version string for entity */ int standalone; /* Was that entity marked standalone */ int id; /* an unique identifier for the entity */ }; /** * xmlParserNodeInfo: * * The parser can be asked to collect Node information, i.e. at what * place in the file they were detected. * NOTE: This is off by default and not very well tested. */ typedef struct _xmlParserNodeInfo xmlParserNodeInfo; typedef xmlParserNodeInfo *xmlParserNodeInfoPtr; struct _xmlParserNodeInfo { const struct _xmlNode* node; /* Position & line # that text that created the node begins & ends on */ unsigned long begin_pos; unsigned long begin_line; unsigned long end_pos; unsigned long end_line; }; typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq; typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr; struct _xmlParserNodeInfoSeq { unsigned long maximum; unsigned long length; xmlParserNodeInfo* buffer; }; /** * xmlParserInputState: * * The parser is now working also as a state based parser. * The recursive one use the state info for entities processing. */ typedef enum { XML_PARSER_EOF = -1, /* nothing is to be parsed */ XML_PARSER_START = 0, /* nothing has been parsed */ XML_PARSER_MISC, /* Misc* before int subset */ XML_PARSER_PI, /* Within a processing instruction */ XML_PARSER_DTD, /* within some DTD content */ XML_PARSER_PROLOG, /* Misc* after internal subset */ XML_PARSER_COMMENT, /* within a comment */ XML_PARSER_START_TAG, /* within a start tag */ XML_PARSER_CONTENT, /* within the content */ XML_PARSER_CDATA_SECTION, /* within a CDATA section */ XML_PARSER_END_TAG, /* within a closing tag */ XML_PARSER_ENTITY_DECL, /* within an entity declaration */ XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */ XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */ XML_PARSER_EPILOG, /* the Misc* after the last end tag */ XML_PARSER_IGNORE, /* within an IGNORED section */ XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */ } xmlParserInputState; /** * XML_DETECT_IDS: * * Bit in the loadsubset context field to tell to do ID/REFs lookups. * Use it to initialize xmlLoadExtDtdDefaultValue. */ #define XML_DETECT_IDS 2 /** * XML_COMPLETE_ATTRS: * * Bit in the loadsubset context field to tell to do complete the * elements attributes lists with the ones defaulted from the DTDs. * Use it to initialize xmlLoadExtDtdDefaultValue. */ #define XML_COMPLETE_ATTRS 4 /** * XML_SKIP_IDS: * * Bit in the loadsubset context field to tell to not do ID/REFs registration. * Used to initialize xmlLoadExtDtdDefaultValue in some special cases. */ #define XML_SKIP_IDS 8 /** * xmlParserMode: * * A parser can operate in various modes */ typedef enum { XML_PARSE_UNKNOWN = 0, XML_PARSE_DOM = 1, XML_PARSE_SAX = 2, XML_PARSE_PUSH_DOM = 3, XML_PARSE_PUSH_SAX = 4, XML_PARSE_READER = 5 } xmlParserMode; typedef struct _xmlStartTag xmlStartTag; /** * xmlParserCtxt: * * The parser context. * NOTE This doesn't completely define the parser state, the (current ?) * design of the parser uses recursive function calls since this allow * and easy mapping from the production rules of the specification * to the actual code. The drawback is that the actual function call * also reflect the parser state. However most of the parsing routines * takes as the only argument the parser context pointer, so migrating * to a state based parser for progressive parsing shouldn't be too hard. */ struct _xmlParserCtxt { struct _xmlSAXHandler *sax; /* The SAX handler */ void *userData; /* For SAX interface only, used by DOM build */ xmlDocPtr myDoc; /* the document being built */ int wellFormed; /* is the document well formed */ int replaceEntities; /* shall we replace entities ? */ const xmlChar *version; /* the XML version string */ const xmlChar *encoding; /* the declared encoding, if any */ int standalone; /* standalone document */ int html; /* an HTML(1) document * 3 is HTML after * 10 is HTML after */ /* Input stream stack */ xmlParserInputPtr input; /* Current input stream */ int inputNr; /* Number of current input streams */ int inputMax; /* Max number of input streams */ xmlParserInputPtr *inputTab; /* stack of inputs */ /* Node analysis stack only used for DOM building */ xmlNodePtr node; /* Current parsed Node */ int nodeNr; /* Depth of the parsing stack */ int nodeMax; /* Max depth of the parsing stack */ xmlNodePtr *nodeTab; /* array of nodes */ int record_info; /* Whether node info should be kept */ xmlParserNodeInfoSeq node_seq; /* info about each node parsed */ int errNo; /* error code */ int hasExternalSubset; /* reference and external subset */ int hasPErefs; /* the internal subset has PE refs */ int external; /* are we parsing an external entity */ int valid; /* is the document valid */ int validate; /* shall we try to validate ? */ xmlValidCtxt vctxt; /* The validity context */ xmlParserInputState instate; /* current type of input */ int token; /* next char look-ahead */ char *directory; /* the data directory */ /* Node name stack */ const xmlChar *name; /* Current parsed Node */ int nameNr; /* Depth of the parsing stack */ int nameMax; /* Max depth of the parsing stack */ const xmlChar * *nameTab; /* array of nodes */ long nbChars; /* unused */ long checkIndex; /* used by progressive parsing lookup */ int keepBlanks; /* ugly but ... */ int disableSAX; /* SAX callbacks are disabled */ int inSubset; /* Parsing is in int 1/ext 2 subset */ const xmlChar * intSubName; /* name of subset */ xmlChar * extSubURI; /* URI of external subset */ xmlChar * extSubSystem; /* SYSTEM ID of external subset */ /* xml:space values */ int * space; /* Should the parser preserve spaces */ int spaceNr; /* Depth of the parsing stack */ int spaceMax; /* Max depth of the parsing stack */ int * spaceTab; /* array of space infos */ int depth; /* to prevent entity substitution loops */ xmlParserInputPtr entity; /* used to check entities boundaries */ int charset; /* encoding of the in-memory content actually an xmlCharEncoding */ int nodelen; /* Those two fields are there to */ int nodemem; /* Speed up large node parsing */ int pedantic; /* signal pedantic warnings */ void *_private; /* For user data, libxml won't touch it */ int loadsubset; /* should the external subset be loaded */ int linenumbers; /* set line number in element content */ void *catalogs; /* document's own catalog */ int recovery; /* run in recovery mode */ int progressive; /* is this a progressive parsing */ xmlDictPtr dict; /* dictionary for the parser */ const xmlChar * *atts; /* array for the attributes callbacks */ int maxatts; /* the size of the array */ int docdict; /* use strings from dict to build tree */ /* * pre-interned strings */ const xmlChar *str_xml; const xmlChar *str_xmlns; const xmlChar *str_xml_ns; /* * Everything below is used only by the new SAX mode */ int sax2; /* operating in the new SAX mode */ int nsNr; /* the number of inherited namespaces */ int nsMax; /* the size of the arrays */ const xmlChar * *nsTab; /* the array of prefix/namespace name */ int *attallocs; /* which attribute were allocated */ xmlStartTag *pushTab; /* array of data for push */ xmlHashTablePtr attsDefault; /* defaulted attributes if any */ xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */ int nsWellFormed; /* is the document XML Namespace okay */ int options; /* Extra options */ /* * Those fields are needed only for streaming parsing so far */ int dictNames; /* Use dictionary names for the tree */ int freeElemsNr; /* number of freed element nodes */ xmlNodePtr freeElems; /* List of freed element nodes */ int freeAttrsNr; /* number of freed attributes nodes */ xmlAttrPtr freeAttrs; /* List of freed attributes nodes */ /* * the complete error information for the last error. */ xmlError lastError; xmlParserMode parseMode; /* the parser mode */ unsigned long nbentities; /* number of entities references */ unsigned long sizeentities; /* size of parsed entities */ /* for use by HTML non-recursive parser */ xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */ int nodeInfoNr; /* Depth of the parsing stack */ int nodeInfoMax; /* Max depth of the parsing stack */ xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */ int input_id; /* we need to label inputs */ unsigned long sizeentcopy; /* volume of entity copy */ }; /** * xmlSAXLocator: * * A SAX Locator. */ struct _xmlSAXLocator { const xmlChar *(*getPublicId)(void *ctx); const xmlChar *(*getSystemId)(void *ctx); int (*getLineNumber)(void *ctx); int (*getColumnNumber)(void *ctx); }; /** * xmlSAXHandler: * * A SAX handler is bunch of callbacks called by the parser when processing * of the input generate data or structure information. */ /** * resolveEntitySAXFunc: * @ctx: the user data (XML parser context) * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * Callback: * 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 * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, const xmlChar *publicId, const xmlChar *systemId); /** * internalSubsetSAXFunc: * @ctx: the user data (XML parser context) * @name: the root element name * @ExternalID: the external ID * @SystemID: the SYSTEM ID (e.g. filename or URL) * * Callback on internal subset declaration. */ typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); /** * externalSubsetSAXFunc: * @ctx: the user data (XML parser context) * @name: the root element name * @ExternalID: the external ID * @SystemID: the SYSTEM ID (e.g. filename or URL) * * Callback on external subset declaration. */ typedef void (*externalSubsetSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); /** * getEntitySAXFunc: * @ctx: the user data (XML parser context) * @name: The entity name * * Get an entity by name. * * Returns the xmlEntityPtr if found. */ typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, const xmlChar *name); /** * getParameterEntitySAXFunc: * @ctx: the user data (XML parser context) * @name: The entity name * * Get a parameter entity by name. * * Returns the xmlEntityPtr if found. */ typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, const xmlChar *name); /** * entityDeclSAXFunc: * @ctx: the user data (XML parser context) * @name: the entity name * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). * * An entity definition has been parsed. */ typedef void (*entityDeclSAXFunc) (void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content); /** * notationDeclSAXFunc: * @ctx: the user data (XML parser context) * @name: The name of the notation * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * What to do when a notation declaration has been parsed. */ typedef void (*notationDeclSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); /** * attributeDeclSAXFunc: * @ctx: the user data (XML parser context) * @elem: the name of the element * @fullname: the attribute name * @type: the attribute type * @def: the type of default value * @defaultValue: the attribute default value * @tree: the tree of enumerated value set * * An attribute definition has been parsed. */ typedef void (*attributeDeclSAXFunc)(void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree); /** * elementDeclSAXFunc: * @ctx: the user data (XML parser context) * @name: the element name * @type: the element type * @content: the element value tree * * An element definition has been parsed. */ typedef void (*elementDeclSAXFunc)(void *ctx, const xmlChar *name, int type, xmlElementContentPtr content); /** * unparsedEntityDeclSAXFunc: * @ctx: the user data (XML parser context) * @name: The name of the entity * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @notationName: the name of the notation * * What to do when an unparsed entity declaration is parsed. */ typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName); /** * setDocumentLocatorSAXFunc: * @ctx: the user data (XML parser context) * @loc: A SAX Locator * * Receive the document locator at startup, actually xmlDefaultSAXLocator. * Everything is available on the context, so this is useless in our case. */ typedef void (*setDocumentLocatorSAXFunc) (void *ctx, xmlSAXLocatorPtr loc); /** * startDocumentSAXFunc: * @ctx: the user data (XML parser context) * * Called when the document start being processed. */ typedef void (*startDocumentSAXFunc) (void *ctx); /** * endDocumentSAXFunc: * @ctx: the user data (XML parser context) * * Called when the document end has been detected. */ typedef void (*endDocumentSAXFunc) (void *ctx); /** * startElementSAXFunc: * @ctx: the user data (XML parser context) * @name: The element name, including namespace prefix * @atts: An array of name/value attributes pairs, NULL terminated * * Called when an opening tag has been processed. */ typedef void (*startElementSAXFunc) (void *ctx, const xmlChar *name, const xmlChar **atts); /** * endElementSAXFunc: * @ctx: the user data (XML parser context) * @name: The element name * * Called when the end of an element has been detected. */ typedef void (*endElementSAXFunc) (void *ctx, const xmlChar *name); /** * attributeSAXFunc: * @ctx: the user data (XML parser context) * @name: The attribute name, including namespace prefix * @value: The attribute value * * Handle an attribute that has been read by the parser. * The default handling is to convert the attribute into an * DOM subtree and past it in a new xmlAttr element added to * the element. */ typedef void (*attributeSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *value); /** * referenceSAXFunc: * @ctx: the user data (XML parser context) * @name: The entity name * * Called when an entity reference is detected. */ typedef void (*referenceSAXFunc) (void *ctx, const xmlChar *name); /** * charactersSAXFunc: * @ctx: the user data (XML parser context) * @ch: a xmlChar string * @len: the number of xmlChar * * Receiving some chars from the parser. */ typedef void (*charactersSAXFunc) (void *ctx, const xmlChar *ch, int len); /** * ignorableWhitespaceSAXFunc: * @ctx: the user data (XML parser context) * @ch: a xmlChar string * @len: the number of xmlChar * * Receiving some ignorable whitespaces from the parser. * UNUSED: by default the DOM building will use characters. */ typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, const xmlChar *ch, int len); /** * processingInstructionSAXFunc: * @ctx: the user data (XML parser context) * @target: the target name * @data: the PI data's * * A processing instruction has been parsed. */ typedef void (*processingInstructionSAXFunc) (void *ctx, const xmlChar *target, const xmlChar *data); /** * commentSAXFunc: * @ctx: the user data (XML parser context) * @value: the comment content * * A comment has been parsed. */ typedef void (*commentSAXFunc) (void *ctx, const xmlChar *value); /** * cdataBlockSAXFunc: * @ctx: the user data (XML parser context) * @value: The pcdata content * @len: the block length * * Called when a pcdata block has been parsed. */ typedef void (*cdataBlockSAXFunc) ( void *ctx, const xmlChar *value, int len); /** * warningSAXFunc: * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display * * Display and format a warning messages, callback. */ typedef void (XMLCDECL *warningSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * errorSAXFunc: * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display * * Display and format an error messages, callback. */ typedef void (XMLCDECL *errorSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * fatalErrorSAXFunc: * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display * * Display and format fatal error messages, callback. * Note: so far fatalError() SAX callbacks are not used, error() * get all the callbacks for errors. */ typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * isStandaloneSAXFunc: * @ctx: the user data (XML parser context) * * Is this document tagged standalone? * * Returns 1 if true */ typedef int (*isStandaloneSAXFunc) (void *ctx); /** * hasInternalSubsetSAXFunc: * @ctx: the user data (XML parser context) * * Does this document has an internal subset. * * Returns 1 if true */ typedef int (*hasInternalSubsetSAXFunc) (void *ctx); /** * hasExternalSubsetSAXFunc: * @ctx: the user data (XML parser context) * * Does this document has an external subset? * * Returns 1 if true */ typedef int (*hasExternalSubsetSAXFunc) (void *ctx); /************************************************************************ * * * The SAX version 2 API extensions * * * ************************************************************************/ /** * XML_SAX2_MAGIC: * * Special constant found in SAX2 blocks initialized fields */ #define XML_SAX2_MAGIC 0xDEEDBEAF /** * startElementNsSAX2Func: * @ctx: the user data (XML parser context) * @localname: the local name of the element * @prefix: the element namespace prefix if available * @URI: the element namespace name if available * @nb_namespaces: number of namespace definitions on that node * @namespaces: pointer to the array of prefix/URI pairs namespace definitions * @nb_attributes: the number of attributes on that node * @nb_defaulted: the number of defaulted attributes. The defaulted * ones are at the end of the array * @attributes: pointer to the array of (localname/prefix/URI/value/end) * attribute values. * * 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. */ typedef void (*startElementNsSAX2Func) (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes); /** * endElementNsSAX2Func: * @ctx: the user data (XML parser context) * @localname: the local name of the element * @prefix: the element namespace prefix if available * @URI: the element namespace name if available * * SAX2 callback when an element end has been detected by the parser. * It provides the namespace information for the element. */ typedef void (*endElementNsSAX2Func) (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI); struct _xmlSAXHandler { internalSubsetSAXFunc internalSubset; isStandaloneSAXFunc isStandalone; hasInternalSubsetSAXFunc hasInternalSubset; hasExternalSubsetSAXFunc hasExternalSubset; resolveEntitySAXFunc resolveEntity; getEntitySAXFunc getEntity; entityDeclSAXFunc entityDecl; notationDeclSAXFunc notationDecl; attributeDeclSAXFunc attributeDecl; elementDeclSAXFunc elementDecl; unparsedEntityDeclSAXFunc unparsedEntityDecl; setDocumentLocatorSAXFunc setDocumentLocator; startDocumentSAXFunc startDocument; endDocumentSAXFunc endDocument; startElementSAXFunc startElement; endElementSAXFunc endElement; referenceSAXFunc reference; charactersSAXFunc characters; ignorableWhitespaceSAXFunc ignorableWhitespace; processingInstructionSAXFunc processingInstruction; commentSAXFunc comment; warningSAXFunc warning; errorSAXFunc error; fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ getParameterEntitySAXFunc getParameterEntity; cdataBlockSAXFunc cdataBlock; externalSubsetSAXFunc externalSubset; unsigned int initialized; /* The following fields are extensions available only on version 2 */ void *_private; startElementNsSAX2Func startElementNs; endElementNsSAX2Func endElementNs; xmlStructuredErrorFunc serror; }; /* * SAX Version 1 */ typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1; typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr; struct _xmlSAXHandlerV1 { internalSubsetSAXFunc internalSubset; isStandaloneSAXFunc isStandalone; hasInternalSubsetSAXFunc hasInternalSubset; hasExternalSubsetSAXFunc hasExternalSubset; resolveEntitySAXFunc resolveEntity; getEntitySAXFunc getEntity; entityDeclSAXFunc entityDecl; notationDeclSAXFunc notationDecl; attributeDeclSAXFunc attributeDecl; elementDeclSAXFunc elementDecl; unparsedEntityDeclSAXFunc unparsedEntityDecl; setDocumentLocatorSAXFunc setDocumentLocator; startDocumentSAXFunc startDocument; endDocumentSAXFunc endDocument; startElementSAXFunc startElement; endElementSAXFunc endElement; referenceSAXFunc reference; charactersSAXFunc characters; ignorableWhitespaceSAXFunc ignorableWhitespace; processingInstructionSAXFunc processingInstruction; commentSAXFunc comment; warningSAXFunc warning; errorSAXFunc error; fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ getParameterEntitySAXFunc getParameterEntity; cdataBlockSAXFunc cdataBlock; externalSubsetSAXFunc externalSubset; unsigned int initialized; }; /** * xmlExternalEntityLoader: * @URL: The System ID of the resource requested * @ID: The Public ID of the resource requested * @context: the XML parser context * * External entity loaders types. * * Returns the entity input parser. */ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL, const char *ID, xmlParserCtxtPtr context); #ifdef __cplusplus } #endif #include #include #include #ifdef __cplusplus extern "C" { #endif /* * Init/Cleanup */ XMLPUBFUN void XMLCALL xmlInitParser (void); XMLPUBFUN void XMLCALL xmlCleanupParser (void); /* * Input functions */ XMLPUBFUN int XMLCALL xmlParserInputRead (xmlParserInputPtr in, int len); XMLPUBFUN int XMLCALL xmlParserInputGrow (xmlParserInputPtr in, int len); /* * Basic parsing Interfaces */ #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN xmlDocPtr XMLCALL xmlParseDoc (const xmlChar *cur); XMLPUBFUN xmlDocPtr XMLCALL xmlParseFile (const char *filename); XMLPUBFUN xmlDocPtr XMLCALL xmlParseMemory (const char *buffer, int size); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN int XMLCALL xmlSubstituteEntitiesDefault(int val); XMLPUBFUN int XMLCALL xmlKeepBlanksDefault (int val); XMLPUBFUN void XMLCALL xmlStopParser (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlPedanticParserDefault(int val); XMLPUBFUN int XMLCALL xmlLineNumbersDefault (int val); #ifdef LIBXML_SAX1_ENABLED /* * Recovery mode */ XMLPUBFUN xmlDocPtr XMLCALL xmlRecoverDoc (const xmlChar *cur); XMLPUBFUN xmlDocPtr XMLCALL xmlRecoverMemory (const char *buffer, int size); XMLPUBFUN xmlDocPtr XMLCALL xmlRecoverFile (const char *filename); #endif /* LIBXML_SAX1_ENABLED */ /* * Less common routines and SAX interfaces */ XMLPUBFUN int XMLCALL xmlParseDocument (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN int XMLCALL xmlSAXUserParseFile (xmlSAXHandlerPtr sax, void *user_data, const char *filename); XMLPUBFUN int XMLCALL xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, void *user_data, const char *buffer, int size); XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseDoc (xmlSAXHandlerPtr sax, const xmlChar *cur, int recovery); XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseMemory (xmlSAXHandlerPtr sax, const char *buffer, int size, int recovery); XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax, const char *buffer, int size, int recovery, void *data); XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseFile (xmlSAXHandlerPtr sax, const char *filename, int recovery); XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseFileWithData (xmlSAXHandlerPtr sax, const char *filename, int recovery, void *data); XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseEntity (xmlSAXHandlerPtr sax, const char *filename); XMLPUBFUN xmlDocPtr XMLCALL xmlParseEntity (const char *filename); #endif /* LIBXML_SAX1_ENABLED */ #ifdef LIBXML_VALID_ENABLED XMLPUBFUN xmlDtdPtr XMLCALL xmlSAXParseDTD (xmlSAXHandlerPtr sax, const xmlChar *ExternalID, const xmlChar *SystemID); XMLPUBFUN xmlDtdPtr XMLCALL xmlParseDTD (const xmlChar *ExternalID, const xmlChar *SystemID); XMLPUBFUN xmlDtdPtr XMLCALL xmlIOParseDTD (xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input, xmlCharEncoding enc); #endif /* LIBXML_VALID_ENABLE */ #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN int XMLCALL xmlParseBalancedChunkMemory(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, int depth, const xmlChar *string, xmlNodePtr *lst); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN xmlParserErrors XMLCALL xmlParseInNodeContext (xmlNodePtr node, const char *data, int datalen, int options, xmlNodePtr *lst); #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN int XMLCALL xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, int depth, const xmlChar *string, xmlNodePtr *lst, int recover); XMLPUBFUN int XMLCALL xmlParseExternalEntity (xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, int depth, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN int XMLCALL xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst); /* * Parser contexts handling. */ XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlNewParserCtxt (void); XMLPUBFUN int XMLCALL xmlInitParserCtxt (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlClearParserCtxt (xmlParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN void XMLCALL xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, const xmlChar* buffer, const char *filename); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateDocParserCtxt (const xmlChar *cur); #ifdef LIBXML_LEGACY_ENABLED /* * Reading/setting optional parsing features. */ XML_DEPRECATED XMLPUBFUN int XMLCALL xmlGetFeaturesList (int *len, const char **result); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlGetFeature (xmlParserCtxtPtr ctxt, const char *name, void *result); XML_DEPRECATED XMLPUBFUN int XMLCALL xmlSetFeature (xmlParserCtxtPtr ctxt, const char *name, void *value); #endif /* LIBXML_LEGACY_ENABLED */ #ifdef LIBXML_PUSH_ENABLED /* * Interfaces for the Push mode. */ XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, const char *chunk, int size, const char *filename); XMLPUBFUN int XMLCALL xmlParseChunk (xmlParserCtxtPtr ctxt, const char *chunk, int size, int terminate); #endif /* LIBXML_PUSH_ENABLED */ /* * Special I/O mode. */ XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, void *user_data, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc); XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewIOInputStream (xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc); /* * Node infos. */ XMLPUBFUN const xmlParserNodeInfo* XMLCALL xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt, const xmlNodePtr node); XMLPUBFUN void XMLCALL xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); XMLPUBFUN void XMLCALL xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); XMLPUBFUN unsigned long XMLCALL xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, const xmlNodePtr node); XMLPUBFUN void XMLCALL xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt, const xmlParserNodeInfoPtr info); /* * External entities handling actually implemented in xmlIO. */ XMLPUBFUN void XMLCALL xmlSetExternalEntityLoader(xmlExternalEntityLoader f); XMLPUBFUN xmlExternalEntityLoader XMLCALL xmlGetExternalEntityLoader(void); XMLPUBFUN xmlParserInputPtr XMLCALL xmlLoadExternalEntity (const char *URL, const char *ID, xmlParserCtxtPtr ctxt); /* * Index lookup, actually implemented in the encoding module */ XMLPUBFUN long XMLCALL xmlByteConsumed (xmlParserCtxtPtr ctxt); /* * New set of simpler/more flexible APIs */ /** * xmlParserOption: * * This is the set of XML parser options that can be passed down * to the xmlReadDoc() and similar calls. */ typedef enum { XML_PARSE_RECOVER = 1<<0, /* recover on errors */ XML_PARSE_NOENT = 1<<1, /* substitute entities */ XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */ XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */ XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */ XML_PARSE_NOERROR = 1<<5, /* suppress error reports */ XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */ XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */ XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */ XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution */ XML_PARSE_NONET = 1<<11,/* Forbid network access */ XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */ XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */ XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */ XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */ XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree) */ XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */ XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */ XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */ XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */ XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */ XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */ } xmlParserOption; XMLPUBFUN void XMLCALL xmlCtxtReset (xmlParserCtxtPtr ctxt); XMLPUBFUN int XMLCALL xmlCtxtResetPush (xmlParserCtxtPtr ctxt, const char *chunk, int size, const char *filename, const char *encoding); XMLPUBFUN int XMLCALL xmlCtxtUseOptions (xmlParserCtxtPtr ctxt, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlReadDoc (const xmlChar *cur, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlReadFile (const char *URL, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlReadMemory (const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlReadFd (int fd, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlReadIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadDoc (xmlParserCtxtPtr ctxt, const xmlChar *cur, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadFile (xmlParserCtxtPtr ctxt, const char *filename, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadMemory (xmlParserCtxtPtr ctxt, const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadFd (xmlParserCtxtPtr ctxt, int fd, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadIO (xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); /* * Library wide options */ /** * xmlFeature: * * Used to examine the existence of features that can be enabled * or disabled at compile-time. * They used to be called XML_FEATURE_xxx but this clashed with Expat */ typedef enum { XML_WITH_THREAD = 1, XML_WITH_TREE = 2, XML_WITH_OUTPUT = 3, XML_WITH_PUSH = 4, XML_WITH_READER = 5, XML_WITH_PATTERN = 6, XML_WITH_WRITER = 7, XML_WITH_SAX1 = 8, XML_WITH_FTP = 9, XML_WITH_HTTP = 10, XML_WITH_VALID = 11, XML_WITH_HTML = 12, XML_WITH_LEGACY = 13, XML_WITH_C14N = 14, XML_WITH_CATALOG = 15, XML_WITH_XPATH = 16, XML_WITH_XPTR = 17, XML_WITH_XINCLUDE = 18, XML_WITH_ICONV = 19, XML_WITH_ISO8859X = 20, XML_WITH_UNICODE = 21, XML_WITH_REGEXP = 22, XML_WITH_AUTOMATA = 23, XML_WITH_EXPR = 24, XML_WITH_SCHEMAS = 25, XML_WITH_SCHEMATRON = 26, XML_WITH_MODULES = 27, XML_WITH_DEBUG = 28, XML_WITH_DEBUG_MEM = 29, XML_WITH_DEBUG_RUN = 30, XML_WITH_ZLIB = 31, XML_WITH_ICU = 32, XML_WITH_LZMA = 33, XML_WITH_NONE = 99999 /* just to be sure of allocation size */ } xmlFeature; XMLPUBFUN int XMLCALL xmlHasFeature (xmlFeature feature); #ifdef __cplusplus } #endif #endif /* __XML_PARSER_H__ */ PK!䤔WWlibxml/xmlmemory.hnu[/* * Summary: interface for the memory allocator * Description: provides interfaces for the memory allocator, * including debugging capabilities. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __DEBUG_MEMORY_ALLOC__ #define __DEBUG_MEMORY_ALLOC__ #include #include /** * DEBUG_MEMORY: * * DEBUG_MEMORY replaces the allocator with a collect and debug * shell to the libc allocator. * DEBUG_MEMORY should only be activated when debugging * libxml i.e. if libxml has been configured with --with-debug-mem too. */ /* #define DEBUG_MEMORY_FREED */ /* #define DEBUG_MEMORY_LOCATION */ #ifdef DEBUG #ifndef DEBUG_MEMORY #define DEBUG_MEMORY #endif #endif /** * DEBUG_MEMORY_LOCATION: * * DEBUG_MEMORY_LOCATION should be activated only when debugging * libxml i.e. if libxml has been configured with --with-debug-mem too. */ #ifdef DEBUG_MEMORY_LOCATION #endif #ifdef __cplusplus extern "C" { #endif /* * The XML memory wrapper support 4 basic overloadable functions. */ /** * xmlFreeFunc: * @mem: an already allocated block of memory * * Signature for a free() implementation. */ typedef void (XMLCALL *xmlFreeFunc)(void *mem); /** * xmlMallocFunc: * @size: the size requested in bytes * * Signature for a malloc() implementation. * * Returns a pointer to the newly allocated block or NULL in case of error. */ typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size); /** * xmlReallocFunc: * @mem: an already allocated block of memory * @size: the new size requested in bytes * * Signature for a realloc() implementation. * * Returns a pointer to the newly reallocated block or NULL in case of error. */ typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size); /** * xmlStrdupFunc: * @str: a zero terminated string * * Signature for an strdup() implementation. * * Returns the copy of the string or NULL in case of error. */ typedef char *(XMLCALL *xmlStrdupFunc)(const char *str); /* * The 4 interfaces used for all memory handling within libxml. LIBXML_DLL_IMPORT xmlFreeFunc xmlFree; LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc; LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic; LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc; LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup; */ /* * The way to overload the existing functions. * The xmlGc function have an extra entry for atomic block * allocations useful for garbage collected memory allocators */ XMLPUBFUN int XMLCALL xmlMemSetup (xmlFreeFunc freeFunc, xmlMallocFunc mallocFunc, xmlReallocFunc reallocFunc, xmlStrdupFunc strdupFunc); XMLPUBFUN int XMLCALL xmlMemGet (xmlFreeFunc *freeFunc, xmlMallocFunc *mallocFunc, xmlReallocFunc *reallocFunc, xmlStrdupFunc *strdupFunc); XMLPUBFUN int XMLCALL xmlGcMemSetup (xmlFreeFunc freeFunc, xmlMallocFunc mallocFunc, xmlMallocFunc mallocAtomicFunc, xmlReallocFunc reallocFunc, xmlStrdupFunc strdupFunc); XMLPUBFUN int XMLCALL xmlGcMemGet (xmlFreeFunc *freeFunc, xmlMallocFunc *mallocFunc, xmlMallocFunc *mallocAtomicFunc, xmlReallocFunc *reallocFunc, xmlStrdupFunc *strdupFunc); /* * Initialization of the memory layer. */ XML_DEPRECATED XMLPUBFUN int XMLCALL xmlInitMemory (void); /* * Cleanup of the memory layer. */ XML_DEPRECATED XMLPUBFUN void XMLCALL xmlCleanupMemory (void); /* * These are specific to the XML debug memory wrapper. */ XMLPUBFUN int XMLCALL xmlMemUsed (void); XMLPUBFUN int XMLCALL xmlMemBlocks (void); XMLPUBFUN void XMLCALL xmlMemDisplay (FILE *fp); XMLPUBFUN void XMLCALL xmlMemDisplayLast(FILE *fp, long nbBytes); XMLPUBFUN void XMLCALL xmlMemShow (FILE *fp, int nr); XMLPUBFUN void XMLCALL xmlMemoryDump (void); XMLPUBFUN void * XMLCALL xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1); XMLPUBFUN void * XMLCALL xmlMemRealloc (void *ptr,size_t size); XMLPUBFUN void XMLCALL xmlMemFree (void *ptr); XMLPUBFUN char * XMLCALL xmlMemoryStrdup (const char *str); XMLPUBFUN void * XMLCALL xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1); XMLPUBFUN void * XMLCALL xmlReallocLoc (void *ptr, size_t size, const char *file, int line); XMLPUBFUN void * XMLCALL xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1); XMLPUBFUN char * XMLCALL xmlMemStrdupLoc (const char *str, const char *file, int line); #ifdef DEBUG_MEMORY_LOCATION /** * xmlMalloc: * @size: number of bytes to allocate * * Wrapper for the malloc() function used in the XML library. * * Returns the pointer to the allocated area or NULL in case of error. */ #define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__) /** * xmlMallocAtomic: * @size: number of bytes to allocate * * Wrapper for the malloc() function used in the XML library for allocation * of block not containing pointers to other areas. * * Returns the pointer to the allocated area or NULL in case of error. */ #define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__) /** * xmlRealloc: * @ptr: pointer to the existing allocated area * @size: number of bytes to allocate * * Wrapper for the realloc() function used in the XML library. * * Returns the pointer to the allocated area or NULL in case of error. */ #define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__) /** * xmlMemStrdup: * @str: pointer to the existing string * * Wrapper for the strdup() function, xmlStrdup() is usually preferred. * * Returns the pointer to the allocated area or NULL in case of error. */ #define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__) #endif /* DEBUG_MEMORY_LOCATION */ #ifdef __cplusplus } #endif /* __cplusplus */ #ifndef __XML_GLOBALS_H #ifndef __XML_THREADS_H__ #include #include #endif #endif #endif /* __DEBUG_MEMORY_ALLOC__ */ PK!w libxml/SAX.hnu[/* * Summary: Old SAX version 1 handler, deprecated * Description: DEPRECATED set of SAX version 1 interfaces used to * build the DOM tree. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_SAX_H__ #define __XML_SAX_H__ #include #include #include #include #ifdef LIBXML_LEGACY_ENABLED #ifdef __cplusplus extern "C" { #endif XML_DEPRECATED XMLPUBFUN const xmlChar * XMLCALL getPublicId (void *ctx); XML_DEPRECATED XMLPUBFUN const xmlChar * XMLCALL getSystemId (void *ctx); XML_DEPRECATED XMLPUBFUN void XMLCALL setDocumentLocator (void *ctx, xmlSAXLocatorPtr loc); XML_DEPRECATED XMLPUBFUN int XMLCALL getLineNumber (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL getColumnNumber (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL isStandalone (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL hasInternalSubset (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL hasExternalSubset (void *ctx); XML_DEPRECATED XMLPUBFUN void XMLCALL internalSubset (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); XML_DEPRECATED XMLPUBFUN void XMLCALL externalSubset (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); XML_DEPRECATED XMLPUBFUN xmlEntityPtr XMLCALL getEntity (void *ctx, const xmlChar *name); XML_DEPRECATED XMLPUBFUN xmlEntityPtr XMLCALL getParameterEntity (void *ctx, const xmlChar *name); XML_DEPRECATED XMLPUBFUN xmlParserInputPtr XMLCALL resolveEntity (void *ctx, const xmlChar *publicId, const xmlChar *systemId); XML_DEPRECATED XMLPUBFUN void XMLCALL entityDecl (void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content); XML_DEPRECATED XMLPUBFUN void XMLCALL attributeDecl (void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree); XML_DEPRECATED XMLPUBFUN void XMLCALL elementDecl (void *ctx, const xmlChar *name, int type, xmlElementContentPtr content); XML_DEPRECATED XMLPUBFUN void XMLCALL notationDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); XML_DEPRECATED XMLPUBFUN void XMLCALL unparsedEntityDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName); XML_DEPRECATED XMLPUBFUN void XMLCALL startDocument (void *ctx); XML_DEPRECATED XMLPUBFUN void XMLCALL endDocument (void *ctx); XML_DEPRECATED XMLPUBFUN void XMLCALL attribute (void *ctx, const xmlChar *fullname, const xmlChar *value); XML_DEPRECATED XMLPUBFUN void XMLCALL startElement (void *ctx, const xmlChar *fullname, const xmlChar **atts); XML_DEPRECATED XMLPUBFUN void XMLCALL endElement (void *ctx, const xmlChar *name); XML_DEPRECATED XMLPUBFUN void XMLCALL reference (void *ctx, const xmlChar *name); XML_DEPRECATED XMLPUBFUN void XMLCALL characters (void *ctx, const xmlChar *ch, int len); XML_DEPRECATED XMLPUBFUN void XMLCALL ignorableWhitespace (void *ctx, const xmlChar *ch, int len); XML_DEPRECATED XMLPUBFUN void XMLCALL processingInstruction (void *ctx, const xmlChar *target, const xmlChar *data); XML_DEPRECATED XMLPUBFUN void XMLCALL globalNamespace (void *ctx, const xmlChar *href, const xmlChar *prefix); XML_DEPRECATED XMLPUBFUN void XMLCALL setNamespace (void *ctx, const xmlChar *name); XML_DEPRECATED XMLPUBFUN xmlNsPtr XMLCALL getNamespace (void *ctx); XML_DEPRECATED XMLPUBFUN int XMLCALL checkNamespace (void *ctx, xmlChar *nameSpace); XML_DEPRECATED XMLPUBFUN void XMLCALL namespaceDecl (void *ctx, const xmlChar *href, const xmlChar *prefix); XML_DEPRECATED XMLPUBFUN void XMLCALL comment (void *ctx, const xmlChar *value); XML_DEPRECATED XMLPUBFUN void XMLCALL cdataBlock (void *ctx, const xmlChar *value, int len); #ifdef LIBXML_SAX1_ENABLED XML_DEPRECATED XMLPUBFUN void XMLCALL initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr, int warning); #ifdef LIBXML_HTML_ENABLED XML_DEPRECATED XMLPUBFUN void XMLCALL inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); #endif #endif /* LIBXML_SAX1_ENABLED */ #ifdef __cplusplus } #endif #endif /* LIBXML_LEGACY_ENABLED */ #endif /* __XML_SAX_H__ */ PK!< pfpflibxml/schemasInternals.hnu[/* * Summary: internal interfaces for XML Schemas * Description: internal interfaces for the XML Schemas handling * and schema validity checking * The Schemas development is a Work In Progress. * Some of those interfaces are not guaranteed to be API or ABI stable ! * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_SCHEMA_INTERNALS_H__ #define __XML_SCHEMA_INTERNALS_H__ #include #ifdef LIBXML_SCHEMAS_ENABLED #include #include #include #ifdef __cplusplus extern "C" { #endif typedef enum { XML_SCHEMAS_UNKNOWN = 0, XML_SCHEMAS_STRING = 1, XML_SCHEMAS_NORMSTRING = 2, XML_SCHEMAS_DECIMAL = 3, XML_SCHEMAS_TIME = 4, XML_SCHEMAS_GDAY = 5, XML_SCHEMAS_GMONTH = 6, XML_SCHEMAS_GMONTHDAY = 7, XML_SCHEMAS_GYEAR = 8, XML_SCHEMAS_GYEARMONTH = 9, XML_SCHEMAS_DATE = 10, XML_SCHEMAS_DATETIME = 11, XML_SCHEMAS_DURATION = 12, XML_SCHEMAS_FLOAT = 13, XML_SCHEMAS_DOUBLE = 14, XML_SCHEMAS_BOOLEAN = 15, XML_SCHEMAS_TOKEN = 16, XML_SCHEMAS_LANGUAGE = 17, XML_SCHEMAS_NMTOKEN = 18, XML_SCHEMAS_NMTOKENS = 19, XML_SCHEMAS_NAME = 20, XML_SCHEMAS_QNAME = 21, XML_SCHEMAS_NCNAME = 22, XML_SCHEMAS_ID = 23, XML_SCHEMAS_IDREF = 24, XML_SCHEMAS_IDREFS = 25, XML_SCHEMAS_ENTITY = 26, XML_SCHEMAS_ENTITIES = 27, XML_SCHEMAS_NOTATION = 28, XML_SCHEMAS_ANYURI = 29, XML_SCHEMAS_INTEGER = 30, XML_SCHEMAS_NPINTEGER = 31, XML_SCHEMAS_NINTEGER = 32, XML_SCHEMAS_NNINTEGER = 33, XML_SCHEMAS_PINTEGER = 34, XML_SCHEMAS_INT = 35, XML_SCHEMAS_UINT = 36, XML_SCHEMAS_LONG = 37, XML_SCHEMAS_ULONG = 38, XML_SCHEMAS_SHORT = 39, XML_SCHEMAS_USHORT = 40, XML_SCHEMAS_BYTE = 41, XML_SCHEMAS_UBYTE = 42, XML_SCHEMAS_HEXBINARY = 43, XML_SCHEMAS_BASE64BINARY = 44, XML_SCHEMAS_ANYTYPE = 45, XML_SCHEMAS_ANYSIMPLETYPE = 46 } xmlSchemaValType; /* * XML Schemas defines multiple type of types. */ typedef enum { XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */ XML_SCHEMA_TYPE_ANY, XML_SCHEMA_TYPE_FACET, XML_SCHEMA_TYPE_SIMPLE, XML_SCHEMA_TYPE_COMPLEX, XML_SCHEMA_TYPE_SEQUENCE = 6, XML_SCHEMA_TYPE_CHOICE, XML_SCHEMA_TYPE_ALL, XML_SCHEMA_TYPE_SIMPLE_CONTENT, XML_SCHEMA_TYPE_COMPLEX_CONTENT, XML_SCHEMA_TYPE_UR, XML_SCHEMA_TYPE_RESTRICTION, XML_SCHEMA_TYPE_EXTENSION, XML_SCHEMA_TYPE_ELEMENT, XML_SCHEMA_TYPE_ATTRIBUTE, XML_SCHEMA_TYPE_ATTRIBUTEGROUP, XML_SCHEMA_TYPE_GROUP, XML_SCHEMA_TYPE_NOTATION, XML_SCHEMA_TYPE_LIST, XML_SCHEMA_TYPE_UNION, XML_SCHEMA_TYPE_ANY_ATTRIBUTE, XML_SCHEMA_TYPE_IDC_UNIQUE, XML_SCHEMA_TYPE_IDC_KEY, XML_SCHEMA_TYPE_IDC_KEYREF, XML_SCHEMA_TYPE_PARTICLE = 25, XML_SCHEMA_TYPE_ATTRIBUTE_USE, XML_SCHEMA_FACET_MININCLUSIVE = 1000, XML_SCHEMA_FACET_MINEXCLUSIVE, XML_SCHEMA_FACET_MAXINCLUSIVE, XML_SCHEMA_FACET_MAXEXCLUSIVE, XML_SCHEMA_FACET_TOTALDIGITS, XML_SCHEMA_FACET_FRACTIONDIGITS, XML_SCHEMA_FACET_PATTERN, XML_SCHEMA_FACET_ENUMERATION, XML_SCHEMA_FACET_WHITESPACE, XML_SCHEMA_FACET_LENGTH, XML_SCHEMA_FACET_MAXLENGTH, XML_SCHEMA_FACET_MINLENGTH, XML_SCHEMA_EXTRA_QNAMEREF = 2000, XML_SCHEMA_EXTRA_ATTR_USE_PROHIB } xmlSchemaTypeType; typedef enum { XML_SCHEMA_CONTENT_UNKNOWN = 0, XML_SCHEMA_CONTENT_EMPTY = 1, XML_SCHEMA_CONTENT_ELEMENTS, XML_SCHEMA_CONTENT_MIXED, XML_SCHEMA_CONTENT_SIMPLE, XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */ XML_SCHEMA_CONTENT_BASIC, XML_SCHEMA_CONTENT_ANY } xmlSchemaContentType; typedef struct _xmlSchemaVal xmlSchemaVal; typedef xmlSchemaVal *xmlSchemaValPtr; typedef struct _xmlSchemaType xmlSchemaType; typedef xmlSchemaType *xmlSchemaTypePtr; typedef struct _xmlSchemaFacet xmlSchemaFacet; typedef xmlSchemaFacet *xmlSchemaFacetPtr; /** * Annotation */ typedef struct _xmlSchemaAnnot xmlSchemaAnnot; typedef xmlSchemaAnnot *xmlSchemaAnnotPtr; struct _xmlSchemaAnnot { struct _xmlSchemaAnnot *next; xmlNodePtr content; /* the annotation */ }; /** * XML_SCHEMAS_ANYATTR_SKIP: * * Skip unknown attribute from validation * Obsolete, not used anymore. */ #define XML_SCHEMAS_ANYATTR_SKIP 1 /** * XML_SCHEMAS_ANYATTR_LAX: * * Ignore validation non definition on attributes * Obsolete, not used anymore. */ #define XML_SCHEMAS_ANYATTR_LAX 2 /** * XML_SCHEMAS_ANYATTR_STRICT: * * Apply strict validation rules on attributes * Obsolete, not used anymore. */ #define XML_SCHEMAS_ANYATTR_STRICT 3 /** * XML_SCHEMAS_ANY_SKIP: * * Skip unknown attribute from validation */ #define XML_SCHEMAS_ANY_SKIP 1 /** * XML_SCHEMAS_ANY_LAX: * * Used by wildcards. * Validate if type found, don't worry if not found */ #define XML_SCHEMAS_ANY_LAX 2 /** * XML_SCHEMAS_ANY_STRICT: * * Used by wildcards. * Apply strict validation rules */ #define XML_SCHEMAS_ANY_STRICT 3 /** * XML_SCHEMAS_ATTR_USE_PROHIBITED: * * Used by wildcards. * The attribute is prohibited. */ #define XML_SCHEMAS_ATTR_USE_PROHIBITED 0 /** * XML_SCHEMAS_ATTR_USE_REQUIRED: * * The attribute is required. */ #define XML_SCHEMAS_ATTR_USE_REQUIRED 1 /** * XML_SCHEMAS_ATTR_USE_OPTIONAL: * * The attribute is optional. */ #define XML_SCHEMAS_ATTR_USE_OPTIONAL 2 /** * XML_SCHEMAS_ATTR_GLOBAL: * * allow elements in no namespace */ #define XML_SCHEMAS_ATTR_GLOBAL 1 << 0 /** * XML_SCHEMAS_ATTR_NSDEFAULT: * * allow elements in no namespace */ #define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7 /** * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED: * * this is set when the "type" and "ref" references * have been resolved. */ #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8 /** * XML_SCHEMAS_ATTR_FIXED: * * the attribute has a fixed value */ #define XML_SCHEMAS_ATTR_FIXED 1 << 9 /** * xmlSchemaAttribute: * An attribute definition. */ typedef struct _xmlSchemaAttribute xmlSchemaAttribute; typedef xmlSchemaAttribute *xmlSchemaAttributePtr; struct _xmlSchemaAttribute { xmlSchemaTypeType type; struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */ const xmlChar *name; /* the name of the declaration */ const xmlChar *id; /* Deprecated; not used */ const xmlChar *ref; /* Deprecated; not used */ const xmlChar *refNs; /* Deprecated; not used */ const xmlChar *typeName; /* the local name of the type definition */ const xmlChar *typeNs; /* the ns URI of the type definition */ xmlSchemaAnnotPtr annot; xmlSchemaTypePtr base; /* Deprecated; not used */ int occurs; /* Deprecated; not used */ const xmlChar *defValue; /* The initial value of the value constraint */ xmlSchemaTypePtr subtypes; /* the type definition */ xmlNodePtr node; const xmlChar *targetNamespace; int flags; const xmlChar *refPrefix; /* Deprecated; not used */ xmlSchemaValPtr defVal; /* The compiled value constraint */ xmlSchemaAttributePtr refDecl; /* Deprecated; not used */ }; /** * xmlSchemaAttributeLink: * Used to build a list of attribute uses on complexType definitions. * WARNING: Deprecated; not used. */ typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink; typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr; struct _xmlSchemaAttributeLink { struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */ struct _xmlSchemaAttribute *attr;/* the linked attribute */ }; /** * XML_SCHEMAS_WILDCARD_COMPLETE: * * If the wildcard is complete. */ #define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0 /** * xmlSchemaCharValueLink: * Used to build a list of namespaces on wildcards. */ typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs; typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr; struct _xmlSchemaWildcardNs { struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */ const xmlChar *value;/* the value */ }; /** * xmlSchemaWildcard. * A wildcard. */ typedef struct _xmlSchemaWildcard xmlSchemaWildcard; typedef xmlSchemaWildcard *xmlSchemaWildcardPtr; struct _xmlSchemaWildcard { xmlSchemaTypeType type; /* The kind of type */ const xmlChar *id; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlNodePtr node; int minOccurs; /* Deprecated; not used */ int maxOccurs; /* Deprecated; not used */ int processContents; int any; /* Indicates if the ns constraint is of ##any */ xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */ xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */ int flags; }; /** * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED: * * The attribute wildcard has been built. */ #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0 /** * XML_SCHEMAS_ATTRGROUP_GLOBAL: * * The attribute group has been defined. */ #define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1 /** * XML_SCHEMAS_ATTRGROUP_MARKED: * * Marks the attr group as marked; used for circular checks. */ #define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2 /** * XML_SCHEMAS_ATTRGROUP_REDEFINED: * * The attr group was redefined. */ #define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3 /** * XML_SCHEMAS_ATTRGROUP_HAS_REFS: * * Whether this attr. group contains attr. group references. */ #define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4 /** * An attribute group definition. * * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures * must be kept similar */ typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup; typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr; struct _xmlSchemaAttributeGroup { xmlSchemaTypeType type; /* The kind of type */ struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ const xmlChar *name; const xmlChar *id; const xmlChar *ref; /* Deprecated; not used */ const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlSchemaAttributePtr attributes; /* Deprecated; not used */ xmlNodePtr node; int flags; xmlSchemaWildcardPtr attributeWildcard; const xmlChar *refPrefix; /* Deprecated; not used */ xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */ const xmlChar *targetNamespace; void *attrUses; }; /** * xmlSchemaTypeLink: * Used to build a list of types (e.g. member types of * simpleType with variety "union"). */ typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink; typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr; struct _xmlSchemaTypeLink { struct _xmlSchemaTypeLink *next;/* the next type link ... */ xmlSchemaTypePtr type;/* the linked type */ }; /** * xmlSchemaFacetLink: * Used to build a list of facets. */ typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink; typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr; struct _xmlSchemaFacetLink { struct _xmlSchemaFacetLink *next;/* the next facet link ... */ xmlSchemaFacetPtr facet;/* the linked facet */ }; /** * XML_SCHEMAS_TYPE_MIXED: * * the element content type is mixed */ #define XML_SCHEMAS_TYPE_MIXED 1 << 0 /** * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION: * * the simple or complex type has a derivation method of "extension". */ #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1 /** * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION: * * the simple or complex type has a derivation method of "restriction". */ #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2 /** * XML_SCHEMAS_TYPE_GLOBAL: * * the type is global */ #define XML_SCHEMAS_TYPE_GLOBAL 1 << 3 /** * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD: * * the complexType owns an attribute wildcard, i.e. * it can be freed by the complexType */ #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */ /** * XML_SCHEMAS_TYPE_VARIETY_ABSENT: * * the simpleType has a variety of "absent". * TODO: Actually not necessary :-/, since if * none of the variety flags occur then it's * automatically absent. */ #define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5 /** * XML_SCHEMAS_TYPE_VARIETY_LIST: * * the simpleType has a variety of "list". */ #define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6 /** * XML_SCHEMAS_TYPE_VARIETY_UNION: * * the simpleType has a variety of "union". */ #define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7 /** * XML_SCHEMAS_TYPE_VARIETY_ATOMIC: * * the simpleType has a variety of "union". */ #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8 /** * XML_SCHEMAS_TYPE_FINAL_EXTENSION: * * the complexType has a final of "extension". */ #define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9 /** * XML_SCHEMAS_TYPE_FINAL_RESTRICTION: * * the simpleType/complexType has a final of "restriction". */ #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10 /** * XML_SCHEMAS_TYPE_FINAL_LIST: * * the simpleType has a final of "list". */ #define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11 /** * XML_SCHEMAS_TYPE_FINAL_UNION: * * the simpleType has a final of "union". */ #define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12 /** * XML_SCHEMAS_TYPE_FINAL_DEFAULT: * * the simpleType has a final of "default". */ #define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13 /** * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE: * * Marks the item as a builtin primitive. */ #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14 /** * XML_SCHEMAS_TYPE_MARKED: * * Marks the item as marked; used for circular checks. */ #define XML_SCHEMAS_TYPE_MARKED 1 << 16 /** * XML_SCHEMAS_TYPE_BLOCK_DEFAULT: * * the complexType did not specify 'block' so use the default of the * item. */ #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17 /** * XML_SCHEMAS_TYPE_BLOCK_EXTENSION: * * the complexType has a 'block' of "extension". */ #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18 /** * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION: * * the complexType has a 'block' of "restriction". */ #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19 /** * XML_SCHEMAS_TYPE_ABSTRACT: * * the simple/complexType is abstract. */ #define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20 /** * XML_SCHEMAS_TYPE_FACETSNEEDVALUE: * * indicates if the facets need a computed value */ #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21 /** * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED: * * indicates that the type was typefixed */ #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22 /** * XML_SCHEMAS_TYPE_INTERNAL_INVALID: * * indicates that the type is invalid */ #define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23 /** * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE: * * a whitespace-facet value of "preserve" */ #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24 /** * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE: * * a whitespace-facet value of "replace" */ #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25 /** * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE: * * a whitespace-facet value of "collapse" */ #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26 /** * XML_SCHEMAS_TYPE_HAS_FACETS: * * has facets */ #define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27 /** * XML_SCHEMAS_TYPE_NORMVALUENEEDED: * * indicates if the facets (pattern) need a normalized value */ #define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28 /** * XML_SCHEMAS_TYPE_FIXUP_1: * * First stage of fixup was done. */ #define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29 /** * XML_SCHEMAS_TYPE_REDEFINED: * * The type was redefined. */ #define XML_SCHEMAS_TYPE_REDEFINED 1 << 30 /** * XML_SCHEMAS_TYPE_REDEFINING: * * The type redefines an other type. */ /* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */ /** * _xmlSchemaType: * * Schemas type definition. */ struct _xmlSchemaType { xmlSchemaTypeType type; /* The kind of type */ struct _xmlSchemaType *next; /* the next type if in a sequence ... */ const xmlChar *name; const xmlChar *id ; /* Deprecated; not used */ const xmlChar *ref; /* Deprecated; not used */ const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlSchemaTypePtr subtypes; xmlSchemaAttributePtr attributes; /* Deprecated; not used */ xmlNodePtr node; int minOccurs; /* Deprecated; not used */ int maxOccurs; /* Deprecated; not used */ int flags; xmlSchemaContentType contentType; const xmlChar *base; /* Base type's local name */ const xmlChar *baseNs; /* Base type's target namespace */ xmlSchemaTypePtr baseType; /* The base type component */ xmlSchemaFacetPtr facets; /* Local facets */ struct _xmlSchemaType *redef; /* Deprecated; not used */ int recurse; /* Obsolete */ xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */ xmlSchemaWildcardPtr attributeWildcard; int builtInType; /* Type of built-in types. */ xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */ xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */ const xmlChar *refPrefix; /* Deprecated; not used */ xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types. Could we use @subtypes for this? */ xmlRegexpPtr contModel; /* Holds the automaton of the content model */ const xmlChar *targetNamespace; void *attrUses; }; /* * xmlSchemaElement: * An element definition. * * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of * structures must be kept similar */ /** * XML_SCHEMAS_ELEM_NILLABLE: * * the element is nillable */ #define XML_SCHEMAS_ELEM_NILLABLE 1 << 0 /** * XML_SCHEMAS_ELEM_GLOBAL: * * the element is global */ #define XML_SCHEMAS_ELEM_GLOBAL 1 << 1 /** * XML_SCHEMAS_ELEM_DEFAULT: * * the element has a default value */ #define XML_SCHEMAS_ELEM_DEFAULT 1 << 2 /** * XML_SCHEMAS_ELEM_FIXED: * * the element has a fixed value */ #define XML_SCHEMAS_ELEM_FIXED 1 << 3 /** * XML_SCHEMAS_ELEM_ABSTRACT: * * the element is abstract */ #define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4 /** * XML_SCHEMAS_ELEM_TOPLEVEL: * * the element is top level * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead */ #define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5 /** * XML_SCHEMAS_ELEM_REF: * * the element is a reference to a type */ #define XML_SCHEMAS_ELEM_REF 1 << 6 /** * XML_SCHEMAS_ELEM_NSDEFAULT: * * allow elements in no namespace * Obsolete, not used anymore. */ #define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7 /** * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED: * * this is set when "type", "ref", "substitutionGroup" * references have been resolved. */ #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8 /** * XML_SCHEMAS_ELEM_CIRCULAR: * * a helper flag for the search of circular references. */ #define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9 /** * XML_SCHEMAS_ELEM_BLOCK_ABSENT: * * the "block" attribute is absent */ #define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10 /** * XML_SCHEMAS_ELEM_BLOCK_EXTENSION: * * disallowed substitutions are absent */ #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11 /** * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION: * * disallowed substitutions: "restriction" */ #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12 /** * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION: * * disallowed substitutions: "substitution" */ #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13 /** * XML_SCHEMAS_ELEM_FINAL_ABSENT: * * substitution group exclusions are absent */ #define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14 /** * XML_SCHEMAS_ELEM_FINAL_EXTENSION: * * substitution group exclusions: "extension" */ #define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15 /** * XML_SCHEMAS_ELEM_FINAL_RESTRICTION: * * substitution group exclusions: "restriction" */ #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16 /** * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD: * * the declaration is a substitution group head */ #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17 /** * XML_SCHEMAS_ELEM_INTERNAL_CHECKED: * * this is set when the elem decl has been checked against * all constraints */ #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18 typedef struct _xmlSchemaElement xmlSchemaElement; typedef xmlSchemaElement *xmlSchemaElementPtr; struct _xmlSchemaElement { xmlSchemaTypeType type; /* The kind of type */ struct _xmlSchemaType *next; /* Not used? */ const xmlChar *name; const xmlChar *id; /* Deprecated; not used */ const xmlChar *ref; /* Deprecated; not used */ const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlSchemaTypePtr subtypes; /* the type definition */ xmlSchemaAttributePtr attributes; xmlNodePtr node; int minOccurs; /* Deprecated; not used */ int maxOccurs; /* Deprecated; not used */ int flags; const xmlChar *targetNamespace; const xmlChar *namedType; const xmlChar *namedTypeNs; const xmlChar *substGroup; const xmlChar *substGroupNs; const xmlChar *scope; const xmlChar *value; /* The original value of the value constraint. */ struct _xmlSchemaElement *refDecl; /* This will now be used for the substitution group affiliation */ xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */ xmlSchemaContentType contentType; const xmlChar *refPrefix; /* Deprecated; not used */ xmlSchemaValPtr defVal; /* The compiled value constraint. */ void *idcs; /* The identity-constraint defs */ }; /* * XML_SCHEMAS_FACET_UNKNOWN: * * unknown facet handling */ #define XML_SCHEMAS_FACET_UNKNOWN 0 /* * XML_SCHEMAS_FACET_PRESERVE: * * preserve the type of the facet */ #define XML_SCHEMAS_FACET_PRESERVE 1 /* * XML_SCHEMAS_FACET_REPLACE: * * replace the type of the facet */ #define XML_SCHEMAS_FACET_REPLACE 2 /* * XML_SCHEMAS_FACET_COLLAPSE: * * collapse the types of the facet */ #define XML_SCHEMAS_FACET_COLLAPSE 3 /** * A facet definition. */ struct _xmlSchemaFacet { xmlSchemaTypeType type; /* The kind of type */ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ const xmlChar *value; /* The original value */ const xmlChar *id; /* Obsolete */ xmlSchemaAnnotPtr annot; xmlNodePtr node; int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */ int whitespace; xmlSchemaValPtr val; /* The compiled value */ xmlRegexpPtr regexp; /* The regex for patterns */ }; /** * A notation definition. */ typedef struct _xmlSchemaNotation xmlSchemaNotation; typedef xmlSchemaNotation *xmlSchemaNotationPtr; struct _xmlSchemaNotation { xmlSchemaTypeType type; /* The kind of type */ const xmlChar *name; xmlSchemaAnnotPtr annot; const xmlChar *identifier; const xmlChar *targetNamespace; }; /* * TODO: Actually all those flags used for the schema should sit * on the schema parser context, since they are used only * during parsing an XML schema document, and not available * on the component level as per spec. */ /** * XML_SCHEMAS_QUALIF_ELEM: * * Reflects elementFormDefault == qualified in * an XML schema document. */ #define XML_SCHEMAS_QUALIF_ELEM 1 << 0 /** * XML_SCHEMAS_QUALIF_ATTR: * * Reflects attributeFormDefault == qualified in * an XML schema document. */ #define XML_SCHEMAS_QUALIF_ATTR 1 << 1 /** * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION: * * the schema has "extension" in the set of finalDefault. */ #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2 /** * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION: * * the schema has "restriction" in the set of finalDefault. */ #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3 /** * XML_SCHEMAS_FINAL_DEFAULT_LIST: * * the schema has "list" in the set of finalDefault. */ #define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4 /** * XML_SCHEMAS_FINAL_DEFAULT_UNION: * * the schema has "union" in the set of finalDefault. */ #define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5 /** * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION: * * the schema has "extension" in the set of blockDefault. */ #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6 /** * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION: * * the schema has "restriction" in the set of blockDefault. */ #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7 /** * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION: * * the schema has "substitution" in the set of blockDefault. */ #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8 /** * XML_SCHEMAS_INCLUDING_CONVERT_NS: * * the schema is currently including an other schema with * no target namespace. */ #define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9 /** * _xmlSchema: * * A Schemas definition */ struct _xmlSchema { const xmlChar *name; /* schema name */ const xmlChar *targetNamespace; /* the target namespace */ const xmlChar *version; const xmlChar *id; /* Obsolete */ xmlDocPtr doc; xmlSchemaAnnotPtr annot; int flags; xmlHashTablePtr typeDecl; xmlHashTablePtr attrDecl; xmlHashTablePtr attrgrpDecl; xmlHashTablePtr elemDecl; xmlHashTablePtr notaDecl; xmlHashTablePtr schemasImports; void *_private; /* unused by the library for users or bindings */ xmlHashTablePtr groupDecl; xmlDictPtr dict; void *includes; /* the includes, this is opaque for now */ int preserve; /* whether to free the document */ int counter; /* used to give anonymous components unique names */ xmlHashTablePtr idcDef; /* All identity-constraint defs. */ void *volatiles; /* Obsolete */ }; XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMAS_ENABLED */ #endif /* __XML_SCHEMA_INTERNALS_H__ */ PK!Qlibxml/xpointer.hnu[/* * Summary: API to handle XML Pointers * Description: API to handle XML Pointers * Base implementation was made accordingly to * W3C Candidate Recommendation 7 June 2000 * http://www.w3.org/TR/2000/CR-xptr-20000607 * * Added support for the element() scheme described in: * W3C Proposed Recommendation 13 November 2002 * http://www.w3.org/TR/2002/PR-xptr-element-20021113/ * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XPTR_H__ #define __XML_XPTR_H__ #include #ifdef LIBXML_XPTR_ENABLED #include #include #ifdef __cplusplus extern "C" { #endif #ifdef LIBXML_XPTR_LOCS_ENABLED /* * A Location Set */ typedef struct _xmlLocationSet xmlLocationSet; typedef xmlLocationSet *xmlLocationSetPtr; struct _xmlLocationSet { int locNr; /* number of locations in the set */ int locMax; /* size of the array as allocated */ xmlXPathObjectPtr *locTab;/* array of locations */ }; /* * Handling of location sets. */ XML_DEPRECATED XMLPUBFUN xmlLocationSetPtr XMLCALL xmlXPtrLocationSetCreate (xmlXPathObjectPtr val); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlXPtrFreeLocationSet (xmlLocationSetPtr obj); XML_DEPRECATED XMLPUBFUN xmlLocationSetPtr XMLCALL xmlXPtrLocationSetMerge (xmlLocationSetPtr val1, xmlLocationSetPtr val2); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewRange (xmlNodePtr start, int startindex, xmlNodePtr end, int endindex); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewRangePoints (xmlXPathObjectPtr start, xmlXPathObjectPtr end); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewRangeNodePoint (xmlNodePtr start, xmlXPathObjectPtr end); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewRangePointNode (xmlXPathObjectPtr start, xmlNodePtr end); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewRangeNodes (xmlNodePtr start, xmlNodePtr end); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewLocationSetNodes (xmlNodePtr start, xmlNodePtr end); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewRangeNodeObject (xmlNodePtr start, xmlXPathObjectPtr end); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrNewCollapsedRange (xmlNodePtr start); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlXPtrLocationSetAdd (xmlLocationSetPtr cur, xmlXPathObjectPtr val); XML_DEPRECATED XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrWrapLocationSet (xmlLocationSetPtr val); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlXPtrLocationSetDel (xmlLocationSetPtr cur, xmlXPathObjectPtr val); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlXPtrLocationSetRemove (xmlLocationSetPtr cur, int val); #endif /* LIBXML_XPTR_LOCS_ENABLED */ /* * Functions. */ XMLPUBFUN xmlXPathContextPtr XMLCALL xmlXPtrNewContext (xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPtrEval (const xmlChar *str, xmlXPathContextPtr ctx); #ifdef LIBXML_XPTR_LOCS_ENABLED XML_DEPRECATED XMLPUBFUN void XMLCALL xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt, int nargs); XML_DEPRECATED XMLPUBFUN xmlNodePtr XMLCALL xmlXPtrBuildNodeList (xmlXPathObjectPtr obj); XML_DEPRECATED XMLPUBFUN void XMLCALL xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt); #endif /* LIBXML_XPTR_LOCS_ENABLED */ #ifdef __cplusplus } #endif #endif /* LIBXML_XPTR_ENABLED */ #endif /* __XML_XPTR_H__ */ PK!{A{Alibxml/xpath.hnu[/* * Summary: XML Path Language implementation * Description: API for the XML Path Language implementation * * XML Path Language implementation * XPath is a language for addressing parts of an XML document, * designed to be used by both XSLT and XPointer * http://www.w3.org/TR/xpath * * Implements * W3C Recommendation 16 November 1999 * http://www.w3.org/TR/1999/REC-xpath-19991116 * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XPATH_H__ #define __XML_XPATH_H__ #include #ifdef LIBXML_XPATH_ENABLED #include #include #include #endif /* LIBXML_XPATH_ENABLED */ #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) #ifdef __cplusplus extern "C" { #endif #endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */ #ifdef LIBXML_XPATH_ENABLED typedef struct _xmlXPathContext xmlXPathContext; typedef xmlXPathContext *xmlXPathContextPtr; typedef struct _xmlXPathParserContext xmlXPathParserContext; typedef xmlXPathParserContext *xmlXPathParserContextPtr; /** * The set of XPath error codes. */ typedef enum { XPATH_EXPRESSION_OK = 0, XPATH_NUMBER_ERROR, XPATH_UNFINISHED_LITERAL_ERROR, XPATH_START_LITERAL_ERROR, XPATH_VARIABLE_REF_ERROR, XPATH_UNDEF_VARIABLE_ERROR, XPATH_INVALID_PREDICATE_ERROR, XPATH_EXPR_ERROR, XPATH_UNCLOSED_ERROR, XPATH_UNKNOWN_FUNC_ERROR, XPATH_INVALID_OPERAND, XPATH_INVALID_TYPE, XPATH_INVALID_ARITY, XPATH_INVALID_CTXT_SIZE, XPATH_INVALID_CTXT_POSITION, XPATH_MEMORY_ERROR, XPTR_SYNTAX_ERROR, XPTR_RESOURCE_ERROR, XPTR_SUB_RESOURCE_ERROR, XPATH_UNDEF_PREFIX_ERROR, XPATH_ENCODING_ERROR, XPATH_INVALID_CHAR_ERROR, XPATH_INVALID_CTXT, XPATH_STACK_ERROR, XPATH_FORBID_VARIABLE_ERROR, XPATH_OP_LIMIT_EXCEEDED, XPATH_RECURSION_LIMIT_EXCEEDED } xmlXPathError; /* * A node-set (an unordered collection of nodes without duplicates). */ typedef struct _xmlNodeSet xmlNodeSet; typedef xmlNodeSet *xmlNodeSetPtr; struct _xmlNodeSet { int nodeNr; /* number of nodes in the set */ int nodeMax; /* size of the array as allocated */ xmlNodePtr *nodeTab; /* array of nodes in no particular order */ /* @@ with_ns to check whether namespace nodes should be looked at @@ */ }; /* * An expression is evaluated to yield an object, which * has one of the following four basic types: * - node-set * - boolean * - number * - string * * @@ XPointer will add more types ! */ typedef enum { XPATH_UNDEFINED = 0, XPATH_NODESET = 1, XPATH_BOOLEAN = 2, XPATH_NUMBER = 3, XPATH_STRING = 4, #ifdef LIBXML_XPTR_LOCS_ENABLED XPATH_POINT = 5, XPATH_RANGE = 6, XPATH_LOCATIONSET = 7, #endif XPATH_USERS = 8, XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */ } xmlXPathObjectType; #ifndef LIBXML_XPTR_LOCS_ENABLED /** DOC_DISABLE */ #define XPATH_POINT 5 #define XPATH_RANGE 6 #define XPATH_LOCATIONSET 7 /** DOC_ENABLE */ #endif typedef struct _xmlXPathObject xmlXPathObject; typedef xmlXPathObject *xmlXPathObjectPtr; struct _xmlXPathObject { xmlXPathObjectType type; xmlNodeSetPtr nodesetval; int boolval; double floatval; xmlChar *stringval; void *user; int index; void *user2; int index2; }; /** * xmlXPathConvertFunc: * @obj: an XPath object * @type: the number of the target type * * A conversion function is associated to a type and used to cast * the new type to primitive values. * * Returns -1 in case of error, 0 otherwise */ typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type); /* * Extra type: a name and a conversion function. */ typedef struct _xmlXPathType xmlXPathType; typedef xmlXPathType *xmlXPathTypePtr; struct _xmlXPathType { const xmlChar *name; /* the type name */ xmlXPathConvertFunc func; /* the conversion function */ }; /* * Extra variable: a name and a value. */ typedef struct _xmlXPathVariable xmlXPathVariable; typedef xmlXPathVariable *xmlXPathVariablePtr; struct _xmlXPathVariable { const xmlChar *name; /* the variable name */ xmlXPathObjectPtr value; /* the value */ }; /** * xmlXPathEvalFunc: * @ctxt: an XPath parser context * @nargs: the number of arguments passed to the function * * An XPath evaluation function, the parameters are on the XPath context stack. */ typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, int nargs); /* * Extra function: a name and a evaluation function. */ typedef struct _xmlXPathFunct xmlXPathFunct; typedef xmlXPathFunct *xmlXPathFuncPtr; struct _xmlXPathFunct { const xmlChar *name; /* the function name */ xmlXPathEvalFunc func; /* the evaluation function */ }; /** * xmlXPathAxisFunc: * @ctxt: the XPath interpreter context * @cur: the previous node being explored on that axis * * An axis traversal function. To traverse an axis, the engine calls * the first time with cur == NULL and repeat until the function returns * NULL indicating the end of the axis traversal. * * Returns the next node in that axis or NULL if at the end of the axis. */ typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr cur); /* * Extra axis: a name and an axis function. */ typedef struct _xmlXPathAxis xmlXPathAxis; typedef xmlXPathAxis *xmlXPathAxisPtr; struct _xmlXPathAxis { const xmlChar *name; /* the axis name */ xmlXPathAxisFunc func; /* the search function */ }; /** * xmlXPathFunction: * @ctxt: the XPath interprestation context * @nargs: the number of arguments * * An XPath function. * The arguments (if any) are popped out from the context stack * and the result is pushed on the stack. */ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs); /* * Function and Variable Lookup. */ /** * xmlXPathVariableLookupFunc: * @ctxt: an XPath context * @name: name of the variable * @ns_uri: the namespace name hosting this variable * * Prototype for callbacks used to plug variable lookup in the XPath * engine. * * Returns the XPath object value or NULL if not found. */ typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt, const xmlChar *name, const xmlChar *ns_uri); /** * xmlXPathFuncLookupFunc: * @ctxt: an XPath context * @name: name of the function * @ns_uri: the namespace name hosting this function * * Prototype for callbacks used to plug function lookup in the XPath * engine. * * Returns the XPath function or NULL if not found. */ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt, const xmlChar *name, const xmlChar *ns_uri); /** * xmlXPathFlags: * Flags for XPath engine compilation and runtime */ /** * XML_XPATH_CHECKNS: * * check namespaces at compilation */ #define XML_XPATH_CHECKNS (1<<0) /** * XML_XPATH_NOVAR: * * forbid variables in expression */ #define XML_XPATH_NOVAR (1<<1) /** * xmlXPathContext: * * Expression evaluation occurs with respect to a context. * he context consists of: * - a node (the context node) * - a node list (the context node list) * - a set of variable bindings * - a function library * - the set of namespace declarations in scope for the expression * Following the switch to hash tables, this need to be trimmed up at * the next binary incompatible release. * The node may be modified when the context is passed to libxml2 * for an XPath evaluation so you may need to initialize it again * before the next call. */ struct _xmlXPathContext { xmlDocPtr doc; /* The current document */ xmlNodePtr node; /* The current node */ int nb_variables_unused; /* unused (hash table) */ int max_variables_unused; /* unused (hash table) */ xmlHashTablePtr varHash; /* Hash table of defined variables */ int nb_types; /* number of defined types */ int max_types; /* max number of types */ xmlXPathTypePtr types; /* Array of defined types */ int nb_funcs_unused; /* unused (hash table) */ int max_funcs_unused; /* unused (hash table) */ xmlHashTablePtr funcHash; /* Hash table of defined funcs */ int nb_axis; /* number of defined axis */ int max_axis; /* max number of axis */ xmlXPathAxisPtr axis; /* Array of defined axis */ /* the namespace nodes of the context node */ xmlNsPtr *namespaces; /* Array of namespaces */ int nsNr; /* number of namespace in scope */ void *user; /* function to free */ /* extra variables */ int contextSize; /* the context size */ int proximityPosition; /* the proximity position */ /* extra stuff for XPointer */ int xptr; /* is this an XPointer context? */ xmlNodePtr here; /* for here() */ xmlNodePtr origin; /* for origin() */ /* the set of namespace declarations in scope for the expression */ xmlHashTablePtr nsHash; /* The namespaces hash table */ xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */ void *varLookupData; /* variable lookup data */ /* Possibility to link in an extra item */ void *extra; /* needed for XSLT */ /* The function name and URI when calling a function */ const xmlChar *function; const xmlChar *functionURI; /* function lookup function and data */ xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */ void *funcLookupData; /* function lookup data */ /* temporary namespace lists kept for walking the namespace axis */ xmlNsPtr *tmpNsList; /* Array of namespaces */ int tmpNsNr; /* number of namespaces in scope */ /* error reporting mechanism */ void *userData; /* user specific data block */ xmlStructuredErrorFunc error; /* the callback in case of errors */ xmlError lastError; /* the last error */ xmlNodePtr debugNode; /* the source node XSLT */ /* dictionary */ xmlDictPtr dict; /* dictionary if any */ int flags; /* flags to control compilation */ /* Cache for reusal of XPath objects */ void *cache; /* Resource limits */ unsigned long opLimit; unsigned long opCount; int depth; }; /* * The structure of a compiled expression form is not public. */ typedef struct _xmlXPathCompExpr xmlXPathCompExpr; typedef xmlXPathCompExpr *xmlXPathCompExprPtr; /** * xmlXPathParserContext: * * An XPath parser context. It contains pure parsing information, * an xmlXPathContext, and the stack of objects. */ struct _xmlXPathParserContext { const xmlChar *cur; /* the current char being parsed */ const xmlChar *base; /* the full expression */ int error; /* error code */ xmlXPathContextPtr context; /* the evaluation context */ xmlXPathObjectPtr value; /* the current value */ int valueNr; /* number of values stacked */ int valueMax; /* max number of values stacked */ xmlXPathObjectPtr *valueTab; /* stack of values */ xmlXPathCompExprPtr comp; /* the precompiled expression */ int xptr; /* it this an XPointer expression */ xmlNodePtr ancestor; /* used for walking preceding axis */ int valueFrame; /* used to limit Pop on the stack */ }; /************************************************************************ * * * Public API * * * ************************************************************************/ /** * Objects and Nodesets handling */ XMLPUBVAR double xmlXPathNAN; XMLPUBVAR double xmlXPathPINF; XMLPUBVAR double xmlXPathNINF; /* These macros may later turn into functions */ /** * xmlXPathNodeSetGetLength: * @ns: a node-set * * Implement a functionality similar to the DOM NodeList.length. * * Returns the number of nodes in the node-set. */ #define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0) /** * xmlXPathNodeSetItem: * @ns: a node-set * @index: index of a node in the set * * Implements a functionality similar to the DOM NodeList.item(). * * Returns the xmlNodePtr at the given @index in @ns or NULL if * @index is out of range (0 to length-1) */ #define xmlXPathNodeSetItem(ns, index) \ ((((ns) != NULL) && \ ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \ (ns)->nodeTab[(index)] \ : NULL) /** * xmlXPathNodeSetIsEmpty: * @ns: a node-set * * Checks whether @ns is empty or not. * * Returns %TRUE if @ns is an empty node-set. */ #define xmlXPathNodeSetIsEmpty(ns) \ (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL)) XMLPUBFUN void XMLCALL xmlXPathFreeObject (xmlXPathObjectPtr obj); XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathNodeSetCreate (xmlNodePtr val); XMLPUBFUN void XMLCALL xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj); XMLPUBFUN void XMLCALL xmlXPathFreeNodeSet (xmlNodeSetPtr obj); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathObjectCopy (xmlXPathObjectPtr val); XMLPUBFUN int XMLCALL xmlXPathCmpNodes (xmlNodePtr node1, xmlNodePtr node2); /** * Conversion functions to basic types. */ XMLPUBFUN int XMLCALL xmlXPathCastNumberToBoolean (double val); XMLPUBFUN int XMLCALL xmlXPathCastStringToBoolean (const xmlChar * val); XMLPUBFUN int XMLCALL xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns); XMLPUBFUN int XMLCALL xmlXPathCastToBoolean (xmlXPathObjectPtr val); XMLPUBFUN double XMLCALL xmlXPathCastBooleanToNumber (int val); XMLPUBFUN double XMLCALL xmlXPathCastStringToNumber (const xmlChar * val); XMLPUBFUN double XMLCALL xmlXPathCastNodeToNumber (xmlNodePtr node); XMLPUBFUN double XMLCALL xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns); XMLPUBFUN double XMLCALL xmlXPathCastToNumber (xmlXPathObjectPtr val); XMLPUBFUN xmlChar * XMLCALL xmlXPathCastBooleanToString (int val); XMLPUBFUN xmlChar * XMLCALL xmlXPathCastNumberToString (double val); XMLPUBFUN xmlChar * XMLCALL xmlXPathCastNodeToString (xmlNodePtr node); XMLPUBFUN xmlChar * XMLCALL xmlXPathCastNodeSetToString (xmlNodeSetPtr ns); XMLPUBFUN xmlChar * XMLCALL xmlXPathCastToString (xmlXPathObjectPtr val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathConvertBoolean (xmlXPathObjectPtr val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathConvertNumber (xmlXPathObjectPtr val); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathConvertString (xmlXPathObjectPtr val); /** * Context handling. */ XMLPUBFUN xmlXPathContextPtr XMLCALL xmlXPathNewContext (xmlDocPtr doc); XMLPUBFUN void XMLCALL xmlXPathFreeContext (xmlXPathContextPtr ctxt); XMLPUBFUN int XMLCALL xmlXPathContextSetCache(xmlXPathContextPtr ctxt, int active, int value, int options); /** * Evaluation functions. */ XMLPUBFUN long XMLCALL xmlXPathOrderDocElems (xmlDocPtr doc); XMLPUBFUN int XMLCALL xmlXPathSetContextNode (xmlNodePtr node, xmlXPathContextPtr ctx); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathNodeEval (xmlNodePtr node, const xmlChar *str, xmlXPathContextPtr ctx); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathEval (const xmlChar *str, xmlXPathContextPtr ctx); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathEvalExpression (const xmlChar *str, xmlXPathContextPtr ctxt); XMLPUBFUN int XMLCALL xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, xmlXPathObjectPtr res); /** * Separate compilation/evaluation entry points. */ XMLPUBFUN xmlXPathCompExprPtr XMLCALL xmlXPathCompile (const xmlChar *str); XMLPUBFUN xmlXPathCompExprPtr XMLCALL xmlXPathCtxtCompile (xmlXPathContextPtr ctxt, const xmlChar *str); XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathCompiledEval (xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx); XMLPUBFUN int XMLCALL xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctxt); XMLPUBFUN void XMLCALL xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp); #endif /* LIBXML_XPATH_ENABLED */ #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) XML_DEPRECATED XMLPUBFUN void XMLCALL xmlXPathInit (void); XMLPUBFUN int XMLCALL xmlXPathIsNaN (double val); XMLPUBFUN int XMLCALL xmlXPathIsInf (double val); #ifdef __cplusplus } #endif #endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/ #endif /* ! __XML_XPATH_H__ */ PK! x9 libxml/xmlversion.hnu[/* * Summary: compile-time version information * Description: compile-time version information for the XML library * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_VERSION_H__ #define __XML_VERSION_H__ #include #ifdef __cplusplus extern "C" { #endif /* * use those to be sure nothing nasty will happen if * your library and includes mismatch */ #ifndef LIBXML2_COMPILING_MSCCDEF XMLPUBFUN void XMLCALL xmlCheckVersion(int version); #endif /* LIBXML2_COMPILING_MSCCDEF */ /** * LIBXML_DOTTED_VERSION: * * the version string like "1.2.3" */ #define LIBXML_DOTTED_VERSION "2.10.2" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 10203 */ #define LIBXML_VERSION 21002 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "10203" */ #define LIBXML_VERSION_STRING "21002" /** * LIBXML_VERSION_EXTRA: * * extra version information, used to show a git commit description */ #define LIBXML_VERSION_EXTRA "" /** * LIBXML_TEST_VERSION: * * Macro to check that the libxml version in use is compatible with * the version the software has been compiled against */ #define LIBXML_TEST_VERSION xmlCheckVersion(21002); #ifndef VMS #if 0 /** * WITH_TRIO: * * defined if the trio support need to be configured in */ #define WITH_TRIO #else /** * WITHOUT_TRIO: * * defined if the trio support should not be configured in */ #define WITHOUT_TRIO #endif #else /* VMS */ /** * WITH_TRIO: * * defined if the trio support need to be configured in */ #define WITH_TRIO 1 #endif /* VMS */ /** * LIBXML_THREAD_ENABLED: * * Whether the thread support is configured in */ #if 1 #define LIBXML_THREAD_ENABLED #endif /** * LIBXML_THREAD_ALLOC_ENABLED: * * Whether the allocation hooks are per-thread */ #if 0 #define LIBXML_THREAD_ALLOC_ENABLED #endif /** * LIBXML_TREE_ENABLED: * * Whether the DOM like tree manipulation API support is configured in */ #if 1 #define LIBXML_TREE_ENABLED #endif /** * LIBXML_OUTPUT_ENABLED: * * Whether the serialization/saving support is configured in */ #if 1 #define LIBXML_OUTPUT_ENABLED #endif /** * LIBXML_PUSH_ENABLED: * * Whether the push parsing interfaces are configured in */ #if 1 #define LIBXML_PUSH_ENABLED #endif /** * LIBXML_READER_ENABLED: * * Whether the xmlReader parsing interface is configured in */ #if 1 #define LIBXML_READER_ENABLED #endif /** * LIBXML_PATTERN_ENABLED: * * Whether the xmlPattern node selection interface is configured in */ #if 1 #define LIBXML_PATTERN_ENABLED #endif /** * LIBXML_WRITER_ENABLED: * * Whether the xmlWriter saving interface is configured in */ #if 1 #define LIBXML_WRITER_ENABLED #endif /** * LIBXML_SAX1_ENABLED: * * Whether the older SAX1 interface is configured in */ #if 1 #define LIBXML_SAX1_ENABLED #endif /** * LIBXML_FTP_ENABLED: * * Whether the FTP support is configured in */ #if 1 #define LIBXML_FTP_ENABLED #endif /** * LIBXML_HTTP_ENABLED: * * Whether the HTTP support is configured in */ #if 1 #define LIBXML_HTTP_ENABLED #endif /** * LIBXML_VALID_ENABLED: * * Whether the DTD validation support is configured in */ #if 1 #define LIBXML_VALID_ENABLED #endif /** * LIBXML_HTML_ENABLED: * * Whether the HTML support is configured in */ #if 1 #define LIBXML_HTML_ENABLED #endif /** * LIBXML_LEGACY_ENABLED: * * Whether the deprecated APIs are compiled in for compatibility */ #if 0 #define LIBXML_LEGACY_ENABLED #endif /** * LIBXML_C14N_ENABLED: * * Whether the Canonicalization support is configured in */ #if 1 #define LIBXML_C14N_ENABLED #endif /** * LIBXML_CATALOG_ENABLED: * * Whether the Catalog support is configured in */ #if 1 #define LIBXML_CATALOG_ENABLED #endif /** * LIBXML_XPATH_ENABLED: * * Whether XPath is configured in */ #if 1 #define LIBXML_XPATH_ENABLED #endif /** * LIBXML_XPTR_ENABLED: * * Whether XPointer is configured in */ #if 1 #define LIBXML_XPTR_ENABLED #endif /** * LIBXML_XPTR_LOCS_ENABLED: * * Whether support for XPointer locations is configured in */ #if 0 #define LIBXML_XPTR_LOCS_ENABLED #endif /** * LIBXML_XINCLUDE_ENABLED: * * Whether XInclude is configured in */ #if 1 #define LIBXML_XINCLUDE_ENABLED #endif /** * LIBXML_ICONV_ENABLED: * * Whether iconv support is available */ #if 1 #define LIBXML_ICONV_ENABLED #endif /** * LIBXML_ICU_ENABLED: * * Whether icu support is available */ #if 0 #define LIBXML_ICU_ENABLED #endif /** * LIBXML_ISO8859X_ENABLED: * * Whether ISO-8859-* support is made available in case iconv is not */ #if 1 #define LIBXML_ISO8859X_ENABLED #endif /** * LIBXML_DEBUG_ENABLED: * * Whether Debugging module is configured in */ #if 1 #define LIBXML_DEBUG_ENABLED #endif /** * DEBUG_MEMORY_LOCATION: * * Whether the memory debugging is configured in */ #if 0 #define DEBUG_MEMORY_LOCATION #endif /** * LIBXML_DEBUG_RUNTIME: * * Whether the runtime debugging is configured in */ #if 0 #define LIBXML_DEBUG_RUNTIME #endif /** * LIBXML_UNICODE_ENABLED: * * Whether the Unicode related interfaces are compiled in */ #if 1 #define LIBXML_UNICODE_ENABLED #endif /** * LIBXML_REGEXP_ENABLED: * * Whether the regular expressions interfaces are compiled in */ #if 1 #define LIBXML_REGEXP_ENABLED #endif /** * LIBXML_AUTOMATA_ENABLED: * * Whether the automata interfaces are compiled in */ #if 1 #define LIBXML_AUTOMATA_ENABLED #endif /** * LIBXML_EXPR_ENABLED: * * Whether the formal expressions interfaces are compiled in * * This code is unused and disabled unconditionally for now. */ #if 0 #define LIBXML_EXPR_ENABLED #endif /** * LIBXML_SCHEMAS_ENABLED: * * Whether the Schemas validation interfaces are compiled in */ #if 1 #define LIBXML_SCHEMAS_ENABLED #endif /** * LIBXML_SCHEMATRON_ENABLED: * * Whether the Schematron validation interfaces are compiled in */ #if 1 #define LIBXML_SCHEMATRON_ENABLED #endif /** * LIBXML_MODULES_ENABLED: * * Whether the module interfaces are compiled in */ #if 1 #define LIBXML_MODULES_ENABLED /** * LIBXML_MODULE_EXTENSION: * * the string suffix used by dynamic modules (usually shared libraries) */ #define LIBXML_MODULE_EXTENSION ".so" #endif /** * LIBXML_ZLIB_ENABLED: * * Whether the Zlib support is compiled in */ #if 1 #define LIBXML_ZLIB_ENABLED #endif /** * LIBXML_LZMA_ENABLED: * * Whether the Lzma support is compiled in */ #if 1 #define LIBXML_LZMA_ENABLED #endif #ifdef __GNUC__ /** * ATTRIBUTE_UNUSED: * * Macro used to signal to GCC unused function parameters */ #ifndef ATTRIBUTE_UNUSED # if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7))) # define ATTRIBUTE_UNUSED __attribute__((unused)) # else # define ATTRIBUTE_UNUSED # endif #endif /** * LIBXML_ATTR_ALLOC_SIZE: * * Macro used to indicate to GCC this is an allocator function */ #ifndef LIBXML_ATTR_ALLOC_SIZE # if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))) # define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) # else # define LIBXML_ATTR_ALLOC_SIZE(x) # endif #else # define LIBXML_ATTR_ALLOC_SIZE(x) #endif /** * LIBXML_ATTR_FORMAT: * * Macro used to indicate to GCC the parameter are printf like */ #ifndef LIBXML_ATTR_FORMAT # if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) # define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) # else # define LIBXML_ATTR_FORMAT(fmt,args) # endif #else # define LIBXML_ATTR_FORMAT(fmt,args) #endif #ifndef XML_DEPRECATED # ifdef IN_LIBXML # define XML_DEPRECATED # else /* Available since at least GCC 3.1 */ # define XML_DEPRECATED __attribute__((deprecated)) # endif #endif #else /* ! __GNUC__ */ /** * ATTRIBUTE_UNUSED: * * Macro used to signal to GCC unused function parameters */ #define ATTRIBUTE_UNUSED /** * LIBXML_ATTR_ALLOC_SIZE: * * Macro used to indicate to GCC this is an allocator function */ #define LIBXML_ATTR_ALLOC_SIZE(x) /** * LIBXML_ATTR_FORMAT: * * Macro used to indicate to GCC the parameter are printf like */ #define LIBXML_ATTR_FORMAT(fmt,args) /** * XML_DEPRECATED: * * Macro used to indicate that a function, variable, type or struct member * is deprecated. */ #ifndef XML_DEPRECATED #define XML_DEPRECATED #endif #endif /* __GNUC__ */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif PK!m**libxml/xmlerror.hnu[/* * Summary: error handling * Description: the API used to report errors * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #include #ifndef __XML_ERROR_H__ #define __XML_ERROR_H__ #ifdef __cplusplus extern "C" { #endif /** * xmlErrorLevel: * * Indicates the level of an error */ typedef enum { XML_ERR_NONE = 0, XML_ERR_WARNING = 1, /* A simple warning */ XML_ERR_ERROR = 2, /* A recoverable error */ XML_ERR_FATAL = 3 /* A fatal error */ } xmlErrorLevel; /** * xmlErrorDomain: * * Indicates where an error may have come from */ typedef enum { XML_FROM_NONE = 0, XML_FROM_PARSER, /* The XML parser */ XML_FROM_TREE, /* The tree module */ XML_FROM_NAMESPACE, /* The XML Namespace module */ XML_FROM_DTD, /* The XML DTD validation with parser context*/ XML_FROM_HTML, /* The HTML parser */ XML_FROM_MEMORY, /* The memory allocator */ XML_FROM_OUTPUT, /* The serialization code */ XML_FROM_IO, /* The Input/Output stack */ XML_FROM_FTP, /* The FTP module */ XML_FROM_HTTP, /* The HTTP module */ XML_FROM_XINCLUDE, /* The XInclude processing */ XML_FROM_XPATH, /* The XPath module */ XML_FROM_XPOINTER, /* The XPointer module */ XML_FROM_REGEXP, /* The regular expressions module */ XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */ XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */ XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */ XML_FROM_RELAXNGP, /* The Relax-NG parser module */ XML_FROM_RELAXNGV, /* The Relax-NG validator module */ XML_FROM_CATALOG, /* The Catalog module */ XML_FROM_C14N, /* The Canonicalization module */ XML_FROM_XSLT, /* The XSLT engine from libxslt */ XML_FROM_VALID, /* The XML DTD validation with valid context */ XML_FROM_CHECK, /* The error checking module */ XML_FROM_WRITER, /* The xmlwriter module */ XML_FROM_MODULE, /* The dynamically loaded module module*/ XML_FROM_I18N, /* The module handling character conversion */ XML_FROM_SCHEMATRONV,/* The Schematron validator module */ XML_FROM_BUFFER, /* The buffers module */ XML_FROM_URI /* The URI module */ } xmlErrorDomain; /** * xmlError: * * An XML Error instance. */ typedef struct _xmlError xmlError; typedef xmlError *xmlErrorPtr; struct _xmlError { int domain; /* What part of the library raised this error */ int code; /* The error code, e.g. an xmlParserError */ char *message;/* human-readable informative error message */ xmlErrorLevel level;/* how consequent is the error */ char *file; /* the filename */ int line; /* the line number if available */ char *str1; /* extra string information */ char *str2; /* extra string information */ char *str3; /* extra string information */ int int1; /* extra number information */ int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */ void *ctxt; /* the parser context if available */ void *node; /* the node in the tree */ }; /** * xmlParserError: * * This is an error that the XML (or HTML) parser can generate */ typedef enum { XML_ERR_OK = 0, XML_ERR_INTERNAL_ERROR, /* 1 */ XML_ERR_NO_MEMORY, /* 2 */ XML_ERR_DOCUMENT_START, /* 3 */ XML_ERR_DOCUMENT_EMPTY, /* 4 */ XML_ERR_DOCUMENT_END, /* 5 */ XML_ERR_INVALID_HEX_CHARREF, /* 6 */ XML_ERR_INVALID_DEC_CHARREF, /* 7 */ XML_ERR_INVALID_CHARREF, /* 8 */ XML_ERR_INVALID_CHAR, /* 9 */ XML_ERR_CHARREF_AT_EOF, /* 10 */ XML_ERR_CHARREF_IN_PROLOG, /* 11 */ XML_ERR_CHARREF_IN_EPILOG, /* 12 */ XML_ERR_CHARREF_IN_DTD, /* 13 */ XML_ERR_ENTITYREF_AT_EOF, /* 14 */ XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */ XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */ XML_ERR_ENTITYREF_IN_DTD, /* 17 */ XML_ERR_PEREF_AT_EOF, /* 18 */ XML_ERR_PEREF_IN_PROLOG, /* 19 */ XML_ERR_PEREF_IN_EPILOG, /* 20 */ XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */ XML_ERR_ENTITYREF_NO_NAME, /* 22 */ XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */ XML_ERR_PEREF_NO_NAME, /* 24 */ XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */ XML_ERR_UNDECLARED_ENTITY, /* 26 */ XML_WAR_UNDECLARED_ENTITY, /* 27 */ XML_ERR_UNPARSED_ENTITY, /* 28 */ XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */ XML_ERR_ENTITY_IS_PARAMETER, /* 30 */ XML_ERR_UNKNOWN_ENCODING, /* 31 */ XML_ERR_UNSUPPORTED_ENCODING, /* 32 */ XML_ERR_STRING_NOT_STARTED, /* 33 */ XML_ERR_STRING_NOT_CLOSED, /* 34 */ XML_ERR_NS_DECL_ERROR, /* 35 */ XML_ERR_ENTITY_NOT_STARTED, /* 36 */ XML_ERR_ENTITY_NOT_FINISHED, /* 37 */ XML_ERR_LT_IN_ATTRIBUTE, /* 38 */ XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */ XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */ XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */ XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */ XML_ERR_LITERAL_NOT_STARTED, /* 43 */ XML_ERR_LITERAL_NOT_FINISHED, /* 44 */ XML_ERR_COMMENT_NOT_FINISHED, /* 45 */ XML_ERR_PI_NOT_STARTED, /* 46 */ XML_ERR_PI_NOT_FINISHED, /* 47 */ XML_ERR_NOTATION_NOT_STARTED, /* 48 */ XML_ERR_NOTATION_NOT_FINISHED, /* 49 */ XML_ERR_ATTLIST_NOT_STARTED, /* 50 */ XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */ XML_ERR_MIXED_NOT_STARTED, /* 52 */ XML_ERR_MIXED_NOT_FINISHED, /* 53 */ XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */ XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */ XML_ERR_XMLDECL_NOT_STARTED, /* 56 */ XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */ XML_ERR_CONDSEC_NOT_STARTED, /* 58 */ XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */ XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */ XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */ XML_ERR_MISPLACED_CDATA_END, /* 62 */ XML_ERR_CDATA_NOT_FINISHED, /* 63 */ XML_ERR_RESERVED_XML_NAME, /* 64 */ XML_ERR_SPACE_REQUIRED, /* 65 */ XML_ERR_SEPARATOR_REQUIRED, /* 66 */ XML_ERR_NMTOKEN_REQUIRED, /* 67 */ XML_ERR_NAME_REQUIRED, /* 68 */ XML_ERR_PCDATA_REQUIRED, /* 69 */ XML_ERR_URI_REQUIRED, /* 70 */ XML_ERR_PUBID_REQUIRED, /* 71 */ XML_ERR_LT_REQUIRED, /* 72 */ XML_ERR_GT_REQUIRED, /* 73 */ XML_ERR_LTSLASH_REQUIRED, /* 74 */ XML_ERR_EQUAL_REQUIRED, /* 75 */ XML_ERR_TAG_NAME_MISMATCH, /* 76 */ XML_ERR_TAG_NOT_FINISHED, /* 77 */ XML_ERR_STANDALONE_VALUE, /* 78 */ XML_ERR_ENCODING_NAME, /* 79 */ XML_ERR_HYPHEN_IN_COMMENT, /* 80 */ XML_ERR_INVALID_ENCODING, /* 81 */ XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */ XML_ERR_CONDSEC_INVALID, /* 83 */ XML_ERR_VALUE_REQUIRED, /* 84 */ XML_ERR_NOT_WELL_BALANCED, /* 85 */ XML_ERR_EXTRA_CONTENT, /* 86 */ XML_ERR_ENTITY_CHAR_ERROR, /* 87 */ XML_ERR_ENTITY_PE_INTERNAL, /* 88 */ XML_ERR_ENTITY_LOOP, /* 89 */ XML_ERR_ENTITY_BOUNDARY, /* 90 */ XML_ERR_INVALID_URI, /* 91 */ XML_ERR_URI_FRAGMENT, /* 92 */ XML_WAR_CATALOG_PI, /* 93 */ XML_ERR_NO_DTD, /* 94 */ XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */ XML_ERR_VERSION_MISSING, /* 96 */ XML_WAR_UNKNOWN_VERSION, /* 97 */ XML_WAR_LANG_VALUE, /* 98 */ XML_WAR_NS_URI, /* 99 */ XML_WAR_NS_URI_RELATIVE, /* 100 */ XML_ERR_MISSING_ENCODING, /* 101 */ XML_WAR_SPACE_VALUE, /* 102 */ XML_ERR_NOT_STANDALONE, /* 103 */ XML_ERR_ENTITY_PROCESSING, /* 104 */ XML_ERR_NOTATION_PROCESSING, /* 105 */ XML_WAR_NS_COLUMN, /* 106 */ XML_WAR_ENTITY_REDEFINED, /* 107 */ XML_ERR_UNKNOWN_VERSION, /* 108 */ XML_ERR_VERSION_MISMATCH, /* 109 */ XML_ERR_NAME_TOO_LONG, /* 110 */ XML_ERR_USER_STOP, /* 111 */ XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */ XML_NS_ERR_XML_NAMESPACE = 200, XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */ XML_NS_ERR_QNAME, /* 202 */ XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */ XML_NS_ERR_EMPTY, /* 204 */ XML_NS_ERR_COLON, /* 205 */ XML_DTD_ATTRIBUTE_DEFAULT = 500, XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */ XML_DTD_ATTRIBUTE_VALUE, /* 502 */ XML_DTD_CONTENT_ERROR, /* 503 */ XML_DTD_CONTENT_MODEL, /* 504 */ XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */ XML_DTD_DIFFERENT_PREFIX, /* 506 */ XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */ XML_DTD_ELEM_NAMESPACE, /* 508 */ XML_DTD_ELEM_REDEFINED, /* 509 */ XML_DTD_EMPTY_NOTATION, /* 510 */ XML_DTD_ENTITY_TYPE, /* 511 */ XML_DTD_ID_FIXED, /* 512 */ XML_DTD_ID_REDEFINED, /* 513 */ XML_DTD_ID_SUBSET, /* 514 */ XML_DTD_INVALID_CHILD, /* 515 */ XML_DTD_INVALID_DEFAULT, /* 516 */ XML_DTD_LOAD_ERROR, /* 517 */ XML_DTD_MISSING_ATTRIBUTE, /* 518 */ XML_DTD_MIXED_CORRUPT, /* 519 */ XML_DTD_MULTIPLE_ID, /* 520 */ XML_DTD_NO_DOC, /* 521 */ XML_DTD_NO_DTD, /* 522 */ XML_DTD_NO_ELEM_NAME, /* 523 */ XML_DTD_NO_PREFIX, /* 524 */ XML_DTD_NO_ROOT, /* 525 */ XML_DTD_NOTATION_REDEFINED, /* 526 */ XML_DTD_NOTATION_VALUE, /* 527 */ XML_DTD_NOT_EMPTY, /* 528 */ XML_DTD_NOT_PCDATA, /* 529 */ XML_DTD_NOT_STANDALONE, /* 530 */ XML_DTD_ROOT_NAME, /* 531 */ XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */ XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */ XML_DTD_UNKNOWN_ELEM, /* 534 */ XML_DTD_UNKNOWN_ENTITY, /* 535 */ XML_DTD_UNKNOWN_ID, /* 536 */ XML_DTD_UNKNOWN_NOTATION, /* 537 */ XML_DTD_STANDALONE_DEFAULTED, /* 538 */ XML_DTD_XMLID_VALUE, /* 539 */ XML_DTD_XMLID_TYPE, /* 540 */ XML_DTD_DUP_TOKEN, /* 541 */ XML_HTML_STRUCURE_ERROR = 800, XML_HTML_UNKNOWN_TAG, /* 801 */ XML_HTML_INCORRECTLY_OPENED_COMMENT, /* 802 */ XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000, XML_RNGP_ATTR_CONFLICT, /* 1001 */ XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */ XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */ XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */ XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */ XML_RNGP_CHOICE_CONTENT, /* 1006 */ XML_RNGP_CHOICE_EMPTY, /* 1007 */ XML_RNGP_CREATE_FAILURE, /* 1008 */ XML_RNGP_DATA_CONTENT, /* 1009 */ XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */ XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */ XML_RNGP_DEFINE_EMPTY, /* 1012 */ XML_RNGP_DEFINE_MISSING, /* 1013 */ XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */ XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */ XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */ XML_RNGP_ELEMENT_EMPTY, /* 1017 */ XML_RNGP_ELEMENT_CONTENT, /* 1018 */ XML_RNGP_ELEMENT_NAME, /* 1019 */ XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */ XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */ XML_RNGP_EMPTY, /* 1022 */ XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */ XML_RNGP_EMPTY_CONTENT, /* 1024 */ XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */ XML_RNGP_ERROR_TYPE_LIB, /* 1026 */ XML_RNGP_EXCEPT_EMPTY, /* 1027 */ XML_RNGP_EXCEPT_MISSING, /* 1028 */ XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */ XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */ XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */ XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */ XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */ XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */ XML_RNGP_FOREIGN_ELEMENT, /* 1035 */ XML_RNGP_GRAMMAR_CONTENT, /* 1036 */ XML_RNGP_GRAMMAR_EMPTY, /* 1037 */ XML_RNGP_GRAMMAR_MISSING, /* 1038 */ XML_RNGP_GRAMMAR_NO_START, /* 1039 */ XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */ XML_RNGP_HREF_ERROR, /* 1041 */ XML_RNGP_INCLUDE_EMPTY, /* 1042 */ XML_RNGP_INCLUDE_FAILURE, /* 1043 */ XML_RNGP_INCLUDE_RECURSE, /* 1044 */ XML_RNGP_INTERLEAVE_ADD, /* 1045 */ XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */ XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */ XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */ XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */ XML_RNGP_INVALID_URI, /* 1050 */ XML_RNGP_INVALID_VALUE, /* 1051 */ XML_RNGP_MISSING_HREF, /* 1052 */ XML_RNGP_NAME_MISSING, /* 1053 */ XML_RNGP_NEED_COMBINE, /* 1054 */ XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */ XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */ XML_RNGP_NSNAME_NO_NS, /* 1057 */ XML_RNGP_PARAM_FORBIDDEN, /* 1058 */ XML_RNGP_PARAM_NAME_MISSING, /* 1059 */ XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */ XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */ XML_RNGP_PARENTREF_NO_NAME, /* 1062 */ XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */ XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */ XML_RNGP_PARSE_ERROR, /* 1065 */ XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */ XML_RNGP_PAT_ATTR_ATTR, /* 1067 */ XML_RNGP_PAT_ATTR_ELEM, /* 1068 */ XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */ XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */ XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */ XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */ XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */ XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */ XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */ XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */ XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */ XML_RNGP_PAT_LIST_ATTR, /* 1078 */ XML_RNGP_PAT_LIST_ELEM, /* 1079 */ XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */ XML_RNGP_PAT_LIST_LIST, /* 1081 */ XML_RNGP_PAT_LIST_REF, /* 1082 */ XML_RNGP_PAT_LIST_TEXT, /* 1083 */ XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */ XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */ XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */ XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */ XML_RNGP_PAT_START_ATTR, /* 1088 */ XML_RNGP_PAT_START_DATA, /* 1089 */ XML_RNGP_PAT_START_EMPTY, /* 1090 */ XML_RNGP_PAT_START_GROUP, /* 1091 */ XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */ XML_RNGP_PAT_START_LIST, /* 1093 */ XML_RNGP_PAT_START_ONEMORE, /* 1094 */ XML_RNGP_PAT_START_TEXT, /* 1095 */ XML_RNGP_PAT_START_VALUE, /* 1096 */ XML_RNGP_PREFIX_UNDEFINED, /* 1097 */ XML_RNGP_REF_CREATE_FAILED, /* 1098 */ XML_RNGP_REF_CYCLE, /* 1099 */ XML_RNGP_REF_NAME_INVALID, /* 1100 */ XML_RNGP_REF_NO_DEF, /* 1101 */ XML_RNGP_REF_NO_NAME, /* 1102 */ XML_RNGP_REF_NOT_EMPTY, /* 1103 */ XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */ XML_RNGP_START_CONTENT, /* 1105 */ XML_RNGP_START_EMPTY, /* 1106 */ XML_RNGP_START_MISSING, /* 1107 */ XML_RNGP_TEXT_EXPECTED, /* 1108 */ XML_RNGP_TEXT_HAS_CHILD, /* 1109 */ XML_RNGP_TYPE_MISSING, /* 1110 */ XML_RNGP_TYPE_NOT_FOUND, /* 1111 */ XML_RNGP_TYPE_VALUE, /* 1112 */ XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */ XML_RNGP_UNKNOWN_COMBINE, /* 1114 */ XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */ XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */ XML_RNGP_URI_FRAGMENT, /* 1117 */ XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */ XML_RNGP_VALUE_EMPTY, /* 1119 */ XML_RNGP_VALUE_NO_CONTENT, /* 1120 */ XML_RNGP_XMLNS_NAME, /* 1121 */ XML_RNGP_XML_NS, /* 1122 */ XML_XPATH_EXPRESSION_OK = 1200, XML_XPATH_NUMBER_ERROR, /* 1201 */ XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */ XML_XPATH_START_LITERAL_ERROR, /* 1203 */ XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */ XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */ XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */ XML_XPATH_EXPR_ERROR, /* 1207 */ XML_XPATH_UNCLOSED_ERROR, /* 1208 */ XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */ XML_XPATH_INVALID_OPERAND, /* 1210 */ XML_XPATH_INVALID_TYPE, /* 1211 */ XML_XPATH_INVALID_ARITY, /* 1212 */ XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */ XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */ XML_XPATH_MEMORY_ERROR, /* 1215 */ XML_XPTR_SYNTAX_ERROR, /* 1216 */ XML_XPTR_RESOURCE_ERROR, /* 1217 */ XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */ XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */ XML_XPATH_ENCODING_ERROR, /* 1220 */ XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */ XML_TREE_INVALID_HEX = 1300, XML_TREE_INVALID_DEC, /* 1301 */ XML_TREE_UNTERMINATED_ENTITY, /* 1302 */ XML_TREE_NOT_UTF8, /* 1303 */ XML_SAVE_NOT_UTF8 = 1400, XML_SAVE_CHAR_INVALID, /* 1401 */ XML_SAVE_NO_DOCTYPE, /* 1402 */ XML_SAVE_UNKNOWN_ENCODING, /* 1403 */ XML_REGEXP_COMPILE_ERROR = 1450, XML_IO_UNKNOWN = 1500, XML_IO_EACCES, /* 1501 */ XML_IO_EAGAIN, /* 1502 */ XML_IO_EBADF, /* 1503 */ XML_IO_EBADMSG, /* 1504 */ XML_IO_EBUSY, /* 1505 */ XML_IO_ECANCELED, /* 1506 */ XML_IO_ECHILD, /* 1507 */ XML_IO_EDEADLK, /* 1508 */ XML_IO_EDOM, /* 1509 */ XML_IO_EEXIST, /* 1510 */ XML_IO_EFAULT, /* 1511 */ XML_IO_EFBIG, /* 1512 */ XML_IO_EINPROGRESS, /* 1513 */ XML_IO_EINTR, /* 1514 */ XML_IO_EINVAL, /* 1515 */ XML_IO_EIO, /* 1516 */ XML_IO_EISDIR, /* 1517 */ XML_IO_EMFILE, /* 1518 */ XML_IO_EMLINK, /* 1519 */ XML_IO_EMSGSIZE, /* 1520 */ XML_IO_ENAMETOOLONG, /* 1521 */ XML_IO_ENFILE, /* 1522 */ XML_IO_ENODEV, /* 1523 */ XML_IO_ENOENT, /* 1524 */ XML_IO_ENOEXEC, /* 1525 */ XML_IO_ENOLCK, /* 1526 */ XML_IO_ENOMEM, /* 1527 */ XML_IO_ENOSPC, /* 1528 */ XML_IO_ENOSYS, /* 1529 */ XML_IO_ENOTDIR, /* 1530 */ XML_IO_ENOTEMPTY, /* 1531 */ XML_IO_ENOTSUP, /* 1532 */ XML_IO_ENOTTY, /* 1533 */ XML_IO_ENXIO, /* 1534 */ XML_IO_EPERM, /* 1535 */ XML_IO_EPIPE, /* 1536 */ XML_IO_ERANGE, /* 1537 */ XML_IO_EROFS, /* 1538 */ XML_IO_ESPIPE, /* 1539 */ XML_IO_ESRCH, /* 1540 */ XML_IO_ETIMEDOUT, /* 1541 */ XML_IO_EXDEV, /* 1542 */ XML_IO_NETWORK_ATTEMPT, /* 1543 */ XML_IO_ENCODER, /* 1544 */ XML_IO_FLUSH, /* 1545 */ XML_IO_WRITE, /* 1546 */ XML_IO_NO_INPUT, /* 1547 */ XML_IO_BUFFER_FULL, /* 1548 */ XML_IO_LOAD_ERROR, /* 1549 */ XML_IO_ENOTSOCK, /* 1550 */ XML_IO_EISCONN, /* 1551 */ XML_IO_ECONNREFUSED, /* 1552 */ XML_IO_ENETUNREACH, /* 1553 */ XML_IO_EADDRINUSE, /* 1554 */ XML_IO_EALREADY, /* 1555 */ XML_IO_EAFNOSUPPORT, /* 1556 */ XML_XINCLUDE_RECURSION=1600, XML_XINCLUDE_PARSE_VALUE, /* 1601 */ XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */ XML_XINCLUDE_NO_HREF, /* 1603 */ XML_XINCLUDE_NO_FALLBACK, /* 1604 */ XML_XINCLUDE_HREF_URI, /* 1605 */ XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */ XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */ XML_XINCLUDE_INVALID_CHAR, /* 1608 */ XML_XINCLUDE_BUILD_FAILED, /* 1609 */ XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */ XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */ XML_XINCLUDE_XPTR_FAILED, /* 1612 */ XML_XINCLUDE_XPTR_RESULT, /* 1613 */ XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */ XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */ XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */ XML_XINCLUDE_DEPRECATED_NS, /* 1617 */ XML_XINCLUDE_FRAGMENT_ID, /* 1618 */ XML_CATALOG_MISSING_ATTR = 1650, XML_CATALOG_ENTRY_BROKEN, /* 1651 */ XML_CATALOG_PREFER_VALUE, /* 1652 */ XML_CATALOG_NOT_CATALOG, /* 1653 */ XML_CATALOG_RECURSION, /* 1654 */ XML_SCHEMAP_PREFIX_UNDEFINED = 1700, XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */ XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */ XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */ XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */ XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */ XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */ XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */ XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */ XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */ XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */ XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */ XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */ XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */ XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */ XML_SCHEMAP_INVALID_ENUM, /* 1715 */ XML_SCHEMAP_INVALID_FACET, /* 1716 */ XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */ XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */ XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */ XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */ XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */ XML_SCHEMAP_NOATTR_NOREF, /* 1722 */ XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */ XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */ XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */ XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */ XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */ XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */ XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */ XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */ XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */ XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */ XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */ XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */ XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */ XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */ XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */ XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */ XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */ XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */ XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */ XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */ XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */ XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */ XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */ XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */ XML_SCHEMAP_UNKNOWN_REF, /* 1747 */ XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */ XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */ XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */ XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */ XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */ XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */ XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */ XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */ XML_SCHEMAP_REGEXP_INVALID, /* 1756 */ XML_SCHEMAP_FAILED_LOAD, /* 1757 */ XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */ XML_SCHEMAP_NOROOT, /* 1759 */ XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */ XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */ XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */ XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */ XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */ XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */ XML_SCHEMAP_FAILED_PARSE, /* 1766 */ XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */ XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */ XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */ XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */ XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */ XML_SCHEMAP_NOT_SCHEMA, /* 1772 */ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */ XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */ XML_SCHEMAP_RECURSIVE, /* 1775 */ XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */ XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */ XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */ XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */ XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */ XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */ XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */ XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */ XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */ XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */ XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */ XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */ XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */ XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */ XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */ XML_SCHEMAV_NOROOT = 1801, XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */ XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */ XML_SCHEMAV_MISSING, /* 1804 */ XML_SCHEMAV_WRONGELEM, /* 1805 */ XML_SCHEMAV_NOTYPE, /* 1806 */ XML_SCHEMAV_NOROLLBACK, /* 1807 */ XML_SCHEMAV_ISABSTRACT, /* 1808 */ XML_SCHEMAV_NOTEMPTY, /* 1809 */ XML_SCHEMAV_ELEMCONT, /* 1810 */ XML_SCHEMAV_HAVEDEFAULT, /* 1811 */ XML_SCHEMAV_NOTNILLABLE, /* 1812 */ XML_SCHEMAV_EXTRACONTENT, /* 1813 */ XML_SCHEMAV_INVALIDATTR, /* 1814 */ XML_SCHEMAV_INVALIDELEM, /* 1815 */ XML_SCHEMAV_NOTDETERMINIST, /* 1816 */ XML_SCHEMAV_CONSTRUCT, /* 1817 */ XML_SCHEMAV_INTERNAL, /* 1818 */ XML_SCHEMAV_NOTSIMPLE, /* 1819 */ XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */ XML_SCHEMAV_ATTRINVALID, /* 1821 */ XML_SCHEMAV_VALUE, /* 1822 */ XML_SCHEMAV_FACET, /* 1823 */ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */ XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */ XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */ XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */ XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */ XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */ XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */ XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */ XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */ XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */ XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */ XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */ XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */ XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */ XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */ XML_SCHEMAV_CVC_ELT_1, /* 1845 */ XML_SCHEMAV_CVC_ELT_2, /* 1846 */ XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */ XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */ XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */ XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */ XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */ XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */ XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */ XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */ XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */ XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */ XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */ XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */ XML_SCHEMAV_CVC_ELT_6, /* 1859 */ XML_SCHEMAV_CVC_ELT_7, /* 1860 */ XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */ XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */ XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */ XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */ XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */ XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */ XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */ XML_SCHEMAV_CVC_AU, /* 1874 */ XML_SCHEMAV_CVC_TYPE_1, /* 1875 */ XML_SCHEMAV_CVC_TYPE_2, /* 1876 */ XML_SCHEMAV_CVC_IDC, /* 1877 */ XML_SCHEMAV_CVC_WILDCARD, /* 1878 */ XML_SCHEMAV_MISC, /* 1879 */ XML_XPTR_UNKNOWN_SCHEME = 1900, XML_XPTR_CHILDSEQ_START, /* 1901 */ XML_XPTR_EVAL_FAILED, /* 1902 */ XML_XPTR_EXTRA_OBJECTS, /* 1903 */ XML_C14N_CREATE_CTXT = 1950, XML_C14N_REQUIRES_UTF8, /* 1951 */ XML_C14N_CREATE_STACK, /* 1952 */ XML_C14N_INVALID_NODE, /* 1953 */ XML_C14N_UNKNOW_NODE, /* 1954 */ XML_C14N_RELATIVE_NAMESPACE, /* 1955 */ XML_FTP_PASV_ANSWER = 2000, XML_FTP_EPSV_ANSWER, /* 2001 */ XML_FTP_ACCNT, /* 2002 */ XML_FTP_URL_SYNTAX, /* 2003 */ XML_HTTP_URL_SYNTAX = 2020, XML_HTTP_USE_IP, /* 2021 */ XML_HTTP_UNKNOWN_HOST, /* 2022 */ XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000, XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */ XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */ XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */ XML_SCHEMAP_SRC_RESOLVE, /* 3004 */ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */ XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */ XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */ XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */ XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */ XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */ XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */ XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */ XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */ XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */ XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */ XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */ XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */ XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */ XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */ XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */ XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */ XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */ XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */ XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */ XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */ XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */ XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */ XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */ XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */ XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */ XML_SCHEMAP_SRC_INCLUDE, /* 3050 */ XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */ XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */ XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */ XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */ XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */ XML_SCHEMAP_NO_XMLNS, /* 3056 */ XML_SCHEMAP_NO_XSI, /* 3057 */ XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */ XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */ XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */ XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */ XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */ XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */ XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */ XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */ XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */ XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */ XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */ XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */ XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */ XML_SCHEMAP_SRC_CT_1, /* 3076 */ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */ XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */ XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */ XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */ XML_SCHEMAP_SRC_REDEFINE, /* 3081 */ XML_SCHEMAP_SRC_IMPORT, /* 3082 */ XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */ XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */ XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */ XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */ XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */ XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */ XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */ XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */ XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */ XML_SCHEMATRONV_REPORT, XML_MODULE_OPEN = 4900, /* 4900 */ XML_MODULE_CLOSE, /* 4901 */ XML_CHECK_FOUND_ELEMENT = 5000, XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */ XML_CHECK_FOUND_TEXT, /* 5002 */ XML_CHECK_FOUND_CDATA, /* 5003 */ XML_CHECK_FOUND_ENTITYREF, /* 5004 */ XML_CHECK_FOUND_ENTITY, /* 5005 */ XML_CHECK_FOUND_PI, /* 5006 */ XML_CHECK_FOUND_COMMENT, /* 5007 */ XML_CHECK_FOUND_DOCTYPE, /* 5008 */ XML_CHECK_FOUND_FRAGMENT, /* 5009 */ XML_CHECK_FOUND_NOTATION, /* 5010 */ XML_CHECK_UNKNOWN_NODE, /* 5011 */ XML_CHECK_ENTITY_TYPE, /* 5012 */ XML_CHECK_NO_PARENT, /* 5013 */ XML_CHECK_NO_DOC, /* 5014 */ XML_CHECK_NO_NAME, /* 5015 */ XML_CHECK_NO_ELEM, /* 5016 */ XML_CHECK_WRONG_DOC, /* 5017 */ XML_CHECK_NO_PREV, /* 5018 */ XML_CHECK_WRONG_PREV, /* 5019 */ XML_CHECK_NO_NEXT, /* 5020 */ XML_CHECK_WRONG_NEXT, /* 5021 */ XML_CHECK_NOT_DTD, /* 5022 */ XML_CHECK_NOT_ATTR, /* 5023 */ XML_CHECK_NOT_ATTR_DECL, /* 5024 */ XML_CHECK_NOT_ELEM_DECL, /* 5025 */ XML_CHECK_NOT_ENTITY_DECL, /* 5026 */ XML_CHECK_NOT_NS_DECL, /* 5027 */ XML_CHECK_NO_HREF, /* 5028 */ XML_CHECK_WRONG_PARENT,/* 5029 */ XML_CHECK_NS_SCOPE, /* 5030 */ XML_CHECK_NS_ANCESTOR, /* 5031 */ XML_CHECK_NOT_UTF8, /* 5032 */ XML_CHECK_NO_DICT, /* 5033 */ XML_CHECK_NOT_NCNAME, /* 5034 */ XML_CHECK_OUTSIDE_DICT, /* 5035 */ XML_CHECK_WRONG_NAME, /* 5036 */ XML_CHECK_NAME_NOT_NULL, /* 5037 */ XML_I18N_NO_NAME = 6000, XML_I18N_NO_HANDLER, /* 6001 */ XML_I18N_EXCESS_HANDLER, /* 6002 */ XML_I18N_CONV_FAILED, /* 6003 */ XML_I18N_NO_OUTPUT, /* 6004 */ XML_BUF_OVERFLOW = 7000 } xmlParserErrors; /** * xmlGenericErrorFunc: * @ctx: a parsing context * @msg: the message * @...: the extra arguments of the varargs to format the message * * Signature of the function to use when there is an error and * no parsing or validity context available . */ typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * xmlStructuredErrorFunc: * @userData: user provided data for the error callback * @error: the error being raised. * * Signature of the function to use when there is an error and * the module handles the new error reporting mechanism. */ typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error); /* * Use the following function to reset the two global variables * xmlGenericError and xmlGenericErrorContext. */ XMLPUBFUN void XMLCALL xmlSetGenericErrorFunc (void *ctx, xmlGenericErrorFunc handler); XMLPUBFUN void XMLCALL initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler); XMLPUBFUN void XMLCALL xmlSetStructuredErrorFunc (void *ctx, xmlStructuredErrorFunc handler); /* * Default message routines used by SAX and Valid context for error * and warning reporting. */ XMLPUBFUN void XMLCDECL xmlParserError (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN void XMLCDECL xmlParserWarning (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN void XMLCDECL xmlParserValidityError (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN void XMLCDECL xmlParserValidityWarning (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN void XMLCALL xmlParserPrintFileInfo (xmlParserInputPtr input); XMLPUBFUN void XMLCALL xmlParserPrintFileContext (xmlParserInputPtr input); /* * Extended error information routines */ XMLPUBFUN xmlErrorPtr XMLCALL xmlGetLastError (void); XMLPUBFUN void XMLCALL xmlResetLastError (void); XMLPUBFUN xmlErrorPtr XMLCALL xmlCtxtGetLastError (void *ctx); XMLPUBFUN void XMLCALL xmlCtxtResetLastError (void *ctx); XMLPUBFUN void XMLCALL xmlResetError (xmlErrorPtr err); XMLPUBFUN int XMLCALL xmlCopyError (xmlErrorPtr from, xmlErrorPtr to); #ifdef IN_LIBXML /* * Internal callback reporting routine */ XMLPUBFUN void XMLCALL __xmlRaiseError (xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel, void *data, void *ctx, void *node, int domain, int code, xmlErrorLevel level, const char *file, int line, const char *str1, const char *str2, const char *str3, int int1, int col, const char *msg, ...) LIBXML_ATTR_FORMAT(16,17); XMLPUBFUN void XMLCALL __xmlSimpleError (int domain, int code, xmlNodePtr node, const char *msg, const char *extra) LIBXML_ATTR_FORMAT(4,0); #endif #ifdef __cplusplus } #endif #endif /* __XML_ERROR_H__ */ PK!#-- - libxml/c14n.hnu[/* * Summary: Provide Canonical XML and Exclusive XML Canonicalization * Description: the c14n modules provides a * * "Canonical XML" implementation * http://www.w3.org/TR/xml-c14n * * and an * * "Exclusive XML Canonicalization" implementation * http://www.w3.org/TR/xml-exc-c14n * Copy: See Copyright for the status of this software. * * Author: Aleksey Sanin */ #ifndef __XML_C14N_H__ #define __XML_C14N_H__ #include #ifdef LIBXML_C14N_ENABLED #ifdef LIBXML_OUTPUT_ENABLED #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* * XML Canonicalization * http://www.w3.org/TR/xml-c14n * * Exclusive XML Canonicalization * http://www.w3.org/TR/xml-exc-c14n * * Canonical form of an XML document could be created if and only if * a) default attributes (if any) are added to all nodes * b) all character and parsed entity references are resolved * In order to achieve this in libxml2 the document MUST be loaded with * following global settings: * * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; * xmlSubstituteEntitiesDefault(1); * * or corresponding parser context setting: * xmlParserCtxtPtr ctxt; * * ... * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS; * ctxt->replaceEntities = 1; * ... */ /* * xmlC14NMode: * * Predefined values for C14N modes * */ typedef enum { XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */ XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */ XML_C14N_1_1 = 2 /* C14N 1.1 spec */ } xmlC14NMode; XMLPUBFUN int XMLCALL xmlC14NDocSaveTo (xmlDocPtr doc, xmlNodeSetPtr nodes, int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf); XMLPUBFUN int XMLCALL xmlC14NDocDumpMemory (xmlDocPtr doc, xmlNodeSetPtr nodes, int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlChar **doc_txt_ptr); XMLPUBFUN int XMLCALL xmlC14NDocSave (xmlDocPtr doc, xmlNodeSetPtr nodes, int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, const char* filename, int compression); /** * This is the core C14N function */ /** * xmlC14NIsVisibleCallback: * @user_data: user data * @node: the current node * @parent: the parent node * * Signature for a C14N callback on visible nodes * * Returns 1 if the node should be included */ typedef int (*xmlC14NIsVisibleCallback) (void* user_data, xmlNodePtr node, xmlNodePtr parent); XMLPUBFUN int XMLCALL xmlC14NExecute (xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, void* user_data, int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_C14N_ENABLED */ #endif /* __XML_C14N_H__ */ PK!ks>~~libxml2-SAX.htmlnu[ SAX: Old SAX version 1 handler, deprecated

SAX

SAX - Old SAX version 1 handler, deprecated

DEPRECATED set of SAX version 1 interfaces used to build the DOM tree.

WARNING: this module is deprecated !

Author(s): Daniel Veillard

Synopsis

void	attribute			(void * ctx, 
const xmlChar * fullname,
const xmlChar * value); void attributeDecl (void * ctx,
const xmlChar * elem,
const xmlChar * fullname,
int type,
int def,
const xmlChar * defaultValue,
xmlEnumerationPtr tree); void cdataBlock (void * ctx,
const xmlChar * value,
int len); void characters (void * ctx,
const xmlChar * ch,
int len); int checkNamespace (void * ctx,
xmlChar * namespace); void comment (void * ctx,
const xmlChar * value); void elementDecl (void * ctx,
const xmlChar * name,
int type,
xmlElementContentPtr content); void endDocument (void * ctx); void endElement (void * ctx,
const xmlChar * name); void entityDecl (void * ctx,
const xmlChar * name,
int type,
const xmlChar * publicId,
const xmlChar * systemId,
xmlChar * content); void externalSubset (void * ctx,
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID); int getColumnNumber (void * ctx); xmlEntityPtr getEntity (void * ctx,
const xmlChar * name); int getLineNumber (void * ctx); xmlNsPtr getNamespace (void * ctx); xmlEntityPtr getParameterEntity (void * ctx,
const xmlChar * name); const xmlChar * getPublicId (void * ctx); const xmlChar * getSystemId (void * ctx); void globalNamespace (void * ctx,
const xmlChar * href,
const xmlChar * prefix); int hasExternalSubset (void * ctx); int hasInternalSubset (void * ctx); void ignorableWhitespace (void * ctx,
const xmlChar * ch,
int len); void inithtmlDefaultSAXHandler (xmlSAXHandlerV1 * hdlr); void initxmlDefaultSAXHandler (xmlSAXHandlerV1 * hdlr,
int warning); void internalSubset (void * ctx,
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID); int isStandalone (void * ctx); void namespaceDecl (void * ctx,
const xmlChar * href,
const xmlChar * prefix); void notationDecl (void * ctx,
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId); void processingInstruction (void * ctx,
const xmlChar * target,
const xmlChar * data); void reference (void * ctx,
const xmlChar * name); xmlParserInputPtr resolveEntity (void * ctx,
const xmlChar * publicId,
const xmlChar * systemId); void setDocumentLocator (void * ctx,
xmlSAXLocatorPtr loc); void setNamespace (void * ctx,
const xmlChar * name); void startDocument (void * ctx); void startElement (void * ctx,
const xmlChar * fullname,
const xmlChar ** atts); void unparsedEntityDecl (void * ctx,
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId,
const xmlChar * notationName);

Description

Details

attribute ()

void	attribute			(void * ctx, 
const xmlChar * fullname,
const xmlChar * value)

Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element. DEPRECATED: use xmlSAX2Attribute()

ctx: the user data (XML parser context)
fullname: The attribute name, including namespace prefix
value: The attribute value

attributeDecl ()

void	attributeDecl			(void * ctx, 
const xmlChar * elem,
const xmlChar * fullname,
int type,
int def,
const xmlChar * defaultValue,
xmlEnumerationPtr tree)

An attribute definition has been parsed DEPRECATED: use xmlSAX2AttributeDecl()

ctx: the user data (XML parser context)
elem: the name of the element
fullname: the attribute name
type: the attribute type
def: the type of default value
defaultValue: the attribute default value
tree: the tree of enumerated value set

cdataBlock ()

void	cdataBlock			(void * ctx, 
const xmlChar * value,
int len)

called when a pcdata block has been parsed DEPRECATED: use xmlSAX2CDataBlock()

ctx: the user data (XML parser context)
value: The pcdata content
len: the block length

characters ()

void	characters			(void * ctx, 
const xmlChar * ch,
int len)

receiving some chars from the parser. DEPRECATED: use xmlSAX2Characters()

ctx: the user data (XML parser context)
ch: a xmlChar string
len: the number of xmlChar

checkNamespace ()

int	checkNamespace			(void * ctx, 
xmlChar * namespace)

Check that the current element namespace is the same as the one read upon parsing. DEPRECATED

ctx: the user data (XML parser context)
namespace: the namespace to check against
Returns: 1 if true 0 otherwise

comment ()

void	comment			(void * ctx, 
const xmlChar * value)

A comment has been parsed. DEPRECATED: use xmlSAX2Comment()

ctx: the user data (XML parser context)
value: the comment content

elementDecl ()

void	elementDecl			(void * ctx, 
const xmlChar * name,
int type,
xmlElementContentPtr content)

An element definition has been parsed DEPRECATED: use xmlSAX2ElementDecl()

ctx: the user data (XML parser context)
name: the element name
type: the element type
content: the element value tree

endDocument ()

void	endDocument			(void * ctx)

called when the document end has been detected. DEPRECATED: use xmlSAX2EndDocument()

ctx: the user data (XML parser context)

endElement ()

void	endElement			(void * ctx, 
const xmlChar * name)

called when the end of an element has been detected. DEPRECATED: use xmlSAX2EndElement()

ctx: the user data (XML parser context)
name: The element name

entityDecl ()

void	entityDecl			(void * ctx, 
const xmlChar * name,
int type,
const xmlChar * publicId,
const xmlChar * systemId,
xmlChar * content)

An entity definition has been parsed DEPRECATED: use xmlSAX2EntityDecl()

ctx: the user data (XML parser context)
name: the entity name
type: the entity type
publicId: The public ID of the entity
systemId: The system ID of the entity
content: the entity value (without processing).

externalSubset ()

void	externalSubset			(void * ctx, 
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID)

Callback on external subset declaration. DEPRECATED: use xmlSAX2ExternalSubset()

ctx: the user data (XML parser context)
name: the root element name
ExternalID: the external ID
SystemID: the SYSTEM ID (e.g. filename or URL)

getColumnNumber ()

int	getColumnNumber			(void * ctx)

Provide the column number of the current parsing point. DEPRECATED: use xmlSAX2GetColumnNumber()

ctx: the user data (XML parser context)
Returns: an int

getEntity ()

xmlEntityPtr	getEntity		(void * ctx, 
const xmlChar * name)

Get an entity by name DEPRECATED: use xmlSAX2GetEntity()

ctx: the user data (XML parser context)
name: The entity name
Returns: the xmlEntityPtr if found.

getLineNumber ()

int	getLineNumber			(void * ctx)

Provide the line number of the current parsing point. DEPRECATED: use xmlSAX2GetLineNumber()

ctx: the user data (XML parser context)
Returns: an int

getNamespace ()

xmlNsPtr	getNamespace		(void * ctx)

Get the current element namespace. DEPRECATED

ctx: the user data (XML parser context)
Returns: the xmlNsPtr or NULL if none

getParameterEntity ()

xmlEntityPtr	getParameterEntity	(void * ctx, 
const xmlChar * name)

Get a parameter entity by name DEPRECATED: use xmlSAX2GetParameterEntity()

ctx: the user data (XML parser context)
name: The entity name
Returns: the xmlEntityPtr if found.

getPublicId ()

const xmlChar *	getPublicId		(void * ctx)

Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" DEPRECATED: use xmlSAX2GetPublicId()

ctx: the user data (XML parser context)
Returns: a xmlChar *

getSystemId ()

const xmlChar *	getSystemId		(void * ctx)

Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd DEPRECATED: use xmlSAX2GetSystemId()

ctx: the user data (XML parser context)
Returns: a xmlChar *

globalNamespace ()

void	globalNamespace			(void * ctx, 
const xmlChar * href,
const xmlChar * prefix)

An old global namespace has been parsed. DEPRECATED

ctx: the user data (XML parser context)
href: the namespace associated URN
prefix: the namespace prefix

hasExternalSubset ()

int	hasExternalSubset		(void * ctx)

Does this document has an external subset DEPRECATED: use xmlSAX2HasExternalSubset()

ctx: the user data (XML parser context)
Returns: 1 if true

hasInternalSubset ()

int	hasInternalSubset		(void * ctx)

Does this document has an internal subset DEPRECATED: use xmlSAX2HasInternalSubset()

ctx: the user data (XML parser context)
Returns: 1 if true

ignorableWhitespace ()

void	ignorableWhitespace		(void * ctx, 
const xmlChar * ch,
int len)

receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters DEPRECATED: use xmlSAX2IgnorableWhitespace()

ctx: the user data (XML parser context)
ch: a xmlChar string
len: the number of xmlChar

inithtmlDefaultSAXHandler ()

void	inithtmlDefaultSAXHandler	(xmlSAXHandlerV1 * hdlr)

Initialize the default HTML SAX version 1 handler DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks

hdlr: the SAX handler

initxmlDefaultSAXHandler ()

void	initxmlDefaultSAXHandler	(xmlSAXHandlerV1 * hdlr, 
int warning)

Initialize the default XML SAX version 1 handler DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks

hdlr: the SAX handler
warning: flag if non-zero sets the handler warning procedure

internalSubset ()

void	internalSubset			(void * ctx, 
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID)

Callback on internal subset declaration. DEPRECATED: use xmlSAX2InternalSubset()

ctx: the user data (XML parser context)
name: the root element name
ExternalID: the external ID
SystemID: the SYSTEM ID (e.g. filename or URL)

isStandalone ()

int	isStandalone			(void * ctx)

Is this document tagged standalone ? DEPRECATED: use xmlSAX2IsStandalone()

ctx: the user data (XML parser context)
Returns: 1 if true

namespaceDecl ()

void	namespaceDecl			(void * ctx, 
const xmlChar * href,
const xmlChar * prefix)

A namespace has been parsed. DEPRECATED

ctx: the user data (XML parser context)
href: the namespace associated URN
prefix: the namespace prefix

notationDecl ()

void	notationDecl			(void * ctx, 
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId)

What to do when a notation declaration has been parsed. DEPRECATED: use xmlSAX2NotationDecl()

ctx: the user data (XML parser context)
name: The name of the notation
publicId: The public ID of the entity
systemId: The system ID of the entity

processingInstruction ()

void	processingInstruction		(void * ctx, 
const xmlChar * target,
const xmlChar * data)

A processing instruction has been parsed. DEPRECATED: use xmlSAX2ProcessingInstruction()

ctx: the user data (XML parser context)
target: the target name
data: the PI data's

reference ()

void	reference			(void * ctx, 
const xmlChar * name)

called when an entity reference is detected. DEPRECATED: use xmlSAX2Reference()

ctx: the user data (XML parser context)
name: The entity name

resolveEntity ()

xmlParserInputPtr	resolveEntity	(void * ctx, 
const xmlChar * publicId,
const xmlChar * systemId)

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()

ctx: the user data (XML parser context)
publicId: The public ID of the entity
systemId: The system ID of the entity
Returns: the xmlParserInputPtr if inlined or NULL for DOM behaviour.

setDocumentLocator ()

void	setDocumentLocator		(void * ctx, 
xmlSAXLocatorPtr loc)

Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case. DEPRECATED

ctx: the user data (XML parser context)
loc: A SAX Locator

setNamespace ()

void	setNamespace			(void * ctx, 
const xmlChar * name)

Set the current element namespace. DEPRECATED

ctx: the user data (XML parser context)
name: the namespace prefix

startDocument ()

void	startDocument			(void * ctx)

called when the document start being processed. DEPRECATED: use xmlSAX2StartDocument()

ctx: the user data (XML parser context)

startElement ()

void	startElement			(void * ctx, 
const xmlChar * fullname,
const xmlChar ** atts)

called when an opening tag has been processed. DEPRECATED: use xmlSAX2StartElement()

ctx: the user data (XML parser context)
fullname: The element name, including namespace prefix
atts: An array of name/value attributes pairs, NULL terminated

unparsedEntityDecl ()

void	unparsedEntityDecl		(void * ctx, 
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId,
const xmlChar * notationName)

What to do when an unparsed entity declaration is parsed DEPRECATED: use xmlSAX2UnparsedEntityDecl()

ctx: the user data (XML parser context)
name: The name of the entity
publicId: The public ID of the entity
systemId: The system ID of the entity
notationName: the name of the notation

PK!G]]libxml2-HTMLtree.htmlnu[ HTMLtree: specific APIs to process HTML tree, especially serialization

HTMLtree

HTMLtree - specific APIs to process HTML tree, especially serialization

this module implements a few function needed to process tree in an HTML specific way.

Author(s): Daniel Veillard

Synopsis

#define HTML_COMMENT_NODE;
#define HTML_ENTITY_REF_NODE;
#define HTML_PI_NODE;
#define HTML_PRESERVE_NODE;
#define HTML_TEXT_NODE;
void	htmlDocContentDumpFormatOutput	(xmlOutputBufferPtr buf, 
xmlDocPtr cur,
const char * encoding,
int format); void htmlDocContentDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char * encoding); int htmlDocDump (FILE * f,
xmlDocPtr cur); void htmlDocDumpMemory (xmlDocPtr cur,
xmlChar ** mem,
int * size); void htmlDocDumpMemoryFormat (xmlDocPtr cur,
xmlChar ** mem,
int * size,
int format); const xmlChar * htmlGetMetaEncoding (htmlDocPtr doc); int htmlIsBooleanAttr (const xmlChar * name); htmlDocPtr htmlNewDoc (const xmlChar * URI,
const xmlChar * ExternalID); htmlDocPtr htmlNewDocNoDtD (const xmlChar * URI,
const xmlChar * ExternalID); int htmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur); void htmlNodeDumpFile (FILE * out,
xmlDocPtr doc,
xmlNodePtr cur); int htmlNodeDumpFileFormat (FILE * out,
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding,
int format); void htmlNodeDumpFormatOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding,
int format); void htmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding); int htmlSaveFile (const char * filename,
xmlDocPtr cur); int htmlSaveFileEnc (const char * filename,
xmlDocPtr cur,
const char * encoding); int htmlSaveFileFormat (const char * filename,
xmlDocPtr cur,
const char * encoding,
int format); int htmlSetMetaEncoding (htmlDocPtr doc,
const xmlChar * encoding);

Description

Details

Macro HTML_COMMENT_NODE

#define HTML_COMMENT_NODE;

Macro. A comment in a HTML document is really implemented the same way as a comment in an XML document.


Macro HTML_ENTITY_REF_NODE

#define HTML_ENTITY_REF_NODE;

Macro. An entity reference in a HTML document is really implemented the same way as an entity reference in an XML document.


Macro HTML_PI_NODE

#define HTML_PI_NODE;

Macro. A processing instruction in a HTML document is really implemented the same way as a processing instruction in an XML document.


Macro HTML_PRESERVE_NODE

#define HTML_PRESERVE_NODE;

Macro. A preserved node in a HTML document is really implemented the same way as a CDATA section in an XML document.


Macro HTML_TEXT_NODE

#define HTML_TEXT_NODE;

Macro. A text node in a HTML document is really implemented the same way as a text node in an XML document.


htmlDocContentDumpFormatOutput ()

void	htmlDocContentDumpFormatOutput	(xmlOutputBufferPtr buf, 
xmlDocPtr cur,
const char * encoding,
int format)

Dump an HTML document.

buf: the HTML buffer output
cur: the document
encoding: the encoding string (unused)
format: should formatting spaces been added

htmlDocContentDumpOutput ()

void	htmlDocContentDumpOutput	(xmlOutputBufferPtr buf, 
xmlDocPtr cur,
const char * encoding)

Dump an HTML document. Formatting return/spaces are added.

buf: the HTML buffer output
cur: the document
encoding: the encoding string (unused)

htmlDocDump ()

int	htmlDocDump			(FILE * f, 
xmlDocPtr cur)

Dump an HTML document to an open FILE.

f: the FILE*
cur: the document
Returns: the number of byte written or -1 in case of failure.

htmlDocDumpMemory ()

void	htmlDocDumpMemory		(xmlDocPtr cur, 
xmlChar ** mem,
int * size)

Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

cur: the document
mem: OUT: the memory pointer
size: OUT: the memory length

htmlDocDumpMemoryFormat ()

void	htmlDocDumpMemoryFormat		(xmlDocPtr cur, 
xmlChar ** mem,
int * size,
int format)

Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

cur: the document
mem: OUT: the memory pointer
size: OUT: the memory length
format: should formatting spaces been added

htmlGetMetaEncoding ()

const xmlChar *	htmlGetMetaEncoding	(htmlDocPtr doc)

Encoding definition lookup in the Meta tags

doc: the document
Returns: the current encoding as flagged in the HTML source

htmlIsBooleanAttr ()

int	htmlIsBooleanAttr		(const xmlChar * name)

Determine if a given attribute is a boolean attribute.

name: the name of the attribute to check
Returns: false if the attribute is not boolean, true otherwise.

htmlNewDoc ()

htmlDocPtr	htmlNewDoc		(const xmlChar * URI, 
const xmlChar * ExternalID)

Creates a new HTML document

URI: URI for the dtd, or NULL
ExternalID: the external ID of the DTD, or NULL
Returns: a new document

htmlNewDocNoDtD ()

htmlDocPtr	htmlNewDocNoDtD		(const xmlChar * URI, 
const xmlChar * ExternalID)

Creates a new HTML document without a DTD node if @URI and @ExternalID are NULL

URI: URI for the dtd, or NULL
ExternalID: the external ID of the DTD, or NULL
Returns: a new document, do not initialize the DTD if not provided

htmlNodeDump ()

int	htmlNodeDump			(xmlBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur)

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.

buf: the HTML buffer output
doc: the document
cur: the current node
Returns: the number of byte written or -1 in case of error

htmlNodeDumpFile ()

void	htmlNodeDumpFile		(FILE * out, 
xmlDocPtr doc,
xmlNodePtr cur)

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.

out: the FILE pointer
doc: the document
cur: the current node

htmlNodeDumpFileFormat ()

int	htmlNodeDumpFileFormat		(FILE * out, 
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding,
int format)

Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding

out: the FILE pointer
doc: the document
cur: the current node
encoding: the document encoding
format: should formatting spaces been added
Returns: the number of byte written or -1 in case of failure.

htmlNodeDumpFormatOutput ()

void	htmlNodeDumpFormatOutput	(xmlOutputBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding,
int format)

Dump an HTML node, recursive behaviour,children are printed too.

buf: the HTML buffer output
doc: the document
cur: the current node
encoding: the encoding string (unused)
format: should formatting spaces been added

htmlNodeDumpOutput ()

void	htmlNodeDumpOutput		(xmlOutputBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
const char * encoding)

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added.

buf: the HTML buffer output
doc: the document
cur: the current node
encoding: the encoding string (unused)

htmlSaveFile ()

int	htmlSaveFile			(const char * filename, 
xmlDocPtr cur)

Dump an HTML document to a file. If @filename is "-" the stdout file is used.

filename: the filename (or URL)
cur: the document
Returns: the number of byte written or -1 in case of failure.

htmlSaveFileEnc ()

int	htmlSaveFileEnc			(const char * filename, 
xmlDocPtr cur,
const char * encoding)

Dump an HTML document to a file using a given encoding and formatting returns/spaces are added.

filename: the filename
cur: the document
encoding: the document encoding
Returns: the number of byte written or -1 in case of failure.

htmlSaveFileFormat ()

int	htmlSaveFileFormat		(const char * filename, 
xmlDocPtr cur,
const char * encoding,
int format)

Dump an HTML document to a file using a given encoding.

filename: the filename
cur: the document
encoding: the document encoding
format: should formatting spaces been added
Returns: the number of byte written or -1 in case of failure.

htmlSetMetaEncoding ()

int	htmlSetMetaEncoding		(htmlDocPtr doc, 
const xmlChar * encoding)

Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.

doc: the document
encoding: the encoding string
Returns: 0 in case of success and -1 in case of error

PK! (libxml2-xmlautomata.htmlnu[ xmlautomata: API to build regexp automata

xmlautomata

xmlautomata - API to build regexp automata

the API to build regexp automata

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlAutomata xmlAutomata;
typedef xmlAutomata * xmlAutomataPtr;
typedef struct _xmlAutomataState xmlAutomataState;
typedef xmlAutomataState * xmlAutomataStatePtr;
xmlRegexpPtr	xmlAutomataCompile	(xmlAutomataPtr am);
xmlAutomataStatePtr	xmlAutomataGetInitState	(xmlAutomataPtr am);
int	xmlAutomataIsDeterminist	(xmlAutomataPtr am);
xmlAutomataStatePtr	xmlAutomataNewAllTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int lax); xmlAutomataStatePtr xmlAutomataNewCountTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
int min,
int max,
void * data); xmlAutomataStatePtr xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
int min,
int max,
void * data); xmlAutomataStatePtr xmlAutomataNewCountedTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter); int xmlAutomataNewCounter (xmlAutomataPtr am,
int min,
int max); xmlAutomataStatePtr xmlAutomataNewCounterTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter); xmlAutomataStatePtr xmlAutomataNewEpsilon (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to); xmlAutomataStatePtr xmlAutomataNewNegTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
void * data); xmlAutomataStatePtr xmlAutomataNewOnceTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
int min,
int max,
void * data); xmlAutomataStatePtr xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
int min,
int max,
void * data); xmlAutomataStatePtr xmlAutomataNewState (xmlAutomataPtr am); xmlAutomataStatePtr xmlAutomataNewTransition (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
void * data); xmlAutomataStatePtr xmlAutomataNewTransition2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
void * data); int xmlAutomataSetFinalState (xmlAutomataPtr am,
xmlAutomataStatePtr state); void xmlFreeAutomata (xmlAutomataPtr am); xmlAutomataPtr xmlNewAutomata (void);

Description

Details

Structure xmlAutomata

struct _xmlAutomata {
The content of this structure is not made public by the API.
} xmlAutomata;


Typedef xmlAutomataPtr

xmlAutomata * xmlAutomataPtr;

A libxml automata description, It can be compiled into a regexp


Structure xmlAutomataState

struct _xmlAutomataState {
The content of this structure is not made public by the API.
} xmlAutomataState;


Typedef xmlAutomataStatePtr

xmlAutomataState * xmlAutomataStatePtr;

A state int the automata description,


xmlAutomataCompile ()

xmlRegexpPtr	xmlAutomataCompile	(xmlAutomataPtr am)

Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.

am: an automata
Returns: the compiled regexp or NULL in case of error

xmlAutomataGetInitState ()

xmlAutomataStatePtr	xmlAutomataGetInitState	(xmlAutomataPtr am)

Initial state lookup

am: an automata
Returns: the initial state of the automata

xmlAutomataIsDeterminist ()

int	xmlAutomataIsDeterminist	(xmlAutomataPtr am)

Checks if an automata is determinist.

am: an automata
Returns: 1 if true, 0 if not, and -1 in case of error

xmlAutomataNewAllTrans ()

xmlAutomataStatePtr	xmlAutomataNewAllTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int lax)

If @to is NULL, this creates first a new target state in the automata and then adds a an ALL transition from the @from state to the target state. That transition is an epsilon transition allowed only when all transitions from the @from node have been activated.

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
lax: allow to transition if not all all transitions have been activated
Returns: the target state or NULL in case of error

xmlAutomataNewCountTrans ()

xmlAutomataStatePtr	xmlAutomataNewCountTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
int min,
int max,
void * data)

If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
token: the input string associated to that transition
min: the minimum successive occurrences of token
max: the maximum successive occurrences of token
data: data associated to the transition
Returns: the target state or NULL in case of error

xmlAutomataNewCountTrans2 ()

xmlAutomataStatePtr	xmlAutomataNewCountTrans2	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
int min,
int max,
void * data)

If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
token: the input string associated to that transition
token2: the second input string associated to that transition
min: the minimum successive occurrences of token
max: the maximum successive occurrences of token
data: data associated to the transition
Returns: the target state or NULL in case of error

xmlAutomataNewCountedTrans ()

xmlAutomataStatePtr	xmlAutomataNewCountedTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter)

If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will increment the counter provided

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
counter: the counter associated to that transition
Returns: the target state or NULL in case of error

xmlAutomataNewCounter ()

int	xmlAutomataNewCounter		(xmlAutomataPtr am, 
int min,
int max)

Create a new counter

am: an automata
min: the minimal value on the counter
max: the maximal value on the counter
Returns: the counter number or -1 in case of error

xmlAutomataNewCounterTrans ()

xmlAutomataStatePtr	xmlAutomataNewCounterTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter)

If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will be allowed only if the counter is within the right range.

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
counter: the counter associated to that transition
Returns: the target state or NULL in case of error

xmlAutomataNewEpsilon ()

xmlAutomataStatePtr	xmlAutomataNewEpsilon	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to)

If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
Returns: the target state or NULL in case of error

xmlAutomataNewNegTrans ()

xmlAutomataStatePtr	xmlAutomataNewNegTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
void * data)

If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by any value except (@token,@token2) Note that if @token2 is not NULL, then (X, NULL) won't match to follow # the semantic of XSD ##other

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
token: the first input string associated to that transition
token2: the second input string associated to that transition
data: data passed to the callback function if the transition is activated
Returns: the target state or NULL in case of error

xmlAutomataNewOnceTrans ()

xmlAutomataStatePtr	xmlAutomataNewOnceTrans	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
int min,
int max,
void * data)

If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max, moreover that transition can only be crossed once.

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
token: the input string associated to that transition
min: the minimum successive occurrences of token
max: the maximum successive occurrences of token
data: data associated to the transition
Returns: the target state or NULL in case of error

xmlAutomataNewOnceTrans2 ()

xmlAutomataStatePtr	xmlAutomataNewOnceTrans2	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
int min,
int max,
void * data)

If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max, moreover that transition can only be crossed once.

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
token: the input string associated to that transition
token2: the second input string associated to that transition
min: the minimum successive occurrences of token
max: the maximum successive occurrences of token
data: data associated to the transition
Returns: the target state or NULL in case of error

xmlAutomataNewState ()

xmlAutomataStatePtr	xmlAutomataNewState	(xmlAutomataPtr am)

Create a new disconnected state in the automata

am: an automata
Returns: the new state or NULL in case of error

xmlAutomataNewTransition ()

xmlAutomataStatePtr	xmlAutomataNewTransition	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
void * data)

If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
token: the input string associated to that transition
data: data passed to the callback function if the transition is activated
Returns: the target state or NULL in case of error

xmlAutomataNewTransition2 ()

xmlAutomataStatePtr	xmlAutomataNewTransition2	(xmlAutomataPtr am, 
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar * token,
const xmlChar * token2,
void * data)

If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token

am: an automata
from: the starting point of the transition
to: the target point of the transition or NULL
token: the first input string associated to that transition
token2: the second input string associated to that transition
data: data passed to the callback function if the transition is activated
Returns: the target state or NULL in case of error

xmlAutomataSetFinalState ()

int	xmlAutomataSetFinalState	(xmlAutomataPtr am, 
xmlAutomataStatePtr state)

Makes that state a final state

am: an automata
state: a state in this automata
Returns: 0 or -1 in case of error

xmlFreeAutomata ()

void	xmlFreeAutomata			(xmlAutomataPtr am)

Free an automata

am: an automata

xmlNewAutomata ()

xmlAutomataPtr	xmlNewAutomata		(void)

Create a new automata

Returns: the new object or NULL in case of failure

PK!w-libxml2-xmlmodule.htmlnu[ xmlmodule: dynamic module loading

xmlmodule

xmlmodule - dynamic module loading

basic API for dynamic module loading, used by libexslt added in 2.6.17

Author(s): Joel W. Reed

Synopsis

typedef struct _xmlModule xmlModule;
typedef enum xmlModuleOption;
typedef xmlModule * xmlModulePtr;
int	xmlModuleClose			(xmlModulePtr module);
int	xmlModuleFree			(xmlModulePtr module);
xmlModulePtr	xmlModuleOpen		(const char * name, 
int options); int xmlModuleSymbol (xmlModulePtr module,
const char * name,
void ** symbol);

Description

Details

Structure xmlModule

struct _xmlModule {
The content of this structure is not made public by the API.
} xmlModule;


Enum xmlModuleOption

enum xmlModuleOption {
    XML_MODULE_LAZY = 1 /* lazy binding */
    XML_MODULE_LOCAL = 2 /*  local binding */
};


Typedef xmlModulePtr

xmlModule * xmlModulePtr;

A handle to a dynamically loaded module


xmlModuleClose ()

int	xmlModuleClose			(xmlModulePtr module)

The close operations unload the associated module and free the data associated to the module.

module: the module handle
Returns: 0 in case of success, -1 in case of argument error and -2 if the module could not be closed/unloaded.

xmlModuleFree ()

int	xmlModuleFree			(xmlModulePtr module)

The free operations free the data associated to the module but does not unload the associated shared library which may still be in use.

module: the module handle
Returns: 0 in case of success, -1 in case of argument error

xmlModuleOpen ()

xmlModulePtr	xmlModuleOpen		(const char * name, 
int options)

Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We cannot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * . TODO: options are not yet implemented.

name: the module name
options: a set of xmlModuleOption
Returns: a handle for the module or NULL in case of error

xmlModuleSymbol ()

int	xmlModuleSymbol			(xmlModulePtr module, 
const char * name,
void ** symbol)

Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We cannot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * .

module: the module
name: the name of the symbol
symbol: the resulting symbol address
Returns: 0 if the symbol was found, or -1 in case of error

PK!+~qqlibxml2-encoding.htmlnu[ encoding: interface for the encoding conversion functions

encoding

encoding - interface for the encoding conversion functions

interface for the encoding conversion functions needed for XML basic encoding and iconv() support. Related specs are rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies [ISO-10646] UTF-8 and UTF-16 in Annexes [ISO-8859-1] ISO Latin-1 characters codes. [UNICODE] The Unicode Consortium, "The Unicode Standard -- Worldwide Character Encoding -- Version 1.0", Addison- Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is described in Unicode Technical Report #4. [US-ASCII] Coded Character Set--7-bit American Standard Code for Information Interchange, ANSI X3.4-1986.

Author(s): Daniel Veillard

Synopsis

typedef enum xmlCharEncoding;
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
typedef xmlCharEncodingHandler * xmlCharEncodingHandlerPtr;
int	UTF8Toisolat1			(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen); int isolat1ToUTF8 (unsigned char * out,
int * outlen,
const unsigned char * in,
int * inlen); int xmlAddEncodingAlias (const char * name,
const char * alias); int xmlCharEncCloseFunc (xmlCharEncodingHandler * handler); int xmlCharEncFirstLine (xmlCharEncodingHandler * handler,
xmlBufferPtr out,
xmlBufferPtr in); int xmlCharEncInFunc (xmlCharEncodingHandler * handler,
xmlBufferPtr out,
xmlBufferPtr in); int xmlCharEncOutFunc (xmlCharEncodingHandler * handler,
xmlBufferPtr out,
xmlBufferPtr in); typedef int xmlCharEncodingInputFunc (unsigned char * out,
int * outlen,
const unsigned char * in,
int * inlen); typedef int xmlCharEncodingOutputFunc (unsigned char * out,
int * outlen,
const unsigned char * in,
int * inlen); void xmlCleanupCharEncodingHandlers (void); void xmlCleanupEncodingAliases (void); int xmlDelEncodingAlias (const char * alias); xmlCharEncoding xmlDetectCharEncoding (const unsigned char * in,
int len); xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler (const char * name); xmlCharEncodingHandlerPtr xmlGetCharEncodingHandler (xmlCharEncoding enc); const char * xmlGetCharEncodingName (xmlCharEncoding enc); const char * xmlGetEncodingAlias (const char * alias); void xmlInitCharEncodingHandlers (void); xmlCharEncodingHandlerPtr xmlNewCharEncodingHandler (const char * name,
xmlCharEncodingInputFunc input,
xmlCharEncodingOutputFunc output); xmlCharEncoding xmlParseCharEncoding (const char * name); void xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);

Description

Details

Enum xmlCharEncoding

enum xmlCharEncoding {
    XML_CHAR_ENCODING_ERROR = -1 /* No char encoding detected */
    XML_CHAR_ENCODING_NONE = 0 /* No char encoding detected */
    XML_CHAR_ENCODING_UTF8 = 1 /* UTF-8 */
    XML_CHAR_ENCODING_UTF16LE = 2 /* UTF-16 little endian */
    XML_CHAR_ENCODING_UTF16BE = 3 /* UTF-16 big endian */
    XML_CHAR_ENCODING_UCS4LE = 4 /* UCS-4 little endian */
    XML_CHAR_ENCODING_UCS4BE = 5 /* UCS-4 big endian */
    XML_CHAR_ENCODING_EBCDIC = 6 /* EBCDIC uh! */
    XML_CHAR_ENCODING_UCS4_2143 = 7 /* UCS-4 unusual ordering */
    XML_CHAR_ENCODING_UCS4_3412 = 8 /* UCS-4 unusual ordering */
    XML_CHAR_ENCODING_UCS2 = 9 /* UCS-2 */
    XML_CHAR_ENCODING_8859_1 = 10 /* ISO-8859-1 ISO Latin 1 */
    XML_CHAR_ENCODING_8859_2 = 11 /* ISO-8859-2 ISO Latin 2 */
    XML_CHAR_ENCODING_8859_3 = 12 /* ISO-8859-3 */
    XML_CHAR_ENCODING_8859_4 = 13 /* ISO-8859-4 */
    XML_CHAR_ENCODING_8859_5 = 14 /* ISO-8859-5 */
    XML_CHAR_ENCODING_8859_6 = 15 /* ISO-8859-6 */
    XML_CHAR_ENCODING_8859_7 = 16 /* ISO-8859-7 */
    XML_CHAR_ENCODING_8859_8 = 17 /* ISO-8859-8 */
    XML_CHAR_ENCODING_8859_9 = 18 /* ISO-8859-9 */
    XML_CHAR_ENCODING_2022_JP = 19 /* ISO-2022-JP */
    XML_CHAR_ENCODING_SHIFT_JIS = 20 /* Shift_JIS */
    XML_CHAR_ENCODING_EUC_JP = 21 /* EUC-JP */
    XML_CHAR_ENCODING_ASCII = 22 /*  pure ASCII */
};


Structure xmlCharEncodingHandler

struct _xmlCharEncodingHandler {
    char *	name
    xmlCharEncodingInputFunc	input
    xmlCharEncodingOutputFunc	output
    iconv_t	iconv_in
    iconv_t	iconv_out
    struct _uconv_t *	uconv_in
    struct _uconv_t *	uconv_out
} xmlCharEncodingHandler;


Typedef xmlCharEncodingHandlerPtr

xmlCharEncodingHandler * xmlCharEncodingHandlerPtr;


Function type xmlCharEncodingInputFunc

int	xmlCharEncodingInputFunc	(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen)

Take a block of chars in the original encoding and try to convert it to an UTF-8 block of chars out.

out: a pointer to an array of bytes to store the UTF-8 result
outlen: the length of @out
in: a pointer to an array of chars in the original encoding
inlen: the length of @in
Returns: the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets consumed.

Function type xmlCharEncodingOutputFunc

int	xmlCharEncodingOutputFunc	(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen)

Take a block of UTF-8 chars in and try to convert it to another encoding. Note: a first call designed to produce heading info is called with in = NULL. If stateful this should also initialize the encoder state.

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
Returns: the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets produced.

UTF8Toisolat1 ()

int	UTF8Toisolat1			(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen)

Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1 block of chars out.

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
Returns: the number of bytes written if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets produced.

isolat1ToUTF8 ()

int	isolat1ToUTF8			(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen)

Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 block of chars out.

out: a pointer to an array of bytes to store the result
outlen: the length of @out
in: a pointer to an array of ISO Latin 1 chars
inlen: the length of @in
Returns: the number of bytes written if success, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets produced.

xmlAddEncodingAlias ()

int	xmlAddEncodingAlias		(const char * name, 
const char * alias)

Registers an alias @alias for an encoding named @name. Existing alias will be overwritten.

name: the encoding name as parsed, in UTF-8 format (ASCII actually)
alias: the alias name as parsed, in UTF-8 format (ASCII actually)
Returns: 0 in case of success, -1 in case of error

xmlCharEncCloseFunc ()

int	xmlCharEncCloseFunc		(xmlCharEncodingHandler * handler)

Generic front-end for encoding handler close function

handler: char encoding transformation data structure
Returns: 0 if success, or -1 in case of error

xmlCharEncFirstLine ()

int	xmlCharEncFirstLine		(xmlCharEncodingHandler * handler, 
xmlBufferPtr out,
xmlBufferPtr in)

Front-end for the encoding handler input function, but handle only the very first line, i.e. limit itself to 45 chars.

handler: char encoding transformation data structure
out: an xmlBuffer for the output.
in: an xmlBuffer for the input
Returns: the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or

xmlCharEncInFunc ()

int	xmlCharEncInFunc		(xmlCharEncodingHandler * handler, 
xmlBufferPtr out,
xmlBufferPtr in)

Generic front-end for the encoding handler input function

handler: char encoding transformation data structure
out: an xmlBuffer for the output.
in: an xmlBuffer for the input
Returns: the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or

xmlCharEncOutFunc ()

int	xmlCharEncOutFunc		(xmlCharEncodingHandler * handler, 
xmlBufferPtr out,
xmlBufferPtr in)

Generic front-end for the encoding handler output function a first call with @in == NULL has to be made firs to initiate the output in case of non-stateless encoding needing to initiate their state or the output (like the BOM in UTF16). In case of UTF8 sequence conversion errors for the given encoder, the content will be automatically remapped to a CharRef sequence.

handler: char encoding transformation data structure
out: an xmlBuffer for the output.
in: an xmlBuffer for the input
Returns: the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or

xmlCleanupCharEncodingHandlers ()

void	xmlCleanupCharEncodingHandlers	(void)

DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Cleanup the memory allocated for the char encoding support, it unregisters all the encoding handlers and the aliases.


xmlCleanupEncodingAliases ()

void	xmlCleanupEncodingAliases	(void)

Unregisters all aliases


xmlDelEncodingAlias ()

int	xmlDelEncodingAlias		(const char * alias)

Unregisters an encoding alias @alias

alias: the alias name as parsed, in UTF-8 format (ASCII actually)
Returns: 0 in case of success, -1 in case of error

xmlDetectCharEncoding ()

xmlCharEncoding	xmlDetectCharEncoding	(const unsigned char * in, 
int len)

Guess the encoding of the entity using the first bytes of the entity content according to the non-normative appendix F of the XML-1.0 recommendation.

in: a pointer to the first bytes of the XML entity, must be at least 2 bytes long (at least 4 if encoding is UTF4 variant).
len: pointer to the length of the buffer
Returns: one of the XML_CHAR_ENCODING_... values.

xmlFindCharEncodingHandler ()

xmlCharEncodingHandlerPtr	xmlFindCharEncodingHandler	(const char * name)

Search in the registered set the handler able to read/write that encoding.

name: a string describing the char encoding.
Returns: the handler or NULL if not found

xmlGetCharEncodingHandler ()

xmlCharEncodingHandlerPtr	xmlGetCharEncodingHandler	(xmlCharEncoding enc)

Search in the registered set the handler able to read/write that encoding.

enc: an xmlCharEncoding value.
Returns: the handler or NULL if not found

xmlGetCharEncodingName ()

const char *	xmlGetCharEncodingName	(xmlCharEncoding enc)

The "canonical" name for XML encoding. C.f. http://www.w3.org/TR/REC-xml#charencoding Section 4.3.3 Character Encoding in Entities

enc: the encoding
Returns: the canonical name for the given encoding

xmlGetEncodingAlias ()

const char *	xmlGetEncodingAlias	(const char * alias)

Lookup an encoding name for the given alias.

alias: the alias name as parsed, in UTF-8 format (ASCII actually)
Returns: NULL if not found, otherwise the original name

xmlInitCharEncodingHandlers ()

void	xmlInitCharEncodingHandlers	(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. Initialize the char encoding support, it registers the default encoding supported. NOTE: while public, this function usually doesn't need to be called in normal processing.


xmlNewCharEncodingHandler ()

xmlCharEncodingHandlerPtr	xmlNewCharEncodingHandler	(const char * name, 
xmlCharEncodingInputFunc input,
xmlCharEncodingOutputFunc output)

Create and registers an xmlCharEncodingHandler.

name: the encoding name, in UTF-8 format (ASCII actually)
input: the xmlCharEncodingInputFunc to read that encoding
output: the xmlCharEncodingOutputFunc to write that encoding
Returns: the xmlCharEncodingHandlerPtr created (or NULL in case of error).

xmlParseCharEncoding ()

xmlCharEncoding	xmlParseCharEncoding	(const char * name)

Compare the string to the encoding schemes already known. Note that the comparison is case insensitive accordingly to the section [XML] 4.3.3 Character Encoding in Entities.

name: the encoding name as parsed, in UTF-8 format (ASCII actually)
Returns: one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE if not recognized.

xmlRegisterCharEncodingHandler ()

void	xmlRegisterCharEncodingHandler	(xmlCharEncodingHandlerPtr handler)

Register the char encoding handler, surprising, isn't it ?

handler: the xmlCharEncodingHandlerPtr handler block

PK!,Ilibxml2-globals.htmlnu[ globals: interface for all global variables of the library

globals

globals - interface for all global variables of the library

all the global variables and thread handling for those variables is handled by this module. The bottom of this file is automatically generated by build_glob.py based on the description file global.data

Author(s): Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard

Synopsis

typedef struct _xmlGlobalState xmlGlobalState;
typedef xmlGlobalState * xmlGlobalStatePtr;
void	xmlCleanupGlobals		(void);
xmlDeregisterNodeFunc	xmlDeregisterNodeDefault	(xmlDeregisterNodeFunc func);
typedef void xmlDeregisterNodeFunc		(xmlNodePtr node);
void	xmlInitGlobals			(void);
void	xmlInitializeGlobalState	(xmlGlobalStatePtr gs);
xmlOutputBufferCreateFilenameFunc	xmlOutputBufferCreateFilenameDefault	(xmlOutputBufferCreateFilenameFunc func);
typedef xmlOutputBufferPtr xmlOutputBufferCreateFilenameFunc	(const char * URI, 
xmlCharEncodingHandlerPtr encoder,
int compression); xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); typedef xmlParserInputBufferPtr xmlParserInputBufferCreateFilenameFunc (const char * URI,
xmlCharEncoding enc); xmlRegisterNodeFunc xmlRegisterNodeDefault (xmlRegisterNodeFunc func); typedef void xmlRegisterNodeFunc (xmlNodePtr node); xmlBufferAllocationScheme xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v); int xmlThrDefDefaultBufferSize (int v); xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault (xmlDeregisterNodeFunc func); int xmlThrDefDoValidityCheckingDefaultValue (int v); int xmlThrDefGetWarningsDefaultValue (int v); int xmlThrDefIndentTreeOutput (int v); int xmlThrDefKeepBlanksDefaultValue (int v); int xmlThrDefLineNumbersDefaultValue (int v); int xmlThrDefLoadExtDtdDefaultValue (int v); xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); int xmlThrDefParserDebugEntities (int v); xmlParserInputBufferCreateFilenameFunc xmlThrDefParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); int xmlThrDefPedanticParserDefaultValue (int v); xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault (xmlRegisterNodeFunc func); int xmlThrDefSaveNoEmptyTags (int v); void xmlThrDefSetGenericErrorFunc (void * ctx,
xmlGenericErrorFunc handler); void xmlThrDefSetStructuredErrorFunc (void * ctx,
xmlStructuredErrorFunc handler); int xmlThrDefSubstituteEntitiesDefaultValue (int v); const char * xmlThrDefTreeIndentString (const char * v);

Description

Details

Structure xmlGlobalState

struct _xmlGlobalState {
    const char *	xmlParserVersion
    xmlSAXLocator	xmlDefaultSAXLocator
    xmlSAXHandlerV1	xmlDefaultSAXHandler
    xmlSAXHandlerV1	docbDefaultSAXHandler	: unused
    xmlSAXHandlerV1	htmlDefaultSAXHandler
    xmlFreeFunc	xmlFree
    xmlMallocFunc	xmlMalloc
    xmlStrdupFunc	xmlMemStrdup
    xmlReallocFunc	xmlRealloc
    xmlGenericErrorFunc	xmlGenericError
    xmlStructuredErrorFunc	xmlStructuredError
    void *	xmlGenericErrorContext
    int	oldXMLWDcompatibility
    xmlBufferAllocationScheme	xmlBufferAllocScheme
    int	xmlDefaultBufferSize
    int	xmlSubstituteEntitiesDefaultValue
    int	xmlDoValidityCheckingDefaultValue
    int	xmlGetWarningsDefaultValue
    int	xmlKeepBlanksDefaultValue
    int	xmlLineNumbersDefaultValue
    int	xmlLoadExtDtdDefaultValue
    int	xmlParserDebugEntities
    int	xmlPedanticParserDefaultValue
    int	xmlSaveNoEmptyTags
    int	xmlIndentTreeOutput
    const char *	xmlTreeIndentString
    xmlRegisterNodeFunc	xmlRegisterNodeDefaultValue
    xmlDeregisterNodeFunc	xmlDeregisterNodeDefaultValue
    xmlMallocFunc	xmlMallocAtomic
    xmlError	xmlLastError
    xmlParserInputBufferCreateFilenameFunc	xmlParserInputBufferCreateFilenameValue
    xmlOutputBufferCreateFilenameFunc	xmlOutputBufferCreateFilenameValue
    void *	xmlStructuredErrorContext
} xmlGlobalState;


Typedef xmlGlobalStatePtr

xmlGlobalState * xmlGlobalStatePtr;


Function type xmlDeregisterNodeFunc

void	xmlDeregisterNodeFunc		(xmlNodePtr node)

Signature for the deregistration callback of a discarded node

node: the current node

Function type xmlOutputBufferCreateFilenameFunc

xmlOutputBufferPtr	xmlOutputBufferCreateFilenameFunc	(const char * URI, 
xmlCharEncodingHandlerPtr encoder,
int compression)

Signature for the function doing the lookup for a suitable output method corresponding to an URI.

URI: the URI to write to
encoder:
compression:
Returns: the new xmlOutputBufferPtr in case of success or NULL if no method was found.

Function type xmlParserInputBufferCreateFilenameFunc

xmlParserInputBufferPtr	xmlParserInputBufferCreateFilenameFunc	(const char * URI, 
xmlCharEncoding enc)

Signature for the function doing the lookup for a suitable input method corresponding to an URI.

URI: the URI to read from
enc: the requested source encoding
Returns: the new xmlParserInputBufferPtr in case of success or NULL if no method was found.

Function type xmlRegisterNodeFunc

void	xmlRegisterNodeFunc		(xmlNodePtr node)

Signature for the registration callback of a created node

node: the current node

Variable htmlDefaultSAXHandler

xmlSAXHandlerV1 htmlDefaultSAXHandler;


Variable oldXMLWDcompatibility

int oldXMLWDcompatibility;


Variable xmlBufferAllocScheme

xmlBufferAllocationScheme xmlBufferAllocScheme;


Variable xmlDefaultBufferSize

int xmlDefaultBufferSize;


Variable xmlDefaultSAXHandler

xmlSAXHandlerV1 xmlDefaultSAXHandler;


Variable xmlDefaultSAXLocator

xmlSAXLocator xmlDefaultSAXLocator;


Variable xmlDeregisterNodeDefaultValue

xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;


Variable xmlDoValidityCheckingDefaultValue

int xmlDoValidityCheckingDefaultValue;


Variable xmlFree

xmlFreeFunc xmlFree;


Variable xmlGenericError

xmlGenericErrorFunc xmlGenericError;


Variable xmlGenericErrorContext

void * xmlGenericErrorContext;


Variable xmlGetWarningsDefaultValue

int xmlGetWarningsDefaultValue;


Variable xmlIndentTreeOutput

int xmlIndentTreeOutput;


Variable xmlKeepBlanksDefaultValue

int xmlKeepBlanksDefaultValue;


Variable xmlLastError

xmlError xmlLastError;


Variable xmlLineNumbersDefaultValue

int xmlLineNumbersDefaultValue;


Variable xmlLoadExtDtdDefaultValue

int xmlLoadExtDtdDefaultValue;


Variable xmlMalloc

xmlMallocFunc xmlMalloc;


Variable xmlMallocAtomic

xmlMallocFunc xmlMallocAtomic;


Variable xmlMemStrdup

xmlStrdupFunc xmlMemStrdup;


Variable xmlOutputBufferCreateFilenameValue

xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;


Variable xmlParserDebugEntities

int xmlParserDebugEntities;


Variable xmlParserInputBufferCreateFilenameValue

xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;


Variable xmlParserVersion

const char * xmlParserVersion;


Variable xmlPedanticParserDefaultValue

int xmlPedanticParserDefaultValue;


Variable xmlRealloc

xmlReallocFunc xmlRealloc;


Variable xmlRegisterNodeDefaultValue

xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;


Variable xmlSaveNoEmptyTags

int xmlSaveNoEmptyTags;


Variable xmlStructuredError

xmlStructuredErrorFunc xmlStructuredError;


Variable xmlStructuredErrorContext

void * xmlStructuredErrorContext;


Variable xmlSubstituteEntitiesDefaultValue

int xmlSubstituteEntitiesDefaultValue;


Variable xmlTreeIndentString

const char * xmlTreeIndentString;


xmlCleanupGlobals ()

void	xmlCleanupGlobals		(void)

DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Additional cleanup for multi-threading


xmlDeregisterNodeDefault ()

xmlDeregisterNodeFunc	xmlDeregisterNodeDefault	(xmlDeregisterNodeFunc func)

Registers a callback for node destruction

func: function pointer to the new DeregisterNodeFunc
Returns: the previous value of the deregistration function

xmlInitGlobals ()

void	xmlInitGlobals			(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. Additional initialisation for multi-threading


xmlInitializeGlobalState ()

void	xmlInitializeGlobalState	(xmlGlobalStatePtr gs)

xmlInitializeGlobalState() initialize a global state with all the default values of the library.

gs: a pointer to a newly allocated global state

xmlOutputBufferCreateFilenameDefault ()

xmlOutputBufferCreateFilenameFunc	xmlOutputBufferCreateFilenameDefault	(xmlOutputBufferCreateFilenameFunc func)

Registers a callback for URI output file handling

func: function pointer to the new OutputBufferCreateFilenameFunc
Returns: the old value of the registration function

xmlParserInputBufferCreateFilenameDefault ()

xmlParserInputBufferCreateFilenameFunc	xmlParserInputBufferCreateFilenameDefault	(xmlParserInputBufferCreateFilenameFunc func)

Registers a callback for URI input file handling

func: function pointer to the new ParserInputBufferCreateFilenameFunc
Returns: the old value of the registration function

xmlRegisterNodeDefault ()

xmlRegisterNodeFunc	xmlRegisterNodeDefault	(xmlRegisterNodeFunc func)

Registers a callback for node creation

func: function pointer to the new RegisterNodeFunc
Returns: the old value of the registration function

xmlThrDefBufferAllocScheme ()

xmlBufferAllocationScheme	xmlThrDefBufferAllocScheme	(xmlBufferAllocationScheme v)

v:
Returns:

xmlThrDefDefaultBufferSize ()

int	xmlThrDefDefaultBufferSize	(int v)

v:
Returns:

xmlThrDefDeregisterNodeDefault ()

xmlDeregisterNodeFunc	xmlThrDefDeregisterNodeDefault	(xmlDeregisterNodeFunc func)

func:
Returns:

xmlThrDefDoValidityCheckingDefaultValue ()

int	xmlThrDefDoValidityCheckingDefaultValue	(int v)

v:
Returns:

xmlThrDefGetWarningsDefaultValue ()

int	xmlThrDefGetWarningsDefaultValue	(int v)

v:
Returns:

xmlThrDefIndentTreeOutput ()

int	xmlThrDefIndentTreeOutput	(int v)

v:
Returns:

xmlThrDefKeepBlanksDefaultValue ()

int	xmlThrDefKeepBlanksDefaultValue	(int v)

v:
Returns:

xmlThrDefLineNumbersDefaultValue ()

int	xmlThrDefLineNumbersDefaultValue	(int v)

v:
Returns:

xmlThrDefLoadExtDtdDefaultValue ()

int	xmlThrDefLoadExtDtdDefaultValue	(int v)

v:
Returns:

xmlThrDefOutputBufferCreateFilenameDefault ()

xmlOutputBufferCreateFilenameFunc	xmlThrDefOutputBufferCreateFilenameDefault	(xmlOutputBufferCreateFilenameFunc func)

func:
Returns:

xmlThrDefParserDebugEntities ()

int	xmlThrDefParserDebugEntities	(int v)

v:
Returns:

xmlThrDefParserInputBufferCreateFilenameDefault ()

xmlParserInputBufferCreateFilenameFunc	xmlThrDefParserInputBufferCreateFilenameDefault	(xmlParserInputBufferCreateFilenameFunc func)

func:
Returns:

xmlThrDefPedanticParserDefaultValue ()

int	xmlThrDefPedanticParserDefaultValue	(int v)

v:
Returns:

xmlThrDefRegisterNodeDefault ()

xmlRegisterNodeFunc	xmlThrDefRegisterNodeDefault	(xmlRegisterNodeFunc func)

func:
Returns:

xmlThrDefSaveNoEmptyTags ()

int	xmlThrDefSaveNoEmptyTags	(int v)

v:
Returns:

xmlThrDefSetGenericErrorFunc ()

void	xmlThrDefSetGenericErrorFunc	(void * ctx, 
xmlGenericErrorFunc handler)

ctx:
handler:

xmlThrDefSetStructuredErrorFunc ()

void	xmlThrDefSetStructuredErrorFunc	(void * ctx, 
xmlStructuredErrorFunc handler)

ctx:
handler:

xmlThrDefSubstituteEntitiesDefaultValue ()

int	xmlThrDefSubstituteEntitiesDefaultValue	(int v)

v:
Returns:

xmlThrDefTreeIndentString ()

const char *	xmlThrDefTreeIndentString	(const char * v)

v:
Returns:

PK!^^e]]libxml2-xpath.htmlnu[ xpath: XML Path Language implementation

xpath

xpath - XML Path Language implementation

API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer

Author(s): Daniel Veillard

Synopsis

#define XML_XPATH_CHECKNS;
#define XML_XPATH_NOVAR;
#define xmlXPathNodeSetGetLength(ns);
#define xmlXPathNodeSetIsEmpty(ns);
#define xmlXPathNodeSetItem(ns, index);
typedef struct _xmlNodeSet xmlNodeSet;
typedef xmlNodeSet * xmlNodeSetPtr;
typedef struct _xmlXPathAxis xmlXPathAxis;
typedef xmlXPathAxis * xmlXPathAxisPtr;
typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
typedef xmlXPathCompExpr * xmlXPathCompExprPtr;
typedef struct _xmlXPathContext xmlXPathContext;
typedef xmlXPathContext * xmlXPathContextPtr;
typedef enum xmlXPathError;
typedef xmlXPathFunct * xmlXPathFuncPtr;
typedef struct _xmlXPathFunct xmlXPathFunct;
typedef struct _xmlXPathObject xmlXPathObject;
typedef xmlXPathObject * xmlXPathObjectPtr;
typedef enum xmlXPathObjectType;
typedef struct _xmlXPathParserContext xmlXPathParserContext;
typedef xmlXPathParserContext * xmlXPathParserContextPtr;
typedef struct _xmlXPathType xmlXPathType;
typedef xmlXPathType * xmlXPathTypePtr;
typedef struct _xmlXPathVariable xmlXPathVariable;
typedef xmlXPathVariable * xmlXPathVariablePtr;
typedef xmlXPathObjectPtr xmlXPathAxisFunc	(xmlXPathParserContextPtr ctxt, 
xmlXPathObjectPtr cur); double xmlXPathCastBooleanToNumber (int val); xmlChar * xmlXPathCastBooleanToString (int val); int xmlXPathCastNodeSetToBoolean (xmlNodeSetPtr ns); double xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns); xmlChar * xmlXPathCastNodeSetToString (xmlNodeSetPtr ns); double xmlXPathCastNodeToNumber (xmlNodePtr node); xmlChar * xmlXPathCastNodeToString (xmlNodePtr node); int xmlXPathCastNumberToBoolean (double val); xmlChar * xmlXPathCastNumberToString (double val); int xmlXPathCastStringToBoolean (const xmlChar * val); double xmlXPathCastStringToNumber (const xmlChar * val); int xmlXPathCastToBoolean (xmlXPathObjectPtr val); double xmlXPathCastToNumber (xmlXPathObjectPtr val); xmlChar * xmlXPathCastToString (xmlXPathObjectPtr val); int xmlXPathCmpNodes (xmlNodePtr node1,
xmlNodePtr node2); xmlXPathCompExprPtr xmlXPathCompile (const xmlChar * str); xmlXPathObjectPtr xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctx); int xmlXPathCompiledEvalToBoolean (xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctxt); int xmlXPathContextSetCache (xmlXPathContextPtr ctxt,
int active,
int value,
int options); xmlXPathObjectPtr xmlXPathConvertBoolean (xmlXPathObjectPtr val); typedef int xmlXPathConvertFunc (xmlXPathObjectPtr obj,
int type); xmlXPathObjectPtr xmlXPathConvertNumber (xmlXPathObjectPtr val); xmlXPathObjectPtr xmlXPathConvertString (xmlXPathObjectPtr val); xmlXPathCompExprPtr xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
const xmlChar * str); xmlXPathObjectPtr xmlXPathEval (const xmlChar * str,
xmlXPathContextPtr ctx); xmlXPathObjectPtr xmlXPathEvalExpression (const xmlChar * str,
xmlXPathContextPtr ctxt); typedef void xmlXPathEvalFunc (xmlXPathParserContextPtr ctxt,
int nargs); int xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
xmlXPathObjectPtr res); void xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp); void xmlXPathFreeContext (xmlXPathContextPtr ctxt); void xmlXPathFreeNodeSet (xmlNodeSetPtr obj); void xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj); void xmlXPathFreeObject (xmlXPathObjectPtr obj); typedef xmlXPathFunction xmlXPathFuncLookupFunc (void * ctxt,
const xmlChar * name,
const xmlChar * ns_uri); typedef void xmlXPathFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathInit (void); int xmlXPathIsInf (double val); int xmlXPathIsNaN (double val); xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc); xmlXPathObjectPtr xmlXPathNodeEval (xmlNodePtr node,
const xmlChar * str,
xmlXPathContextPtr ctx); xmlNodeSetPtr xmlXPathNodeSetCreate (xmlNodePtr val); xmlXPathObjectPtr xmlXPathObjectCopy (xmlXPathObjectPtr val); long xmlXPathOrderDocElems (xmlDocPtr doc); int xmlXPathSetContextNode (xmlNodePtr node,
xmlXPathContextPtr ctx); typedef xmlXPathObjectPtr xmlXPathVariableLookupFunc (void * ctxt,
const xmlChar * name,
const xmlChar * ns_uri);

Description

Details

Macro XML_XPATH_CHECKNS

#define XML_XPATH_CHECKNS;

check namespaces at compilation


Macro XML_XPATH_NOVAR

#define XML_XPATH_NOVAR;

forbid variables in expression


Macro XPATH_LOCATIONSET

#define XPATH_LOCATIONSET;


Macro XPATH_POINT

#define XPATH_POINT;


Macro XPATH_RANGE

#define XPATH_RANGE;


Macro xmlXPathNodeSetGetLength

#define xmlXPathNodeSetGetLength(ns);

Implement a functionality similar to the DOM NodeList.length. Returns the number of nodes in the node-set.

ns: a node-set

Macro xmlXPathNodeSetIsEmpty

#define xmlXPathNodeSetIsEmpty(ns);

Checks whether @ns is empty or not. Returns %TRUE if @ns is an empty node-set.

ns: a node-set

Macro xmlXPathNodeSetItem

#define xmlXPathNodeSetItem(ns, index);

Implements a functionality similar to the DOM NodeList.item(). Returns the xmlNodePtr at the given @index in @ns or NULL if @index is out of range (0 to length-1)

ns: a node-set
index: index of a node in the set

Structure xmlNodeSet

struct _xmlNodeSet {
    int	nodeNr	: number of nodes in the set
    int	nodeMax	: size of the array as allocated
    xmlNodePtr *	nodeTab	: array of nodes in no particular order @@ with_ns to check whether nam
} xmlNodeSet;


Typedef xmlNodeSetPtr

xmlNodeSet * xmlNodeSetPtr;


Structure xmlXPathAxis

struct _xmlXPathAxis {
    const xmlChar *	name	: the axis name
    xmlXPathAxisFunc	func	: the search function
} xmlXPathAxis;


Typedef xmlXPathAxisPtr

xmlXPathAxis * xmlXPathAxisPtr;


Structure xmlXPathCompExpr

struct _xmlXPathCompExpr {
The content of this structure is not made public by the API.
} xmlXPathCompExpr;


Typedef xmlXPathCompExprPtr

xmlXPathCompExpr * xmlXPathCompExprPtr;


Structure xmlXPathContext

struct _xmlXPathContext {
    xmlDocPtr	doc	: The current document
    xmlNodePtr	node	: The current node
    int	nb_variables_unused	: unused (hash table)
    int	max_variables_unused	: unused (hash table)
    xmlHashTablePtr	varHash	: Hash table of defined variables
    int	nb_types	: number of defined types
    int	max_types	: max number of types
    xmlXPathTypePtr	types	: Array of defined types
    int	nb_funcs_unused	: unused (hash table)
    int	max_funcs_unused	: unused (hash table)
    xmlHashTablePtr	funcHash	: Hash table of defined funcs
    int	nb_axis	: number of defined axis
    int	max_axis	: max number of axis
    xmlXPathAxisPtr	axis	: Array of defined axis the namespace nodes of the context node
    xmlNsPtr *	namespaces	: Array of namespaces
    int	nsNr	: number of namespace in scope
    void *	user	: function to free extra variables
    int	contextSize	: the context size
    int	proximityPosition	: the proximity position extra stuff for XPointer
    int	xptr	: is this an XPointer context?
    xmlNodePtr	here	: for here()
    xmlNodePtr	origin	: for origin() the set of namespace declarations in scope for the expre
    xmlHashTablePtr	nsHash	: The namespaces hash table
    xmlXPathVariableLookupFunc	varLookupFunc	: variable lookup func
    void *	varLookupData	: variable lookup data Possibility to link in an extra item
    void *	extra	: needed for XSLT The function name and URI when calling a function
    const xmlChar *	function
    const xmlChar *	functionURI	: function lookup function and data
    xmlXPathFuncLookupFunc	funcLookupFunc	: function lookup func
    void *	funcLookupData	: function lookup data temporary namespace lists kept for walking the n
    xmlNsPtr *	tmpNsList	: Array of namespaces
    int	tmpNsNr	: number of namespaces in scope error reporting mechanism
    void *	userData	: user specific data block
    xmlStructuredErrorFunc	error	: the callback in case of errors
    xmlError	lastError	: the last error
    xmlNodePtr	debugNode	: the source node XSLT dictionary
    xmlDictPtr	dict	: dictionary if any
    int	flags	: flags to control compilation Cache for reusal of XPath objects
    void *	cache	: Resource limits
    unsigned long	opLimit
    unsigned long	opCount
    int	depth
} xmlXPathContext;


Typedef xmlXPathContextPtr

xmlXPathContext * xmlXPathContextPtr;



Typedef xmlXPathFuncPtr

xmlXPathFunct * xmlXPathFuncPtr;


Structure xmlXPathFunct

struct _xmlXPathFunct {
    const xmlChar *	name	: the function name
    xmlXPathEvalFunc	func	: the evaluation function
} xmlXPathFunct;


Structure xmlXPathObject

struct _xmlXPathObject {
    xmlXPathObjectType	type
    xmlNodeSetPtr	nodesetval
    int	boolval
    double	floatval
    xmlChar *	stringval
    void *	user
    int	index
    void *	user2
    int	index2
} xmlXPathObject;


Typedef xmlXPathObjectPtr

xmlXPathObject * xmlXPathObjectPtr;


Enum xmlXPathObjectType

enum xmlXPathObjectType {
    XPATH_UNDEFINED = 0
    XPATH_NODESET = 1
    XPATH_BOOLEAN = 2
    XPATH_NUMBER = 3
    XPATH_STRING = 4
    XPATH_POINT = 5
    XPATH_RANGE = 6
    XPATH_LOCATIONSET = 7
    XPATH_USERS = 8
    XPATH_XSLT_TREE = 9 /*  An XSLT value tree, non modifiable */
};


Structure xmlXPathParserContext

struct _xmlXPathParserContext {
    const xmlChar *	cur	: the current char being parsed
    const xmlChar *	base	: the full expression
    int	error	: error code
    xmlXPathContextPtr	context	: the evaluation context
    xmlXPathObjectPtr	value	: the current value
    int	valueNr	: number of values stacked
    int	valueMax	: max number of values stacked
    xmlXPathObjectPtr *	valueTab	: stack of values
    xmlXPathCompExprPtr	comp	: the precompiled expression
    int	xptr	: it this an XPointer expression
    xmlNodePtr	ancestor	: used for walking preceding axis
    int	valueFrame	: used to limit Pop on the stack
} xmlXPathParserContext;


Typedef xmlXPathParserContextPtr

xmlXPathParserContext * xmlXPathParserContextPtr;


Structure xmlXPathType

struct _xmlXPathType {
    const xmlChar *	name	: the type name
    xmlXPathConvertFunc	func	: the conversion function
} xmlXPathType;


Typedef xmlXPathTypePtr

xmlXPathType * xmlXPathTypePtr;


Structure xmlXPathVariable

struct _xmlXPathVariable {
    const xmlChar *	name	: the variable name
    xmlXPathObjectPtr	value	: the value
} xmlXPathVariable;


Typedef xmlXPathVariablePtr

xmlXPathVariable * xmlXPathVariablePtr;


Function type xmlXPathAxisFunc

xmlXPathObjectPtr	xmlXPathAxisFunc	(xmlXPathParserContextPtr ctxt, 
xmlXPathObjectPtr cur)

An axis traversal function. To traverse an axis, the engine calls the first time with cur == NULL and repeat until the function returns NULL indicating the end of the axis traversal.

ctxt: the XPath interpreter context
cur: the previous node being explored on that axis
Returns: the next node in that axis or NULL if at the end of the axis.

Function type xmlXPathConvertFunc

int	xmlXPathConvertFunc		(xmlXPathObjectPtr obj, 
int type)

A conversion function is associated to a type and used to cast the new type to primitive values.

obj: an XPath object
type: the number of the target type
Returns: -1 in case of error, 0 otherwise

Function type xmlXPathEvalFunc

void	xmlXPathEvalFunc		(xmlXPathParserContextPtr ctxt, 
int nargs)

An XPath evaluation function, the parameters are on the XPath context stack.

ctxt: an XPath parser context
nargs: the number of arguments passed to the function

Function type xmlXPathFuncLookupFunc

xmlXPathFunction	xmlXPathFuncLookupFunc	(void * ctxt, 
const xmlChar * name,
const xmlChar * ns_uri)

Prototype for callbacks used to plug function lookup in the XPath engine.

ctxt: an XPath context
name: name of the function
ns_uri: the namespace name hosting this function
Returns: the XPath function or NULL if not found.

Function type xmlXPathFunction

void	xmlXPathFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

An XPath function. The arguments (if any) are popped out from the context stack and the result is pushed on the stack.

ctxt: the XPath interprestation context
nargs: the number of arguments

Function type xmlXPathVariableLookupFunc

xmlXPathObjectPtr	xmlXPathVariableLookupFunc	(void * ctxt, 
const xmlChar * name,
const xmlChar * ns_uri)

Prototype for callbacks used to plug variable lookup in the XPath engine.

ctxt: an XPath context
name: name of the variable
ns_uri: the namespace name hosting this variable
Returns: the XPath object value or NULL if not found.

Variable xmlXPathNAN

double xmlXPathNAN;


Variable xmlXPathNINF

double xmlXPathNINF;


Variable xmlXPathPINF

double xmlXPathPINF;


xmlXPathCastBooleanToNumber ()

double	xmlXPathCastBooleanToNumber	(int val)

Converts a boolean to its number value

val: a boolean
Returns: the number value

xmlXPathCastBooleanToString ()

xmlChar *	xmlXPathCastBooleanToString	(int val)

Converts a boolean to its string value.

val: a boolean
Returns: a newly allocated string.

xmlXPathCastNodeSetToBoolean ()

int	xmlXPathCastNodeSetToBoolean	(xmlNodeSetPtr ns)

Converts a node-set to its boolean value

ns: a node-set
Returns: the boolean value

xmlXPathCastNodeSetToNumber ()

double	xmlXPathCastNodeSetToNumber	(xmlNodeSetPtr ns)

Converts a node-set to its number value

ns: a node-set
Returns: the number value

xmlXPathCastNodeSetToString ()

xmlChar *	xmlXPathCastNodeSetToString	(xmlNodeSetPtr ns)

Converts a node-set to its string value.

ns: a node-set
Returns: a newly allocated string.

xmlXPathCastNodeToNumber ()

double	xmlXPathCastNodeToNumber	(xmlNodePtr node)

Converts a node to its number value

node: a node
Returns: the number value

xmlXPathCastNodeToString ()

xmlChar *	xmlXPathCastNodeToString	(xmlNodePtr node)

Converts a node to its string value.

node: a node
Returns: a newly allocated string.

xmlXPathCastNumberToBoolean ()

int	xmlXPathCastNumberToBoolean	(double val)

Converts a number to its boolean value

val: a number
Returns: the boolean value

xmlXPathCastNumberToString ()

xmlChar *	xmlXPathCastNumberToString	(double val)

Converts a number to its string value.

val: a number
Returns: a newly allocated string.

xmlXPathCastStringToBoolean ()

int	xmlXPathCastStringToBoolean	(const xmlChar * val)

Converts a string to its boolean value

val: a string
Returns: the boolean value

xmlXPathCastStringToNumber ()

double	xmlXPathCastStringToNumber	(const xmlChar * val)

Converts a string to its number value

val: a string
Returns: the number value

xmlXPathCastToBoolean ()

int	xmlXPathCastToBoolean		(xmlXPathObjectPtr val)

Converts an XPath object to its boolean value

val: an XPath object
Returns: the boolean value

xmlXPathCastToNumber ()

double	xmlXPathCastToNumber		(xmlXPathObjectPtr val)

Converts an XPath object to its number value

val: an XPath object
Returns: the number value

xmlXPathCastToString ()

xmlChar *	xmlXPathCastToString	(xmlXPathObjectPtr val)

Converts an existing object to its string() equivalent

val: an XPath object
Returns: the allocated string value of the object, NULL in case of error. It's up to the caller to free the string memory with xmlFree().

xmlXPathCmpNodes ()

int	xmlXPathCmpNodes		(xmlNodePtr node1, 
xmlNodePtr node2)

Compare two nodes w.r.t document order

node1: the first node
node2: the second node
Returns: -2 in case of error 1 if first point < second point, 0 if it's the same node, -1 otherwise

xmlXPathCompile ()

xmlXPathCompExprPtr	xmlXPathCompile	(const xmlChar * str)

Compile an XPath expression

str: the XPath expression
Returns: the xmlXPathCompExprPtr resulting from the compilation or NULL. the caller has to free the object.

xmlXPathCompiledEval ()

xmlXPathObjectPtr	xmlXPathCompiledEval	(xmlXPathCompExprPtr comp, 
xmlXPathContextPtr ctx)

Evaluate the Precompiled XPath expression in the given context.

comp: the compiled XPath expression
ctx: the XPath context
Returns: the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

xmlXPathCompiledEvalToBoolean ()

int	xmlXPathCompiledEvalToBoolean	(xmlXPathCompExprPtr comp, 
xmlXPathContextPtr ctxt)

Applies the XPath boolean() function on the result of the given compiled expression.

comp: the compiled XPath expression
ctxt: the XPath context
Returns: 1 if the expression evaluated to true, 0 if to false and -1 in API and internal errors.

xmlXPathContextSetCache ()

int	xmlXPathContextSetCache		(xmlXPathContextPtr ctxt, 
int active,
int value,
int options)

Creates/frees an object cache on the XPath context. If activates XPath objects (xmlXPathObject) will be cached internally to be reused. @options: 0: This will set the XPath object caching: @value: This will set the maximum number of XPath objects to be cached per slot There are 5 slots for: node-set, string, number, boolean, and misc objects. Use <0 for the default number (100). Other values for @options have currently no effect.

ctxt: the XPath context
active: enables/disables (creates/frees) the cache
value: a value with semantics dependent on @options
options: options (currently only the value 0 is used)
Returns: 0 if the setting succeeded, and -1 on API or internal errors.

xmlXPathConvertBoolean ()

xmlXPathObjectPtr	xmlXPathConvertBoolean	(xmlXPathObjectPtr val)

Converts an existing object to its boolean() equivalent

val: an XPath object
Returns: the new object, the old one is freed (or the operation is done directly on @val)

xmlXPathConvertNumber ()

xmlXPathObjectPtr	xmlXPathConvertNumber	(xmlXPathObjectPtr val)

Converts an existing object to its number() equivalent

val: an XPath object
Returns: the new object, the old one is freed (or the operation is done directly on @val)

xmlXPathConvertString ()

xmlXPathObjectPtr	xmlXPathConvertString	(xmlXPathObjectPtr val)

Converts an existing object to its string() equivalent

val: an XPath object
Returns: the new object, the old one is freed (or the operation is done directly on @val)

xmlXPathCtxtCompile ()

xmlXPathCompExprPtr	xmlXPathCtxtCompile	(xmlXPathContextPtr ctxt, 
const xmlChar * str)

Compile an XPath expression

ctxt: an XPath context
str: the XPath expression
Returns: the xmlXPathCompExprPtr resulting from the compilation or NULL. the caller has to free the object.

xmlXPathEval ()

xmlXPathObjectPtr	xmlXPathEval	(const xmlChar * str, 
xmlXPathContextPtr ctx)

Evaluate the XPath Location Path in the given context.

str: the XPath expression
ctx: the XPath context
Returns: the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

xmlXPathEvalExpression ()

xmlXPathObjectPtr	xmlXPathEvalExpression	(const xmlChar * str, 
xmlXPathContextPtr ctxt)

Alias for xmlXPathEval().

str: the XPath expression
ctxt: the XPath context
Returns: the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

xmlXPathEvalPredicate ()

int	xmlXPathEvalPredicate		(xmlXPathContextPtr ctxt, 
xmlXPathObjectPtr res)

Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.

ctxt: the XPath context
res: the Predicate Expression evaluation result
Returns: 1 if predicate is true, 0 otherwise

xmlXPathFreeCompExpr ()

void	xmlXPathFreeCompExpr		(xmlXPathCompExprPtr comp)

Free up the memory allocated by @comp

comp: an XPATH comp

xmlXPathFreeContext ()

void	xmlXPathFreeContext		(xmlXPathContextPtr ctxt)

Free up an xmlXPathContext

ctxt: the context to free

xmlXPathFreeNodeSet ()

void	xmlXPathFreeNodeSet		(xmlNodeSetPtr obj)

Free the NodeSet compound (not the actual nodes !).

obj: the xmlNodeSetPtr to free

xmlXPathFreeNodeSetList ()

void	xmlXPathFreeNodeSetList		(xmlXPathObjectPtr obj)

Free up the xmlXPathObjectPtr @obj but don't deallocate the objects in the list contrary to xmlXPathFreeObject().

obj: an existing NodeSetList object

xmlXPathFreeObject ()

void	xmlXPathFreeObject		(xmlXPathObjectPtr obj)

Free up an xmlXPathObjectPtr object.

obj: the object to free

xmlXPathInit ()

void	xmlXPathInit			(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. Initialize the XPath environment


xmlXPathIsInf ()

int	xmlXPathIsInf			(double val)

val: a double value
Returns: 1 if the value is +Infinite, -1 if -Infinite, 0 otherwise

xmlXPathIsNaN ()

int	xmlXPathIsNaN			(double val)

val: a double value
Returns: 1 if the value is a NaN, 0 otherwise

xmlXPathNewContext ()

xmlXPathContextPtr	xmlXPathNewContext	(xmlDocPtr doc)

Create a new xmlXPathContext

doc: the XML document
Returns: the xmlXPathContext just allocated. The caller will need to free it.

xmlXPathNodeEval ()

xmlXPathObjectPtr	xmlXPathNodeEval	(xmlNodePtr node, 
const xmlChar * str,
xmlXPathContextPtr ctx)

Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored.

node: the node to to use as the context node
str: the XPath expression
ctx: the XPath context
Returns: the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

xmlXPathNodeSetCreate ()

xmlNodeSetPtr	xmlXPathNodeSetCreate	(xmlNodePtr val)

Create a new xmlNodeSetPtr of type double and of value @val

val: an initial xmlNodePtr, or NULL
Returns: the newly created object.

xmlXPathObjectCopy ()

xmlXPathObjectPtr	xmlXPathObjectCopy	(xmlXPathObjectPtr val)

allocate a new copy of a given object

val: the original object
Returns: the newly created object.

xmlXPathOrderDocElems ()

long	xmlXPathOrderDocElems		(xmlDocPtr doc)

Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element->content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.

doc: an input document
Returns: the number of elements found in the document or -1 in case of error.

xmlXPathSetContextNode ()

int	xmlXPathSetContextNode		(xmlNodePtr node, 
xmlXPathContextPtr ctx)

Sets 'node' as the context node. The node must be in the same document as that associated with the context.

node: the node to to use as the context node
ctx: the XPath context
Returns: -1 in case of error or 0 if successful

PK!((88 index.htmlnu[ libxml2 Reference Manual

libxml2 Reference Manual

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 MIT License. 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 variety of language bindings make it available in other environments.

Libxml2 implements a number of existing standards related to markup languages:

PK!Ȉ@@libxml2-schematron.htmlnu[ schematron: XML Schematron implementation

schematron

schematron - XML Schematron implementation

interface to the XML Schematron validity checking.

Author(s): Daniel Veillard

Description

Details

Structure xmlSchematron

struct _xmlSchematron {
The content of this structure is not made public by the API.
} xmlSchematron;


Structure xmlSchematronParserCtxt

struct _xmlSchematronParserCtxt {
The content of this structure is not made public by the API.
} xmlSchematronParserCtxt;


Typedef xmlSchematronParserCtxtPtr

xmlSchematronParserCtxt * xmlSchematronParserCtxtPtr;


Typedef xmlSchematronPtr

xmlSchematron * xmlSchematronPtr;


Structure xmlSchematronValidCtxt

struct _xmlSchematronValidCtxt {
The content of this structure is not made public by the API.
} xmlSchematronValidCtxt;


Typedef xmlSchematronValidCtxtPtr

xmlSchematronValidCtxt * xmlSchematronValidCtxtPtr;


Enum xmlSchematronValidOptions

enum xmlSchematronValidOptions {
    XML_SCHEMATRON_OUT_QUIET = 1 /* quiet no report */
    XML_SCHEMATRON_OUT_TEXT = 2 /* build a textual report */
    XML_SCHEMATRON_OUT_XML = 4 /* output SVRL */
    XML_SCHEMATRON_OUT_ERROR = 8 /* output via xmlStructuredErrorFunc */
    XML_SCHEMATRON_OUT_FILE = 256 /* output to a file descriptor */
    XML_SCHEMATRON_OUT_BUFFER = 512 /* output to a buffer */
    XML_SCHEMATRON_OUT_IO = 1024 /*  output to I/O mechanism */
};


Function type xmlSchematronValidityErrorFunc

void	xmlSchematronValidityErrorFunc	(void * ctx, 
const char * msg,
... ...)

Signature of an error callback from a Schematron validation

ctx: the validation context
msg: the message
...: extra arguments

Function type xmlSchematronValidityWarningFunc

void	xmlSchematronValidityWarningFunc	(void * ctx, 
const char * msg,
... ...)

Signature of a warning callback from a Schematron validation

ctx: the validation context
msg: the message
...: extra arguments

xmlSchematronFree ()

void	xmlSchematronFree		(xmlSchematronPtr schema)

Deallocate a Schematron structure.

schema: a schema structure

xmlSchematronFreeParserCtxt ()

void	xmlSchematronFreeParserCtxt	(xmlSchematronParserCtxtPtr ctxt)

Free the resources associated to the schema parser context

ctxt: the schema parser context

xmlSchematronFreeValidCtxt ()

void	xmlSchematronFreeValidCtxt	(xmlSchematronValidCtxtPtr ctxt)

Free the resources associated to the schema validation context

ctxt: the schema validation context

xmlSchematronNewDocParserCtxt ()

xmlSchematronParserCtxtPtr	xmlSchematronNewDocParserCtxt	(xmlDocPtr doc)

Create an XML Schematrons parse context for that document. NB. The document may be modified during the parsing process.

doc: a preparsed document tree
Returns: the parser context or NULL in case of error

xmlSchematronNewMemParserCtxt ()

xmlSchematronParserCtxtPtr	xmlSchematronNewMemParserCtxt	(const char * buffer, 
int size)

Create an XML Schematrons parse context for that memory buffer expected to contain an XML Schematrons file.

buffer: a pointer to a char array containing the schemas
size: the size of the array
Returns: the parser context or NULL in case of error

xmlSchematronNewParserCtxt ()

xmlSchematronParserCtxtPtr	xmlSchematronNewParserCtxt	(const char * URL)

Create an XML Schematrons parse context for that file/resource expected to contain an XML Schematrons file.

URL: the location of the schema
Returns: the parser context or NULL in case of error

xmlSchematronNewValidCtxt ()

xmlSchematronValidCtxtPtr	xmlSchematronNewValidCtxt	(xmlSchematronPtr schema, 
int options)

Create an XML Schematrons validation context based on the given schema.

schema: a precompiled XML Schematrons
options: a set of xmlSchematronValidOptions
Returns: the validation context or NULL in case of error

xmlSchematronParse ()

xmlSchematronPtr	xmlSchematronParse	(xmlSchematronParserCtxtPtr ctxt)

parse a schema definition resource and build an internal XML Schema structure which can be used to validate instances.

ctxt: a schema validation context
Returns: the internal XML Schematron structure built from the resource or NULL in case of error

xmlSchematronSetValidStructuredErrors ()

void	xmlSchematronSetValidStructuredErrors	(xmlSchematronValidCtxtPtr ctxt, 
xmlStructuredErrorFunc serror,
void * ctx)

Set the structured error callback

ctxt: a Schematron validation context
serror: the structured error function
ctx: the functions context

xmlSchematronValidateDoc ()

int	xmlSchematronValidateDoc	(xmlSchematronValidCtxtPtr ctxt, 
xmlDocPtr instance)

Validate a tree instance against the schematron

ctxt: the schema validation context
instance: the document instance tree
Returns: 0 in case of success, -1 in case of internal error and an error count otherwise.

PK!Szlibxml2-debugXML.htmlnu[ debugXML: Tree debugging APIs

debugXML

debugXML - Tree debugging APIs

Interfaces to a set of routines used for debugging the tree produced by the XML parser.

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlShellCtxt xmlShellCtxt;
typedef xmlShellCtxt * xmlShellCtxtPtr;
const char *	xmlBoolToText		(int boolval);
int	xmlDebugCheckDocument		(FILE * output, 
xmlDocPtr doc); void xmlDebugDumpAttr (FILE * output,
xmlAttrPtr attr,
int depth); void xmlDebugDumpAttrList (FILE * output,
xmlAttrPtr attr,
int depth); void xmlDebugDumpDTD (FILE * output,
xmlDtdPtr dtd); void xmlDebugDumpDocument (FILE * output,
xmlDocPtr doc); void xmlDebugDumpDocumentHead (FILE * output,
xmlDocPtr doc); void xmlDebugDumpEntities (FILE * output,
xmlDocPtr doc); void xmlDebugDumpNode (FILE * output,
xmlNodePtr node,
int depth); void xmlDebugDumpNodeList (FILE * output,
xmlNodePtr node,
int depth); void xmlDebugDumpOneNode (FILE * output,
xmlNodePtr node,
int depth); void xmlDebugDumpString (FILE * output,
const xmlChar * str); int xmlLsCountNode (xmlNodePtr node); void xmlLsOneNode (FILE * output,
xmlNodePtr node); void xmlShell (xmlDocPtr doc,
char * filename,
xmlShellReadlineFunc input,
FILE * output); int xmlShellBase (xmlShellCtxtPtr ctxt,
char * arg,
xmlNodePtr node,
xmlNodePtr node2); int xmlShellCat (xmlShellCtxtPtr ctxt,
char * arg,
xmlNodePtr node,
xmlNodePtr node2); typedef int xmlShellCmd (xmlShellCtxtPtr ctxt,
char * arg,
xmlNodePtr node,
xmlNodePtr node2); int xmlShellDir (xmlShellCtxtPtr ctxt,
char * arg,
xmlNodePtr node,
xmlNodePtr node2); int xmlShellDu (xmlShellCtxtPtr ctxt,
char * arg,
xmlNodePtr tree,
xmlNodePtr node2); int xmlShellList (xmlShellCtxtPtr ctxt,
char * arg,
xmlNodePtr node,
xmlNodePtr node2); int xmlShellLoad (xmlShellCtxtPtr ctxt,
char * filename,
xmlNodePtr node,
xmlNodePtr node2); void xmlShellPrintNode (xmlNodePtr node); void xmlShellPrintXPathError (int errorType,
const char * arg); void xmlShellPrintXPathResult (xmlXPathObjectPtr list); int xmlShellPwd (xmlShellCtxtPtr ctxt,
char * buffer,
xmlNodePtr node,
xmlNodePtr node2); typedef char * xmlShellReadlineFunc (char * prompt); int xmlShellSave (xmlShellCtxtPtr ctxt,
char * filename,
xmlNodePtr node,
xmlNodePtr node2); int xmlShellValidate (xmlShellCtxtPtr ctxt,
char * dtd,
xmlNodePtr node,
xmlNodePtr node2); int xmlShellWrite (xmlShellCtxtPtr ctxt,
char * filename,
xmlNodePtr node,
xmlNodePtr node2);

Description

Details

Structure xmlShellCtxt

struct _xmlShellCtxt {
    char *	filename
    xmlDocPtr	doc
    xmlNodePtr	node
    xmlXPathContextPtr	pctxt
    int	loaded
    FILE *	output
    xmlShellReadlineFunc	input
} xmlShellCtxt;


Typedef xmlShellCtxtPtr

xmlShellCtxt * xmlShellCtxtPtr;


Function type xmlShellCmd

int	xmlShellCmd			(xmlShellCtxtPtr ctxt, 
char * arg,
xmlNodePtr node,
xmlNodePtr node2)

This is a generic signature for the XML shell functions.

ctxt: a shell context
arg: a string argument
node: a first node
node2: a second node
Returns: an int, negative returns indicating errors.

Function type xmlShellReadlineFunc

char *	xmlShellReadlineFunc		(char * prompt)

This is a generic signature for the XML shell input function.

prompt: a string prompt
Returns: a string which will be freed by the Shell.

xmlBoolToText ()

const char *	xmlBoolToText		(int boolval)

Convenient way to turn bool into text

boolval: a bool to turn into text
Returns: a pointer to either "True" or "False"

xmlDebugCheckDocument ()

int	xmlDebugCheckDocument		(FILE * output, 
xmlDocPtr doc)

Check the document for potential content problems, and output the errors to @output

output: the FILE * for the output
doc: the document
Returns: the number of errors found

xmlDebugDumpAttr ()

void	xmlDebugDumpAttr		(FILE * output, 
xmlAttrPtr attr,
int depth)

Dumps debug information for the attribute

output: the FILE * for the output
attr: the attribute
depth: the indentation level.

xmlDebugDumpAttrList ()

void	xmlDebugDumpAttrList		(FILE * output, 
xmlAttrPtr attr,
int depth)

Dumps debug information for the attribute list

output: the FILE * for the output
attr: the attribute list
depth: the indentation level.

xmlDebugDumpDTD ()

void	xmlDebugDumpDTD			(FILE * output, 
xmlDtdPtr dtd)

Dumps debug information for the DTD

output: the FILE * for the output
dtd: the DTD

xmlDebugDumpDocument ()

void	xmlDebugDumpDocument		(FILE * output, 
xmlDocPtr doc)

Dumps debug information for the document, it's recursive

output: the FILE * for the output
doc: the document

xmlDebugDumpDocumentHead ()

void	xmlDebugDumpDocumentHead	(FILE * output, 
xmlDocPtr doc)

Dumps debug information concerning the document, not recursive

output: the FILE * for the output
doc: the document

xmlDebugDumpEntities ()

void	xmlDebugDumpEntities		(FILE * output, 
xmlDocPtr doc)

Dumps debug information for all the entities in use by the document

output: the FILE * for the output
doc: the document

xmlDebugDumpNode ()

void	xmlDebugDumpNode		(FILE * output, 
xmlNodePtr node,
int depth)

Dumps debug information for the element node, it is recursive

output: the FILE * for the output
node: the node
depth: the indentation level.

xmlDebugDumpNodeList ()

void	xmlDebugDumpNodeList		(FILE * output, 
xmlNodePtr node,
int depth)

Dumps debug information for the list of element node, it is recursive

output: the FILE * for the output
node: the node list
depth: the indentation level.

xmlDebugDumpOneNode ()

void	xmlDebugDumpOneNode		(FILE * output, 
xmlNodePtr node,
int depth)

Dumps debug information for the element node, it is not recursive

output: the FILE * for the output
node: the node
depth: the indentation level.

xmlDebugDumpString ()

void	xmlDebugDumpString		(FILE * output, 
const xmlChar * str)

Dumps information about the string, shorten it if necessary

output: the FILE * for the output
str: the string

xmlLsCountNode ()

int	xmlLsCountNode			(xmlNodePtr node)

Count the children of @node.

node: the node to count
Returns: the number of children of @node.

xmlLsOneNode ()

void	xmlLsOneNode			(FILE * output, 
xmlNodePtr node)

Dump to @output the type and name of @node.

output: the FILE * for the output
node: the node to dump

xmlShell ()

void	xmlShell			(xmlDocPtr doc, 
char * filename,
xmlShellReadlineFunc input,
FILE * output)

Implements the XML shell This allow to load, validate, view, modify and save a document using a environment similar to a UNIX commandline.

doc: the initial document
filename: the output buffer
input: the line reading function
output: the output FILE*, defaults to stdout if NULL

xmlShellBase ()

int	xmlShellBase			(xmlShellCtxtPtr ctxt, 
char * arg,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "base" dumps the current XML base of the node

ctxt: the shell context
arg: unused
node: a node
node2: unused
Returns: 0

xmlShellCat ()

int	xmlShellCat			(xmlShellCtxtPtr ctxt, 
char * arg,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "cat" dumps the serialization node content (XML or HTML).

ctxt: the shell context
arg: unused
node: a node
node2: unused
Returns: 0

xmlShellDir ()

int	xmlShellDir			(xmlShellCtxtPtr ctxt, 
char * arg,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "dir" dumps information about the node (namespace, attributes, content).

ctxt: the shell context
arg: unused
node: a node
node2: unused
Returns: 0

xmlShellDu ()

int	xmlShellDu			(xmlShellCtxtPtr ctxt, 
char * arg,
xmlNodePtr tree,
xmlNodePtr node2)

Implements the XML shell function "du" show the structure of the subtree under node @tree If @tree is null, the command works on the current node.

ctxt: the shell context
arg: unused
tree: a node defining a subtree
node2: unused
Returns: 0 or -1 in case of error

xmlShellList ()

int	xmlShellList			(xmlShellCtxtPtr ctxt, 
char * arg,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "ls" Does an Unix like listing of the given node (like a directory)

ctxt: the shell context
arg: unused
node: a node
node2: unused
Returns: 0

xmlShellLoad ()

int	xmlShellLoad			(xmlShellCtxtPtr ctxt, 
char * filename,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "load" loads a new document specified by the filename

ctxt: the shell context
filename: the file name
node: unused
node2: unused
Returns: 0 or -1 if loading failed

xmlShellPrintNode ()

void	xmlShellPrintNode		(xmlNodePtr node)

Print node to the output FILE

node: a non-null node to print to the output FILE

xmlShellPrintXPathError ()

void	xmlShellPrintXPathError		(int errorType, 
const char * arg)

Print the xpath error to libxml default error channel

errorType: valid xpath error id
arg: the argument that cause xpath to fail

xmlShellPrintXPathResult ()

void	xmlShellPrintXPathResult	(xmlXPathObjectPtr list)

Prints result to the output FILE

list: a valid result generated by an xpath evaluation

xmlShellPwd ()

int	xmlShellPwd			(xmlShellCtxtPtr ctxt, 
char * buffer,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "pwd" Show the full path from the root to the node, if needed building thumblers when similar elements exists at a given ancestor level. The output is compatible with XPath commands.

ctxt: the shell context
buffer: the output buffer
node: a node
node2: unused
Returns: 0 or -1 in case of error

xmlShellSave ()

int	xmlShellSave			(xmlShellCtxtPtr ctxt, 
char * filename,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "save" Write the current document to the filename, or it's original name

ctxt: the shell context
filename: the file name (optional)
node: unused
node2: unused
Returns: 0 or -1 in case of error

xmlShellValidate ()

int	xmlShellValidate		(xmlShellCtxtPtr ctxt, 
char * dtd,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "validate" Validate the document, if a DTD path is provided, then the validation is done against the given DTD.

ctxt: the shell context
dtd: the DTD URI (optional)
node: unused
node2: unused
Returns: 0 or -1 in case of error

xmlShellWrite ()

int	xmlShellWrite			(xmlShellCtxtPtr ctxt, 
char * filename,
xmlNodePtr node,
xmlNodePtr node2)

Implements the XML shell function "write" Write the current node to the filename, it saves the serialization of the subtree under the @node specified

ctxt: the shell context
filename: the file name
node: a node in the tree
node2: unused
Returns: 0 or -1 in case of error

PK!cIIlibxml2-xmlstring.htmlnu[ xmlstring: set of routines to process strings

xmlstring

xmlstring - set of routines to process strings

type and interfaces needed for the internal string handling of the library, especially UTF8 processing.

Author(s): Daniel Veillard

Synopsis

#define BAD_CAST;
typedef unsigned char xmlChar;
xmlChar *	xmlCharStrdup		(const char * cur);
xmlChar *	xmlCharStrndup		(const char * cur, 
int len); int xmlCheckUTF8 (const unsigned char * utf); int xmlGetUTF8Char (const unsigned char * utf,
int * len); int xmlStrEqual (const xmlChar * str1,
const xmlChar * str2); int xmlStrPrintf (xmlChar * buf,
int len,
const char * msg,
... ...); int xmlStrQEqual (const xmlChar * pref,
const xmlChar * name,
const xmlChar * str); int xmlStrVPrintf (xmlChar * buf,
int len,
const char * msg,
va_list ap); int xmlStrcasecmp (const xmlChar * str1,
const xmlChar * str2); const xmlChar * xmlStrcasestr (const xmlChar * str,
const xmlChar * val); xmlChar * xmlStrcat (xmlChar * cur,
const xmlChar * add); const xmlChar * xmlStrchr (const xmlChar * str,
xmlChar val); int xmlStrcmp (const xmlChar * str1,
const xmlChar * str2); xmlChar * xmlStrdup (const xmlChar * cur); int xmlStrlen (const xmlChar * str); int xmlStrncasecmp (const xmlChar * str1,
const xmlChar * str2,
int len); xmlChar * xmlStrncat (xmlChar * cur,
const xmlChar * add,
int len); xmlChar * xmlStrncatNew (const xmlChar * str1,
const xmlChar * str2,
int len); int xmlStrncmp (const xmlChar * str1,
const xmlChar * str2,
int len); xmlChar * xmlStrndup (const xmlChar * cur,
int len); const xmlChar * xmlStrstr (const xmlChar * str,
const xmlChar * val); xmlChar * xmlStrsub (const xmlChar * str,
int start,
int len); int xmlUTF8Charcmp (const xmlChar * utf1,
const xmlChar * utf2); int xmlUTF8Size (const xmlChar * utf); int xmlUTF8Strlen (const xmlChar * utf); int xmlUTF8Strloc (const xmlChar * utf,
const xmlChar * utfchar); xmlChar * xmlUTF8Strndup (const xmlChar * utf,
int len); const xmlChar * xmlUTF8Strpos (const xmlChar * utf,
int pos); int xmlUTF8Strsize (const xmlChar * utf,
int len); xmlChar * xmlUTF8Strsub (const xmlChar * utf,
int start,
int len);

Description

Details

Macro BAD_CAST

#define BAD_CAST;

Macro to cast a string to an xmlChar * when one know its safe.


Typedef xmlChar

unsigned char xmlChar;

This is a basic byte in an UTF-8 encoded string. It's unsigned allowing to pinpoint case where char * are assigned to xmlChar * (possibly making serialization back impossible).


xmlCharStrdup ()

xmlChar *	xmlCharStrdup		(const char * cur)

a strdup for char's to xmlChar's

cur: the input char *
Returns: a new xmlChar * or NULL

xmlCharStrndup ()

xmlChar *	xmlCharStrndup		(const char * cur, 
int len)

a strndup for char's to xmlChar's

cur: the input char *
len: the len of @cur
Returns: a new xmlChar * or NULL

xmlCheckUTF8 ()

int	xmlCheckUTF8			(const unsigned char * utf)

Checks @utf for being valid UTF-8. @utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer UTF-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value.

utf: Pointer to putative UTF-8 encoded string.
Returns: value: true if @utf is valid.

xmlGetUTF8Char ()

int	xmlGetUTF8Char			(const unsigned char * utf, 
int * len)

Read the first UTF8 character from @utf

utf: a sequence of UTF-8 encoded bytes
len: a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.
Returns: the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)

xmlStrEqual ()

int	xmlStrEqual			(const xmlChar * str1, 
const xmlChar * str2)

Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()

str1: the first xmlChar *
str2: the second xmlChar *
Returns: 1 if they are equal, 0 if they are different

xmlStrPrintf ()

int	xmlStrPrintf			(xmlChar * buf, 
int len,
const char * msg,
... ...)

Formats @msg and places result into @buf.

buf: the result buffer.
len: the result buffer length.
msg: the message with printf formatting.
...: extra parameters for the message.
Returns: the number of characters written to @buf or -1 if an error occurs.

xmlStrQEqual ()

int	xmlStrQEqual			(const xmlChar * pref, 
const xmlChar * name,
const xmlChar * str)

Check if a QName is Equal to a given string

pref: the prefix of the QName
name: the localname of the QName
str: the second xmlChar *
Returns: 1 if they are equal, 0 if they are different

xmlStrVPrintf ()

int	xmlStrVPrintf			(xmlChar * buf, 
int len,
const char * msg,
va_list ap)

Formats @msg and places result into @buf.

buf: the result buffer.
len: the result buffer length.
msg: the message with printf formatting.
ap: extra parameters for the message.
Returns: the number of characters written to @buf or -1 if an error occurs.

xmlStrcasecmp ()

int	xmlStrcasecmp			(const xmlChar * str1, 
const xmlChar * str2)

a strcasecmp for xmlChar's

str1: the first xmlChar *
str2: the second xmlChar *
Returns: the integer result of the comparison

xmlStrcasestr ()

const xmlChar *	xmlStrcasestr		(const xmlChar * str, 
const xmlChar * val)

a case-ignoring strstr for xmlChar's

str: the xmlChar * array (haystack)
val: the xmlChar to search (needle)
Returns: the xmlChar * for the first occurrence or NULL.

xmlStrcat ()

xmlChar *	xmlStrcat		(xmlChar * cur, 
const xmlChar * add)

a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

cur: the original xmlChar * array
add: the xmlChar * array added
Returns: a new xmlChar * containing the concatenated string. The original @cur is reallocated and should not be freed.

xmlStrchr ()

const xmlChar *	xmlStrchr		(const xmlChar * str, 
xmlChar val)

a strchr for xmlChar's

str: the xmlChar * array
val: the xmlChar to search
Returns: the xmlChar * for the first occurrence or NULL.

xmlStrcmp ()

int	xmlStrcmp			(const xmlChar * str1, 
const xmlChar * str2)

a strcmp for xmlChar's

str1: the first xmlChar *
str2: the second xmlChar *
Returns: the integer result of the comparison

xmlStrdup ()

xmlChar *	xmlStrdup		(const xmlChar * cur)

a strdup for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

cur: the input xmlChar *
Returns: a new xmlChar * or NULL

xmlStrlen ()

int	xmlStrlen			(const xmlChar * str)

length of a xmlChar's string

str: the xmlChar * array
Returns: the number of xmlChar contained in the ARRAY.

xmlStrncasecmp ()

int	xmlStrncasecmp			(const xmlChar * str1, 
const xmlChar * str2,
int len)

a strncasecmp for xmlChar's

str1: the first xmlChar *
str2: the second xmlChar *
len: the max comparison length
Returns: the integer result of the comparison

xmlStrncat ()

xmlChar *	xmlStrncat		(xmlChar * cur, 
const xmlChar * add,
int len)

a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len < 0 then this is an API error and NULL will be returned.

cur: the original xmlChar * array
add: the xmlChar * array added
len: the length of @add
Returns: a new xmlChar *, the original @cur is reallocated and should not be freed.

xmlStrncatNew ()

xmlChar *	xmlStrncatNew		(const xmlChar * str1, 
const xmlChar * str2,
int len)

same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is < 0 then the length will be calculated automatically.

str1: first xmlChar string
str2: second xmlChar string
len: the len of @str2 or < 0
Returns: a new xmlChar * or NULL

xmlStrncmp ()

int	xmlStrncmp			(const xmlChar * str1, 
const xmlChar * str2,
int len)

a strncmp for xmlChar's

str1: the first xmlChar *
str2: the second xmlChar *
len: the max comparison length
Returns: the integer result of the comparison

xmlStrndup ()

xmlChar *	xmlStrndup		(const xmlChar * cur, 
int len)

a strndup for array of xmlChar's

cur: the input xmlChar *
len: the len of @cur
Returns: a new xmlChar * or NULL

xmlStrstr ()

const xmlChar *	xmlStrstr		(const xmlChar * str, 
const xmlChar * val)

a strstr for xmlChar's

str: the xmlChar * array (haystack)
val: the xmlChar to search (needle)
Returns: the xmlChar * for the first occurrence or NULL.

xmlStrsub ()

xmlChar *	xmlStrsub		(const xmlChar * str, 
int start,
int len)

Extract a substring of a given string

str: the xmlChar * array (haystack)
start: the index of the first char (zero based)
len: the length of the substring
Returns: the xmlChar * for the first occurrence or NULL.

xmlUTF8Charcmp ()

int	xmlUTF8Charcmp			(const xmlChar * utf1, 
const xmlChar * utf2)

compares the two UCS4 values

utf1: pointer to first UTF8 char
utf2: pointer to second UTF8 char
Returns: result of the compare as with xmlStrncmp

xmlUTF8Size ()

int	xmlUTF8Size			(const xmlChar * utf)

calculates the internal size of a UTF8 character

utf: pointer to the UTF8 character
Returns: the numbers of bytes in the character, -1 on format error

xmlUTF8Strlen ()

int	xmlUTF8Strlen			(const xmlChar * utf)

compute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string.

utf: a sequence of UTF-8 encoded bytes
Returns: the number of characters in the string or -1 in case of error

xmlUTF8Strloc ()

int	xmlUTF8Strloc			(const xmlChar * utf, 
const xmlChar * utfchar)

a function to provide the relative location of a UTF8 char

utf: the input UTF8 *
utfchar: the UTF8 character to be found
Returns: the relative character position of the desired char or -1 if not found

xmlUTF8Strndup ()

xmlChar *	xmlUTF8Strndup		(const xmlChar * utf, 
int len)

a strndup for array of UTF8's

utf: the input UTF8 *
len: the len of @utf (in chars)
Returns: a new UTF8 * or NULL

xmlUTF8Strpos ()

const xmlChar *	xmlUTF8Strpos		(const xmlChar * utf, 
int pos)

a function to provide the equivalent of fetching a character from a string array

utf: the input UTF8 *
pos: the position of the desired UTF8 char (in chars)
Returns: a pointer to the UTF8 character or NULL

xmlUTF8Strsize ()

int	xmlUTF8Strsize			(const xmlChar * utf, 
int len)

storage size of an UTF8 string the behaviour is not guaranteed if the input string is not UTF-8

utf: a sequence of UTF-8 encoded bytes
len: the number of characters in the array
Returns: the storage size of the first 'len' characters of ARRAY

xmlUTF8Strsub ()

xmlChar *	xmlUTF8Strsub		(const xmlChar * utf, 
int start,
int len)

Create a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars

utf: a sequence of UTF-8 encoded bytes
start: relative pos of first char
len: total number to copy
Returns: a pointer to a newly created string or NULL if any problem

PK!ߚlibxml2-xmlwriter.htmlnu[ xmlwriter: text writing API for XML

xmlwriter

xmlwriter - text writing API for XML

text writing API for XML

Author(s): Alfred Mickautsch <alfred@mickautsch.de>

Synopsis

#define xmlTextWriterWriteDocType;
#define xmlTextWriterWriteProcessingInstruction;
typedef struct _xmlTextWriter xmlTextWriter;
typedef xmlTextWriter * xmlTextWriterPtr;
void	xmlFreeTextWriter		(xmlTextWriterPtr writer);
xmlTextWriterPtr	xmlNewTextWriter	(xmlOutputBufferPtr out);
xmlTextWriterPtr	xmlNewTextWriterDoc	(xmlDocPtr * doc, 
int compression); xmlTextWriterPtr xmlNewTextWriterFilename (const char * uri,
int compression); xmlTextWriterPtr xmlNewTextWriterMemory (xmlBufferPtr buf,
int compression); xmlTextWriterPtr xmlNewTextWriterPushParser (xmlParserCtxtPtr ctxt,
int compression); xmlTextWriterPtr xmlNewTextWriterTree (xmlDocPtr doc,
xmlNodePtr node,
int compression); int xmlTextWriterEndAttribute (xmlTextWriterPtr writer); int xmlTextWriterEndCDATA (xmlTextWriterPtr writer); int xmlTextWriterEndComment (xmlTextWriterPtr writer); int xmlTextWriterEndDTD (xmlTextWriterPtr writer); int xmlTextWriterEndDTDAttlist (xmlTextWriterPtr writer); int xmlTextWriterEndDTDElement (xmlTextWriterPtr writer); int xmlTextWriterEndDTDEntity (xmlTextWriterPtr writer); int xmlTextWriterEndDocument (xmlTextWriterPtr writer); int xmlTextWriterEndElement (xmlTextWriterPtr writer); int xmlTextWriterEndPI (xmlTextWriterPtr writer); int xmlTextWriterFlush (xmlTextWriterPtr writer); int xmlTextWriterFullEndElement (xmlTextWriterPtr writer); int xmlTextWriterSetIndent (xmlTextWriterPtr writer,
int indent); int xmlTextWriterSetIndentString (xmlTextWriterPtr writer,
const xmlChar * str); int xmlTextWriterSetQuoteChar (xmlTextWriterPtr writer,
xmlChar quotechar); int xmlTextWriterStartAttribute (xmlTextWriterPtr writer,
const xmlChar * name); int xmlTextWriterStartAttributeNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI); int xmlTextWriterStartCDATA (xmlTextWriterPtr writer); int xmlTextWriterStartComment (xmlTextWriterPtr writer); int xmlTextWriterStartDTD (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid); int xmlTextWriterStartDTDAttlist (xmlTextWriterPtr writer,
const xmlChar * name); int xmlTextWriterStartDTDElement (xmlTextWriterPtr writer,
const xmlChar * name); int xmlTextWriterStartDTDEntity (xmlTextWriterPtr writer,
int pe,
const xmlChar * name); int xmlTextWriterStartDocument (xmlTextWriterPtr writer,
const char * version,
const char * encoding,
const char * standalone); int xmlTextWriterStartElement (xmlTextWriterPtr writer,
const xmlChar * name); int xmlTextWriterStartElementNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI); int xmlTextWriterStartPI (xmlTextWriterPtr writer,
const xmlChar * target); int xmlTextWriterWriteAttribute (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * content); int xmlTextWriterWriteAttributeNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const xmlChar * content); int xmlTextWriterWriteBase64 (xmlTextWriterPtr writer,
const char * data,
int start,
int len); int xmlTextWriterWriteBinHex (xmlTextWriterPtr writer,
const char * data,
int start,
int len); int xmlTextWriterWriteCDATA (xmlTextWriterPtr writer,
const xmlChar * content); int xmlTextWriterWriteComment (xmlTextWriterPtr writer,
const xmlChar * content); int xmlTextWriterWriteDTD (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * subset); int xmlTextWriterWriteDTDAttlist (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * content); int xmlTextWriterWriteDTDElement (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * content); int xmlTextWriterWriteDTDEntity (xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid,
const xmlChar * content); int xmlTextWriterWriteDTDExternalEntity (xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid); int xmlTextWriterWriteDTDExternalEntityContents (xmlTextWriterPtr writer,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid); int xmlTextWriterWriteDTDInternalEntity (xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * content); int xmlTextWriterWriteDTDNotation (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid); int xmlTextWriterWriteElement (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * content); int xmlTextWriterWriteElementNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const xmlChar * content); int xmlTextWriterWriteFormatAttribute (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
... ...); int xmlTextWriterWriteFormatAttributeNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
... ...); int xmlTextWriterWriteFormatCDATA (xmlTextWriterPtr writer,
const char * format,
... ...); int xmlTextWriterWriteFormatComment (xmlTextWriterPtr writer,
const char * format,
... ...); int xmlTextWriterWriteFormatDTD (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char * format,
... ...); int xmlTextWriterWriteFormatDTDAttlist (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
... ...); int xmlTextWriterWriteFormatDTDElement (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
... ...); int xmlTextWriterWriteFormatDTDInternalEntity (xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char * format,
... ...); int xmlTextWriterWriteFormatElement (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
... ...); int xmlTextWriterWriteFormatElementNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
... ...); int xmlTextWriterWriteFormatPI (xmlTextWriterPtr writer,
const xmlChar * target,
const char * format,
... ...); int xmlTextWriterWriteFormatRaw (xmlTextWriterPtr writer,
const char * format,
... ...); int xmlTextWriterWriteFormatString (xmlTextWriterPtr writer,
const char * format,
... ...); int xmlTextWriterWritePI (xmlTextWriterPtr writer,
const xmlChar * target,
const xmlChar * content); int xmlTextWriterWriteRaw (xmlTextWriterPtr writer,
const xmlChar * content); int xmlTextWriterWriteRawLen (xmlTextWriterPtr writer,
const xmlChar * content,
int len); int xmlTextWriterWriteString (xmlTextWriterPtr writer,
const xmlChar * content); int xmlTextWriterWriteVFormatAttribute (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatAttributeNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatCDATA (xmlTextWriterPtr writer,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatComment (xmlTextWriterPtr writer,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatDTD (xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatDTDAttlist (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatDTDElement (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatDTDInternalEntity (xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatElement (xmlTextWriterPtr writer,
const xmlChar * name,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatElementNS (xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatPI (xmlTextWriterPtr writer,
const xmlChar * target,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatRaw (xmlTextWriterPtr writer,
const char * format,
va_list argptr); int xmlTextWriterWriteVFormatString (xmlTextWriterPtr writer,
const char * format,
va_list argptr);

Description

Details

Macro xmlTextWriterWriteDocType

#define xmlTextWriterWriteDocType;

this macro maps to xmlTextWriterWriteDTD


Macro xmlTextWriterWriteProcessingInstruction

#define xmlTextWriterWriteProcessingInstruction;

This macro maps to xmlTextWriterWritePI


Structure xmlTextWriter

struct _xmlTextWriter {
The content of this structure is not made public by the API.
} xmlTextWriter;


Typedef xmlTextWriterPtr

xmlTextWriter * xmlTextWriterPtr;


xmlFreeTextWriter ()

void	xmlFreeTextWriter		(xmlTextWriterPtr writer)

Deallocate all the resources associated to the writer

writer: the xmlTextWriterPtr

xmlNewTextWriter ()

xmlTextWriterPtr	xmlNewTextWriter	(xmlOutputBufferPtr out)

Create a new xmlNewTextWriter structure using an xmlOutputBufferPtr NOTE: the @out parameter will be deallocated when the writer is closed (if the call succeed.)

out: an xmlOutputBufferPtr
Returns: the new xmlTextWriterPtr or NULL in case of error

xmlNewTextWriterDoc ()

xmlTextWriterPtr	xmlNewTextWriterDoc	(xmlDocPtr * doc, 
int compression)

Create a new xmlNewTextWriter structure with @*doc as output

doc: address of a xmlDocPtr to hold the new XML document tree
compression: compress the output?
Returns: the new xmlTextWriterPtr or NULL in case of error

xmlNewTextWriterFilename ()

xmlTextWriterPtr	xmlNewTextWriterFilename	(const char * uri, 
int compression)

Create a new xmlNewTextWriter structure with @uri as output

uri: the URI of the resource for the output
compression: compress the output?
Returns: the new xmlTextWriterPtr or NULL in case of error

xmlNewTextWriterMemory ()

xmlTextWriterPtr	xmlNewTextWriterMemory	(xmlBufferPtr buf, 
int compression)

Create a new xmlNewTextWriter structure with @buf as output TODO: handle compression

buf: xmlBufferPtr
compression: compress the output?
Returns: the new xmlTextWriterPtr or NULL in case of error

xmlNewTextWriterPushParser ()

xmlTextWriterPtr	xmlNewTextWriterPushParser	(xmlParserCtxtPtr ctxt, 
int compression)

Create a new xmlNewTextWriter structure with @ctxt as output NOTE: the @ctxt context will be freed with the resulting writer (if the call succeeds). TODO: handle compression

ctxt: xmlParserCtxtPtr to hold the new XML document tree
compression: compress the output?
Returns: the new xmlTextWriterPtr or NULL in case of error

xmlNewTextWriterTree ()

xmlTextWriterPtr	xmlNewTextWriterTree	(xmlDocPtr doc, 
xmlNodePtr node,
int compression)

Create a new xmlNewTextWriter structure with @doc as output starting at @node

doc: xmlDocPtr
node: xmlNodePtr or NULL for doc->children
compression: compress the output?
Returns: the new xmlTextWriterPtr or NULL in case of error

xmlTextWriterEndAttribute ()

int	xmlTextWriterEndAttribute	(xmlTextWriterPtr writer)

End the current xml element.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterEndCDATA ()

int	xmlTextWriterEndCDATA		(xmlTextWriterPtr writer)

End an xml CDATA section.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterEndComment ()

int	xmlTextWriterEndComment		(xmlTextWriterPtr writer)

End the current xml comment.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterEndDTD ()

int	xmlTextWriterEndDTD		(xmlTextWriterPtr writer)

End an xml DTD.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterEndDTDAttlist ()

int	xmlTextWriterEndDTDAttlist	(xmlTextWriterPtr writer)

End an xml DTD attribute list.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterEndDTDElement ()

int	xmlTextWriterEndDTDElement	(xmlTextWriterPtr writer)

End an xml DTD element.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterEndDTDEntity ()

int	xmlTextWriterEndDTDEntity	(xmlTextWriterPtr writer)

End an xml DTD entity.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterEndDocument ()

int	xmlTextWriterEndDocument	(xmlTextWriterPtr writer)

End an xml document. All open elements are closed, and the content is flushed to the output.

writer: the xmlTextWriterPtr
Returns: the bytes written or -1 in case of error

xmlTextWriterEndElement ()

int	xmlTextWriterEndElement		(xmlTextWriterPtr writer)

End the current xml element.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterEndPI ()

int	xmlTextWriterEndPI		(xmlTextWriterPtr writer)

End the current xml PI.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterFlush ()

int	xmlTextWriterFlush		(xmlTextWriterPtr writer)

Flush the output buffer.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterFullEndElement ()

int	xmlTextWriterFullEndElement	(xmlTextWriterPtr writer)

End the current xml element. Writes an end tag even if the element is empty

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterSetIndent ()

int	xmlTextWriterSetIndent		(xmlTextWriterPtr writer, 
int indent)

Set indentation output. indent = 0 do not indentation. indent > 0 do indentation.

writer: the xmlTextWriterPtr
indent: do indentation?
Returns: -1 on error or 0 otherwise.

xmlTextWriterSetIndentString ()

int	xmlTextWriterSetIndentString	(xmlTextWriterPtr writer, 
const xmlChar * str)

Set string indentation.

writer: the xmlTextWriterPtr
str: the xmlChar string
Returns: -1 on error or 0 otherwise.

xmlTextWriterSetQuoteChar ()

int	xmlTextWriterSetQuoteChar	(xmlTextWriterPtr writer, 
xmlChar quotechar)

Set the character used for quoting attributes.

writer: the xmlTextWriterPtr
quotechar: the quote character
Returns: -1 on error or 0 otherwise.

xmlTextWriterStartAttribute ()

int	xmlTextWriterStartAttribute	(xmlTextWriterPtr writer, 
const xmlChar * name)

Start an xml attribute.

writer: the xmlTextWriterPtr
name: element name
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartAttributeNS ()

int	xmlTextWriterStartAttributeNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI)

Start an xml attribute with namespace support.

writer: the xmlTextWriterPtr
prefix: namespace prefix or NULL
name: element local name
namespaceURI: namespace URI or NULL
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartCDATA ()

int	xmlTextWriterStartCDATA		(xmlTextWriterPtr writer)

Start an xml CDATA section.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartComment ()

int	xmlTextWriterStartComment	(xmlTextWriterPtr writer)

Start an xml comment.

writer: the xmlTextWriterPtr
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartDTD ()

int	xmlTextWriterStartDTD		(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid)

Start an xml DTD.

writer: the xmlTextWriterPtr
name: the name of the DTD
pubid: the public identifier, which is an alternative to the system identifier
sysid: the system identifier, which is the URI of the DTD
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartDTDAttlist ()

int	xmlTextWriterStartDTDAttlist	(xmlTextWriterPtr writer, 
const xmlChar * name)

Start an xml DTD ATTLIST.

writer: the xmlTextWriterPtr
name: the name of the DTD ATTLIST
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartDTDElement ()

int	xmlTextWriterStartDTDElement	(xmlTextWriterPtr writer, 
const xmlChar * name)

Start an xml DTD element.

writer: the xmlTextWriterPtr
name: the name of the DTD element
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartDTDEntity ()

int	xmlTextWriterStartDTDEntity	(xmlTextWriterPtr writer, 
int pe,
const xmlChar * name)

Start an xml DTD ATTLIST.

writer: the xmlTextWriterPtr
pe: TRUE if this is a parameter entity, FALSE if not
name: the name of the DTD ATTLIST
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartDocument ()

int	xmlTextWriterStartDocument	(xmlTextWriterPtr writer, 
const char * version,
const char * encoding,
const char * standalone)

Start a new xml document

writer: the xmlTextWriterPtr
version: the xml version ("1.0") or NULL for default ("1.0")
encoding: the encoding or NULL for default
standalone: "yes" or "no" or NULL for default
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartElement ()

int	xmlTextWriterStartElement	(xmlTextWriterPtr writer, 
const xmlChar * name)

Start an xml element.

writer: the xmlTextWriterPtr
name: element name
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartElementNS ()

int	xmlTextWriterStartElementNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI)

Start an xml element with namespace support.

writer: the xmlTextWriterPtr
prefix: namespace prefix or NULL
name: element local name
namespaceURI: namespace URI or NULL
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterStartPI ()

int	xmlTextWriterStartPI		(xmlTextWriterPtr writer, 
const xmlChar * target)

Start an xml PI.

writer: the xmlTextWriterPtr
target: PI target
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteAttribute ()

int	xmlTextWriterWriteAttribute	(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * content)

Write an xml attribute.

writer: the xmlTextWriterPtr
name: attribute name
content: attribute content
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteAttributeNS ()

int	xmlTextWriterWriteAttributeNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const xmlChar * content)

Write an xml attribute.

writer: the xmlTextWriterPtr
prefix: namespace prefix
name: attribute local name
namespaceURI: namespace URI
content: attribute content
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteBase64 ()

int	xmlTextWriterWriteBase64	(xmlTextWriterPtr writer, 
const char * data,
int start,
int len)

Write an base64 encoded xml text.

writer: the xmlTextWriterPtr
data: binary data
start: the position within the data of the first byte to encode
len: the number of bytes to encode
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteBinHex ()

int	xmlTextWriterWriteBinHex	(xmlTextWriterPtr writer, 
const char * data,
int start,
int len)

Write a BinHex encoded xml text.

writer: the xmlTextWriterPtr
data: binary data
start: the position within the data of the first byte to encode
len: the number of bytes to encode
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteCDATA ()

int	xmlTextWriterWriteCDATA		(xmlTextWriterPtr writer, 
const xmlChar * content)

Write an xml CDATA.

writer: the xmlTextWriterPtr
content: CDATA content
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteComment ()

int	xmlTextWriterWriteComment	(xmlTextWriterPtr writer, 
const xmlChar * content)

Write an xml comment.

writer: the xmlTextWriterPtr
content: comment string
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteDTD ()

int	xmlTextWriterWriteDTD		(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * subset)

Write a DTD.

writer: the xmlTextWriterPtr
name: the name of the DTD
pubid: the public identifier, which is an alternative to the system identifier
sysid: the system identifier, which is the URI of the DTD
subset: string content of the DTD
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteDTDAttlist ()

int	xmlTextWriterWriteDTDAttlist	(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * content)

Write a DTD ATTLIST.

writer: the xmlTextWriterPtr
name: the name of the DTD ATTLIST
content: content of the ATTLIST
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteDTDElement ()

int	xmlTextWriterWriteDTDElement	(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * content)

Write a DTD element.

writer: the xmlTextWriterPtr
name: the name of the DTD element
content: content of the element
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteDTDEntity ()

int	xmlTextWriterWriteDTDEntity	(xmlTextWriterPtr writer, 
int pe,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid,
const xmlChar * content)

Write a DTD entity.

writer: the xmlTextWriterPtr
pe: TRUE if this is a parameter entity, FALSE if not
name: the name of the DTD entity
pubid: the public identifier, which is an alternative to the system identifier
sysid: the system identifier, which is the URI of the DTD
ndataid: the xml notation name.
content: content of the entity
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteDTDExternalEntity ()

int	xmlTextWriterWriteDTDExternalEntity	(xmlTextWriterPtr writer, 
int pe,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid)

Write a DTD external entity. The entity must have been started with xmlTextWriterStartDTDEntity

writer: the xmlTextWriterPtr
pe: TRUE if this is a parameter entity, FALSE if not
name: the name of the DTD entity
pubid: the public identifier, which is an alternative to the system identifier
sysid: the system identifier, which is the URI of the DTD
ndataid: the xml notation name.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteDTDExternalEntityContents ()

int	xmlTextWriterWriteDTDExternalEntityContents	(xmlTextWriterPtr writer, 
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid)

Write the contents of a DTD external entity.

writer: the xmlTextWriterPtr
pubid: the public identifier, which is an alternative to the system identifier
sysid: the system identifier, which is the URI of the DTD
ndataid: the xml notation name.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteDTDInternalEntity ()

int	xmlTextWriterWriteDTDInternalEntity	(xmlTextWriterPtr writer, 
int pe,
const xmlChar * name,
const xmlChar * content)

Write a DTD internal entity.

writer: the xmlTextWriterPtr
pe: TRUE if this is a parameter entity, FALSE if not
name: the name of the DTD entity
content: content of the entity
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteDTDNotation ()

int	xmlTextWriterWriteDTDNotation	(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid)

Write a DTD entity.

writer: the xmlTextWriterPtr
name: the name of the xml notation
pubid: the public identifier, which is an alternative to the system identifier
sysid: the system identifier, which is the URI of the DTD
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteElement ()

int	xmlTextWriterWriteElement	(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * content)

Write an xml element.

writer: the xmlTextWriterPtr
name: element name
content: element content
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteElementNS ()

int	xmlTextWriterWriteElementNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const xmlChar * content)

Write an xml element with namespace support.

writer: the xmlTextWriterPtr
prefix: namespace prefix
name: element local name
namespaceURI: namespace URI
content: element content
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatAttribute ()

int	xmlTextWriterWriteFormatAttribute	(xmlTextWriterPtr writer, 
const xmlChar * name,
const char * format,
... ...)

Write a formatted xml attribute.

writer: the xmlTextWriterPtr
name: attribute name
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatAttributeNS ()

int	xmlTextWriterWriteFormatAttributeNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
... ...)

Write a formatted xml attribute.with namespace support

writer: the xmlTextWriterPtr
prefix: namespace prefix
name: attribute local name
namespaceURI: namespace URI
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatCDATA ()

int	xmlTextWriterWriteFormatCDATA	(xmlTextWriterPtr writer, 
const char * format,
... ...)

Write a formatted xml CDATA.

writer: the xmlTextWriterPtr
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatComment ()

int	xmlTextWriterWriteFormatComment	(xmlTextWriterPtr writer, 
const char * format,
... ...)

Write an xml comment.

writer: the xmlTextWriterPtr
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatDTD ()

int	xmlTextWriterWriteFormatDTD	(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char * format,
... ...)

Write a DTD with a formatted markup declarations part.

writer: the xmlTextWriterPtr
name: the name of the DTD
pubid: the public identifier, which is an alternative to the system identifier
sysid: the system identifier, which is the URI of the DTD
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatDTDAttlist ()

int	xmlTextWriterWriteFormatDTDAttlist	(xmlTextWriterPtr writer, 
const xmlChar * name,
const char * format,
... ...)

Write a formatted DTD ATTLIST.

writer: the xmlTextWriterPtr
name: the name of the DTD ATTLIST
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatDTDElement ()

int	xmlTextWriterWriteFormatDTDElement	(xmlTextWriterPtr writer, 
const xmlChar * name,
const char * format,
... ...)

Write a formatted DTD element.

writer: the xmlTextWriterPtr
name: the name of the DTD element
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatDTDInternalEntity ()

int	xmlTextWriterWriteFormatDTDInternalEntity	(xmlTextWriterPtr writer, 
int pe,
const xmlChar * name,
const char * format,
... ...)

Write a formatted DTD internal entity.

writer: the xmlTextWriterPtr
pe: TRUE if this is a parameter entity, FALSE if not
name: the name of the DTD entity
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatElement ()

int	xmlTextWriterWriteFormatElement	(xmlTextWriterPtr writer, 
const xmlChar * name,
const char * format,
... ...)

Write a formatted xml element.

writer: the xmlTextWriterPtr
name: element name
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatElementNS ()

int	xmlTextWriterWriteFormatElementNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
... ...)

Write a formatted xml element with namespace support.

writer: the xmlTextWriterPtr
prefix: namespace prefix
name: element local name
namespaceURI: namespace URI
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatPI ()

int	xmlTextWriterWriteFormatPI	(xmlTextWriterPtr writer, 
const xmlChar * target,
const char * format,
... ...)

Write a formatted PI.

writer: the xmlTextWriterPtr
target: PI target
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatRaw ()

int	xmlTextWriterWriteFormatRaw	(xmlTextWriterPtr writer, 
const char * format,
... ...)

Write a formatted raw xml text.

writer: the xmlTextWriterPtr
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteFormatString ()

int	xmlTextWriterWriteFormatString	(xmlTextWriterPtr writer, 
const char * format,
... ...)

Write a formatted xml text.

writer: the xmlTextWriterPtr
format: format string (see printf)
...: extra parameters for the format
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWritePI ()

int	xmlTextWriterWritePI		(xmlTextWriterPtr writer, 
const xmlChar * target,
const xmlChar * content)

Write an xml PI.

writer: the xmlTextWriterPtr
target: PI target
content: PI content
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteRaw ()

int	xmlTextWriterWriteRaw		(xmlTextWriterPtr writer, 
const xmlChar * content)

Write a raw xml text.

writer: the xmlTextWriterPtr
content: text string
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteRawLen ()

int	xmlTextWriterWriteRawLen	(xmlTextWriterPtr writer, 
const xmlChar * content,
int len)

Write an xml text. TODO: what about entities and special chars??

writer: the xmlTextWriterPtr
content: text string
len: length of the text string
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteString ()

int	xmlTextWriterWriteString	(xmlTextWriterPtr writer, 
const xmlChar * content)

Write an xml text.

writer: the xmlTextWriterPtr
content: text string
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatAttribute ()

int	xmlTextWriterWriteVFormatAttribute	(xmlTextWriterPtr writer, 
const xmlChar * name,
const char * format,
va_list argptr)

Write a formatted xml attribute.

writer: the xmlTextWriterPtr
name: attribute name
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatAttributeNS ()

int	xmlTextWriterWriteVFormatAttributeNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
va_list argptr)

Write a formatted xml attribute.with namespace support

writer: the xmlTextWriterPtr
prefix: namespace prefix
name: attribute local name
namespaceURI: namespace URI
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatCDATA ()

int	xmlTextWriterWriteVFormatCDATA	(xmlTextWriterPtr writer, 
const char * format,
va_list argptr)

Write a formatted xml CDATA.

writer: the xmlTextWriterPtr
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatComment ()

int	xmlTextWriterWriteVFormatComment	(xmlTextWriterPtr writer, 
const char * format,
va_list argptr)

Write an xml comment.

writer: the xmlTextWriterPtr
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatDTD ()

int	xmlTextWriterWriteVFormatDTD	(xmlTextWriterPtr writer, 
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char * format,
va_list argptr)

Write a DTD with a formatted markup declarations part.

writer: the xmlTextWriterPtr
name: the name of the DTD
pubid: the public identifier, which is an alternative to the system identifier
sysid: the system identifier, which is the URI of the DTD
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatDTDAttlist ()

int	xmlTextWriterWriteVFormatDTDAttlist	(xmlTextWriterPtr writer, 
const xmlChar * name,
const char * format,
va_list argptr)

Write a formatted DTD ATTLIST.

writer: the xmlTextWriterPtr
name: the name of the DTD ATTLIST
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatDTDElement ()

int	xmlTextWriterWriteVFormatDTDElement	(xmlTextWriterPtr writer, 
const xmlChar * name,
const char * format,
va_list argptr)

Write a formatted DTD element.

writer: the xmlTextWriterPtr
name: the name of the DTD element
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatDTDInternalEntity ()

int	xmlTextWriterWriteVFormatDTDInternalEntity	(xmlTextWriterPtr writer, 
int pe,
const xmlChar * name,
const char * format,
va_list argptr)

Write a formatted DTD internal entity.

writer: the xmlTextWriterPtr
pe: TRUE if this is a parameter entity, FALSE if not
name: the name of the DTD entity
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatElement ()

int	xmlTextWriterWriteVFormatElement	(xmlTextWriterPtr writer, 
const xmlChar * name,
const char * format,
va_list argptr)

Write a formatted xml element.

writer: the xmlTextWriterPtr
name: element name
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatElementNS ()

int	xmlTextWriterWriteVFormatElementNS	(xmlTextWriterPtr writer, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char * format,
va_list argptr)

Write a formatted xml element with namespace support.

writer: the xmlTextWriterPtr
prefix: namespace prefix
name: element local name
namespaceURI: namespace URI
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatPI ()

int	xmlTextWriterWriteVFormatPI	(xmlTextWriterPtr writer, 
const xmlChar * target,
const char * format,
va_list argptr)

Write a formatted xml PI.

writer: the xmlTextWriterPtr
target: PI target
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatRaw ()

int	xmlTextWriterWriteVFormatRaw	(xmlTextWriterPtr writer, 
const char * format,
va_list argptr)

Write a formatted raw xml text.

writer: the xmlTextWriterPtr
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

xmlTextWriterWriteVFormatString ()

int	xmlTextWriterWriteVFormatString	(xmlTextWriterPtr writer, 
const char * format,
va_list argptr)

Write a formatted xml text.

writer: the xmlTextWriterPtr
format: format string (see printf)
argptr: pointer to the first member of the variable argument list.
Returns: the bytes written (may be 0 because of buffering) or -1 in case of error

PK!\V\Vlibxml2-nanoftp.htmlnu[ nanoftp: minimal FTP implementation

nanoftp

nanoftp - minimal FTP implementation

minimal FTP implementation allowing to fetch resources like external subset. This module is DEPRECATED, do not use any of its functions.

WARNING: this module is deprecated !

Author(s): Daniel Veillard

Synopsis

#define INVALID_SOCKET;
#define SOCKET;
typedef void ftpDataCallback			(void * userData, 
const char * data,
int len); typedef void ftpListCallback (void * userData,
const char * filename,
const char * attrib,
const char * owner,
const char * group,
unsigned long size,
int links,
int year,
const char * month,
int day,
int hour,
int minute); int xmlNanoFTPCheckResponse (void * ctx); void xmlNanoFTPCleanup (void); int xmlNanoFTPClose (void * ctx); int xmlNanoFTPCloseConnection (void * ctx); int xmlNanoFTPConnect (void * ctx); void * xmlNanoFTPConnectTo (const char * server,
int port); int xmlNanoFTPCwd (void * ctx,
const char * directory); int xmlNanoFTPDele (void * ctx,
const char * file); void xmlNanoFTPFreeCtxt (void * ctx); int xmlNanoFTPGet (void * ctx,
ftpDataCallback callback,
void * userData,
const char * filename); SOCKET xmlNanoFTPGetConnection (void * ctx); int xmlNanoFTPGetResponse (void * ctx); SOCKET xmlNanoFTPGetSocket (void * ctx,
const char * filename); void xmlNanoFTPInit (void); int xmlNanoFTPList (void * ctx,
ftpListCallback callback,
void * userData,
const char * filename); void * xmlNanoFTPNewCtxt (const char * URL); void * xmlNanoFTPOpen (const char * URL); void xmlNanoFTPProxy (const char * host,
int port,
const char * user,
const char * passwd,
int type); int xmlNanoFTPQuit (void * ctx); int xmlNanoFTPRead (void * ctx,
void * dest,
int len); void xmlNanoFTPScanProxy (const char * URL); int xmlNanoFTPUpdateURL (void * ctx,
const char * URL);

Description

Details

Macro INVALID_SOCKET

#define INVALID_SOCKET;

macro used to provide portability of code to windows sockets the value to be used when the socket is not valid


Macro SOCKET

#define SOCKET;

macro used to provide portability of code to windows sockets


Function type ftpDataCallback

void	ftpDataCallback			(void * userData, 
const char * data,
int len)

A callback for the xmlNanoFTPGet command.

userData: the user provided context
data: the data received
len: its size in bytes

Function type ftpListCallback

void	ftpListCallback			(void * userData, 
const char * filename,
const char * attrib,
const char * owner,
const char * group,
unsigned long size,
int links,
int year,
const char * month,
int day,
int hour,
int minute)

A callback for the xmlNanoFTPList command. Note that only one of year and day:minute are specified.

userData: user provided data for the callback
filename: the file name (including "->" when links are shown)
attrib: the attribute string
owner: the owner string
group: the group string
size: the file size
links: the link count
year: the year
month: the month
day: the day
hour: the hour
minute: the minute

xmlNanoFTPCheckResponse ()

int	xmlNanoFTPCheckResponse		(void * ctx)

Check if there is a response from the FTP server after a command.

ctx: an FTP context
Returns: the code number, or 0

xmlNanoFTPCleanup ()

void	xmlNanoFTPCleanup		(void)

Cleanup the FTP protocol layer. This cleanup proxy information.


xmlNanoFTPClose ()

int	xmlNanoFTPClose			(void * ctx)

Close the connection and both control and transport

ctx: an FTP context
Returns: -1 in case of error, 0 otherwise

xmlNanoFTPCloseConnection ()

int	xmlNanoFTPCloseConnection	(void * ctx)

Close the data connection from the server

ctx: an FTP context
Returns: -1 in case of error, 0 otherwise

xmlNanoFTPConnect ()

int	xmlNanoFTPConnect		(void * ctx)

Tries to open a control connection

ctx: an FTP context
Returns: -1 in case of error, 0 otherwise

xmlNanoFTPConnectTo ()

void *	xmlNanoFTPConnectTo		(const char * server, 
int port)

Tries to open a control connection to the given server/port

server: an FTP server name
port: the port (use 21 if 0)
Returns: an fTP context or NULL if it failed

xmlNanoFTPCwd ()

int	xmlNanoFTPCwd			(void * ctx, 
const char * directory)

Tries to change the remote directory

ctx: an FTP context
directory: a directory on the server
Returns: -1 in case of error, 1 if CWD worked, 0 if it failed

xmlNanoFTPDele ()

int	xmlNanoFTPDele			(void * ctx, 
const char * file)

Tries to delete an item (file or directory) from server

ctx: an FTP context
file: a file or directory on the server
Returns: -1 in case of error, 1 if DELE worked, 0 if it failed

xmlNanoFTPFreeCtxt ()

void	xmlNanoFTPFreeCtxt		(void * ctx)

Frees the context after closing the connection.

ctx: an FTP context

xmlNanoFTPGet ()

int	xmlNanoFTPGet			(void * ctx, 
ftpDataCallback callback,
void * userData,
const char * filename)

Fetch the given file from the server. All data are passed back in the callbacks. The last callback has a size of 0 block.

ctx: an FTP context
callback: the user callback
userData: the user callback data
filename: the file to retrieve
Returns: -1 in case of error, 0 otherwise

xmlNanoFTPGetConnection ()

SOCKET	xmlNanoFTPGetConnection		(void * ctx)

Try to open a data connection to the server. Currently only passive mode is supported.

ctx: an FTP context
Returns: -1 in case of error, 0 otherwise

xmlNanoFTPGetResponse ()

int	xmlNanoFTPGetResponse		(void * ctx)

Get the response from the FTP server after a command.

ctx: an FTP context
Returns: the code number

xmlNanoFTPGetSocket ()

SOCKET	xmlNanoFTPGetSocket		(void * ctx, 
const char * filename)

Initiate fetch of the given file from the server.

ctx: an FTP context
filename: the file to retrieve (or NULL if path is in context).
Returns: the socket for the data connection, or <0 in case of error

xmlNanoFTPInit ()

void	xmlNanoFTPInit			(void)

Initialize the FTP protocol layer. Currently it just checks for proxy information, and get the hostname


xmlNanoFTPList ()

int	xmlNanoFTPList			(void * ctx, 
ftpListCallback callback,
void * userData,
const char * filename)

Do a listing on the server. All files info are passed back in the callbacks.

ctx: an FTP context
callback: the user callback
userData: the user callback data
filename: optional files to list
Returns: -1 in case of error, 0 otherwise

xmlNanoFTPNewCtxt ()

void *	xmlNanoFTPNewCtxt		(const char * URL)

Allocate and initialize a new FTP context.

URL: The URL used to initialize the context
Returns: an FTP context or NULL in case of error.

xmlNanoFTPOpen ()

void *	xmlNanoFTPOpen			(const char * URL)

Start to fetch the given ftp:// resource

URL: the URL to the resource
Returns: an FTP context, or NULL

xmlNanoFTPProxy ()

void	xmlNanoFTPProxy			(const char * host, 
int port,
const char * user,
const char * passwd,
int type)

Setup the FTP proxy information. This can also be done by using ftp_proxy ftp_proxy_user and ftp_proxy_password environment variables.

host: the proxy host name
port: the proxy port
user: the proxy user name
passwd: the proxy password
type: the type of proxy 1 for using SITE, 2 for USER a@b

xmlNanoFTPQuit ()

int	xmlNanoFTPQuit			(void * ctx)

Send a QUIT command to the server

ctx: an FTP context
Returns: -1 in case of error, 0 otherwise

xmlNanoFTPRead ()

int	xmlNanoFTPRead			(void * ctx, 
void * dest,
int len)

This function tries to read @len bytes from the existing FTP connection and saves them in @dest. This is a blocking call.

ctx: the FTP context
dest: a buffer
len: the buffer length
Returns: the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.

xmlNanoFTPScanProxy ()

void	xmlNanoFTPScanProxy		(const char * URL)

(Re)Initialize the FTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like ftp://myproxy/ or ftp://myproxy:3128/ A NULL URL cleans up proxy information.

URL: The proxy URL used to initialize the proxy context

xmlNanoFTPUpdateURL ()

int	xmlNanoFTPUpdateURL		(void * ctx, 
const char * URL)

Update an FTP context by parsing the URL and finding new path it indicates. If there is an error in the protocol, hostname, port or other information, the error is raised. It indicates a new connection has to be established.

ctx: an FTP context
URL: The URL used to update the context
Returns: 0 if Ok, -1 in case of error (other host).

PK!Hkl\\libxml2-xmlregexp.htmlnu[ xmlregexp: regular expressions handling

xmlregexp

xmlregexp - regular expressions handling

basic API for libxml regular expressions handling used for XML Schemas and validation.

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlExpCtxt xmlExpCtxt;
typedef xmlExpCtxt * xmlExpCtxtPtr;
typedef struct _xmlExpNode xmlExpNode;
typedef xmlExpNode * xmlExpNodePtr;
typedef enum xmlExpNodeType;
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
typedef xmlRegExecCtxt * xmlRegExecCtxtPtr;
typedef struct _xmlRegexp xmlRegexp;
typedef xmlRegexp * xmlRegexpPtr;
int	xmlExpCtxtNbCons		(xmlExpCtxtPtr ctxt);
int	xmlExpCtxtNbNodes		(xmlExpCtxtPtr ctxt);
void	xmlExpDump			(xmlBufferPtr buf, 
xmlExpNodePtr expr); xmlExpNodePtr xmlExpExpDerive (xmlExpCtxtPtr ctxt,
xmlExpNodePtr exp,
xmlExpNodePtr sub); void xmlExpFree (xmlExpCtxtPtr ctxt,
xmlExpNodePtr exp); void xmlExpFreeCtxt (xmlExpCtxtPtr ctxt); int xmlExpGetLanguage (xmlExpCtxtPtr ctxt,
xmlExpNodePtr exp,
const xmlChar ** langList,
int len); int xmlExpGetStart (xmlExpCtxtPtr ctxt,
xmlExpNodePtr exp,
const xmlChar ** tokList,
int len); int xmlExpIsNillable (xmlExpNodePtr exp); int xmlExpMaxToken (xmlExpNodePtr expr); xmlExpNodePtr xmlExpNewAtom (xmlExpCtxtPtr ctxt,
const xmlChar * name,
int len); xmlExpCtxtPtr xmlExpNewCtxt (int maxNodes,
xmlDictPtr dict); xmlExpNodePtr xmlExpNewOr (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left,
xmlExpNodePtr right); xmlExpNodePtr xmlExpNewRange (xmlExpCtxtPtr ctxt,
xmlExpNodePtr subset,
int min,
int max); xmlExpNodePtr xmlExpNewSeq (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left,
xmlExpNodePtr right); xmlExpNodePtr xmlExpParse (xmlExpCtxtPtr ctxt,
const char * expr); void xmlExpRef (xmlExpNodePtr exp); xmlExpNodePtr xmlExpStringDerive (xmlExpCtxtPtr ctxt,
xmlExpNodePtr exp,
const xmlChar * str,
int len); int xmlExpSubsume (xmlExpCtxtPtr ctxt,
xmlExpNodePtr exp,
xmlExpNodePtr sub); typedef void xmlRegExecCallbacks (xmlRegExecCtxtPtr exec,
const xmlChar * token,
void * transdata,
void * inputdata); int xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
const xmlChar ** string,
int * nbval,
int * nbneg,
xmlChar ** values,
int * terminal); int xmlRegExecNextValues (xmlRegExecCtxtPtr exec,
int * nbval,
int * nbneg,
xmlChar ** values,
int * terminal); int xmlRegExecPushString (xmlRegExecCtxtPtr exec,
const xmlChar * value,
void * data); int xmlRegExecPushString2 (xmlRegExecCtxtPtr exec,
const xmlChar * value,
const xmlChar * value2,
void * data); void xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec); void xmlRegFreeRegexp (xmlRegexpPtr regexp); xmlRegExecCtxtPtr xmlRegNewExecCtxt (xmlRegexpPtr comp,
xmlRegExecCallbacks callback,
void * data); xmlRegexpPtr xmlRegexpCompile (const xmlChar * regexp); int xmlRegexpExec (xmlRegexpPtr comp,
const xmlChar * content); int xmlRegexpIsDeterminist (xmlRegexpPtr comp); void xmlRegexpPrint (FILE * output,
xmlRegexpPtr regexp);

Description

Details

Structure xmlExpCtxt

struct _xmlExpCtxt {
The content of this structure is not made public by the API.
} xmlExpCtxt;


Typedef xmlExpCtxtPtr

xmlExpCtxt * xmlExpCtxtPtr;


Structure xmlExpNode

struct _xmlExpNode {
The content of this structure is not made public by the API.
} xmlExpNode;


Typedef xmlExpNodePtr

xmlExpNode * xmlExpNodePtr;



Structure xmlRegExecCtxt

struct _xmlRegExecCtxt {
The content of this structure is not made public by the API.
} xmlRegExecCtxt;


Typedef xmlRegExecCtxtPtr

xmlRegExecCtxt * xmlRegExecCtxtPtr;

A libxml progressive regular expression evaluation context


Structure xmlRegexp

struct _xmlRegexp {
The content of this structure is not made public by the API.
} xmlRegexp;


Typedef xmlRegexpPtr

xmlRegexp * xmlRegexpPtr;

A libxml regular expression, they can actually be far more complex thank the POSIX regex expressions.


Function type xmlRegExecCallbacks

void	xmlRegExecCallbacks		(xmlRegExecCtxtPtr exec, 
const xmlChar * token,
void * transdata,
void * inputdata)

Callback function when doing a transition in the automata

exec: the regular expression context
token: the current token string
transdata: transition data
inputdata: input data

Variable emptyExp

xmlExpNodePtr emptyExp;


Variable forbiddenExp

xmlExpNodePtr forbiddenExp;


xmlExpCtxtNbCons ()

int	xmlExpCtxtNbCons		(xmlExpCtxtPtr ctxt)

Debugging facility provides the number of allocated nodes over lifetime

ctxt: an expression context
Returns: the number of nodes ever allocated or -1 in case of error

xmlExpCtxtNbNodes ()

int	xmlExpCtxtNbNodes		(xmlExpCtxtPtr ctxt)

Debugging facility provides the number of allocated nodes at a that point

ctxt: an expression context
Returns: the number of nodes in use or -1 in case of error

xmlExpDump ()

void	xmlExpDump			(xmlBufferPtr buf, 
xmlExpNodePtr expr)

Serialize the expression as compiled to the buffer

buf: a buffer to receive the output
expr: the compiled expression

xmlExpExpDerive ()

xmlExpNodePtr	xmlExpExpDerive		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
xmlExpNodePtr sub)

Evaluates the expression resulting from @exp consuming a sub expression @sub Based on algebraic derivation and sometimes direct Brzozowski derivation it usually takes less than linear time and can handle expressions generating infinite languages.

ctxt: the expressions context
exp: the englobing expression
sub: the subexpression
Returns: the resulting expression or NULL in case of internal error, the result must be freed

xmlExpFree ()

void	xmlExpFree			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp)

Dereference the expression

ctxt: the expression context
exp: the expression

xmlExpFreeCtxt ()

void	xmlExpFreeCtxt			(xmlExpCtxtPtr ctxt)

Free an expression context

ctxt: an expression context

xmlExpGetLanguage ()

int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** langList,
int len)

Find all the strings used in @exp and store them in @list

ctxt: the expression context
exp: the expression
langList: where to store the tokens
len: the allocated length of @list
Returns: the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

xmlExpGetStart ()

int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** tokList,
int len)

Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]

ctxt: the expression context
exp: the expression
tokList: where to store the tokens
len: the allocated length of @list
Returns: the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

xmlExpIsNillable ()

int	xmlExpIsNillable		(xmlExpNodePtr exp)

Finds if the expression is nillable, i.e. if it accepts the empty sequence

exp: the expression
Returns: 1 if nillable, 0 if not and -1 in case of error

xmlExpMaxToken ()

int	xmlExpMaxToken			(xmlExpNodePtr expr)

Indicate the maximum number of input a expression can accept

expr: a compiled expression
Returns: the maximum length or -1 in case of error

xmlExpNewAtom ()

xmlExpNodePtr	xmlExpNewAtom		(xmlExpCtxtPtr ctxt, 
const xmlChar * name,
int len)

Get the atom associated to this name from that context

ctxt: the expression context
name: the atom name
len: the atom name length in byte (or -1);
Returns: the node or NULL in case of error

xmlExpNewCtxt ()

xmlExpCtxtPtr	xmlExpNewCtxt		(int maxNodes, 
xmlDictPtr dict)

Creates a new context for manipulating expressions

maxNodes: the maximum number of nodes
dict: optional dictionary to use internally
Returns: the context or NULL in case of error

xmlExpNewOr ()

xmlExpNodePtr	xmlExpNewOr		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr left,
xmlExpNodePtr right)

Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).

ctxt: the expression context
left: left expression
right: right expression
Returns: the node or NULL in case of error

xmlExpNewRange ()

xmlExpNodePtr	xmlExpNewRange		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr subset,
int min,
int max)

Get the atom associated to the range (@subset){@min, @max} Note that @subset is consumed in the operation, to keep an handle on it use xmlExpRef() and use xmlExpFree() to release it, this is true even in case of failure (unless ctxt == NULL).

ctxt: the expression context
subset: the expression to be repeated
min: the lower bound for the repetition
max: the upper bound for the repetition, -1 means infinite
Returns: the node or NULL in case of error

xmlExpNewSeq ()

xmlExpNodePtr	xmlExpNewSeq		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr left,
xmlExpNodePtr right)

Get the atom associated to the sequence @left , @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).

ctxt: the expression context
left: left expression
right: right expression
Returns: the node or NULL in case of error

xmlExpParse ()

xmlExpNodePtr	xmlExpParse		(xmlExpCtxtPtr ctxt, 
const char * expr)

Minimal parser for regexps, it understand the following constructs - string terminals - choice operator | - sequence operator , - subexpressions (...) - usual cardinality operators + * and ? - finite sequences { min, max } - infinite sequences { min, * } There is minimal checkings made especially no checking on strings values

ctxt: the expressions context
expr: the 0 terminated string
Returns: a new expression or NULL in case of failure

xmlExpRef ()

void	xmlExpRef			(xmlExpNodePtr exp)

Increase the reference count of the expression

exp: the expression

xmlExpStringDerive ()

xmlExpNodePtr	xmlExpStringDerive	(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar * str,
int len)

Do one step of Brzozowski derivation of the expression @exp with respect to the input string

ctxt: the expression context
exp: the expression
str: the string
len: the string len in bytes if available
Returns: the resulting expression or NULL in case of internal error

xmlExpSubsume ()

int	xmlExpSubsume			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
xmlExpNodePtr sub)

Check whether @exp accepts all the languages accepted by @sub the input being a subexpression.

ctxt: the expressions context
exp: the englobing expression
sub: the subexpression
Returns: 1 if true 0 if false and -1 in case of failure.

xmlRegExecErrInfo ()

int	xmlRegExecErrInfo		(xmlRegExecCtxtPtr exec, 
const xmlChar ** string,
int * nbval,
int * nbneg,
xmlChar ** values,
int * terminal)

Extract error information from the regexp execution, the parameter @string will be updated with the value pushed and not accepted, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values

exec: a regexp execution context generating an error
string: return value for the error string
nbval: pointer to the number of accepted values IN/OUT
nbneg: return number of negative transitions
values: pointer to the array of acceptable values
terminal: return value if this was a terminal state
Returns: will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.

xmlRegExecNextValues ()

int	xmlRegExecNextValues		(xmlRegExecCtxtPtr exec, 
int * nbval,
int * nbneg,
xmlChar ** values,
int * terminal)

Extract information from the regexp execution, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values

exec: a regexp execution context
nbval: pointer to the number of accepted values IN/OUT
nbneg: return number of negative transitions
values: pointer to the array of acceptable values
terminal: return value if this was a terminal state
Returns: will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.

xmlRegExecPushString ()

int	xmlRegExecPushString		(xmlRegExecCtxtPtr exec, 
const xmlChar * value,
void * data)

Push one input token in the execution context

exec: a regexp execution context or NULL to indicate the end
value: a string token input
data: data associated to the token to reuse in callbacks
Returns: 1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.

xmlRegExecPushString2 ()

int	xmlRegExecPushString2		(xmlRegExecCtxtPtr exec, 
const xmlChar * value,
const xmlChar * value2,
void * data)

Push one input token in the execution context

exec: a regexp execution context or NULL to indicate the end
value: the first string token input
value2: the second string token input
data: data associated to the token to reuse in callbacks
Returns: 1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.

xmlRegFreeExecCtxt ()

void	xmlRegFreeExecCtxt		(xmlRegExecCtxtPtr exec)

Free the structures associated to a regular expression evaluation context.

exec: a regular expression evaluation context

xmlRegFreeRegexp ()

void	xmlRegFreeRegexp		(xmlRegexpPtr regexp)

Free a regexp

regexp: the regexp

xmlRegNewExecCtxt ()

xmlRegExecCtxtPtr	xmlRegNewExecCtxt	(xmlRegexpPtr comp, 
xmlRegExecCallbacks callback,
void * data)

Build a context used for progressive evaluation of a regexp.

comp: a precompiled regular expression
callback: a callback function used for handling progresses in the automata matching phase
data: the context data associated to the callback in this context
Returns: the new context

xmlRegexpCompile ()

xmlRegexpPtr	xmlRegexpCompile	(const xmlChar * regexp)

Parses a regular expression conforming to XML Schemas Part 2 Datatype Appendix F and builds an automata suitable for testing strings against that regular expression

regexp: a regular expression string
Returns: the compiled expression or NULL in case of error

xmlRegexpExec ()

int	xmlRegexpExec			(xmlRegexpPtr comp, 
const xmlChar * content)

Check if the regular expression generates the value

comp: the compiled regular expression
content: the value to check against the regular expression
Returns: 1 if it matches, 0 if not and a negative value in case of error

xmlRegexpIsDeterminist ()

int	xmlRegexpIsDeterminist		(xmlRegexpPtr comp)

Check if the regular expression is determinist

comp: the compiled regular expression
Returns: 1 if it yes, 0 if not and a negative value in case of error

xmlRegexpPrint ()

void	xmlRegexpPrint			(FILE * output, 
xmlRegexpPtr regexp)

Print the content of the compiled regular expression

output: the file for the output debug
regexp: the compiled regexp

PK!G\?\?libxml2-nanohttp.htmlnu[ nanohttp: minimal HTTP implementation

nanohttp

nanohttp - minimal HTTP implementation

minimal HTTP implementation allowing to fetch resources like external subset.

Author(s): Daniel Veillard

Synopsis

const char *	xmlNanoHTTPAuthHeader	(void * ctx);
void	xmlNanoHTTPCleanup		(void);
void	xmlNanoHTTPClose		(void * ctx);
int	xmlNanoHTTPContentLength	(void * ctx);
const char *	xmlNanoHTTPEncoding	(void * ctx);
int	xmlNanoHTTPFetch		(const char * URL, 
const char * filename,
char ** contentType); void xmlNanoHTTPInit (void); void * xmlNanoHTTPMethod (const char * URL,
const char * method,
const char * input,
char ** contentType,
const char * headers,
int ilen); void * xmlNanoHTTPMethodRedir (const char * URL,
const char * method,
const char * input,
char ** contentType,
char ** redir,
const char * headers,
int ilen); const char * xmlNanoHTTPMimeType (void * ctx); void * xmlNanoHTTPOpen (const char * URL,
char ** contentType); void * xmlNanoHTTPOpenRedir (const char * URL,
char ** contentType,
char ** redir); int xmlNanoHTTPRead (void * ctx,
void * dest,
int len); const char * xmlNanoHTTPRedir (void * ctx); int xmlNanoHTTPReturnCode (void * ctx); int xmlNanoHTTPSave (void * ctxt,
const char * filename); void xmlNanoHTTPScanProxy (const char * URL);

Description

Details

xmlNanoHTTPAuthHeader ()

const char *	xmlNanoHTTPAuthHeader	(void * ctx)

Get the authentication header of an HTTP context

ctx: the HTTP context
Returns: the stashed value of the WWW-Authenticate or Proxy-Authenticate header.

xmlNanoHTTPCleanup ()

void	xmlNanoHTTPCleanup		(void)

Cleanup the HTTP protocol layer.


xmlNanoHTTPClose ()

void	xmlNanoHTTPClose		(void * ctx)

This function closes an HTTP context, it ends up the connection and free all data related to it.

ctx: the HTTP context

xmlNanoHTTPContentLength ()

int	xmlNanoHTTPContentLength	(void * ctx)

Provides the specified content length from the HTTP header.

ctx: the HTTP context
Returns: the specified content length from the HTTP header. Note that a value of -1 indicates that the content length element was not included in the response header.

xmlNanoHTTPEncoding ()

const char *	xmlNanoHTTPEncoding	(void * ctx)

Provides the specified encoding if specified in the HTTP headers.

ctx: the HTTP context
Returns: the specified encoding or NULL if not available

xmlNanoHTTPFetch ()

int	xmlNanoHTTPFetch		(const char * URL, 
const char * filename,
char ** contentType)

This function try to fetch the indicated resource via HTTP GET and save it's content in the file.

URL: The URL to load
filename: the filename where the content should be saved
contentType: if available the Content-Type information will be returned at that location
Returns: -1 in case of failure, 0 in case of success. The contentType, if provided must be freed by the caller

xmlNanoHTTPInit ()

void	xmlNanoHTTPInit			(void)

Initialize the HTTP protocol layer. Currently it just checks for proxy information


xmlNanoHTTPMethod ()

void *	xmlNanoHTTPMethod		(const char * URL, 
const char * method,
const char * input,
char ** contentType,
const char * headers,
int ilen)

This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.

URL: The URL to load
method: the HTTP method to use
input: the input string if any
contentType: the Content-Type information IN and OUT
headers: the extra headers
ilen: input length
Returns: NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller

xmlNanoHTTPMethodRedir ()

void *	xmlNanoHTTPMethodRedir		(const char * URL, 
const char * method,
const char * input,
char ** contentType,
char ** redir,
const char * headers,
int ilen)

This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.

URL: The URL to load
method: the HTTP method to use
input: the input string if any
contentType: the Content-Type information IN and OUT
redir: the redirected URL OUT
headers: the extra headers
ilen: input length
Returns: NULL in case of failure, otherwise a request handler. The contentType, or redir, if provided must be freed by the caller

xmlNanoHTTPMimeType ()

const char *	xmlNanoHTTPMimeType	(void * ctx)

Provides the specified Mime-Type if specified in the HTTP headers.

ctx: the HTTP context
Returns: the specified Mime-Type or NULL if not available

xmlNanoHTTPOpen ()

void *	xmlNanoHTTPOpen			(const char * URL, 
char ** contentType)

This function try to open a connection to the indicated resource via HTTP GET.

URL: The URL to load
contentType: if available the Content-Type information will be returned at that location
Returns: NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller

xmlNanoHTTPOpenRedir ()

void *	xmlNanoHTTPOpenRedir		(const char * URL, 
char ** contentType,
char ** redir)

This function try to open a connection to the indicated resource via HTTP GET.

URL: The URL to load
contentType: if available the Content-Type information will be returned at that location
redir: if available the redirected URL will be returned
Returns: NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller

xmlNanoHTTPRead ()

int	xmlNanoHTTPRead			(void * ctx, 
void * dest,
int len)

This function tries to read @len bytes from the existing HTTP connection and saves them in @dest. This is a blocking call.

ctx: the HTTP context
dest: a buffer
len: the buffer length
Returns: the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.

xmlNanoHTTPRedir ()

const char *	xmlNanoHTTPRedir	(void * ctx)

Provides the specified redirection URL if available from the HTTP header.

ctx: the HTTP context
Returns: the specified redirection URL or NULL if not redirected.

xmlNanoHTTPReturnCode ()

int	xmlNanoHTTPReturnCode		(void * ctx)

Get the latest HTTP return code received

ctx: the HTTP context
Returns: the HTTP return code for the request.

xmlNanoHTTPSave ()

int	xmlNanoHTTPSave			(void * ctxt, 
const char * filename)

This function saves the output of the HTTP transaction to a file It closes and free the context at the end

ctxt: the HTTP context
filename: the filename where the content should be saved
Returns: -1 in case of failure, 0 in case of success.

xmlNanoHTTPScanProxy ()

void	xmlNanoHTTPScanProxy		(const char * URL)

(Re)Initialize the HTTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like http://myproxy/ or http://myproxy:3128/ A NULL URL cleans up proxy information.

URL: The proxy URL used to initialize the proxy context

PK!qSy3y3libxml2-c14n.htmlnu[ c14n: Provide Canonical XML and Exclusive XML Canonicalization

c14n

c14n - Provide Canonical XML and Exclusive XML Canonicalization

the c14n modules provides a "Canonical XML" implementation

Author(s): Aleksey Sanin <aleksey@aleksey.com>

Synopsis

typedef enum xmlC14NMode;
int	xmlC14NDocDumpMemory		(xmlDocPtr doc, 
xmlNodeSetPtr nodes,
int mode,
xmlChar ** inclusive_ns_prefixes,
int with_comments,
xmlChar ** doc_txt_ptr); int xmlC14NDocSave (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode,
xmlChar ** inclusive_ns_prefixes,
int with_comments,
const char * filename,
int compression); int xmlC14NDocSaveTo (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode,
xmlChar ** inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf); int xmlC14NExecute (xmlDocPtr doc,
xmlC14NIsVisibleCallback is_visible_callback,
void * user_data,
int mode,
xmlChar ** inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf); typedef int xmlC14NIsVisibleCallback (void * user_data,
xmlNodePtr node,
xmlNodePtr parent);

Description

Details

Enum xmlC14NMode

enum xmlC14NMode {
    XML_C14N_1_0 = 0 /* Original C14N 1.0 spec */
    XML_C14N_EXCLUSIVE_1_0 = 1 /* Exclusive C14N 1.0 spec */
    XML_C14N_1_1 = 2 /*  C14N 1.1 spec */
};


Function type xmlC14NIsVisibleCallback

int	xmlC14NIsVisibleCallback	(void * user_data, 
xmlNodePtr node,
xmlNodePtr parent)

Signature for a C14N callback on visible nodes

user_data: user data
node: the current node
parent: the parent node
Returns: 1 if the node should be included

xmlC14NDocDumpMemory ()

int	xmlC14NDocDumpMemory		(xmlDocPtr doc, 
xmlNodeSetPtr nodes,
int mode,
xmlChar ** inclusive_ns_prefixes,
int with_comments,
xmlChar ** doc_txt_ptr)

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)

doc: the XML document for canonization
nodes: the nodes set to be included in the canonized image or NULL if all document nodes should be included
mode: the c14n mode (see @xmlC14NMode)
inclusive_ns_prefixes: the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
with_comments: include comments in the result (!=0) or not (==0)
doc_txt_ptr: the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory
Returns: the number of bytes written on success or a negative value on fail

xmlC14NDocSave ()

int	xmlC14NDocSave			(xmlDocPtr doc, 
xmlNodeSetPtr nodes,
int mode,
xmlChar ** inclusive_ns_prefixes,
int with_comments,
const char * filename,
int compression)

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)

doc: the XML document for canonization
nodes: the nodes set to be included in the canonized image or NULL if all document nodes should be included
mode: the c14n mode (see @xmlC14NMode)
inclusive_ns_prefixes: the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
with_comments: include comments in the result (!=0) or not (==0)
filename: the filename to store canonical XML image
compression: the compression level (zlib required): -1 - libxml default, 0 - uncompressed, >0 - compression level
Returns: the number of bytes written success or a negative value on fail

xmlC14NDocSaveTo ()

int	xmlC14NDocSaveTo		(xmlDocPtr doc, 
xmlNodeSetPtr nodes,
int mode,
xmlChar ** inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf)

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)

doc: the XML document for canonization
nodes: the nodes set to be included in the canonized image or NULL if all document nodes should be included
mode: the c14n mode (see @xmlC14NMode)
inclusive_ns_prefixes: the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
with_comments: include comments in the result (!=0) or not (==0)
buf: the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
Returns: non-negative value on success or a negative value on fail

xmlC14NExecute ()

int	xmlC14NExecute			(xmlDocPtr doc, 
xmlC14NIsVisibleCallback is_visible_callback,
void * user_data,
int mode,
xmlChar ** inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf)

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)

doc: the XML document for canonization
is_visible_callback: the function to use to determine is node visible or not
user_data: the first parameter for @is_visible_callback function (in most cases, it is nodes set)
mode: the c14n mode (see @xmlC14NMode)
inclusive_ns_prefixes: the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)
with_comments: include comments in the result (!=0) or not (==0)
buf: the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output
Returns: non-negative value on success or a negative value on fail

PK! ^^libxml2-xmlmemory.htmlnu[ xmlmemory: interface for the memory allocator

xmlmemory

xmlmemory - interface for the memory allocator

provides interfaces for the memory allocator, including debugging capabilities.

Author(s): Daniel Veillard

Synopsis

#define DEBUG_MEMORY;
#define xmlMalloc;
#define xmlMallocAtomic;
#define xmlMemStrdup;
#define xmlRealloc;
void	xmlCleanupMemory		(void);
typedef void xmlFreeFunc			(void * mem);
int	xmlGcMemGet			(xmlFreeFunc * freeFunc, 
xmlMallocFunc * mallocFunc,
xmlMallocFunc * mallocAtomicFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc); int xmlGcMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlMallocFunc mallocAtomicFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc); int xmlInitMemory (void); void * xmlMallocAtomicLoc (size_t size,
const char * file,
int line); typedef void * xmlMallocFunc (size_t size); void * xmlMallocLoc (size_t size,
const char * file,
int line); int xmlMemBlocks (void); void xmlMemDisplay (FILE * fp); void xmlMemDisplayLast (FILE * fp,
long nbBytes); void xmlMemFree (void * ptr); int xmlMemGet (xmlFreeFunc * freeFunc,
xmlMallocFunc * mallocFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc); void * xmlMemMalloc (size_t size); void * xmlMemRealloc (void * ptr,
size_t size); int xmlMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc); void xmlMemShow (FILE * fp,
int nr); char * xmlMemStrdupLoc (const char * str,
const char * file,
int line); int xmlMemUsed (void); void xmlMemoryDump (void); char * xmlMemoryStrdup (const char * str); typedef void * xmlReallocFunc (void * mem,
size_t size); void * xmlReallocLoc (void * ptr,
size_t size,
const char * file,
int line); typedef char * xmlStrdupFunc (const char * str);

Description

Details

Macro DEBUG_MEMORY

#define DEBUG_MEMORY;

DEBUG_MEMORY replaces the allocator with a collect and debug shell to the libc allocator. DEBUG_MEMORY should only be activated when debugging libxml i.e. if libxml has been configured with --with-debug-mem too. #define DEBUG_MEMORY_FREED #define DEBUG_MEMORY_LOCATION


Function type xmlFreeFunc

void	xmlFreeFunc			(void * mem)

Signature for a free() implementation.

mem: an already allocated block of memory

Function type xmlMallocFunc

void *	xmlMallocFunc			(size_t size)

Signature for a malloc() implementation.

size: the size requested in bytes
Returns: a pointer to the newly allocated block or NULL in case of error.

Function type xmlReallocFunc

void *	xmlReallocFunc			(void * mem, 
size_t size)

Signature for a realloc() implementation.

mem: an already allocated block of memory
size: the new size requested in bytes
Returns: a pointer to the newly reallocated block or NULL in case of error.

Function type xmlStrdupFunc

char *	xmlStrdupFunc			(const char * str)

Signature for an strdup() implementation.

str: a zero terminated string
Returns: the copy of the string or NULL in case of error.

xmlCleanupMemory ()

void	xmlCleanupMemory		(void)

DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Free up all the memory allocated by the library for its own use. This should not be called by user level code.


xmlGcMemGet ()

int	xmlGcMemGet			(xmlFreeFunc * freeFunc, 
xmlMallocFunc * mallocFunc,
xmlMallocFunc * mallocAtomicFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc)

Provides the memory access functions set currently in use The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators

freeFunc: place to save the free() function in use
mallocFunc: place to save the malloc() function in use
mallocAtomicFunc: place to save the atomic malloc() function in use
reallocFunc: place to save the realloc() function in use
strdupFunc: place to save the strdup() function in use
Returns: 0 on success

xmlGcMemSetup ()

int	xmlGcMemSetup			(xmlFreeFunc freeFunc, 
xmlMallocFunc mallocFunc,
xmlMallocFunc mallocAtomicFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc)

Override the default memory access functions with a new set This has to be called before any other libxml routines ! The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators Should this be blocked if there was already some allocations done ?

freeFunc: the free() function to use
mallocFunc: the malloc() function to use
mallocAtomicFunc: the malloc() function to use for atomic allocations
reallocFunc: the realloc() function to use
strdupFunc: the strdup() function to use
Returns: 0 on success

xmlInitMemory ()

int	xmlInitMemory			(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. Initialize the memory layer.

Returns: 0 on success

xmlMallocAtomicLoc ()

void *	xmlMallocAtomicLoc		(size_t size, 
const char * file,
int line)

a malloc() equivalent, with logging of the allocation info.

size: an unsigned int specifying the size in byte to allocate.
file: the file name or NULL
line: the line number
Returns: a pointer to the allocated area or NULL in case of lack of memory.

xmlMallocLoc ()

void *	xmlMallocLoc			(size_t size, 
const char * file,
int line)

a malloc() equivalent, with logging of the allocation info.

size: an int specifying the size in byte to allocate.
file: the file name or NULL
line: the line number
Returns: a pointer to the allocated area or NULL in case of lack of memory.

xmlMemBlocks ()

int	xmlMemBlocks			(void)

Provides the number of memory areas currently allocated

Returns: an int representing the number of blocks

xmlMemDisplay ()

void	xmlMemDisplay			(FILE * fp)

show in-extenso the memory blocks allocated

fp: a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist

xmlMemDisplayLast ()

void	xmlMemDisplayLast		(FILE * fp, 
long nbBytes)

the last nbBytes of memory allocated and not freed, useful for dumping the memory left allocated between two places at runtime.

fp: a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist
nbBytes: the amount of memory to dump

xmlMemFree ()

void	xmlMemFree			(void * ptr)

a free() equivalent, with error checking.

ptr: the memory block pointer

xmlMemGet ()

int	xmlMemGet			(xmlFreeFunc * freeFunc, 
xmlMallocFunc * mallocFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc)

Provides the memory access functions set currently in use

freeFunc: place to save the free() function in use
mallocFunc: place to save the malloc() function in use
reallocFunc: place to save the realloc() function in use
strdupFunc: place to save the strdup() function in use
Returns: 0 on success

xmlMemMalloc ()

void *	xmlMemMalloc			(size_t size)

a malloc() equivalent, with logging of the allocation info.

size: an int specifying the size in byte to allocate.
Returns: a pointer to the allocated area or NULL in case of lack of memory.

xmlMemRealloc ()

void *	xmlMemRealloc			(void * ptr, 
size_t size)

a realloc() equivalent, with logging of the allocation info.

ptr: the initial memory block pointer
size: an int specifying the size in byte to allocate.
Returns: a pointer to the allocated area or NULL in case of lack of memory.

xmlMemSetup ()

int	xmlMemSetup			(xmlFreeFunc freeFunc, 
xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc)

Override the default memory access functions with a new set This has to be called before any other libxml routines ! Should this be blocked if there was already some allocations done ?

freeFunc: the free() function to use
mallocFunc: the malloc() function to use
reallocFunc: the realloc() function to use
strdupFunc: the strdup() function to use
Returns: 0 on success

xmlMemShow ()

void	xmlMemShow			(FILE * fp, 
int nr)

show a show display of the memory allocated, and dump the @nr last allocated areas which were not freed

fp: a FILE descriptor used as the output file
nr: number of entries to dump

xmlMemStrdupLoc ()

char *	xmlMemStrdupLoc			(const char * str, 
const char * file,
int line)

a strdup() equivalent, with logging of the allocation info.

str: the initial string pointer
file: the file name or NULL
line: the line number
Returns: a pointer to the new string or NULL if allocation error occurred.

xmlMemUsed ()

int	xmlMemUsed			(void)

Provides the amount of memory currently allocated

Returns: an int representing the amount of memory allocated.

xmlMemoryDump ()

void	xmlMemoryDump			(void)

Dump in-extenso the memory blocks allocated to the file .memorylist


xmlMemoryStrdup ()

char *	xmlMemoryStrdup			(const char * str)

a strdup() equivalent, with logging of the allocation info.

str: the initial string pointer
Returns: a pointer to the new string or NULL if allocation error occurred.

xmlReallocLoc ()

void *	xmlReallocLoc			(void * ptr, 
size_t size,
const char * file,
int line)

a realloc() equivalent, with logging of the allocation info.

ptr: the initial memory block pointer
size: an int specifying the size in byte to allocate.
file: the file name or NULL
line: the line number
Returns: a pointer to the allocated area or NULL in case of lack of memory.

PK!<1kAAlibxml2-xlink.htmlnu[ xlink: unfinished XLink detection module

xlink

xlink - unfinished XLink detection module

unfinished XLink detection module

Author(s): Daniel Veillard

Synopsis

typedef enum xlinkActuate;
typedef xmlChar * xlinkHRef;
typedef struct _xlinkHandler xlinkHandler;
typedef xlinkHandler * xlinkHandlerPtr;
typedef xmlChar * xlinkRole;
typedef enum xlinkShow;
typedef xmlChar * xlinkTitle;
typedef enum xlinkType;
typedef void xlinkExtendedLinkFunk		(void * ctx, 
xmlNodePtr node,
int nbLocators,
const xlinkHRef * hrefs,
const xlinkRole * roles,
int nbArcs,
const xlinkRole * from,
const xlinkRole * to,
xlinkShow * show,
xlinkActuate * actuate,
int nbTitles,
const xlinkTitle * titles,
const xmlChar ** langs); typedef void xlinkExtendedLinkSetFunk (void * ctx,
xmlNodePtr node,
int nbLocators,
const xlinkHRef * hrefs,
const xlinkRole * roles,
int nbTitles,
const xlinkTitle * titles,
const xmlChar ** langs); xlinkNodeDetectFunc xlinkGetDefaultDetect (void); xlinkHandlerPtr xlinkGetDefaultHandler (void); xlinkType xlinkIsLink (xmlDocPtr doc,
xmlNodePtr node); typedef void xlinkNodeDetectFunc (void * ctx,
xmlNodePtr node); void xlinkSetDefaultDetect (xlinkNodeDetectFunc func); void xlinkSetDefaultHandler (xlinkHandlerPtr handler); typedef void xlinkSimpleLinkFunk (void * ctx,
xmlNodePtr node,
const xlinkHRef href,
const xlinkRole role,
const xlinkTitle title);

Description

Details


Typedef xlinkHRef

xmlChar * xlinkHRef;


Structure xlinkHandler

struct _xlinkHandler {
    xlinkSimpleLinkFunk	simple
    xlinkExtendedLinkFunk	extended
    xlinkExtendedLinkSetFunk	set
} xlinkHandler;


Typedef xlinkHandlerPtr

xlinkHandler * xlinkHandlerPtr;


Typedef xlinkRole

xmlChar * xlinkRole;



Typedef xlinkTitle

xmlChar * xlinkTitle;



Function type xlinkExtendedLinkFunk

void	xlinkExtendedLinkFunk		(void * ctx, 
xmlNodePtr node,
int nbLocators,
const xlinkHRef * hrefs,
const xlinkRole * roles,
int nbArcs,
const xlinkRole * from,
const xlinkRole * to,
xlinkShow * show,
xlinkActuate * actuate,
int nbTitles,
const xlinkTitle * titles,
const xmlChar ** langs)

This is the prototype for a extended link detection callback.

ctx: user data pointer
node: the node carrying the link
nbLocators: the number of locators detected on the link
hrefs: pointer to the array of locator hrefs
roles: pointer to the array of locator roles
nbArcs: the number of arcs detected on the link
from: pointer to the array of source roles found on the arcs
to: pointer to the array of target roles found on the arcs
show: array of values for the show attributes found on the arcs
actuate: array of values for the actuate attributes found on the arcs
nbTitles: the number of titles detected on the link
titles:
langs: array of xml:lang values for the titles

Function type xlinkExtendedLinkSetFunk

void	xlinkExtendedLinkSetFunk	(void * ctx, 
xmlNodePtr node,
int nbLocators,
const xlinkHRef * hrefs,
const xlinkRole * roles,
int nbTitles,
const xlinkTitle * titles,
const xmlChar ** langs)

This is the prototype for a extended link set detection callback.

ctx: user data pointer
node: the node carrying the link
nbLocators: the number of locators detected on the link
hrefs: pointer to the array of locator hrefs
roles: pointer to the array of locator roles
nbTitles: the number of titles detected on the link
titles:
langs: array of xml:lang values for the titles

Function type xlinkNodeDetectFunc

void	xlinkNodeDetectFunc		(void * ctx, 
xmlNodePtr node)

This is the prototype for the link detection routine. It calls the default link detection callbacks upon link detection.

ctx: user data pointer
node: the node to check

Function type xlinkSimpleLinkFunk

void	xlinkSimpleLinkFunk		(void * ctx, 
xmlNodePtr node,
const xlinkHRef href,
const xlinkRole role,
const xlinkTitle title)

This is the prototype for a simple link detection callback.

ctx: user data pointer
node: the node carrying the link
href: the target of the link
role: the role string
title: the link title

xlinkGetDefaultDetect ()

xlinkNodeDetectFunc	xlinkGetDefaultDetect	(void)

Get the default xlink detection routine

Returns: the current function or NULL;

xlinkGetDefaultHandler ()

xlinkHandlerPtr	xlinkGetDefaultHandler	(void)

Get the default xlink handler.

Returns: the current xlinkHandlerPtr value.

xlinkIsLink ()

xlinkType	xlinkIsLink		(xmlDocPtr doc, 
xmlNodePtr node)

Check whether the given node carries the attributes needed to be a link element (or is one of the linking elements issued from the (X)HTML DtDs). This routine don't try to do full checking of the link validity but tries to detect and return the appropriate link type.

doc: the document containing the node
node: the node pointer itself
Returns: the xlinkType of the node (XLINK_TYPE_NONE if there is no link detected.

xlinkSetDefaultDetect ()

void	xlinkSetDefaultDetect		(xlinkNodeDetectFunc func)

Set the default xlink detection routine

func: pointer to the new detection routine.

xlinkSetDefaultHandler ()

void	xlinkSetDefaultHandler		(xlinkHandlerPtr handler)

Set the default xlink handlers

handler: the new value for the xlink handler block

PK!|home.pngnu[PNG  IHDRw=bKGD pHYs  ~tIME1KvIDATxՕkq?rCp ~CnpCAAJ .B-\'G]:ܠC -(8 Ԁ!fDғklbRoyxwpðIJ<of_-@RHf֟t^ښ$Q|pgv;X^^&s(bwwZF9&3඙ ^IRZUE.0Z]]U PYM8HGIekqqҀ! $۬3n e{-/seeeÌXOͷ$8==USQRR'9-s+B^ Cەs+%<7W :2IENDB`PK!ӌ$^NNlibxml2-xmlschemas.htmlnu[ xmlschemas: incomplete XML Schemas structure implementation

xmlschemas

xmlschemas - incomplete XML Schemas structure implementation

interface to the XML Schemas handling and schema validity checking, it is incomplete right now.

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlSchema xmlSchema;
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
typedef xmlSchemaParserCtxt * xmlSchemaParserCtxtPtr;
typedef xmlSchema * xmlSchemaPtr;
typedef xmlSchemaSAXPlugStruct * xmlSchemaSAXPlugPtr;
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
typedef xmlSchemaValidCtxt * xmlSchemaValidCtxtPtr;
typedef enum xmlSchemaValidError;
typedef enum xmlSchemaValidOption;
void	xmlSchemaDump			(FILE * output, 
xmlSchemaPtr schema); void xmlSchemaFree (xmlSchemaPtr schema); void xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt); void xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt); int xmlSchemaGetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void ** ctx); int xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void ** ctx); int xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt); xmlSchemaParserCtxtPtr xmlSchemaNewDocParserCtxt (xmlDocPtr doc); xmlSchemaParserCtxtPtr xmlSchemaNewMemParserCtxt (const char * buffer,
int size); xmlSchemaParserCtxtPtr xmlSchemaNewParserCtxt (const char * URL); xmlSchemaValidCtxtPtr xmlSchemaNewValidCtxt (xmlSchemaPtr schema); xmlSchemaPtr xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt); xmlSchemaSAXPlugPtr xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
xmlSAXHandlerPtr * sax,
void ** user_data); int xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug); void xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx); void xmlSchemaSetParserStructuredErrors (xmlSchemaParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void * ctx); void xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx); int xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
int options); void xmlSchemaSetValidStructuredErrors (xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void * ctx); int xmlSchemaValidCtxtGetOptions (xmlSchemaValidCtxtPtr ctxt); xmlParserCtxtPtr xmlSchemaValidCtxtGetParserCtxt (xmlSchemaValidCtxtPtr ctxt); int xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr doc); int xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
const char * filename,
int options); int xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
xmlNodePtr elem); void xmlSchemaValidateSetFilename (xmlSchemaValidCtxtPtr vctxt,
const char * filename); void xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
xmlSchemaValidityLocatorFunc f,
void * ctxt); int xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data); typedef void xmlSchemaValidityErrorFunc (void * ctx,
const char * msg,
... ...); typedef int xmlSchemaValidityLocatorFunc (void * ctx,
const char ** file,
unsigned long * line); typedef void xmlSchemaValidityWarningFunc (void * ctx,
const char * msg,
... ...);

Description

Details

Structure xmlSchema

struct _xmlSchema {
    const xmlChar *	name	: schema name
    const xmlChar *	targetNamespace	: the target namespace
    const xmlChar *	version
    const xmlChar *	id	: Obsolete
    xmlDocPtr	doc
    xmlSchemaAnnotPtr	annot
    int	flags
    xmlHashTablePtr	typeDecl
    xmlHashTablePtr	attrDecl
    xmlHashTablePtr	attrgrpDecl
    xmlHashTablePtr	elemDecl
    xmlHashTablePtr	notaDecl
    xmlHashTablePtr	schemasImports
    void *	_private	: unused by the library for users or bindings
    xmlHashTablePtr	groupDecl
    xmlDictPtr	dict
    void *	includes	: the includes, this is opaque for now
    int	preserve	: whether to free the document
    int	counter	: used to give anonymous components unique names
    xmlHashTablePtr	idcDef	: All identity-constraint defs.
    void *	volatiles	: Obsolete
} xmlSchema;


Structure xmlSchemaParserCtxt

struct _xmlSchemaParserCtxt {
The content of this structure is not made public by the API.
} xmlSchemaParserCtxt;


Typedef xmlSchemaParserCtxtPtr

xmlSchemaParserCtxt * xmlSchemaParserCtxtPtr;


Typedef xmlSchemaPtr

xmlSchema * xmlSchemaPtr;


Typedef xmlSchemaSAXPlugPtr

xmlSchemaSAXPlugStruct * xmlSchemaSAXPlugPtr;


Structure xmlSchemaSAXPlugStruct

struct _xmlSchemaSAXPlug {
The content of this structure is not made public by the API.
} xmlSchemaSAXPlugStruct;


Structure xmlSchemaValidCtxt

struct _xmlSchemaValidCtxt {
The content of this structure is not made public by the API.
} xmlSchemaValidCtxt;


Typedef xmlSchemaValidCtxtPtr

xmlSchemaValidCtxt * xmlSchemaValidCtxtPtr;



Enum xmlSchemaValidOption

enum xmlSchemaValidOption {
    XML_SCHEMA_VAL_VC_I_CREATE = 1 /*  Default/fixed: create an attribute node * or an element's text node on the instance. * */
};


Function type xmlSchemaValidityErrorFunc

void	xmlSchemaValidityErrorFunc	(void * ctx, 
const char * msg,
... ...)

Signature of an error callback from an XSD validation

ctx: the validation context
msg: the message
...: extra arguments

Function type xmlSchemaValidityLocatorFunc

int	xmlSchemaValidityLocatorFunc	(void * ctx, 
const char ** file,
unsigned long * line)

A schemas validation locator, a callback called by the validator. This is used when file or node information are not available to find out what file and line number are affected

ctx: user provided context
file: returned file information
line: returned line information
Returns: 0 in case of success and -1 in case of error

Function type xmlSchemaValidityWarningFunc

void	xmlSchemaValidityWarningFunc	(void * ctx, 
const char * msg,
... ...)

Signature of a warning callback from an XSD validation

ctx: the validation context
msg: the message
...: extra arguments

xmlSchemaDump ()

void	xmlSchemaDump			(FILE * output, 
xmlSchemaPtr schema)

Dump a Schema structure.

output: the file output
schema: a schema structure

xmlSchemaFree ()

void	xmlSchemaFree			(xmlSchemaPtr schema)

Deallocate a Schema structure.

schema: a schema structure

xmlSchemaFreeParserCtxt ()

void	xmlSchemaFreeParserCtxt		(xmlSchemaParserCtxtPtr ctxt)

Free the resources associated to the schema parser context

ctxt: the schema parser context

xmlSchemaFreeValidCtxt ()

void	xmlSchemaFreeValidCtxt		(xmlSchemaValidCtxtPtr ctxt)

Free the resources associated to the schema validation context

ctxt: the schema validation context

xmlSchemaGetParserErrors ()

int	xmlSchemaGetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void ** ctx)

Get the callback information used to handle errors for a parser context

ctxt: a XMl-Schema parser context
err: the error callback result
warn: the warning callback result
ctx: contextual data for the callbacks result
Returns: -1 in case of failure, 0 otherwise

xmlSchemaGetValidErrors ()

int	xmlSchemaGetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void ** ctx)

Get the error and warning callback information

ctxt: a XML-Schema validation context
err: the error function result
warn: the warning function result
ctx: the functions context result
Returns: -1 in case of error and 0 otherwise

xmlSchemaIsValid ()

int	xmlSchemaIsValid		(xmlSchemaValidCtxtPtr ctxt)

Check if any error was detected during validation.

ctxt: the schema validation context
Returns: 1 if valid so far, 0 if errors were detected, and -1 in case of internal error.

xmlSchemaNewDocParserCtxt ()

xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(xmlDocPtr doc)

Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.

doc: a preparsed document tree
Returns: the parser context or NULL in case of error

xmlSchemaNewMemParserCtxt ()

xmlSchemaParserCtxtPtr	xmlSchemaNewMemParserCtxt	(const char * buffer, 
int size)

Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.

buffer: a pointer to a char array containing the schemas
size: the size of the array
Returns: the parser context or NULL in case of error

xmlSchemaNewParserCtxt ()

xmlSchemaParserCtxtPtr	xmlSchemaNewParserCtxt	(const char * URL)

Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.

URL: the location of the schema
Returns: the parser context or NULL in case of error

xmlSchemaNewValidCtxt ()

xmlSchemaValidCtxtPtr	xmlSchemaNewValidCtxt	(xmlSchemaPtr schema)

Create an XML Schemas validation context based on the given schema.

schema: a precompiled XML Schemas
Returns: the validation context or NULL in case of error

xmlSchemaParse ()

xmlSchemaPtr	xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt)

parse a schema definition resource and build an internal XML Schema structure which can be used to validate instances.

ctxt: a schema validation context
Returns: the internal XML Schema structure built from the resource or NULL in case of error

xmlSchemaSAXPlug ()

xmlSchemaSAXPlugPtr	xmlSchemaSAXPlug	(xmlSchemaValidCtxtPtr ctxt, 
xmlSAXHandlerPtr * sax,
void ** user_data)

Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.

ctxt: a schema validation context
sax: a pointer to the original xmlSAXHandlerPtr
user_data: a pointer to the original SAX user data pointer
Returns: a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.

xmlSchemaSAXUnplug ()

int	xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug)

Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.

plug: a data structure returned by xmlSchemaSAXPlug
Returns: 0 in case of success and -1 in case of failure.

xmlSchemaSetParserErrors ()

void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx)

Set the callback functions used to handle errors for a validation context

ctxt: a schema validation context
err: the error callback
warn: the warning callback
ctx: contextual data for the callbacks

xmlSchemaSetParserStructuredErrors ()

void	xmlSchemaSetParserStructuredErrors	(xmlSchemaParserCtxtPtr ctxt, 
xmlStructuredErrorFunc serror,
void * ctx)

Set the structured error callback

ctxt: a schema parser context
serror: the structured error function
ctx: the functions context

xmlSchemaSetValidErrors ()

void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx)

Set the error and warning callback information

ctxt: a schema validation context
err: the error function
warn: the warning function
ctx: the functions context

xmlSchemaSetValidOptions ()

int	xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt, 
int options)

Sets the options to be used during the validation.

ctxt: a schema validation context
options: a combination of xmlSchemaValidOption
Returns: 0 in case of success, -1 in case of an API error.

xmlSchemaSetValidStructuredErrors ()

void	xmlSchemaSetValidStructuredErrors	(xmlSchemaValidCtxtPtr ctxt, 
xmlStructuredErrorFunc serror,
void * ctx)

Set the structured error callback

ctxt: a schema validation context
serror: the structured error function
ctx: the functions context

xmlSchemaValidCtxtGetOptions ()

int	xmlSchemaValidCtxtGetOptions	(xmlSchemaValidCtxtPtr ctxt)

Get the validation context options.

ctxt: a schema validation context
Returns: the option combination or -1 on error.

xmlSchemaValidCtxtGetParserCtxt ()

xmlParserCtxtPtr	xmlSchemaValidCtxtGetParserCtxt	(xmlSchemaValidCtxtPtr ctxt)

allow access to the parser context of the schema validation context

ctxt: a schema validation context
Returns: the parser context of the schema validation context or NULL in case of error.

xmlSchemaValidateDoc ()

int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
xmlDocPtr doc)

Validate a document tree in memory.

ctxt: a schema validation context
doc: a parsed document tree
Returns: 0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

xmlSchemaValidateFile ()

int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
const char * filename,
int options)

Do a schemas validation of the given resource, it will use the SAX streamable validation internally.

ctxt: a schema validation context
filename: the URI of the instance
options: a future set of options, currently unused
Returns: 0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.

xmlSchemaValidateOneElement ()

int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
xmlNodePtr elem)

Validate a branch of a tree, starting with the given @elem.

ctxt: a schema validation context
elem: an element node
Returns: 0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.

xmlSchemaValidateSetFilename ()

void	xmlSchemaValidateSetFilename	(xmlSchemaValidCtxtPtr vctxt, 
const char * filename)

Workaround to provide file error reporting information when this is not provided by current APIs

vctxt: the schema validation context
filename: the file name

xmlSchemaValidateSetLocator ()

void	xmlSchemaValidateSetLocator	(xmlSchemaValidCtxtPtr vctxt, 
xmlSchemaValidityLocatorFunc f,
void * ctxt)

Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator.

vctxt: a schema validation context
f: the locator function pointer
ctxt: the locator context

xmlSchemaValidateStream ()

int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)

Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.

ctxt: a schema validation context
input: the input to use for reading the data
enc: an optional encoding information
sax: a SAX handler for the resulting events
user_data: the context to provide to the SAX handler.
Returns: 0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

PK!Zfflibxml2-parser.htmlnu[ parser: the core parser module

parser

parser - the core parser module

Interfaces, constants and types related to the XML parser

Author(s): Daniel Veillard

Synopsis

#define XML_COMPLETE_ATTRS;
#define XML_DEFAULT_VERSION;
#define XML_DETECT_IDS;
#define XML_SAX2_MAGIC;
#define XML_SKIP_IDS;
typedef enum xmlFeature;
typedef enum xmlParserInputState;
typedef enum xmlParserMode;
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
typedef xmlParserNodeInfo * xmlParserNodeInfoPtr;
typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
typedef xmlParserNodeInfoSeq * xmlParserNodeInfoSeqPtr;
typedef enum xmlParserOption;
typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
typedef xmlSAXHandlerV1 * xmlSAXHandlerV1Ptr;
typedef struct _xmlStartTag xmlStartTag;
typedef void attributeDeclSAXFunc		(void * ctx, 
const xmlChar * elem,
const xmlChar * fullname,
int type,
int def,
const xmlChar * defaultValue,
xmlEnumerationPtr tree); typedef void attributeSAXFunc (void * ctx,
const xmlChar * name,
const xmlChar * value); typedef void cdataBlockSAXFunc (void * ctx,
const xmlChar * value,
int len); typedef void charactersSAXFunc (void * ctx,
const xmlChar * ch,
int len); typedef void commentSAXFunc (void * ctx,
const xmlChar * value); typedef void elementDeclSAXFunc (void * ctx,
const xmlChar * name,
int type,
xmlElementContentPtr content); typedef void endDocumentSAXFunc (void * ctx); typedef void endElementNsSAX2Func (void * ctx,
const xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI); typedef void endElementSAXFunc (void * ctx,
const xmlChar * name); typedef void entityDeclSAXFunc (void * ctx,
const xmlChar * name,
int type,
const xmlChar * publicId,
const xmlChar * systemId,
xmlChar * content); typedef void errorSAXFunc (void * ctx,
const char * msg,
... ...); typedef void externalSubsetSAXFunc (void * ctx,
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID); typedef void fatalErrorSAXFunc (void * ctx,
const char * msg,
... ...); typedef xmlEntityPtr getEntitySAXFunc (void * ctx,
const xmlChar * name); typedef xmlEntityPtr getParameterEntitySAXFunc (void * ctx,
const xmlChar * name); typedef int hasExternalSubsetSAXFunc (void * ctx); typedef int hasInternalSubsetSAXFunc (void * ctx); typedef void ignorableWhitespaceSAXFunc (void * ctx,
const xmlChar * ch,
int len); typedef void internalSubsetSAXFunc (void * ctx,
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID); typedef int isStandaloneSAXFunc (void * ctx); typedef void notationDeclSAXFunc (void * ctx,
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId); typedef void processingInstructionSAXFunc (void * ctx,
const xmlChar * target,
const xmlChar * data); typedef void referenceSAXFunc (void * ctx,
const xmlChar * name); typedef xmlParserInputPtr resolveEntitySAXFunc (void * ctx,
const xmlChar * publicId,
const xmlChar * systemId); typedef void setDocumentLocatorSAXFunc (void * ctx,
xmlSAXLocatorPtr loc); typedef void startDocumentSAXFunc (void * ctx); typedef void startElementNsSAX2Func (void * ctx,
const xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI,
int nb_namespaces,
const xmlChar ** namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar ** attributes); typedef void startElementSAXFunc (void * ctx,
const xmlChar * name,
const xmlChar ** atts); typedef void unparsedEntityDeclSAXFunc (void * ctx,
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId,
const xmlChar * notationName); typedef void warningSAXFunc (void * ctx,
const char * msg,
... ...); long xmlByteConsumed (xmlParserCtxtPtr ctxt); void xmlCleanupParser (void); void xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); void xmlClearParserCtxt (xmlParserCtxtPtr ctxt); xmlParserCtxtPtr xmlCreateDocParserCtxt (const xmlChar * cur); xmlParserCtxtPtr xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
void * user_data,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
xmlCharEncoding enc); xmlParserCtxtPtr xmlCreatePushParserCtxt (xmlSAXHandlerPtr sax,
void * user_data,
const char * chunk,
int size,
const char * filename); xmlDocPtr xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
const xmlChar * cur,
const char * URL,
const char * encoding,
int options); xmlDocPtr xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
int fd,
const char * URL,
const char * encoding,
int options); xmlDocPtr xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
const char * filename,
const char * encoding,
int options); xmlDocPtr xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options); xmlDocPtr xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options); void xmlCtxtReset (xmlParserCtxtPtr ctxt); int xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
const char * chunk,
int size,
const char * filename,
const char * encoding); int xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
int options); typedef xmlParserInputPtr xmlExternalEntityLoader (const char * URL,
const char * ID,
xmlParserCtxtPtr context); void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); xmlExternalEntityLoader xmlGetExternalEntityLoader (void); int xmlGetFeature (xmlParserCtxtPtr ctxt,
const char * name,
void * result); int xmlGetFeaturesList (int * len,
const char ** result); int xmlHasFeature (xmlFeature feature); xmlDtdPtr xmlIOParseDTD (xmlSAXHandlerPtr sax,
xmlParserInputBufferPtr input,
xmlCharEncoding enc); void xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); void xmlInitParser (void); int xmlInitParserCtxt (xmlParserCtxtPtr ctxt); int xmlKeepBlanksDefault (int val); int xmlLineNumbersDefault (int val); xmlParserInputPtr xmlLoadExternalEntity (const char * URL,
const char * ID,
xmlParserCtxtPtr ctxt); xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc); xmlParserCtxtPtr xmlNewParserCtxt (void); int xmlParseBalancedChunkMemory (xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void * user_data,
int depth,
const xmlChar * string,
xmlNodePtr * lst); int xmlParseBalancedChunkMemoryRecover (xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void * user_data,
int depth,
const xmlChar * string,
xmlNodePtr * lst,
int recover); int xmlParseChunk (xmlParserCtxtPtr ctxt,
const char * chunk,
int size,
int terminate); int xmlParseCtxtExternalEntity (xmlParserCtxtPtr ctx,
const xmlChar * URL,
const xmlChar * ID,
xmlNodePtr * lst); xmlDtdPtr xmlParseDTD (const xmlChar * ExternalID,
const xmlChar * SystemID); xmlDocPtr xmlParseDoc (const xmlChar * cur); int xmlParseDocument (xmlParserCtxtPtr ctxt); xmlDocPtr xmlParseEntity (const char * filename); int xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); int xmlParseExternalEntity (xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void * user_data,
int depth,
const xmlChar * URL,
const xmlChar * ID,
xmlNodePtr * lst); xmlDocPtr xmlParseFile (const char * filename); xmlParserErrors xmlParseInNodeContext (xmlNodePtr node,
const char * data,
int datalen,
int options,
xmlNodePtr * lst); xmlDocPtr xmlParseMemory (const char * buffer,
int size); void xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
const xmlParserNodeInfoPtr info); const xmlParserNodeInfo * xmlParserFindNodeInfo (const xmlParserCtxtPtr ctx,
const xmlNodePtr node); unsigned long xmlParserFindNodeInfoIndex (const xmlParserNodeInfoSeqPtr seq,
const xmlNodePtr node); typedef void xmlParserInputDeallocate (xmlChar * str); int xmlParserInputGrow (xmlParserInputPtr in,
int len); int xmlParserInputRead (xmlParserInputPtr in,
int len); int xmlPedanticParserDefault (int val); xmlDocPtr xmlReadDoc (const xmlChar * cur,
const char * URL,
const char * encoding,
int options); xmlDocPtr xmlReadFd (int fd,
const char * URL,
const char * encoding,
int options); xmlDocPtr xmlReadFile (const char * filename,
const char * encoding,
int options); xmlDocPtr xmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options); xmlDocPtr xmlReadMemory (const char * buffer,
int size,
const char * URL,
const char * encoding,
int options); xmlDocPtr xmlRecoverDoc (const xmlChar * cur); xmlDocPtr xmlRecoverFile (const char * filename); xmlDocPtr xmlRecoverMemory (const char * buffer,
int size); xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax,
const xmlChar * ExternalID,
const xmlChar * SystemID); xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax,
const xmlChar * cur,
int recovery); xmlDocPtr xmlSAXParseEntity (xmlSAXHandlerPtr sax,
const char * filename); xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax,
const char * filename,
int recovery); xmlDocPtr xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
const char * filename,
int recovery,
void * data); xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax,
const char * buffer,
int size,
int recovery); xmlDocPtr xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
const char * buffer,
int size,
int recovery,
void * data); int xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
void * user_data,
const char * filename); int xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
void * user_data,
const char * buffer,
int size); void xmlSetExternalEntityLoader (xmlExternalEntityLoader f); int xmlSetFeature (xmlParserCtxtPtr ctxt,
const char * name,
void * value); void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
const xmlChar * buffer,
const char * filename); void xmlStopParser (xmlParserCtxtPtr ctxt); int xmlSubstituteEntitiesDefault (int val);

Description

Details

Macro XML_COMPLETE_ATTRS

#define XML_COMPLETE_ATTRS;

Bit in the loadsubset context field to tell to do complete the elements attributes lists with the ones defaulted from the DTDs. Use it to initialize xmlLoadExtDtdDefaultValue.


Macro XML_DEFAULT_VERSION

#define XML_DEFAULT_VERSION;

The default version of XML used: 1.0


Macro XML_DETECT_IDS

#define XML_DETECT_IDS;

Bit in the loadsubset context field to tell to do ID/REFs lookups. Use it to initialize xmlLoadExtDtdDefaultValue.


Macro XML_SAX2_MAGIC

#define XML_SAX2_MAGIC;

Special constant found in SAX2 blocks initialized fields


Macro XML_SKIP_IDS

#define XML_SKIP_IDS;

Bit in the loadsubset context field to tell to not do ID/REFs registration. Used to initialize xmlLoadExtDtdDefaultValue in some special cases.



Enum xmlParserInputState

enum xmlParserInputState {
    XML_PARSER_EOF = -1 /* nothing is to be parsed */
    XML_PARSER_START = 0 /* nothing has been parsed */
    XML_PARSER_MISC = 1 /* Misc* before int subset */
    XML_PARSER_PI = 2 /* Within a processing instruction */
    XML_PARSER_DTD = 3 /* within some DTD content */
    XML_PARSER_PROLOG = 4 /* Misc* after internal subset */
    XML_PARSER_COMMENT = 5 /* within a comment */
    XML_PARSER_START_TAG = 6 /* within a start tag */
    XML_PARSER_CONTENT = 7 /* within the content */
    XML_PARSER_CDATA_SECTION = 8 /* within a CDATA section */
    XML_PARSER_END_TAG = 9 /* within a closing tag */
    XML_PARSER_ENTITY_DECL = 10 /* within an entity declaration */
    XML_PARSER_ENTITY_VALUE = 11 /* within an entity value in a decl */
    XML_PARSER_ATTRIBUTE_VALUE = 12 /* within an attribute value */
    XML_PARSER_SYSTEM_LITERAL = 13 /* within a SYSTEM value */
    XML_PARSER_EPILOG = 14 /* the Misc* after the last end tag */
    XML_PARSER_IGNORE = 15 /* within an IGNORED section */
    XML_PARSER_PUBLIC_LITERAL = 16 /*  within a PUBLIC value */
};



Structure xmlParserNodeInfo

struct _xmlParserNodeInfo {
    const struct _xmlNode *	node	: Position & line # that text that created the node begins & ends on
    unsigned long	begin_pos
    unsigned long	begin_line
    unsigned long	end_pos
    unsigned long	end_line
} xmlParserNodeInfo;


Typedef xmlParserNodeInfoPtr

xmlParserNodeInfo * xmlParserNodeInfoPtr;


Structure xmlParserNodeInfoSeq

struct _xmlParserNodeInfoSeq {
    unsigned long	maximum
    unsigned long	length
    xmlParserNodeInfo *	buffer
} xmlParserNodeInfoSeq;


Typedef xmlParserNodeInfoSeqPtr

xmlParserNodeInfoSeq * xmlParserNodeInfoSeqPtr;


Enum xmlParserOption

enum xmlParserOption {
    XML_PARSE_RECOVER = 1 /* recover on errors */
    XML_PARSE_NOENT = 2 /* substitute entities */
    XML_PARSE_DTDLOAD = 4 /* load the external subset */
    XML_PARSE_DTDATTR = 8 /* default DTD attributes */
    XML_PARSE_DTDVALID = 16 /* validate with the DTD */
    XML_PARSE_NOERROR = 32 /* suppress error reports */
    XML_PARSE_NOWARNING = 64 /* suppress warning reports */
    XML_PARSE_PEDANTIC = 128 /* pedantic error reporting */
    XML_PARSE_NOBLANKS = 256 /* remove blank nodes */
    XML_PARSE_SAX1 = 512 /* use the SAX1 interface internally */
    XML_PARSE_XINCLUDE = 1024 /* Implement XInclude substitution */
    XML_PARSE_NONET = 2048 /* Forbid network access */
    XML_PARSE_NODICT = 4096 /* Do not reuse the context dictionary */
    XML_PARSE_NSCLEAN = 8192 /* remove redundant namespaces declarations */
    XML_PARSE_NOCDATA = 16384 /* merge CDATA as text nodes */
    XML_PARSE_NOXINCNODE = 32768 /* do not generate XINCLUDE START/END nodes */
    XML_PARSE_COMPACT = 65536 /* compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree) */
    XML_PARSE_OLD10 = 131072 /* parse using XML-1.0 before update 5 */
    XML_PARSE_NOBASEFIX = 262144 /* do not fixup XINCLUDE xml:base uris */
    XML_PARSE_HUGE = 524288 /* relax any hardcoded limit from the parser */
    XML_PARSE_OLDSAX = 1048576 /* parse using SAX2 interface before 2.7.0 */
    XML_PARSE_IGNORE_ENC = 2097152 /* ignore internal document encoding hint */
    XML_PARSE_BIG_LINES = 4194304 /*  Store big lines numbers in text PSVI field */
};


Structure xmlSAXHandlerV1

struct _xmlSAXHandlerV1 {
    internalSubsetSAXFunc	internalSubset
    isStandaloneSAXFunc	isStandalone
    hasInternalSubsetSAXFunc	hasInternalSubset
    hasExternalSubsetSAXFunc	hasExternalSubset
    resolveEntitySAXFunc	resolveEntity
    getEntitySAXFunc	getEntity
    entityDeclSAXFunc	entityDecl
    notationDeclSAXFunc	notationDecl
    attributeDeclSAXFunc	attributeDecl
    elementDeclSAXFunc	elementDecl
    unparsedEntityDeclSAXFunc	unparsedEntityDecl
    setDocumentLocatorSAXFunc	setDocumentLocator
    startDocumentSAXFunc	startDocument
    endDocumentSAXFunc	endDocument
    startElementSAXFunc	startElement
    endElementSAXFunc	endElement
    referenceSAXFunc	reference
    charactersSAXFunc	characters
    ignorableWhitespaceSAXFunc	ignorableWhitespace
    processingInstructionSAXFunc	processingInstruction
    commentSAXFunc	comment
    warningSAXFunc	warning
    errorSAXFunc	error
    fatalErrorSAXFunc	fatalError	: unused error() get all the errors
    getParameterEntitySAXFunc	getParameterEntity
    cdataBlockSAXFunc	cdataBlock
    externalSubsetSAXFunc	externalSubset
    unsigned int	initialized
} xmlSAXHandlerV1;


Typedef xmlSAXHandlerV1Ptr

xmlSAXHandlerV1 * xmlSAXHandlerV1Ptr;


Structure xmlStartTag

struct _xmlStartTag {
The content of this structure is not made public by the API.
} xmlStartTag;


Function type attributeDeclSAXFunc

void	attributeDeclSAXFunc		(void * ctx, 
const xmlChar * elem,
const xmlChar * fullname,
int type,
int def,
const xmlChar * defaultValue,
xmlEnumerationPtr tree)

An attribute definition has been parsed.

ctx: the user data (XML parser context)
elem: the name of the element
fullname: the attribute name
type: the attribute type
def: the type of default value
defaultValue: the attribute default value
tree: the tree of enumerated value set

Function type attributeSAXFunc

void	attributeSAXFunc		(void * ctx, 
const xmlChar * name,
const xmlChar * value)

Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element.

ctx: the user data (XML parser context)
name: The attribute name, including namespace prefix
value: The attribute value

Function type cdataBlockSAXFunc

void	cdataBlockSAXFunc		(void * ctx, 
const xmlChar * value,
int len)

Called when a pcdata block has been parsed.

ctx: the user data (XML parser context)
value: The pcdata content
len: the block length

Function type charactersSAXFunc

void	charactersSAXFunc		(void * ctx, 
const xmlChar * ch,
int len)

Receiving some chars from the parser.

ctx: the user data (XML parser context)
ch: a xmlChar string
len: the number of xmlChar

Function type commentSAXFunc

void	commentSAXFunc			(void * ctx, 
const xmlChar * value)

A comment has been parsed.

ctx: the user data (XML parser context)
value: the comment content

Function type elementDeclSAXFunc

void	elementDeclSAXFunc		(void * ctx, 
const xmlChar * name,
int type,
xmlElementContentPtr content)

An element definition has been parsed.

ctx: the user data (XML parser context)
name: the element name
type: the element type
content: the element value tree

Function type endDocumentSAXFunc

void	endDocumentSAXFunc		(void * ctx)

Called when the document end has been detected.

ctx: the user data (XML parser context)

Function type endElementNsSAX2Func

void	endElementNsSAX2Func		(void * ctx, 
const xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI)

SAX2 callback when an element end has been detected by the parser. It provides the namespace information for the element.

ctx: the user data (XML parser context)
localname: the local name of the element
prefix: the element namespace prefix if available
URI: the element namespace name if available

Function type endElementSAXFunc

void	endElementSAXFunc		(void * ctx, 
const xmlChar * name)

Called when the end of an element has been detected.

ctx: the user data (XML parser context)
name: The element name

Function type entityDeclSAXFunc

void	entityDeclSAXFunc		(void * ctx, 
const xmlChar * name,
int type,
const xmlChar * publicId,
const xmlChar * systemId,
xmlChar * content)

An entity definition has been parsed.

ctx: the user data (XML parser context)
name: the entity name
type: the entity type
publicId: The public ID of the entity
systemId: The system ID of the entity
content: the entity value (without processing).

Function type errorSAXFunc

void	errorSAXFunc			(void * ctx, 
const char * msg,
... ...)

Display and format an error messages, callback.

ctx: an XML parser context
msg: the message to display/transmit
...: extra parameters for the message display

Function type externalSubsetSAXFunc

void	externalSubsetSAXFunc		(void * ctx, 
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID)

Callback on external subset declaration.

ctx: the user data (XML parser context)
name: the root element name
ExternalID: the external ID
SystemID: the SYSTEM ID (e.g. filename or URL)

Function type fatalErrorSAXFunc

void	fatalErrorSAXFunc		(void * ctx, 
const char * msg,
... ...)

Display and format fatal error messages, callback. Note: so far fatalError() SAX callbacks are not used, error() get all the callbacks for errors.

ctx: an XML parser context
msg: the message to display/transmit
...: extra parameters for the message display

Function type getEntitySAXFunc

xmlEntityPtr	getEntitySAXFunc	(void * ctx, 
const xmlChar * name)

Get an entity by name.

ctx: the user data (XML parser context)
name: The entity name
Returns: the xmlEntityPtr if found.

Function type getParameterEntitySAXFunc

xmlEntityPtr	getParameterEntitySAXFunc	(void * ctx, 
const xmlChar * name)

Get a parameter entity by name.

ctx: the user data (XML parser context)
name: The entity name
Returns: the xmlEntityPtr if found.

Function type hasExternalSubsetSAXFunc

int	hasExternalSubsetSAXFunc	(void * ctx)

Does this document has an external subset?

ctx: the user data (XML parser context)
Returns: 1 if true

Function type hasInternalSubsetSAXFunc

int	hasInternalSubsetSAXFunc	(void * ctx)

Does this document has an internal subset.

ctx: the user data (XML parser context)
Returns: 1 if true

Function type ignorableWhitespaceSAXFunc

void	ignorableWhitespaceSAXFunc	(void * ctx, 
const xmlChar * ch,
int len)

Receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters.

ctx: the user data (XML parser context)
ch: a xmlChar string
len: the number of xmlChar

Function type internalSubsetSAXFunc

void	internalSubsetSAXFunc		(void * ctx, 
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID)

Callback on internal subset declaration.

ctx: the user data (XML parser context)
name: the root element name
ExternalID: the external ID
SystemID: the SYSTEM ID (e.g. filename or URL)

Function type isStandaloneSAXFunc

int	isStandaloneSAXFunc		(void * ctx)

Is this document tagged standalone?

ctx: the user data (XML parser context)
Returns: 1 if true

Function type notationDeclSAXFunc

void	notationDeclSAXFunc		(void * ctx, 
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId)

What to do when a notation declaration has been parsed.

ctx: the user data (XML parser context)
name: The name of the notation
publicId: The public ID of the entity
systemId: The system ID of the entity

Function type processingInstructionSAXFunc

void	processingInstructionSAXFunc	(void * ctx, 
const xmlChar * target,
const xmlChar * data)

A processing instruction has been parsed.

ctx: the user data (XML parser context)
target: the target name
data: the PI data's

Function type referenceSAXFunc

void	referenceSAXFunc		(void * ctx, 
const xmlChar * name)

Called when an entity reference is detected.

ctx: the user data (XML parser context)
name: The entity name

Function type resolveEntitySAXFunc

xmlParserInputPtr	resolveEntitySAXFunc	(void * ctx, 
const xmlChar * publicId,
const xmlChar * systemId)

Callback: 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

ctx: the user data (XML parser context)
publicId: The public ID of the entity
systemId: The system ID of the entity
Returns: the xmlParserInputPtr if inlined or NULL for DOM behaviour.

Function type setDocumentLocatorSAXFunc

void	setDocumentLocatorSAXFunc	(void * ctx, 
xmlSAXLocatorPtr loc)

Receive the document locator at startup, actually xmlDefaultSAXLocator. Everything is available on the context, so this is useless in our case.

ctx: the user data (XML parser context)
loc: A SAX Locator

Function type startDocumentSAXFunc

void	startDocumentSAXFunc		(void * ctx)

Called when the document start being processed.

ctx: the user data (XML parser context)

Function type startElementNsSAX2Func

void	startElementNsSAX2Func		(void * ctx, 
const xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI,
int nb_namespaces,
const xmlChar ** namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar ** attributes)

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.

ctx: the user data (XML parser context)
localname: the local name of the element
prefix: the element namespace prefix if available
URI: the element namespace name if available
nb_namespaces: number of namespace definitions on that node
namespaces: pointer to the array of prefix/URI pairs namespace definitions
nb_attributes: the number of attributes on that node
nb_defaulted: the number of defaulted attributes. The defaulted ones are at the end of the array
attributes: pointer to the array of (localname/prefix/URI/value/end) attribute values.

Function type startElementSAXFunc

void	startElementSAXFunc		(void * ctx, 
const xmlChar * name,
const xmlChar ** atts)

Called when an opening tag has been processed.

ctx: the user data (XML parser context)
name: The element name, including namespace prefix
atts: An array of name/value attributes pairs, NULL terminated

Function type unparsedEntityDeclSAXFunc

void	unparsedEntityDeclSAXFunc	(void * ctx, 
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId,
const xmlChar * notationName)

What to do when an unparsed entity declaration is parsed.

ctx: the user data (XML parser context)
name: The name of the entity
publicId: The public ID of the entity
systemId: The system ID of the entity
notationName: the name of the notation

Function type warningSAXFunc

void	warningSAXFunc			(void * ctx, 
const char * msg,
... ...)

Display and format a warning messages, callback.

ctx: an XML parser context
msg: the message to display/transmit
...: extra parameters for the message display

Function type xmlExternalEntityLoader

xmlParserInputPtr	xmlExternalEntityLoader	(const char * URL, 
const char * ID,
xmlParserCtxtPtr context)

External entity loaders types.

URL: The System ID of the resource requested
ID: The Public ID of the resource requested
context: the XML parser context
Returns: the entity input parser.

Function type xmlParserInputDeallocate

void	xmlParserInputDeallocate	(xmlChar * str)

Callback for freeing some parser input allocations.

str: the string to deallocate

xmlByteConsumed ()

long	xmlByteConsumed			(xmlParserCtxtPtr ctxt)

This function provides the current index of the parser relative to the start of the current entity. This function is computed in bytes from the beginning starting at zero and finishing at the size in byte of the file if parsing a file. The function is of constant cost if the input is UTF-8 but can be costly if run on non-UTF-8 input.

ctxt: an XML parser context
Returns: the index in bytes from the beginning of the entity or -1 in case the index could not be computed.

xmlCleanupParser ()

void	xmlCleanupParser		(void)

This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !


xmlClearNodeInfoSeq ()

void	xmlClearNodeInfoSeq		(xmlParserNodeInfoSeqPtr seq)

-- Clear (release memory and reinitialize) node info sequence

seq: a node info sequence pointer

xmlClearParserCtxt ()

void	xmlClearParserCtxt		(xmlParserCtxtPtr ctxt)

Clear (release owned resources) and reinitialize a parser context

ctxt: an XML parser context

xmlCreateDocParserCtxt ()

xmlParserCtxtPtr	xmlCreateDocParserCtxt	(const xmlChar * cur)

Creates a parser context for an XML in-memory document.

cur: a pointer to an array of xmlChar
Returns: the new parser context or NULL

xmlCreateIOParserCtxt ()

xmlParserCtxtPtr	xmlCreateIOParserCtxt	(xmlSAXHandlerPtr sax, 
void * user_data,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
xmlCharEncoding enc)

Create a parser context for using the XML parser with an existing I/O stream

sax: a SAX handler
user_data: The user data returned on SAX callbacks
ioread: an I/O read function
ioclose: an I/O close function
ioctx: an I/O handler
enc: the charset encoding if known
Returns: the new parser context or NULL

xmlCreatePushParserCtxt ()

xmlParserCtxtPtr	xmlCreatePushParserCtxt	(xmlSAXHandlerPtr sax, 
void * user_data,
const char * chunk,
int size,
const char * filename)

Create a parser context for using the XML parser in push mode. If @buffer and @size are non-NULL, the data is used to detect the encoding. The remaining characters will be parsed so they don't need to be fed in again through xmlParseChunk. To allow content encoding detection, @size should be >= 4 The value of @filename is used for fetching external entities and error/warning reports.

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
Returns: the new parser context or NULL

xmlCtxtReadDoc ()

xmlDocPtr	xmlCtxtReadDoc		(xmlParserCtxtPtr ctxt, 
const xmlChar * cur,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context

ctxt: an XML parser context
cur: a pointer to a zero terminated string
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlCtxtReadFd ()

xmlDocPtr	xmlCtxtReadFd		(xmlParserCtxtPtr ctxt, 
int fd,
const char * URL,
const char * encoding,
int options)

parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context NOTE that the file descriptor will not be closed when the reader is closed or reset.

ctxt: an XML parser context
fd: an open file descriptor
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlCtxtReadFile ()

xmlDocPtr	xmlCtxtReadFile		(xmlParserCtxtPtr ctxt, 
const char * filename,
const char * encoding,
int options)

parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context

ctxt: an XML parser context
filename: a file or URL
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlCtxtReadIO ()

xmlDocPtr	xmlCtxtReadIO		(xmlParserCtxtPtr ctxt, 
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)

parse an XML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context

ctxt: an XML parser context
ioread: an I/O read function
ioclose: an I/O close function
ioctx: an I/O handler
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlCtxtReadMemory ()

xmlDocPtr	xmlCtxtReadMemory	(xmlParserCtxtPtr ctxt, 
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context

ctxt: an XML parser context
buffer: a pointer to a char array
size: the size of the array
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlCtxtReset ()

void	xmlCtxtReset			(xmlParserCtxtPtr ctxt)

Reset a parser context

ctxt: an XML parser context

xmlCtxtResetPush ()

int	xmlCtxtResetPush		(xmlParserCtxtPtr ctxt, 
const char * chunk,
int size,
const char * filename,
const char * encoding)

Reset a push parser context

ctxt: an XML parser context
chunk: a pointer to an array of chars
size: number of chars in the array
filename: an optional file name or URI
encoding: the document encoding, or NULL
Returns: 0 in case of success and 1 in case of error

xmlCtxtUseOptions ()

int	xmlCtxtUseOptions		(xmlParserCtxtPtr ctxt, 
int options)

Applies the options to the parser context

ctxt: an XML parser context
options: a combination of xmlParserOption
Returns: 0 in case of success, the set of unknown or unimplemented options in case of error.

xmlFreeParserCtxt ()

void	xmlFreeParserCtxt		(xmlParserCtxtPtr ctxt)

Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed.

ctxt: an XML parser context

xmlGetExternalEntityLoader ()

xmlExternalEntityLoader	xmlGetExternalEntityLoader	(void)

Get the default external entity resolver function for the application

Returns: the xmlExternalEntityLoader function pointer

xmlGetFeature ()

int	xmlGetFeature			(xmlParserCtxtPtr ctxt, 
const char * name,
void * result)

Read the current value of one feature of this parser instance

ctxt: an XML/HTML parser context
name: the feature name
result: location to store the result
Returns: -1 in case or error, 0 otherwise

xmlGetFeaturesList ()

int	xmlGetFeaturesList		(int * len, 
const char ** result)

Copy at most *@len feature names into the @result array

len: the length of the features name array (input/output)
result: an array of string to be filled with the features name.
Returns: -1 in case or error, or the total number of features, len is updated with the number of strings copied, strings must not be deallocated

xmlHasFeature ()

int	xmlHasFeature			(xmlFeature feature)

Examines if the library has been compiled with a given feature.

feature: the feature to be examined
Returns: a non-zero value if the feature exist, otherwise zero. Returns zero (0) if the feature does not exist or an unknown unknown feature is requested, non-zero otherwise.

xmlIOParseDTD ()

xmlDtdPtr	xmlIOParseDTD		(xmlSAXHandlerPtr sax, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc)

Load and parse a DTD

sax: the SAX handler block or NULL
input: an Input Buffer
enc: the charset encoding if known
Returns: the resulting xmlDtdPtr or NULL in case of error. @input will be freed by the function in any case.

xmlInitNodeInfoSeq ()

void	xmlInitNodeInfoSeq		(xmlParserNodeInfoSeqPtr seq)

-- Initialize (set to initial state) node info sequence

seq: a node info sequence pointer

xmlInitParser ()

void	xmlInitParser			(void)

Initialization function for the XML parser. This is not reentrant. Call once before processing in case of use in multithreaded programs.


xmlInitParserCtxt ()

int	xmlInitParserCtxt		(xmlParserCtxtPtr ctxt)

Initialize a parser context

ctxt: an XML parser context
Returns: 0 in case of success and -1 in case of error

xmlKeepBlanksDefault ()

int	xmlKeepBlanksDefault		(int val)

Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using the DOM output text nodes containing those blanks were not generated. The 2.x and later version will switch to the XML standard way and ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content. This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using xmlIsBlankNode() commodity function to detect the "empty" nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated.

val: int 0 or 1
Returns: the last value for 0 for no substitution, 1 for substitution.

xmlLineNumbersDefault ()

int	xmlLineNumbersDefault		(int val)

Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.

val: int 0 or 1
Returns: the last value for 0 for no substitution, 1 for substitution.

xmlLoadExternalEntity ()

xmlParserInputPtr	xmlLoadExternalEntity	(const char * URL, 
const char * ID,
xmlParserCtxtPtr ctxt)

Load an external entity, note that the use of this function for unparsed entities may generate problems

URL: the URL for the entity to load
ID: the Public ID for the entity to load
ctxt: the context in which the entity is called or NULL
Returns: the xmlParserInputPtr or NULL

xmlNewIOInputStream ()

xmlParserInputPtr	xmlNewIOInputStream	(xmlParserCtxtPtr ctxt, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc)

Create a new input stream structure encapsulating the @input into a stream suitable for the parser.

ctxt: an XML parser context
input: an I/O Input
enc: the charset encoding if known
Returns: the new input stream or NULL

xmlNewParserCtxt ()

xmlParserCtxtPtr	xmlNewParserCtxt	(void)

Allocate and initialize a new parser context.

Returns: the xmlParserCtxtPtr or NULL

xmlParseBalancedChunkMemory ()

int	xmlParseBalancedChunkMemory	(xmlDocPtr doc, 
xmlSAXHandlerPtr sax,
void * user_data,
int depth,
const xmlChar * string,
xmlNodePtr * lst)

Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

doc: the document the chunk pertains to (must not be NULL)
sax: the SAX handler block (possibly NULL)
user_data: The user data returned on SAX callbacks (possibly NULL)
depth: Used for loop detection, use 0
string: the input string in UTF8 or ISO-Latin (zero terminated)
lst: the return value for the set of parsed nodes
Returns: 0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise

xmlParseBalancedChunkMemoryRecover ()

int	xmlParseBalancedChunkMemoryRecover	(xmlDocPtr doc, 
xmlSAXHandlerPtr sax,
void * user_data,
int depth,
const xmlChar * string,
xmlNodePtr * lst,
int recover)

Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

doc: the document the chunk pertains to (must not be NULL)
sax: the SAX handler block (possibly NULL)
user_data: The user data returned on SAX callbacks (possibly NULL)
depth: Used for loop detection, use 0
string: the input string in UTF8 or ISO-Latin (zero terminated)
lst: the return value for the set of parsed nodes
recover: return nodes even if the data is broken (use 0)
Returns: 0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise In case recover is set to 1, the nodelist will not be empty even if the parsed chunk is not well balanced, assuming the parsing succeeded to some extent.

xmlParseChunk ()

int	xmlParseChunk			(xmlParserCtxtPtr ctxt, 
const char * chunk,
int size,
int terminate)

Parse a Chunk of memory

ctxt: an XML parser context
chunk: an char array
size: the size in byte of the chunk
terminate: last chunk indicator
Returns: zero if no error, the xmlParserErrors otherwise.

xmlParseCtxtExternalEntity ()

int	xmlParseCtxtExternalEntity	(xmlParserCtxtPtr ctx, 
const xmlChar * URL,
const xmlChar * ID,
xmlNodePtr * lst)

Parse an external general entity within an existing parsing context An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content

ctx: the existing parsing context
URL: the URL for the entity to load
ID: the System ID for the entity to load
lst: the return value for the set of parsed nodes
Returns: 0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise

xmlParseDTD ()

xmlDtdPtr	xmlParseDTD		(const xmlChar * ExternalID, 
const xmlChar * SystemID)

Load and parse an external subset.

ExternalID: a NAME* containing the External ID of the DTD
SystemID: a NAME* containing the URL to the DTD
Returns: the resulting xmlDtdPtr or NULL in case of error.

xmlParseDoc ()

xmlDocPtr	xmlParseDoc		(const xmlChar * cur)

parse an XML in-memory document and build a tree.

cur: a pointer to an array of xmlChar
Returns: the resulting document tree

xmlParseDocument ()

int	xmlParseDocument		(xmlParserCtxtPtr ctxt)

parse an XML document (and build a tree if using the standard SAX interface). [1] document ::= prolog element Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?

ctxt: an XML parser context
Returns: 0, -1 in case of error. the parser context is augmented as a result of the parsing.

xmlParseEntity ()

xmlDocPtr	xmlParseEntity		(const char * filename)

parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk

filename: the filename
Returns: the resulting document tree

xmlParseExtParsedEnt ()

int	xmlParseExtParsedEnt		(xmlParserCtxtPtr ctxt)

parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content

ctxt: an XML parser context
Returns: 0, -1 in case of error. the parser context is augmented as a result of the parsing.

xmlParseExternalEntity ()

int	xmlParseExternalEntity		(xmlDocPtr doc, 
xmlSAXHandlerPtr sax,
void * user_data,
int depth,
const xmlChar * URL,
const xmlChar * ID,
xmlNodePtr * lst)

Parse an external general entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content

doc: the document the chunk pertains to
sax: the SAX handler block (possibly NULL)
user_data: The user data returned on SAX callbacks (possibly NULL)
depth: Used for loop detection, use 0
URL: the URL for the entity to load
ID: the System ID for the entity to load
lst: the return value for the set of parsed nodes
Returns: 0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise

xmlParseFile ()

xmlDocPtr	xmlParseFile		(const char * filename)

parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

filename: the filename
Returns: the resulting document tree if the file was wellformed, NULL otherwise.

xmlParseInNodeContext ()

xmlParserErrors	xmlParseInNodeContext	(xmlNodePtr node, 
const char * data,
int datalen,
int options,
xmlNodePtr * lst)

Parse a well-balanced chunk of an XML document within the context (DTD, namespaces, etc ...) of the given node. The allowed sequence for the data is a Well Balanced Chunk defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

node: the context node
data: the input string
datalen: the input string length in bytes
options: a combination of xmlParserOption
lst: the return value for the set of parsed nodes
Returns: XML_ERR_OK if the chunk is well balanced, and the parser error code otherwise

xmlParseMemory ()

xmlDocPtr	xmlParseMemory		(const char * buffer, 
int size)

parse an XML in-memory block and build a tree.

buffer: an pointer to a char array
size: the size of the array
Returns: the resulting document tree

xmlParserAddNodeInfo ()

void	xmlParserAddNodeInfo		(xmlParserCtxtPtr ctxt, 
const xmlParserNodeInfoPtr info)

Insert node info record into the sorted sequence

ctxt: an XML parser context
info: a node info sequence pointer

xmlParserFindNodeInfo ()

const xmlParserNodeInfo *	xmlParserFindNodeInfo	(const xmlParserCtxtPtr ctx, 
const xmlNodePtr node)

Find the parser node info struct for a given node

ctx: an XML parser context
node: an XML node within the tree
Returns: an xmlParserNodeInfo block pointer or NULL

xmlParserFindNodeInfoIndex ()

unsigned long	xmlParserFindNodeInfoIndex	(const xmlParserNodeInfoSeqPtr seq, 
const xmlNodePtr node)

xmlParserFindNodeInfoIndex : Find the index that the info record for the given node is or should be at in a sorted sequence

seq: a node info sequence pointer
node: an XML node pointer
Returns: a long indicating the position of the record

xmlParserInputGrow ()

int	xmlParserInputGrow		(xmlParserInputPtr in, 
int len)

This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data

in: an XML parser input
len: an indicative size for the lookahead
Returns: the amount of char read, or -1 in case of error, 0 indicate the end of this entity

xmlParserInputRead ()

int	xmlParserInputRead		(xmlParserInputPtr in, 
int len)

This function was internal and is deprecated.

in: an XML parser input
len: an indicative size for the lookahead
Returns: -1 as this is an error to use it.

xmlPedanticParserDefault ()

int	xmlPedanticParserDefault	(int val)

Set and return the previous value for enabling pedantic warnings.

val: int 0 or 1
Returns: the last value for 0 for no substitution, 1 for substitution.

xmlReadDoc ()

xmlDocPtr	xmlReadDoc		(const xmlChar * cur, 
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree.

cur: a pointer to a zero terminated string
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlReadFd ()

xmlDocPtr	xmlReadFd		(int fd, 
const char * URL,
const char * encoding,
int options)

parse an XML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset.

fd: an open file descriptor
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlReadFile ()

xmlDocPtr	xmlReadFile		(const char * filename, 
const char * encoding,
int options)

parse an XML file from the filesystem or the network.

filename: a file or URL
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlReadIO ()

xmlDocPtr	xmlReadIO		(xmlInputReadCallback ioread, 
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)

parse an XML document from I/O functions and source and build a tree.

ioread: an I/O read function
ioclose: an I/O close function
ioctx: an I/O handler
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlReadMemory ()

xmlDocPtr	xmlReadMemory		(const char * buffer, 
int size,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree.

buffer: a pointer to a char array
size: the size of the array
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the resulting document tree

xmlRecoverDoc ()

xmlDocPtr	xmlRecoverDoc		(const xmlChar * cur)

parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway

cur: a pointer to an array of xmlChar
Returns: the resulting document tree or NULL in case of failure

xmlRecoverFile ()

xmlDocPtr	xmlRecoverFile		(const char * filename)

parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway

filename: the filename
Returns: the resulting document tree or NULL in case of failure

xmlRecoverMemory ()

xmlDocPtr	xmlRecoverMemory	(const char * buffer, 
int size)

parse an XML in-memory block and build a tree. In the case the document is not Well Formed, an attempt to build a tree is tried anyway

buffer: an pointer to a char array
size: the size of the array
Returns: the resulting document tree or NULL in case of error

xmlSAXParseDTD ()

xmlDtdPtr	xmlSAXParseDTD		(xmlSAXHandlerPtr sax, 
const xmlChar * ExternalID,
const xmlChar * SystemID)

Load and parse an external subset.

sax: the SAX handler block
ExternalID: a NAME* containing the External ID of the DTD
SystemID: a NAME* containing the URL to the DTD
Returns: the resulting xmlDtdPtr or NULL in case of error.

xmlSAXParseDoc ()

xmlDocPtr	xmlSAXParseDoc		(xmlSAXHandlerPtr sax, 
const xmlChar * cur,
int recovery)

parse an XML 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.

sax: the SAX handler block
cur: a pointer to an array of xmlChar
recovery: work in recovery mode, i.e. tries to read no Well Formed documents
Returns: the resulting document tree

xmlSAXParseEntity ()

xmlDocPtr	xmlSAXParseEntity	(xmlSAXHandlerPtr sax, 
const char * filename)

parse an XML external entity out of context 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. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk

sax: the SAX handler block
filename: the filename
Returns: the resulting document tree

xmlSAXParseFile ()

xmlDocPtr	xmlSAXParseFile		(xmlSAXHandlerPtr sax, 
const char * filename,
int recovery)

parse an XML 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.

sax: the SAX handler block
filename: the filename
recovery: work in recovery mode, i.e. tries to read no Well Formed documents
Returns: the resulting document tree

xmlSAXParseFileWithData ()

xmlDocPtr	xmlSAXParseFileWithData	(xmlSAXHandlerPtr sax, 
const char * filename,
int recovery,
void * data)

parse an XML 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. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml

sax: the SAX handler block
filename: the filename
recovery: work in recovery mode, i.e. tries to read no Well Formed documents
data: the userdata
Returns: the resulting document tree

xmlSAXParseMemory ()

xmlDocPtr	xmlSAXParseMemory	(xmlSAXHandlerPtr sax, 
const char * buffer,
int size,
int recovery)

parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.

sax: the SAX handler block
buffer: an pointer to a char array
size: the size of the array
recovery: work in recovery mode, i.e. tries to read not Well Formed documents
Returns: the resulting document tree

xmlSAXParseMemoryWithData ()

xmlDocPtr	xmlSAXParseMemoryWithData	(xmlSAXHandlerPtr sax, 
const char * buffer,
int size,
int recovery,
void * data)

parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml

sax: the SAX handler block
buffer: an pointer to a char array
size: the size of the array
recovery: work in recovery mode, i.e. tries to read no Well Formed documents
data: the userdata
Returns: the resulting document tree

xmlSAXUserParseFile ()

int	xmlSAXUserParseFile		(xmlSAXHandlerPtr sax, 
void * user_data,
const char * filename)

parse an XML file and call the given SAX handler routines. Automatic support for ZLIB/Compress compressed document is provided

sax: a SAX handler
user_data: The user data returned on SAX callbacks
filename: a file name
Returns: 0 in case of success or a error number otherwise

xmlSAXUserParseMemory ()

int	xmlSAXUserParseMemory		(xmlSAXHandlerPtr sax, 
void * user_data,
const char * buffer,
int size)

A better SAX parsing routine. parse an XML in-memory buffer and call the given SAX handler routines.

sax: a SAX handler
user_data: The user data returned on SAX callbacks
buffer: an in-memory XML document input
size: the length of the XML document in bytes
Returns: 0 in case of success or a error number otherwise

xmlSetExternalEntityLoader ()

void	xmlSetExternalEntityLoader	(xmlExternalEntityLoader f)

Changes the defaultexternal entity resolver function for the application

f: the new entity resolver function

xmlSetFeature ()

int	xmlSetFeature			(xmlParserCtxtPtr ctxt, 
const char * name,
void * value)

Change the current value of one feature of this parser instance

ctxt: an XML/HTML parser context
name: the feature name
value: pointer to the location of the new value
Returns: -1 in case or error, 0 otherwise

xmlSetupParserForBuffer ()

void	xmlSetupParserForBuffer		(xmlParserCtxtPtr ctxt, 
const xmlChar * buffer,
const char * filename)

Setup the parser context to parse a new buffer; Clears any prior contents from the parser context. The buffer parameter must not be NULL, but the filename parameter can be

ctxt: an XML parser context
buffer: a xmlChar * buffer
filename: a file name

xmlStopParser ()

void	xmlStopParser			(xmlParserCtxtPtr ctxt)

Blocks further parser processing

ctxt: an XML parser context

xmlSubstituteEntitiesDefault ()

int	xmlSubstituteEntitiesDefault	(int val)

Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the default parser behavior SAX::substituteEntities() has to be used for changing that on a file by file basis.

val: int 0 or 1
Returns: the last value for 0 for no substitution, 1 for substitution.

PK!>?+Ylibxml2-catalog.htmlnu[ catalog: interfaces to the Catalog handling system

catalog

catalog - interfaces to the Catalog handling system

the catalog module implements the support for XML Catalogs and SGML catalogs

Author(s): Daniel Veillard

Synopsis

#define XML_CATALOGS_NAMESPACE;
#define XML_CATALOG_PI;
typedef struct _xmlCatalog xmlCatalog;
typedef enum xmlCatalogAllow;
typedef enum xmlCatalogPrefer;
typedef xmlCatalog * xmlCatalogPtr;
int	xmlACatalogAdd			(xmlCatalogPtr catal, 
const xmlChar * type,
const xmlChar * orig,
const xmlChar * replace); void xmlACatalogDump (xmlCatalogPtr catal,
FILE * out); int xmlACatalogRemove (xmlCatalogPtr catal,
const xmlChar * value); xmlChar * xmlACatalogResolve (xmlCatalogPtr catal,
const xmlChar * pubID,
const xmlChar * sysID); xmlChar * xmlACatalogResolvePublic (xmlCatalogPtr catal,
const xmlChar * pubID); xmlChar * xmlACatalogResolveSystem (xmlCatalogPtr catal,
const xmlChar * sysID); xmlChar * xmlACatalogResolveURI (xmlCatalogPtr catal,
const xmlChar * URI); int xmlCatalogAdd (const xmlChar * type,
const xmlChar * orig,
const xmlChar * replace); void * xmlCatalogAddLocal (void * catalogs,
const xmlChar * URL); void xmlCatalogCleanup (void); int xmlCatalogConvert (void); void xmlCatalogDump (FILE * out); void xmlCatalogFreeLocal (void * catalogs); xmlCatalogAllow xmlCatalogGetDefaults (void); const xmlChar * xmlCatalogGetPublic (const xmlChar * pubID); const xmlChar * xmlCatalogGetSystem (const xmlChar * sysID); int xmlCatalogIsEmpty (xmlCatalogPtr catal); xmlChar * xmlCatalogLocalResolve (void * catalogs,
const xmlChar * pubID,
const xmlChar * sysID); xmlChar * xmlCatalogLocalResolveURI (void * catalogs,
const xmlChar * URI); int xmlCatalogRemove (const xmlChar * value); xmlChar * xmlCatalogResolve (const xmlChar * pubID,
const xmlChar * sysID); xmlChar * xmlCatalogResolvePublic (const xmlChar * pubID); xmlChar * xmlCatalogResolveSystem (const xmlChar * sysID); xmlChar * xmlCatalogResolveURI (const xmlChar * URI); int xmlCatalogSetDebug (int level); xmlCatalogPrefer xmlCatalogSetDefaultPrefer (xmlCatalogPrefer prefer); void xmlCatalogSetDefaults (xmlCatalogAllow allow); int xmlConvertSGMLCatalog (xmlCatalogPtr catal); void xmlFreeCatalog (xmlCatalogPtr catal); void xmlInitializeCatalog (void); xmlCatalogPtr xmlLoadACatalog (const char * filename); int xmlLoadCatalog (const char * filename); void xmlLoadCatalogs (const char * pathss); xmlCatalogPtr xmlLoadSGMLSuperCatalog (const char * filename); xmlCatalogPtr xmlNewCatalog (int sgml); xmlDocPtr xmlParseCatalogFile (const char * filename);

Description

Details

Macro XML_CATALOGS_NAMESPACE

#define XML_CATALOGS_NAMESPACE;

The namespace for the XML Catalogs elements.


Macro XML_CATALOG_PI

#define XML_CATALOG_PI;

The specific XML Catalog Processing Instruction name.


Structure xmlCatalog

struct _xmlCatalog {
The content of this structure is not made public by the API.
} xmlCatalog;




Typedef xmlCatalogPtr

xmlCatalog * xmlCatalogPtr;


xmlACatalogAdd ()

int	xmlACatalogAdd			(xmlCatalogPtr catal, 
const xmlChar * type,
const xmlChar * orig,
const xmlChar * replace)

Add an entry in the catalog, it may overwrite existing but different entries.

catal: a Catalog
type: the type of record to add to the catalog
orig: the system, public or prefix to match
replace: the replacement value for the match
Returns: 0 if successful, -1 otherwise

xmlACatalogDump ()

void	xmlACatalogDump			(xmlCatalogPtr catal, 
FILE * out)

Dump the given catalog to the given file.

catal: a Catalog
out: the file.

xmlACatalogRemove ()

int	xmlACatalogRemove		(xmlCatalogPtr catal, 
const xmlChar * value)

Remove an entry from the catalog

catal: a Catalog
value: the value to remove
Returns: the number of entries removed if successful, -1 otherwise

xmlACatalogResolve ()

xmlChar *	xmlACatalogResolve	(xmlCatalogPtr catal, 
const xmlChar * pubID,
const xmlChar * sysID)

Do a complete resolution lookup of an External Identifier

catal: a Catalog
pubID: the public ID string
sysID: the system ID string
Returns: the URI of the resource or NULL if not found, it must be freed by the caller.

xmlACatalogResolvePublic ()

xmlChar *	xmlACatalogResolvePublic	(xmlCatalogPtr catal, 
const xmlChar * pubID)

Try to lookup the catalog local reference associated to a public ID in that catalog

catal: a Catalog
pubID: the public ID string
Returns: the local resource if found or NULL otherwise, the value returned must be freed by the caller.

xmlACatalogResolveSystem ()

xmlChar *	xmlACatalogResolveSystem	(xmlCatalogPtr catal, 
const xmlChar * sysID)

Try to lookup the catalog resource for a system ID

catal: a Catalog
sysID: the system ID string
Returns: the resource if found or NULL otherwise, the value returned must be freed by the caller.

xmlACatalogResolveURI ()

xmlChar *	xmlACatalogResolveURI	(xmlCatalogPtr catal, 
const xmlChar * URI)

Do a complete resolution lookup of an URI

catal: a Catalog
URI: the URI
Returns: the URI of the resource or NULL if not found, it must be freed by the caller.

xmlCatalogAdd ()

int	xmlCatalogAdd			(const xmlChar * type, 
const xmlChar * orig,
const xmlChar * replace)

Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog();

type: the type of record to add to the catalog
orig: the system, public or prefix to match
replace: the replacement value for the match
Returns: 0 if successful, -1 otherwise

xmlCatalogAddLocal ()

void *	xmlCatalogAddLocal		(void * catalogs, 
const xmlChar * URL)

Add the new entry to the catalog list

catalogs: a document's list of catalogs
URL: the URL to a new local catalog
Returns: the updated list

xmlCatalogCleanup ()

void	xmlCatalogCleanup		(void)

Free up all the memory associated with catalogs


xmlCatalogConvert ()

int	xmlCatalogConvert		(void)

Convert all the SGML catalog entries as XML ones

Returns: the number of entries converted if successful, -1 otherwise

xmlCatalogDump ()

void	xmlCatalogDump			(FILE * out)

Dump all the global catalog content to the given file.

out: the file.

xmlCatalogFreeLocal ()

void	xmlCatalogFreeLocal		(void * catalogs)

Free up the memory associated to the catalog list

catalogs: a document's list of catalogs

xmlCatalogGetDefaults ()

xmlCatalogAllow	xmlCatalogGetDefaults	(void)

Used to get the user preference w.r.t. to what catalogs should be accepted

Returns: the current xmlCatalogAllow value

xmlCatalogGetPublic ()

const xmlChar *	xmlCatalogGetPublic	(const xmlChar * pubID)

Try to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()

pubID: the public ID string
Returns: the resource if found or NULL otherwise.

xmlCatalogGetSystem ()

const xmlChar *	xmlCatalogGetSystem	(const xmlChar * sysID)

Try to lookup the catalog reference associated to a system ID DEPRECATED, use xmlCatalogResolveSystem()

sysID: the system ID string
Returns: the resource if found or NULL otherwise.

xmlCatalogIsEmpty ()

int	xmlCatalogIsEmpty		(xmlCatalogPtr catal)

Check is a catalog is empty

catal: should this create an SGML catalog
Returns: 1 if the catalog is empty, 0 if not, amd -1 in case of error.

xmlCatalogLocalResolve ()

xmlChar *	xmlCatalogLocalResolve	(void * catalogs, 
const xmlChar * pubID,
const xmlChar * sysID)

Do a complete resolution lookup of an External Identifier using a document's private catalog list

catalogs: a document's list of catalogs
pubID: the public ID string
sysID: the system ID string
Returns: the URI of the resource or NULL if not found, it must be freed by the caller.

xmlCatalogLocalResolveURI ()

xmlChar *	xmlCatalogLocalResolveURI	(void * catalogs, 
const xmlChar * URI)

Do a complete resolution lookup of an URI using a document's private catalog list

catalogs: a document's list of catalogs
URI: the URI
Returns: the URI of the resource or NULL if not found, it must be freed by the caller.

xmlCatalogRemove ()

int	xmlCatalogRemove		(const xmlChar * value)

Remove an entry from the catalog

value: the value to remove
Returns: the number of entries removed if successful, -1 otherwise

xmlCatalogResolve ()

xmlChar *	xmlCatalogResolve	(const xmlChar * pubID, 
const xmlChar * sysID)

Do a complete resolution lookup of an External Identifier

pubID: the public ID string
sysID: the system ID string
Returns: the URI of the resource or NULL if not found, it must be freed by the caller.

xmlCatalogResolvePublic ()

xmlChar *	xmlCatalogResolvePublic	(const xmlChar * pubID)

Try to lookup the catalog reference associated to a public ID

pubID: the public ID string
Returns: the resource if found or NULL otherwise, the value returned must be freed by the caller.

xmlCatalogResolveSystem ()

xmlChar *	xmlCatalogResolveSystem	(const xmlChar * sysID)

Try to lookup the catalog resource for a system ID

sysID: the system ID string
Returns: the resource if found or NULL otherwise, the value returned must be freed by the caller.

xmlCatalogResolveURI ()

xmlChar *	xmlCatalogResolveURI	(const xmlChar * URI)

Do a complete resolution lookup of an URI

URI: the URI
Returns: the URI of the resource or NULL if not found, it must be freed by the caller.

xmlCatalogSetDebug ()

int	xmlCatalogSetDebug		(int level)

Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it

level: the debug level of catalogs required
Returns: the previous value of the catalog debugging level

xmlCatalogSetDefaultPrefer ()

xmlCatalogPrefer	xmlCatalogSetDefaultPrefer	(xmlCatalogPrefer prefer)

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 XML_CATA_PREFER_PUBLIC or XML_CATA_PREFER_SYSTEM

prefer: the default preference for delegation
Returns: the previous value of the default preference for delegation

xmlCatalogSetDefaults ()

void	xmlCatalogSetDefaults		(xmlCatalogAllow allow)

Used to set the user preference w.r.t. to what catalogs should be accepted

allow: what catalogs should be accepted

xmlConvertSGMLCatalog ()

int	xmlConvertSGMLCatalog		(xmlCatalogPtr catal)

Convert all the SGML catalog entries as XML ones

catal: the catalog
Returns: the number of entries converted if successful, -1 otherwise

xmlFreeCatalog ()

void	xmlFreeCatalog			(xmlCatalogPtr catal)

Free the memory allocated to a Catalog

catal: a Catalog

xmlInitializeCatalog ()

void	xmlInitializeCatalog		(void)

Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup


xmlLoadACatalog ()

xmlCatalogPtr	xmlLoadACatalog		(const char * filename)

Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.

filename: a file path
Returns: the catalog parsed or NULL in case of error

xmlLoadCatalog ()

int	xmlLoadCatalog			(const char * filename)

Load the catalog and makes its definitions effective for the default external entity loader. It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup

filename: a file path
Returns: 0 in case of success -1 in case of error

xmlLoadCatalogs ()

void	xmlLoadCatalogs			(const char * pathss)

Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup

pathss: a list of directories separated by a colon or a space.

xmlLoadSGMLSuperCatalog ()

xmlCatalogPtr	xmlLoadSGMLSuperCatalog	(const char * filename)

Load an SGML super catalog. It won't expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries.

filename: a file path
Returns: the catalog parsed or NULL in case of error

xmlNewCatalog ()

xmlCatalogPtr	xmlNewCatalog		(int sgml)

create a new Catalog.

sgml: should this create an SGML catalog
Returns: the xmlCatalogPtr or NULL in case of error

xmlParseCatalogFile ()

xmlDocPtr	xmlParseCatalogFile	(const char * filename)

parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups.

filename: the filename
Returns: the resulting document tree or NULL in case of error

PK!h>?w4w4libxml2-xpathInternals.htmlnu[ xpathInternals: internal interfaces for XML Path Language implementation

xpathInternals

xpathInternals - internal interfaces for XML Path Language implementation

internal interfaces for XML Path Language implementation used to build new modules on top of XPath like XPointer and XSLT

Author(s): Daniel Veillard

Synopsis

#define CAST_TO_BOOLEAN;
#define CAST_TO_NUMBER;
#define CAST_TO_STRING;
#define CHECK_ARITY(x);
#define CHECK_ERROR;
#define CHECK_ERROR0;
#define CHECK_TYPE(typeval);
#define CHECK_TYPE0(typeval);
#define XP_ERROR(X);
#define XP_ERROR0(X);
#define xmlXPathCheckError(ctxt);
#define xmlXPathEmptyNodeSet(ns);
#define xmlXPathGetContextNode(ctxt);
#define xmlXPathGetDocument(ctxt);
#define xmlXPathGetError(ctxt);
#define xmlXPathReturnBoolean(ctxt, val);
#define xmlXPathReturnEmptyNodeSet(ctxt);
#define xmlXPathReturnEmptyString(ctxt);
#define xmlXPathReturnExternal(ctxt, val);
#define xmlXPathReturnFalse(ctxt);
#define xmlXPathReturnNodeSet(ctxt, ns);
#define xmlXPathReturnNumber(ctxt, val);
#define xmlXPathReturnString(ctxt, str);
#define xmlXPathReturnTrue(ctxt);
#define xmlXPathSetArityError(ctxt);
#define xmlXPathSetError(ctxt, err);
#define xmlXPathSetTypeError(ctxt);
#define xmlXPathStackIsExternal(ctxt);
#define xmlXPathStackIsNodeSet(ctxt);
xmlXPathObjectPtr	valuePop	(xmlXPathParserContextPtr ctxt);
int	valuePush			(xmlXPathParserContextPtr ctxt, 
xmlXPathObjectPtr value); void xmlXPathAddValues (xmlXPathParserContextPtr ctxt); void xmlXPathBooleanFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathCeilingFunction (xmlXPathParserContextPtr ctxt,
int nargs); int xmlXPathCompareValues (xmlXPathParserContextPtr ctxt,
int inf,
int strict); void xmlXPathConcatFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathContainsFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathCountFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathDebugDumpCompExpr (FILE * output,
xmlXPathCompExprPtr comp,
int depth); void xmlXPathDebugDumpObject (FILE * output,
xmlXPathObjectPtr cur,
int depth); xmlNodeSetPtr xmlXPathDifference (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathDistinct (xmlNodeSetPtr nodes); xmlNodeSetPtr xmlXPathDistinctSorted (xmlNodeSetPtr nodes); void xmlXPathDivValues (xmlXPathParserContextPtr ctxt); int xmlXPathEqualValues (xmlXPathParserContextPtr ctxt); void xmlXPathErr (xmlXPathParserContextPtr ctxt,
int error); void xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt); int xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr res); void xmlXPathFalseFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathFloorFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt); xmlXPathFunction xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
const xmlChar * name); xmlXPathFunction xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
const xmlChar * name,
const xmlChar * ns_uri); int xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); void xmlXPathIdFunction (xmlXPathParserContextPtr ctxt,
int nargs); xmlNodeSetPtr xmlXPathIntersection (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); int xmlXPathIsNodeType (const xmlChar * name); void xmlXPathLangFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathLastFunction (xmlXPathParserContextPtr ctxt,
int nargs); xmlNodeSetPtr xmlXPathLeading (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); void xmlXPathLocalNameFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathModValues (xmlXPathParserContextPtr ctxt); void xmlXPathMultValues (xmlXPathParserContextPtr ctxt); void xmlXPathNamespaceURIFunction (xmlXPathParserContextPtr ctxt,
int nargs); xmlXPathObjectPtr xmlXPathNewBoolean (int val); xmlXPathObjectPtr xmlXPathNewCString (const char * val); xmlXPathObjectPtr xmlXPathNewFloat (double val); xmlXPathObjectPtr xmlXPathNewNodeSet (xmlNodePtr val); xmlXPathObjectPtr xmlXPathNewNodeSetList (xmlNodeSetPtr val); xmlXPathParserContextPtr xmlXPathNewParserContext (const xmlChar * str,
xmlXPathContextPtr ctxt); xmlXPathObjectPtr xmlXPathNewString (const xmlChar * val); xmlXPathObjectPtr xmlXPathNewValueTree (xmlNodePtr val); xmlNodePtr xmlXPathNextAncestor (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextAncestorOrSelf (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextAttribute (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextChild (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextDescendant (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextDescendantOrSelf (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextFollowing (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextFollowingSibling (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextNamespace (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextParent (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextPreceding (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextPrecedingSibling (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr xmlXPathNextSelf (xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodeSetPtr xmlXPathNodeLeading (xmlNodeSetPtr nodes,
xmlNodePtr node); xmlNodeSetPtr xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node); int xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
xmlNodePtr val); int xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
xmlNsPtr ns); int xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val); int xmlXPathNodeSetContains (xmlNodeSetPtr cur,
xmlNodePtr val); void xmlXPathNodeSetDel (xmlNodeSetPtr cur,
xmlNodePtr val); void xmlXPathNodeSetFreeNs (xmlNsPtr ns); xmlNodeSetPtr xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
xmlNodeSetPtr val2); void xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
int val); void xmlXPathNodeSetSort (xmlNodeSetPtr set); xmlNodeSetPtr xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
xmlNodePtr node); xmlNodeSetPtr xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node); void xmlXPathNormalizeFunction (xmlXPathParserContextPtr ctxt,
int nargs); int xmlXPathNotEqualValues (xmlXPathParserContextPtr ctxt); void xmlXPathNotFunction (xmlXPathParserContextPtr ctxt,
int nargs); const xmlChar * xmlXPathNsLookup (xmlXPathContextPtr ctxt,
const xmlChar * prefix); void xmlXPathNumberFunction (xmlXPathParserContextPtr ctxt,
int nargs); xmlChar * xmlXPathParseNCName (xmlXPathParserContextPtr ctxt); xmlChar * xmlXPathParseName (xmlXPathParserContextPtr ctxt); int xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt); void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt); xmlNodeSetPtr xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt); double xmlXPathPopNumber (xmlXPathParserContextPtr ctxt); xmlChar * xmlXPathPopString (xmlXPathParserContextPtr ctxt); void xmlXPathPositionFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt); int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
const xmlChar * name,
xmlXPathFunction f); void xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
xmlXPathFuncLookupFunc f,
void * funcCtxt); int xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
const xmlChar * name,
const xmlChar * ns_uri,
xmlXPathFunction f); int xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
const xmlChar * prefix,
const xmlChar * ns_uri); int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
const xmlChar * name,
xmlXPathObjectPtr value); void xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
xmlXPathVariableLookupFunc f,
void * data); int xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
const xmlChar * name,
const xmlChar * ns_uri,
xmlXPathObjectPtr value); void xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt); void xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt); void xmlXPathRegisteredVariablesCleanup (xmlXPathContextPtr ctxt); void xmlXPathRoot (xmlXPathParserContextPtr ctxt); void xmlXPathRoundFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathStartsWithFunction (xmlXPathParserContextPtr ctxt,
int nargs); double xmlXPathStringEvalNumber (const xmlChar * str); void xmlXPathStringFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathStringLengthFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathSubValues (xmlXPathParserContextPtr ctxt); void xmlXPathSubstringAfterFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathSubstringBeforeFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathSubstringFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathSumFunction (xmlXPathParserContextPtr ctxt,
int nargs); xmlNodeSetPtr xmlXPathTrailing (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2); void xmlXPathTranslateFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathTrueFunction (xmlXPathParserContextPtr ctxt,
int nargs); void xmlXPathValueFlipSign (xmlXPathParserContextPtr ctxt); xmlXPathObjectPtr xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
const xmlChar * name); xmlXPathObjectPtr xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
const xmlChar * name,
const xmlChar * ns_uri); xmlXPathObjectPtr xmlXPathWrapCString (char * val); xmlXPathObjectPtr xmlXPathWrapExternal (void * val); xmlXPathObjectPtr xmlXPathWrapNodeSet (xmlNodeSetPtr val); xmlXPathObjectPtr xmlXPathWrapString (xmlChar * val); void xmlXPatherror (xmlXPathParserContextPtr ctxt,
const char * file,
int line,
int no);

Description

Details

Macro CAST_TO_BOOLEAN

#define CAST_TO_BOOLEAN;

Macro to try to cast the value on the top of the XPath stack to a boolean.


Macro CAST_TO_NUMBER

#define CAST_TO_NUMBER;

Macro to try to cast the value on the top of the XPath stack to a number.


Macro CAST_TO_STRING

#define CAST_TO_STRING;

Macro to try to cast the value on the top of the XPath stack to a string.


Macro CHECK_ARITY

#define CHECK_ARITY(x);

Macro to check that the number of args passed to an XPath function matches.

x: the number of expected args

Macro CHECK_ERROR

#define CHECK_ERROR;

Macro to return from the function if an XPath error was detected.


Macro CHECK_ERROR0

#define CHECK_ERROR0;

Macro to return 0 from the function if an XPath error was detected.


Macro CHECK_TYPE

#define CHECK_TYPE(typeval);

Macro to check that the value on top of the XPath stack is of a given type.

typeval: the XPath type

Macro CHECK_TYPE0

#define CHECK_TYPE0(typeval);

Macro to check that the value on top of the XPath stack is of a given type. Return(0) in case of failure

typeval: the XPath type

Macro XP_ERROR

#define XP_ERROR(X);

Macro to raise an XPath error and return.

X: the error code

Macro XP_ERROR0

#define XP_ERROR0(X);

Macro to raise an XPath error and return 0.

X: the error code

Macro xmlXPathCheckError

#define xmlXPathCheckError(ctxt);

Check if an XPath error was raised. Returns true if an error has been raised, false otherwise.

ctxt: an XPath parser context

Macro xmlXPathEmptyNodeSet

#define xmlXPathEmptyNodeSet(ns);

Empties a node-set.

ns: a node-set

Macro xmlXPathGetContextNode

#define xmlXPathGetContextNode(ctxt);

Get the context node of an XPath context. Returns the context node.

ctxt: an XPath parser context

Macro xmlXPathGetDocument

#define xmlXPathGetDocument(ctxt);

Get the document of an XPath context. Returns the context document.

ctxt: an XPath parser context

Macro xmlXPathGetError

#define xmlXPathGetError(ctxt);

Get the error code of an XPath context. Returns the context error.

ctxt: an XPath parser context

Macro xmlXPathReturnBoolean

#define xmlXPathReturnBoolean(ctxt, val);

Pushes the boolean @val on the context stack.

ctxt: an XPath parser context
val: a boolean

Macro xmlXPathReturnEmptyNodeSet

#define xmlXPathReturnEmptyNodeSet(ctxt);

Pushes an empty node-set on the context stack.

ctxt: an XPath parser context

Macro xmlXPathReturnEmptyString

#define xmlXPathReturnEmptyString(ctxt);

Pushes an empty string on the stack.

ctxt: an XPath parser context

Macro xmlXPathReturnExternal

#define xmlXPathReturnExternal(ctxt, val);

Pushes user data on the context stack.

ctxt: an XPath parser context
val: user data

Macro xmlXPathReturnFalse

#define xmlXPathReturnFalse(ctxt);

Pushes false on the context stack.

ctxt: an XPath parser context

Macro xmlXPathReturnNodeSet

#define xmlXPathReturnNodeSet(ctxt, ns);

Pushes the node-set @ns on the context stack.

ctxt: an XPath parser context
ns: a node-set

Macro xmlXPathReturnNumber

#define xmlXPathReturnNumber(ctxt, val);

Pushes the double @val on the context stack.

ctxt: an XPath parser context
val: a double

Macro xmlXPathReturnString

#define xmlXPathReturnString(ctxt, str);

Pushes the string @str on the context stack.

ctxt: an XPath parser context
str: a string

Macro xmlXPathReturnTrue

#define xmlXPathReturnTrue(ctxt);

Pushes true on the context stack.

ctxt: an XPath parser context

Macro xmlXPathSetArityError

#define xmlXPathSetArityError(ctxt);

Raises an XPATH_INVALID_ARITY error.

ctxt: an XPath parser context

Macro xmlXPathSetError

#define xmlXPathSetError(ctxt, err);

Raises an error.

ctxt: an XPath parser context
err: an xmlXPathError code

Macro xmlXPathSetTypeError

#define xmlXPathSetTypeError(ctxt);

Raises an XPATH_INVALID_TYPE error.

ctxt: an XPath parser context

Macro xmlXPathStackIsExternal

#define xmlXPathStackIsExternal(ctxt);

Checks if the current value on the XPath stack is an external object. Returns true if the current object on the stack is an external object.

ctxt: an XPath parser context

Macro xmlXPathStackIsNodeSet

#define xmlXPathStackIsNodeSet(ctxt);

Check if the current value on the XPath stack is a node set or an XSLT value tree. Returns true if the current object on the stack is a node-set.

ctxt: an XPath parser context

valuePop ()

xmlXPathObjectPtr	valuePop	(xmlXPathParserContextPtr ctxt)

Pops the top XPath object from the value stack

ctxt: an XPath evaluation context
Returns: the XPath object just removed

valuePush ()

int	valuePush			(xmlXPathParserContextPtr ctxt, 
xmlXPathObjectPtr value)

Pushes a new XPath object on top of the value stack. If value is NULL, a memory error is recorded in the parser context.

ctxt: an XPath evaluation context
value: the XPath object
Returns: the number of items on the value stack, or -1 in case of error.

xmlXPathAddValues ()

void	xmlXPathAddValues		(xmlXPathParserContextPtr ctxt)

Implement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.

ctxt: the XPath Parser context

xmlXPathBooleanFunction ()

void	xmlXPathBooleanFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the boolean() XPath function boolean boolean(object) The boolean function converts its argument to a boolean as follows: - a number is true if and only if it is neither positive or negative zero nor NaN - a node-set is true if and only if it is non-empty - a string is true if and only if its length is non-zero

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathCeilingFunction ()

void	xmlXPathCeilingFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the ceiling() XPath function number ceiling(number) The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathCompareValues ()

int	xmlXPathCompareValues		(xmlXPathParserContextPtr ctxt, 
int inf,
int strict)

Implement the compare operation on XPath objects: @arg1 < @arg2 (1, 1, ... @arg1 <= @arg2 (1, 0, ... @arg1 > @arg2 (0, 1, ... @arg1 >= @arg2 (0, 0, ... When neither object to be compared is a node-set and the operator is <=, <, >=, >, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The < comparison will be true if and only if the first number is less than the second number. The <= comparison will be true if and only if the first number is less than or equal to the second number. The > comparison will be true if and only if the first number is greater than the second number. The >= comparison will be true if and only if the first number is greater than or equal to the second number.

ctxt: the XPath Parser context
inf: less than (1) or greater than (0)
strict: is the comparison strict
Returns: 1 if the comparison succeeded, 0 if it failed

xmlXPathConcatFunction ()

void	xmlXPathConcatFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the concat() XPath function string concat(string, string, string*) The concat function returns the concatenation of its arguments.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathContainsFunction ()

void	xmlXPathContainsFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the contains() XPath function boolean contains(string, string) The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathCountFunction ()

void	xmlXPathCountFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the count() XPath function number count(node-set)

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathDebugDumpCompExpr ()

void	xmlXPathDebugDumpCompExpr	(FILE * output, 
xmlXPathCompExprPtr comp,
int depth)

Dumps the tree of the compiled XPath expression.

output: the FILE * for the output
comp: the precompiled XPath expression
depth: the indentation level.

xmlXPathDebugDumpObject ()

void	xmlXPathDebugDumpObject		(FILE * output, 
xmlXPathObjectPtr cur,
int depth)

Dump the content of the object for debugging purposes

output: the FILE * to dump the output
cur: the object to inspect
depth: indentation level

xmlXPathDifference ()

xmlNodeSetPtr	xmlXPathDifference	(xmlNodeSetPtr nodes1, 
xmlNodeSetPtr nodes2)

Implements the EXSLT - Sets difference() function: node-set set:difference (node-set, node-set)

nodes1: a node-set
nodes2: a node-set
Returns: the difference between the two node sets, or nodes1 if nodes2 is empty

xmlXPathDistinct ()

xmlNodeSetPtr	xmlXPathDistinct	(xmlNodeSetPtr nodes)

Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set) @nodes is sorted by document order, then #exslSetsDistinctSorted is called with the sorted node-set

nodes: a node-set
Returns: a subset of the nodes contained in @nodes, or @nodes if it is empty

xmlXPathDistinctSorted ()

xmlNodeSetPtr	xmlXPathDistinctSorted	(xmlNodeSetPtr nodes)

Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set)

nodes: a node-set, sorted by document order
Returns: a subset of the nodes contained in @nodes, or @nodes if it is empty

xmlXPathDivValues ()

void	xmlXPathDivValues		(xmlXPathParserContextPtr ctxt)

Implement the div operation on XPath objects @arg1 / @arg2: The numeric operators convert their operands to numbers as if by calling the number function.

ctxt: the XPath Parser context

xmlXPathEqualValues ()

int	xmlXPathEqualValues		(xmlXPathParserContextPtr ctxt)

Implement the equal operation on XPath objects content: @arg1 == @arg2

ctxt: the XPath Parser context
Returns: 0 or 1 depending on the results of the test.

xmlXPathErr ()

void	xmlXPathErr			(xmlXPathParserContextPtr ctxt, 
int error)

Handle an XPath error

ctxt: a XPath parser context
error: the error code

xmlXPathEvalExpr ()

void	xmlXPathEvalExpr		(xmlXPathParserContextPtr ctxt)

Parse and evaluate an XPath expression in the given context, then push the result on the context stack

ctxt: the XPath Parser context

xmlXPathEvaluatePredicateResult ()

int	xmlXPathEvaluatePredicateResult	(xmlXPathParserContextPtr ctxt, 
xmlXPathObjectPtr res)

Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.

ctxt: the XPath Parser context
res: the Predicate Expression evaluation result
Returns: 1 if predicate is true, 0 otherwise

xmlXPathFalseFunction ()

void	xmlXPathFalseFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the false() XPath function boolean false()

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathFloorFunction ()

void	xmlXPathFloorFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the floor() XPath function number floor(number) The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathFreeParserContext ()

void	xmlXPathFreeParserContext	(xmlXPathParserContextPtr ctxt)

Free up an xmlXPathParserContext

ctxt: the context to free

xmlXPathFunctionLookup ()

xmlXPathFunction	xmlXPathFunctionLookup	(xmlXPathContextPtr ctxt, 
const xmlChar * name)

Search in the Function array of the context for the given function.

ctxt: the XPath context
name: the function name
Returns: the xmlXPathFunction or NULL if not found

xmlXPathFunctionLookupNS ()

xmlXPathFunction	xmlXPathFunctionLookupNS	(xmlXPathContextPtr ctxt, 
const xmlChar * name,
const xmlChar * ns_uri)

Search in the Function array of the context for the given function.

ctxt: the XPath context
name: the function name
ns_uri: the function namespace URI
Returns: the xmlXPathFunction or NULL if not found

xmlXPathHasSameNodes ()

int	xmlXPathHasSameNodes		(xmlNodeSetPtr nodes1, 
xmlNodeSetPtr nodes2)

Implements the EXSLT - Sets has-same-nodes function: boolean set:has-same-node(node-set, node-set)

nodes1: a node-set
nodes2: a node-set
Returns: true (1) if @nodes1 shares any node with @nodes2, false (0) otherwise

xmlXPathIdFunction ()

void	xmlXPathIdFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the id() XPath function node-set id(object) The id function selects elements by their unique ID (see [5.2.1 Unique IDs]). When the argument to id is of type node-set, then the result is the union of the result of applying id to the string value of each of the nodes in the argument node-set. When the argument to id is of any other type, the argument is converted to a string as if by a call to the string function; the string is split into a whitespace-separated list of tokens (whitespace is any sequence of characters matching the production S); the result is a node-set containing the elements in the same document as the context node that have a unique ID equal to any of the tokens in the list.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathIntersection ()

xmlNodeSetPtr	xmlXPathIntersection	(xmlNodeSetPtr nodes1, 
xmlNodeSetPtr nodes2)

Implements the EXSLT - Sets intersection() function: node-set set:intersection (node-set, node-set)

nodes1: a node-set
nodes2: a node-set
Returns: a node set comprising the nodes that are within both the node sets passed as arguments

xmlXPathIsNodeType ()

int	xmlXPathIsNodeType		(const xmlChar * name)

Is the name given a NodeType one. [38] NodeType ::= 'comment' | 'text' | 'processing-instruction' | 'node'

name: a name string
Returns: 1 if true 0 otherwise

xmlXPathLangFunction ()

void	xmlXPathLangFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the lang() XPath function boolean lang(string) The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string. The language of the context node is determined by the value of the xml:lang attribute on the context node, or, if the context node has no xml:lang attribute, by the value of the xml:lang attribute on the nearest ancestor of the context node that has an xml:lang attribute. If there is no such attribute, then lang

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathLastFunction ()

void	xmlXPathLastFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the last() XPath function number last() The last function returns the number of nodes in the context node list.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathLeading ()

xmlNodeSetPtr	xmlXPathLeading		(xmlNodeSetPtr nodes1, 
xmlNodeSetPtr nodes2)

Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #exslSetsLeadingSorted is called.

nodes1: a node-set
nodes2: a node-set
Returns: the nodes in @nodes1 that precede the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2

xmlXPathLeadingSorted ()

xmlNodeSetPtr	xmlXPathLeadingSorted	(xmlNodeSetPtr nodes1, 
xmlNodeSetPtr nodes2)

Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)

nodes1: a node-set, sorted by document order
nodes2: a node-set, sorted by document order
Returns: the nodes in @nodes1 that precede the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2

xmlXPathLocalNameFunction ()

void	xmlXPathLocalNameFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the local-name() XPath function string local-name(node-set?) The local-name function returns a string containing the local part of the name of the node in the argument node-set that is first in document order. If the node-set is empty or the first node has no name, an empty string is returned. If the argument is omitted it defaults to the context node.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathModValues ()

void	xmlXPathModValues		(xmlXPathParserContextPtr ctxt)

Implement the mod operation on XPath objects: @arg1 / @arg2 The numeric operators convert their operands to numbers as if by calling the number function.

ctxt: the XPath Parser context

xmlXPathMultValues ()

void	xmlXPathMultValues		(xmlXPathParserContextPtr ctxt)

Implement the multiply operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.

ctxt: the XPath Parser context

xmlXPathNamespaceURIFunction ()

void	xmlXPathNamespaceURIFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the namespace-uri() XPath function string namespace-uri(node-set?) The namespace-uri function returns a string containing the namespace URI of the expanded name of the node in the argument node-set that is first in document order. If the node-set is empty, the first node has no name, or the expanded name has no namespace URI, an empty string is returned. If the argument is omitted it defaults to the context node.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathNewBoolean ()

xmlXPathObjectPtr	xmlXPathNewBoolean	(int val)

Create a new xmlXPathObjectPtr of type boolean and of value @val

val: the boolean value
Returns: the newly created object.

xmlXPathNewCString ()

xmlXPathObjectPtr	xmlXPathNewCString	(const char * val)

Create a new xmlXPathObjectPtr of type string and of value @val

val: the char * value
Returns: the newly created object.

xmlXPathNewFloat ()

xmlXPathObjectPtr	xmlXPathNewFloat	(double val)

Create a new xmlXPathObjectPtr of type double and of value @val

val: the double value
Returns: the newly created object.

xmlXPathNewNodeSet ()

xmlXPathObjectPtr	xmlXPathNewNodeSet	(xmlNodePtr val)

Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the single Node @val

val: the NodePtr value
Returns: the newly created object.

xmlXPathNewNodeSetList ()

xmlXPathObjectPtr	xmlXPathNewNodeSetList	(xmlNodeSetPtr val)

Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the Nodeset @val

val: an existing NodeSet
Returns: the newly created object.

xmlXPathNewParserContext ()

xmlXPathParserContextPtr	xmlXPathNewParserContext	(const xmlChar * str, 
xmlXPathContextPtr ctxt)

Create a new xmlXPathParserContext

str: the XPath expression
ctxt: the XPath context
Returns: the xmlXPathParserContext just allocated.

xmlXPathNewString ()

xmlXPathObjectPtr	xmlXPathNewString	(const xmlChar * val)

Create a new xmlXPathObjectPtr of type string and of value @val

val: the xmlChar * value
Returns: the newly created object.

xmlXPathNewValueTree ()

xmlXPathObjectPtr	xmlXPathNewValueTree	(xmlNodePtr val)

Create a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize it with the tree root @val

val: the NodePtr value
Returns: the newly created object.

xmlXPathNextAncestor ()

xmlNodePtr	xmlXPathNextAncestor	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "ancestor" direction the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on; the nodes are ordered in reverse document order; thus the parent is the first node on the axis, and the parent's parent is the second node on the axis

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextAncestorOrSelf ()

xmlNodePtr	xmlXPathNextAncestorOrSelf	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "ancestor-or-self" direction he ancestor-or-self axis contains the context node and ancestors of the context node in reverse document order; thus the context node is the first node on the axis, and the context node's parent the second; parent here is defined the same as with the parent axis.

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextAttribute ()

xmlNodePtr	xmlXPathNextAttribute	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "attribute" direction TODO: support DTD inherited default attributes

ctxt: the XPath Parser context
cur: the current attribute in the traversal
Returns: the next element following that axis

xmlXPathNextChild ()

xmlNodePtr	xmlXPathNextChild	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "child" direction The child axis contains the children of the context node in document order.

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextDescendant ()

xmlNodePtr	xmlXPathNextDescendant	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on.

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextDescendantOrSelf ()

xmlNodePtr	xmlXPathNextDescendantOrSelf	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "descendant-or-self" direction the descendant-or-self axis contains the context node and the descendants of the context node in document order; thus the context node is the first node on the axis, and the first child of the context node is the second node on the axis

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextFollowing ()

xmlNodePtr	xmlXPathNextFollowing	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "following" direction The following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes; the nodes are ordered in document order

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextFollowingSibling ()

xmlNodePtr	xmlXPathNextFollowingSibling	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "following-sibling" direction The following-sibling axis contains the following siblings of the context node in document order.

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextNamespace ()

xmlNodePtr	xmlXPathNextNamespace	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element We keep the XML namespace node at the end of the list.

ctxt: the XPath Parser context
cur: the current attribute in the traversal
Returns: the next element following that axis

xmlXPathNextParent ()

xmlNodePtr	xmlXPathNextParent	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "parent" direction The parent axis contains the parent of the context node, if there is one.

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextPreceding ()

xmlNodePtr	xmlXPathNextPreceding	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "preceding" direction the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes; the nodes are ordered in reverse document order

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextPrecedingSibling ()

xmlNodePtr	xmlXPathNextPrecedingSibling	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "preceding-sibling" direction The preceding-sibling axis contains the preceding siblings of the context node in reverse document order; the first preceding sibling is first on the axis; the sibling preceding that node is the second on the axis and so on.

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNextSelf ()

xmlNodePtr	xmlXPathNextSelf	(xmlXPathParserContextPtr ctxt, 
xmlNodePtr cur)

Traversal function for the "self" direction The self axis contains just the context node itself

ctxt: the XPath Parser context
cur: the current node in the traversal
Returns: the next element following that axis

xmlXPathNodeLeading ()

xmlNodeSetPtr	xmlXPathNodeLeading	(xmlNodeSetPtr nodes, 
xmlNodePtr node)

Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes is sorted by document order, then #exslSetsNodeLeadingSorted is called.

nodes: a node-set
node: a node
Returns: the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node

xmlXPathNodeLeadingSorted ()

xmlNodeSetPtr	xmlXPathNodeLeadingSorted	(xmlNodeSetPtr nodes, 
xmlNodePtr node)

Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)

nodes: a node-set, sorted by document order
node: a node
Returns: the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node

xmlXPathNodeSetAdd ()

int	xmlXPathNodeSetAdd		(xmlNodeSetPtr cur, 
xmlNodePtr val)

add a new xmlNodePtr to an existing NodeSet

cur: the initial node set
val: a new xmlNodePtr
Returns: 0 in case of success, and -1 in case of error

xmlXPathNodeSetAddNs ()

int	xmlXPathNodeSetAddNs		(xmlNodeSetPtr cur, 
xmlNodePtr node,
xmlNsPtr ns)

add a new namespace node to an existing NodeSet

cur: the initial node set
node: the hosting node
ns: a the namespace node
Returns: 0 in case of success and -1 in case of error

xmlXPathNodeSetAddUnique ()

int	xmlXPathNodeSetAddUnique	(xmlNodeSetPtr cur, 
xmlNodePtr val)

add a new xmlNodePtr to an existing NodeSet, optimized version when we are sure the node is not already in the set.

cur: the initial node set
val: a new xmlNodePtr
Returns: 0 in case of success and -1 in case of failure

xmlXPathNodeSetContains ()

int	xmlXPathNodeSetContains		(xmlNodeSetPtr cur, 
xmlNodePtr val)

checks whether @cur contains @val

cur: the node-set
val: the node
Returns: true (1) if @cur contains @val, false (0) otherwise

xmlXPathNodeSetDel ()

void	xmlXPathNodeSetDel		(xmlNodeSetPtr cur, 
xmlNodePtr val)

Removes an xmlNodePtr from an existing NodeSet

cur: the initial node set
val: an xmlNodePtr

xmlXPathNodeSetFreeNs ()

void	xmlXPathNodeSetFreeNs		(xmlNsPtr ns)

Namespace nodes in libxml don't match the XPath semantic. In a node set the namespace nodes are duplicated and the next pointer is set to the parent node in the XPath semantic. Check if such a node needs to be freed

ns: the XPath namespace node found in a nodeset.

xmlXPathNodeSetMerge ()

xmlNodeSetPtr	xmlXPathNodeSetMerge	(xmlNodeSetPtr val1, 
xmlNodeSetPtr val2)

Merges two nodesets, all nodes from @val2 are added to @val1 if @val1 is NULL, a new set is created and copied from @val2

val1: the first NodeSet or NULL
val2: the second NodeSet
Returns: @val1 once extended or NULL in case of error.

xmlXPathNodeSetRemove ()

void	xmlXPathNodeSetRemove		(xmlNodeSetPtr cur, 
int val)

Removes an entry from an existing NodeSet list.

cur: the initial node set
val: the index to remove

xmlXPathNodeSetSort ()

void	xmlXPathNodeSetSort		(xmlNodeSetPtr set)

Sort the node set in document order

set: the node set

xmlXPathNodeTrailing ()

xmlNodeSetPtr	xmlXPathNodeTrailing	(xmlNodeSetPtr nodes, 
xmlNodePtr node)

Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes is sorted by document order, then #xmlXPathNodeTrailingSorted is called.

nodes: a node-set
node: a node
Returns: the nodes in @nodes that follow @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node

xmlXPathNodeTrailingSorted ()

xmlNodeSetPtr	xmlXPathNodeTrailingSorted	(xmlNodeSetPtr nodes, 
xmlNodePtr node)

Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)

nodes: a node-set, sorted by document order
node: a node
Returns: the nodes in @nodes that follow @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node

xmlXPathNormalizeFunction ()

void	xmlXPathNormalizeFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the normalize-space() XPath function string normalize-space(string?) The normalize-space function returns the argument string with white space normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space. Whitespace characters are the same allowed by the S production in XML. If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathNotEqualValues ()

int	xmlXPathNotEqualValues		(xmlXPathParserContextPtr ctxt)

Implement the equal operation on XPath objects content: @arg1 == @arg2

ctxt: the XPath Parser context
Returns: 0 or 1 depending on the results of the test.

xmlXPathNotFunction ()

void	xmlXPathNotFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the not() XPath function boolean not(boolean) The not function returns true if its argument is false, and false otherwise.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathNsLookup ()

const xmlChar *	xmlXPathNsLookup	(xmlXPathContextPtr ctxt, 
const xmlChar * prefix)

Search in the namespace declaration array of the context for the given namespace name associated to the given prefix

ctxt: the XPath context
prefix: the namespace prefix value
Returns: the value or NULL if not found

xmlXPathNumberFunction ()

void	xmlXPathNumberFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the number() XPath function number number(object?)

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathParseNCName ()

xmlChar *	xmlXPathParseNCName	(xmlXPathParserContextPtr ctxt)

parse an XML namespace non qualified name. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender

ctxt: the XPath Parser context
Returns: the namespace name or NULL

xmlXPathParseName ()

xmlChar *	xmlXPathParseName	(xmlXPathParserContextPtr ctxt)

parse an XML name [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)*

ctxt: the XPath Parser context
Returns: the namespace name or NULL

xmlXPathPopBoolean ()

int	xmlXPathPopBoolean		(xmlXPathParserContextPtr ctxt)

Pops a boolean from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.

ctxt: an XPath parser context
Returns: the boolean

xmlXPathPopExternal ()

void *	xmlXPathPopExternal		(xmlXPathParserContextPtr ctxt)

Pops an external object from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.

ctxt: an XPath parser context
Returns: the object

xmlXPathPopNodeSet ()

xmlNodeSetPtr	xmlXPathPopNodeSet	(xmlXPathParserContextPtr ctxt)

Pops a node-set from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.

ctxt: an XPath parser context
Returns: the node-set

xmlXPathPopNumber ()

double	xmlXPathPopNumber		(xmlXPathParserContextPtr ctxt)

Pops a number from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.

ctxt: an XPath parser context
Returns: the number

xmlXPathPopString ()

xmlChar *	xmlXPathPopString	(xmlXPathParserContextPtr ctxt)

Pops a string from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.

ctxt: an XPath parser context
Returns: the string

xmlXPathPositionFunction ()

void	xmlXPathPositionFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the position() XPath function number position() The position function returns the position of the context node in the context node list. The first position is 1, and so the last position will be equal to last().

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathRegisterAllFunctions ()

void	xmlXPathRegisterAllFunctions	(xmlXPathContextPtr ctxt)

Registers all default XPath functions in this context

ctxt: the XPath context

xmlXPathRegisterFunc ()

int	xmlXPathRegisterFunc		(xmlXPathContextPtr ctxt, 
const xmlChar * name,
xmlXPathFunction f)

Register a new function. If @f is NULL it unregisters the function

ctxt: the XPath context
name: the function name
f: the function implementation or NULL
Returns: 0 in case of success, -1 in case of error

xmlXPathRegisterFuncLookup ()

void	xmlXPathRegisterFuncLookup	(xmlXPathContextPtr ctxt, 
xmlXPathFuncLookupFunc f,
void * funcCtxt)

Registers an external mechanism to do function lookup.

ctxt: the XPath context
f: the lookup function
funcCtxt: the lookup data

xmlXPathRegisterFuncNS ()

int	xmlXPathRegisterFuncNS		(xmlXPathContextPtr ctxt, 
const xmlChar * name,
const xmlChar * ns_uri,
xmlXPathFunction f)

Register a new function. If @f is NULL it unregisters the function

ctxt: the XPath context
name: the function name
ns_uri: the function namespace URI
f: the function implementation or NULL
Returns: 0 in case of success, -1 in case of error

xmlXPathRegisterNs ()

int	xmlXPathRegisterNs		(xmlXPathContextPtr ctxt, 
const xmlChar * prefix,
const xmlChar * ns_uri)

Register a new namespace. If @ns_uri is NULL it unregisters the namespace

ctxt: the XPath context
prefix: the namespace prefix cannot be NULL or empty string
ns_uri: the namespace name
Returns: 0 in case of success, -1 in case of error

xmlXPathRegisterVariable ()

int	xmlXPathRegisterVariable	(xmlXPathContextPtr ctxt, 
const xmlChar * name,
xmlXPathObjectPtr value)

Register a new variable value. If @value is NULL it unregisters the variable

ctxt: the XPath context
name: the variable name
value: the variable value or NULL
Returns: 0 in case of success, -1 in case of error

xmlXPathRegisterVariableLookup ()

void	xmlXPathRegisterVariableLookup	(xmlXPathContextPtr ctxt, 
xmlXPathVariableLookupFunc f,
void * data)

register an external mechanism to do variable lookup

ctxt: the XPath context
f: the lookup function
data: the lookup data

xmlXPathRegisterVariableNS ()

int	xmlXPathRegisterVariableNS	(xmlXPathContextPtr ctxt, 
const xmlChar * name,
const xmlChar * ns_uri,
xmlXPathObjectPtr value)

Register a new variable value. If @value is NULL it unregisters the variable

ctxt: the XPath context
name: the variable name
ns_uri: the variable namespace URI
value: the variable value or NULL
Returns: 0 in case of success, -1 in case of error

xmlXPathRegisteredFuncsCleanup ()

void	xmlXPathRegisteredFuncsCleanup	(xmlXPathContextPtr ctxt)

Cleanup the XPath context data associated to registered functions

ctxt: the XPath context

xmlXPathRegisteredNsCleanup ()

void	xmlXPathRegisteredNsCleanup	(xmlXPathContextPtr ctxt)

Cleanup the XPath context data associated to registered variables

ctxt: the XPath context

xmlXPathRegisteredVariablesCleanup ()

void	xmlXPathRegisteredVariablesCleanup	(xmlXPathContextPtr ctxt)

Cleanup the XPath context data associated to registered variables

ctxt: the XPath context

xmlXPathRoot ()

void	xmlXPathRoot			(xmlXPathParserContextPtr ctxt)

Initialize the context to the root of the document

ctxt: the XPath Parser context

xmlXPathRoundFunction ()

void	xmlXPathRoundFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the round() XPath function number round(number) The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is closest to positive infinity is returned.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathStartsWithFunction ()

void	xmlXPathStartsWithFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the starts-with() XPath function boolean starts-with(string, string) The starts-with function returns true if the first argument string starts with the second argument string, and otherwise returns false.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathStringEvalNumber ()

double	xmlXPathStringEvalNumber	(const xmlChar * str)

[30a] Float ::= Number ('e' Digits?)? [30] Number ::= Digits ('.' Digits?)? | '.' Digits [31] Digits ::= [0-9]+ Compile a Number in the string In complement of the Number expression, this function also handles negative values : '-' Number.

str: A string to scan
Returns: the double value.

xmlXPathStringFunction ()

void	xmlXPathStringFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the string() XPath function string string(object?) The string function converts an object to a string as follows: - A node-set is converted to a string by returning the value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned. - A number is converted to a string as follows + NaN is converted to the string NaN + positive zero is converted to the string 0 + negative zero is converted to the string 0 + positive infinity is converted to the string Infinity + negative infinity is converted to the string -Infinity + if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative + otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values. - The boolean false value is converted to the string false. The boolean true value is converted to the string true. If the argument is omitted, it defaults to a node-set with the context node as its only member.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathStringLengthFunction ()

void	xmlXPathStringLengthFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the string-length() XPath function number string-length(string?) The string-length returns the number of characters in the string (see [3.6 Strings]). If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathSubValues ()

void	xmlXPathSubValues		(xmlXPathParserContextPtr ctxt)

Implement the subtraction operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.

ctxt: the XPath Parser context

xmlXPathSubstringAfterFunction ()

void	xmlXPathSubstringAfterFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the substring-after() XPath function string substring-after(string, string) The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty stringi if the first argument string does not contain the second argument string. For example, substring-after("1999/04/01","/") returns 04/01, and substring-after("1999/04/01","19") returns 99/04/01.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathSubstringBeforeFunction ()

void	xmlXPathSubstringBeforeFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the substring-before() XPath function string substring-before(string, string) The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string. For example, substring-before("1999/04/01","/") returns 1999.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathSubstringFunction ()

void	xmlXPathSubstringFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the substring() XPath function string substring(string, number, number?) The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument. For example, substring("12345",2,3) returns "234". If the third argument is not specified, it returns the substring starting at the position specified in the second argument and continuing to the end of the string. For example, substring("12345",2) returns "2345". More precisely, each character in the string (see [3.6 Strings]) is considered to have a numeric position: the position of the first character is 1, the position of the second character is 2 and so on. The returned substring contains those characters for which the position of the character is greater than or equal to the second argument and, if the third argument is specified, less than the sum of the second and third arguments; the comparisons and addition used for the above follow the standard IEEE 754 rules. Thus: - substring("12345", 1.5, 2.6) returns "234" - substring("12345", 0, 3) returns "12" - substring("12345", 0 div 0, 3) returns "" - substring("12345", 1, 0 div 0) returns "" - substring("12345", -42, 1 div 0) returns "12345" - substring("12345", -1 div 0, 1 div 0) returns ""

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathSumFunction ()

void	xmlXPathSumFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the sum() XPath function number sum(node-set) The sum function returns the sum of the values of the nodes in the argument node-set.

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathTrailing ()

xmlNodeSetPtr	xmlXPathTrailing	(xmlNodeSetPtr nodes1, 
xmlNodeSetPtr nodes2)

Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #xmlXPathTrailingSorted is called.

nodes1: a node-set
nodes2: a node-set
Returns: the nodes in @nodes1 that follow the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2

xmlXPathTrailingSorted ()

xmlNodeSetPtr	xmlXPathTrailingSorted	(xmlNodeSetPtr nodes1, 
xmlNodeSetPtr nodes2)

Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)

nodes1: a node-set, sorted by document order
nodes2: a node-set, sorted by document order
Returns: the nodes in @nodes1 that follow the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2

xmlXPathTranslateFunction ()

void	xmlXPathTranslateFunction	(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the translate() XPath function string translate(string, string, string) The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. For example, translate("bar","abc","ABC") returns the string BAr. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed. For example, translate("--aaa--","abc-","ABC")

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathTrueFunction ()

void	xmlXPathTrueFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the true() XPath function boolean true()

ctxt: the XPath Parser context
nargs: the number of arguments

xmlXPathValueFlipSign ()

void	xmlXPathValueFlipSign		(xmlXPathParserContextPtr ctxt)

Implement the unary - operation on an XPath object The numeric operators convert their operands to numbers as if by calling the number function.

ctxt: the XPath Parser context

xmlXPathVariableLookup ()

xmlXPathObjectPtr	xmlXPathVariableLookup	(xmlXPathContextPtr ctxt, 
const xmlChar * name)

Search in the Variable array of the context for the given variable value.

ctxt: the XPath context
name: the variable name
Returns: a copy of the value or NULL if not found

xmlXPathVariableLookupNS ()

xmlXPathObjectPtr	xmlXPathVariableLookupNS	(xmlXPathContextPtr ctxt, 
const xmlChar * name,
const xmlChar * ns_uri)

Search in the Variable array of the context for the given variable value.

ctxt: the XPath context
name: the variable name
ns_uri: the variable namespace URI
Returns: the a copy of the value or NULL if not found

xmlXPathWrapCString ()

xmlXPathObjectPtr	xmlXPathWrapCString	(char * val)

Wraps a string into an XPath object.

val: the char * value
Returns: the newly created object.

xmlXPathWrapExternal ()

xmlXPathObjectPtr	xmlXPathWrapExternal	(void * val)

Wraps the @val data into an XPath object.

val: the user data
Returns: the newly created object.

xmlXPathWrapNodeSet ()

xmlXPathObjectPtr	xmlXPathWrapNodeSet	(xmlNodeSetPtr val)

Wrap the Nodeset @val in a new xmlXPathObjectPtr

val: the NodePtr value
Returns: the newly created object.

xmlXPathWrapString ()

xmlXPathObjectPtr	xmlXPathWrapString	(xmlChar * val)

Wraps the @val string into an XPath object.

val: the xmlChar * value
Returns: the newly created object.

xmlXPatherror ()

void	xmlXPatherror			(xmlXPathParserContextPtr ctxt, 
const char * file,
int line,
int no)

Formats an error message.

ctxt: the XPath Parser context
file: the file name
line: the line number
no: the error number

PK!E/qqlibxml2-xmlunicode.htmlnu[ xmlunicode: Unicode character APIs

xmlunicode

xmlunicode - Unicode character APIs

API for the Unicode character APIs This file is automatically generated from the UCS description files of the Unicode Character Database

Author(s): Daniel Veillard

Synopsis

int	xmlUCSIsAegeanNumbers		(int code);
int	xmlUCSIsAlphabeticPresentationForms	(int code);
int	xmlUCSIsArabic			(int code);
int	xmlUCSIsArabicPresentationFormsA	(int code);
int	xmlUCSIsArabicPresentationFormsB	(int code);
int	xmlUCSIsArmenian		(int code);
int	xmlUCSIsArrows			(int code);
int	xmlUCSIsBasicLatin		(int code);
int	xmlUCSIsBengali			(int code);
int	xmlUCSIsBlock			(int code, 
const char * block); int xmlUCSIsBlockElements (int code); int xmlUCSIsBopomofo (int code); int xmlUCSIsBopomofoExtended (int code); int xmlUCSIsBoxDrawing (int code); int xmlUCSIsBraillePatterns (int code); int xmlUCSIsBuhid (int code); int xmlUCSIsByzantineMusicalSymbols (int code); int xmlUCSIsCJKCompatibility (int code); int xmlUCSIsCJKCompatibilityForms (int code); int xmlUCSIsCJKCompatibilityIdeographs (int code); int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code); int xmlUCSIsCJKRadicalsSupplement (int code); int xmlUCSIsCJKSymbolsandPunctuation (int code); int xmlUCSIsCJKUnifiedIdeographs (int code); int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code); int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code); int xmlUCSIsCat (int code,
const char * cat); int xmlUCSIsCatC (int code); int xmlUCSIsCatCc (int code); int xmlUCSIsCatCf (int code); int xmlUCSIsCatCo (int code); int xmlUCSIsCatCs (int code); int xmlUCSIsCatL (int code); int xmlUCSIsCatLl (int code); int xmlUCSIsCatLm (int code); int xmlUCSIsCatLo (int code); int xmlUCSIsCatLt (int code); int xmlUCSIsCatLu (int code); int xmlUCSIsCatM (int code); int xmlUCSIsCatMc (int code); int xmlUCSIsCatMe (int code); int xmlUCSIsCatMn (int code); int xmlUCSIsCatN (int code); int xmlUCSIsCatNd (int code); int xmlUCSIsCatNl (int code); int xmlUCSIsCatNo (int code); int xmlUCSIsCatP (int code); int xmlUCSIsCatPc (int code); int xmlUCSIsCatPd (int code); int xmlUCSIsCatPe (int code); int xmlUCSIsCatPf (int code); int xmlUCSIsCatPi (int code); int xmlUCSIsCatPo (int code); int xmlUCSIsCatPs (int code); int xmlUCSIsCatS (int code); int xmlUCSIsCatSc (int code); int xmlUCSIsCatSk (int code); int xmlUCSIsCatSm (int code); int xmlUCSIsCatSo (int code); int xmlUCSIsCatZ (int code); int xmlUCSIsCatZl (int code); int xmlUCSIsCatZp (int code); int xmlUCSIsCatZs (int code); int xmlUCSIsCherokee (int code); int xmlUCSIsCombiningDiacriticalMarks (int code); int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code); int xmlUCSIsCombiningHalfMarks (int code); int xmlUCSIsCombiningMarksforSymbols (int code); int xmlUCSIsControlPictures (int code); int xmlUCSIsCurrencySymbols (int code); int xmlUCSIsCypriotSyllabary (int code); int xmlUCSIsCyrillic (int code); int xmlUCSIsCyrillicSupplement (int code); int xmlUCSIsDeseret (int code); int xmlUCSIsDevanagari (int code); int xmlUCSIsDingbats (int code); int xmlUCSIsEnclosedAlphanumerics (int code); int xmlUCSIsEnclosedCJKLettersandMonths (int code); int xmlUCSIsEthiopic (int code); int xmlUCSIsGeneralPunctuation (int code); int xmlUCSIsGeometricShapes (int code); int xmlUCSIsGeorgian (int code); int xmlUCSIsGothic (int code); int xmlUCSIsGreek (int code); int xmlUCSIsGreekExtended (int code); int xmlUCSIsGreekandCoptic (int code); int xmlUCSIsGujarati (int code); int xmlUCSIsGurmukhi (int code); int xmlUCSIsHalfwidthandFullwidthForms (int code); int xmlUCSIsHangulCompatibilityJamo (int code); int xmlUCSIsHangulJamo (int code); int xmlUCSIsHangulSyllables (int code); int xmlUCSIsHanunoo (int code); int xmlUCSIsHebrew (int code); int xmlUCSIsHighPrivateUseSurrogates (int code); int xmlUCSIsHighSurrogates (int code); int xmlUCSIsHiragana (int code); int xmlUCSIsIPAExtensions (int code); int xmlUCSIsIdeographicDescriptionCharacters (int code); int xmlUCSIsKanbun (int code); int xmlUCSIsKangxiRadicals (int code); int xmlUCSIsKannada (int code); int xmlUCSIsKatakana (int code); int xmlUCSIsKatakanaPhoneticExtensions (int code); int xmlUCSIsKhmer (int code); int xmlUCSIsKhmerSymbols (int code); int xmlUCSIsLao (int code); int xmlUCSIsLatin1Supplement (int code); int xmlUCSIsLatinExtendedA (int code); int xmlUCSIsLatinExtendedAdditional (int code); int xmlUCSIsLatinExtendedB (int code); int xmlUCSIsLetterlikeSymbols (int code); int xmlUCSIsLimbu (int code); int xmlUCSIsLinearBIdeograms (int code); int xmlUCSIsLinearBSyllabary (int code); int xmlUCSIsLowSurrogates (int code); int xmlUCSIsMalayalam (int code); int xmlUCSIsMathematicalAlphanumericSymbols (int code); int xmlUCSIsMathematicalOperators (int code); int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code); int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code); int xmlUCSIsMiscellaneousSymbols (int code); int xmlUCSIsMiscellaneousSymbolsandArrows (int code); int xmlUCSIsMiscellaneousTechnical (int code); int xmlUCSIsMongolian (int code); int xmlUCSIsMusicalSymbols (int code); int xmlUCSIsMyanmar (int code); int xmlUCSIsNumberForms (int code); int xmlUCSIsOgham (int code); int xmlUCSIsOldItalic (int code); int xmlUCSIsOpticalCharacterRecognition (int code); int xmlUCSIsOriya (int code); int xmlUCSIsOsmanya (int code); int xmlUCSIsPhoneticExtensions (int code); int xmlUCSIsPrivateUse (int code); int xmlUCSIsPrivateUseArea (int code); int xmlUCSIsRunic (int code); int xmlUCSIsShavian (int code); int xmlUCSIsSinhala (int code); int xmlUCSIsSmallFormVariants (int code); int xmlUCSIsSpacingModifierLetters (int code); int xmlUCSIsSpecials (int code); int xmlUCSIsSuperscriptsandSubscripts (int code); int xmlUCSIsSupplementalArrowsA (int code); int xmlUCSIsSupplementalArrowsB (int code); int xmlUCSIsSupplementalMathematicalOperators (int code); int xmlUCSIsSupplementaryPrivateUseAreaA (int code); int xmlUCSIsSupplementaryPrivateUseAreaB (int code); int xmlUCSIsSyriac (int code); int xmlUCSIsTagalog (int code); int xmlUCSIsTagbanwa (int code); int xmlUCSIsTags (int code); int xmlUCSIsTaiLe (int code); int xmlUCSIsTaiXuanJingSymbols (int code); int xmlUCSIsTamil (int code); int xmlUCSIsTelugu (int code); int xmlUCSIsThaana (int code); int xmlUCSIsThai (int code); int xmlUCSIsTibetan (int code); int xmlUCSIsUgaritic (int code); int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code); int xmlUCSIsVariationSelectors (int code); int xmlUCSIsVariationSelectorsSupplement (int code); int xmlUCSIsYiRadicals (int code); int xmlUCSIsYiSyllables (int code); int xmlUCSIsYijingHexagramSymbols (int code);

Description

Details

xmlUCSIsAegeanNumbers ()

int	xmlUCSIsAegeanNumbers		(int code)

Check whether the character is part of AegeanNumbers UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsAlphabeticPresentationForms ()

int	xmlUCSIsAlphabeticPresentationForms	(int code)

Check whether the character is part of AlphabeticPresentationForms UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsArabic ()

int	xmlUCSIsArabic			(int code)

Check whether the character is part of Arabic UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsArabicPresentationFormsA ()

int	xmlUCSIsArabicPresentationFormsA	(int code)

Check whether the character is part of ArabicPresentationForms-A UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsArabicPresentationFormsB ()

int	xmlUCSIsArabicPresentationFormsB	(int code)

Check whether the character is part of ArabicPresentationForms-B UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsArmenian ()

int	xmlUCSIsArmenian		(int code)

Check whether the character is part of Armenian UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsArrows ()

int	xmlUCSIsArrows			(int code)

Check whether the character is part of Arrows UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsBasicLatin ()

int	xmlUCSIsBasicLatin		(int code)

Check whether the character is part of BasicLatin UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsBengali ()

int	xmlUCSIsBengali			(int code)

Check whether the character is part of Bengali UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsBlock ()

int	xmlUCSIsBlock			(int code, 
const char * block)

Check whether the character is part of the UCS Block

code: UCS code point
block: UCS block name
Returns: 1 if true, 0 if false and -1 on unknown block

xmlUCSIsBlockElements ()

int	xmlUCSIsBlockElements		(int code)

Check whether the character is part of BlockElements UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsBopomofo ()

int	xmlUCSIsBopomofo		(int code)

Check whether the character is part of Bopomofo UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsBopomofoExtended ()

int	xmlUCSIsBopomofoExtended	(int code)

Check whether the character is part of BopomofoExtended UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsBoxDrawing ()

int	xmlUCSIsBoxDrawing		(int code)

Check whether the character is part of BoxDrawing UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsBraillePatterns ()

int	xmlUCSIsBraillePatterns		(int code)

Check whether the character is part of BraillePatterns UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsBuhid ()

int	xmlUCSIsBuhid			(int code)

Check whether the character is part of Buhid UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsByzantineMusicalSymbols ()

int	xmlUCSIsByzantineMusicalSymbols	(int code)

Check whether the character is part of ByzantineMusicalSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKCompatibility ()

int	xmlUCSIsCJKCompatibility	(int code)

Check whether the character is part of CJKCompatibility UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKCompatibilityForms ()

int	xmlUCSIsCJKCompatibilityForms	(int code)

Check whether the character is part of CJKCompatibilityForms UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKCompatibilityIdeographs ()

int	xmlUCSIsCJKCompatibilityIdeographs	(int code)

Check whether the character is part of CJKCompatibilityIdeographs UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKCompatibilityIdeographsSupplement ()

int	xmlUCSIsCJKCompatibilityIdeographsSupplement	(int code)

Check whether the character is part of CJKCompatibilityIdeographsSupplement UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKRadicalsSupplement ()

int	xmlUCSIsCJKRadicalsSupplement	(int code)

Check whether the character is part of CJKRadicalsSupplement UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKSymbolsandPunctuation ()

int	xmlUCSIsCJKSymbolsandPunctuation	(int code)

Check whether the character is part of CJKSymbolsandPunctuation UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKUnifiedIdeographs ()

int	xmlUCSIsCJKUnifiedIdeographs	(int code)

Check whether the character is part of CJKUnifiedIdeographs UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKUnifiedIdeographsExtensionA ()

int	xmlUCSIsCJKUnifiedIdeographsExtensionA	(int code)

Check whether the character is part of CJKUnifiedIdeographsExtensionA UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCJKUnifiedIdeographsExtensionB ()

int	xmlUCSIsCJKUnifiedIdeographsExtensionB	(int code)

Check whether the character is part of CJKUnifiedIdeographsExtensionB UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCat ()

int	xmlUCSIsCat			(int code, 
const char * cat)

Check whether the character is part of the UCS Category

code: UCS code point
cat: UCS Category name
Returns: 1 if true, 0 if false and -1 on unknown category

xmlUCSIsCatC ()

int	xmlUCSIsCatC			(int code)

Check whether the character is part of C UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatCc ()

int	xmlUCSIsCatCc			(int code)

Check whether the character is part of Cc UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatCf ()

int	xmlUCSIsCatCf			(int code)

Check whether the character is part of Cf UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatCo ()

int	xmlUCSIsCatCo			(int code)

Check whether the character is part of Co UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatCs ()

int	xmlUCSIsCatCs			(int code)

Check whether the character is part of Cs UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatL ()

int	xmlUCSIsCatL			(int code)

Check whether the character is part of L UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatLl ()

int	xmlUCSIsCatLl			(int code)

Check whether the character is part of Ll UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatLm ()

int	xmlUCSIsCatLm			(int code)

Check whether the character is part of Lm UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatLo ()

int	xmlUCSIsCatLo			(int code)

Check whether the character is part of Lo UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatLt ()

int	xmlUCSIsCatLt			(int code)

Check whether the character is part of Lt UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatLu ()

int	xmlUCSIsCatLu			(int code)

Check whether the character is part of Lu UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatM ()

int	xmlUCSIsCatM			(int code)

Check whether the character is part of M UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatMc ()

int	xmlUCSIsCatMc			(int code)

Check whether the character is part of Mc UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatMe ()

int	xmlUCSIsCatMe			(int code)

Check whether the character is part of Me UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatMn ()

int	xmlUCSIsCatMn			(int code)

Check whether the character is part of Mn UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatN ()

int	xmlUCSIsCatN			(int code)

Check whether the character is part of N UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatNd ()

int	xmlUCSIsCatNd			(int code)

Check whether the character is part of Nd UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatNl ()

int	xmlUCSIsCatNl			(int code)

Check whether the character is part of Nl UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatNo ()

int	xmlUCSIsCatNo			(int code)

Check whether the character is part of No UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatP ()

int	xmlUCSIsCatP			(int code)

Check whether the character is part of P UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatPc ()

int	xmlUCSIsCatPc			(int code)

Check whether the character is part of Pc UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatPd ()

int	xmlUCSIsCatPd			(int code)

Check whether the character is part of Pd UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatPe ()

int	xmlUCSIsCatPe			(int code)

Check whether the character is part of Pe UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatPf ()

int	xmlUCSIsCatPf			(int code)

Check whether the character is part of Pf UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatPi ()

int	xmlUCSIsCatPi			(int code)

Check whether the character is part of Pi UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatPo ()

int	xmlUCSIsCatPo			(int code)

Check whether the character is part of Po UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatPs ()

int	xmlUCSIsCatPs			(int code)

Check whether the character is part of Ps UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatS ()

int	xmlUCSIsCatS			(int code)

Check whether the character is part of S UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatSc ()

int	xmlUCSIsCatSc			(int code)

Check whether the character is part of Sc UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatSk ()

int	xmlUCSIsCatSk			(int code)

Check whether the character is part of Sk UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatSm ()

int	xmlUCSIsCatSm			(int code)

Check whether the character is part of Sm UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatSo ()

int	xmlUCSIsCatSo			(int code)

Check whether the character is part of So UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatZ ()

int	xmlUCSIsCatZ			(int code)

Check whether the character is part of Z UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatZl ()

int	xmlUCSIsCatZl			(int code)

Check whether the character is part of Zl UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatZp ()

int	xmlUCSIsCatZp			(int code)

Check whether the character is part of Zp UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCatZs ()

int	xmlUCSIsCatZs			(int code)

Check whether the character is part of Zs UCS Category

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCherokee ()

int	xmlUCSIsCherokee		(int code)

Check whether the character is part of Cherokee UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCombiningDiacriticalMarks ()

int	xmlUCSIsCombiningDiacriticalMarks	(int code)

Check whether the character is part of CombiningDiacriticalMarks UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCombiningDiacriticalMarksforSymbols ()

int	xmlUCSIsCombiningDiacriticalMarksforSymbols	(int code)

Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCombiningHalfMarks ()

int	xmlUCSIsCombiningHalfMarks	(int code)

Check whether the character is part of CombiningHalfMarks UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCombiningMarksforSymbols ()

int	xmlUCSIsCombiningMarksforSymbols	(int code)

Check whether the character is part of CombiningMarksforSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsControlPictures ()

int	xmlUCSIsControlPictures		(int code)

Check whether the character is part of ControlPictures UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCurrencySymbols ()

int	xmlUCSIsCurrencySymbols		(int code)

Check whether the character is part of CurrencySymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCypriotSyllabary ()

int	xmlUCSIsCypriotSyllabary	(int code)

Check whether the character is part of CypriotSyllabary UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCyrillic ()

int	xmlUCSIsCyrillic		(int code)

Check whether the character is part of Cyrillic UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsCyrillicSupplement ()

int	xmlUCSIsCyrillicSupplement	(int code)

Check whether the character is part of CyrillicSupplement UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsDeseret ()

int	xmlUCSIsDeseret			(int code)

Check whether the character is part of Deseret UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsDevanagari ()

int	xmlUCSIsDevanagari		(int code)

Check whether the character is part of Devanagari UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsDingbats ()

int	xmlUCSIsDingbats		(int code)

Check whether the character is part of Dingbats UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsEnclosedAlphanumerics ()

int	xmlUCSIsEnclosedAlphanumerics	(int code)

Check whether the character is part of EnclosedAlphanumerics UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsEnclosedCJKLettersandMonths ()

int	xmlUCSIsEnclosedCJKLettersandMonths	(int code)

Check whether the character is part of EnclosedCJKLettersandMonths UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsEthiopic ()

int	xmlUCSIsEthiopic		(int code)

Check whether the character is part of Ethiopic UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGeneralPunctuation ()

int	xmlUCSIsGeneralPunctuation	(int code)

Check whether the character is part of GeneralPunctuation UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGeometricShapes ()

int	xmlUCSIsGeometricShapes		(int code)

Check whether the character is part of GeometricShapes UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGeorgian ()

int	xmlUCSIsGeorgian		(int code)

Check whether the character is part of Georgian UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGothic ()

int	xmlUCSIsGothic			(int code)

Check whether the character is part of Gothic UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGreek ()

int	xmlUCSIsGreek			(int code)

Check whether the character is part of Greek UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGreekExtended ()

int	xmlUCSIsGreekExtended		(int code)

Check whether the character is part of GreekExtended UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGreekandCoptic ()

int	xmlUCSIsGreekandCoptic		(int code)

Check whether the character is part of GreekandCoptic UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGujarati ()

int	xmlUCSIsGujarati		(int code)

Check whether the character is part of Gujarati UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsGurmukhi ()

int	xmlUCSIsGurmukhi		(int code)

Check whether the character is part of Gurmukhi UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHalfwidthandFullwidthForms ()

int	xmlUCSIsHalfwidthandFullwidthForms	(int code)

Check whether the character is part of HalfwidthandFullwidthForms UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHangulCompatibilityJamo ()

int	xmlUCSIsHangulCompatibilityJamo	(int code)

Check whether the character is part of HangulCompatibilityJamo UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHangulJamo ()

int	xmlUCSIsHangulJamo		(int code)

Check whether the character is part of HangulJamo UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHangulSyllables ()

int	xmlUCSIsHangulSyllables		(int code)

Check whether the character is part of HangulSyllables UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHanunoo ()

int	xmlUCSIsHanunoo			(int code)

Check whether the character is part of Hanunoo UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHebrew ()

int	xmlUCSIsHebrew			(int code)

Check whether the character is part of Hebrew UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHighPrivateUseSurrogates ()

int	xmlUCSIsHighPrivateUseSurrogates	(int code)

Check whether the character is part of HighPrivateUseSurrogates UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHighSurrogates ()

int	xmlUCSIsHighSurrogates		(int code)

Check whether the character is part of HighSurrogates UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsHiragana ()

int	xmlUCSIsHiragana		(int code)

Check whether the character is part of Hiragana UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsIPAExtensions ()

int	xmlUCSIsIPAExtensions		(int code)

Check whether the character is part of IPAExtensions UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsIdeographicDescriptionCharacters ()

int	xmlUCSIsIdeographicDescriptionCharacters	(int code)

Check whether the character is part of IdeographicDescriptionCharacters UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsKanbun ()

int	xmlUCSIsKanbun			(int code)

Check whether the character is part of Kanbun UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsKangxiRadicals ()

int	xmlUCSIsKangxiRadicals		(int code)

Check whether the character is part of KangxiRadicals UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsKannada ()

int	xmlUCSIsKannada			(int code)

Check whether the character is part of Kannada UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsKatakana ()

int	xmlUCSIsKatakana		(int code)

Check whether the character is part of Katakana UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsKatakanaPhoneticExtensions ()

int	xmlUCSIsKatakanaPhoneticExtensions	(int code)

Check whether the character is part of KatakanaPhoneticExtensions UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsKhmer ()

int	xmlUCSIsKhmer			(int code)

Check whether the character is part of Khmer UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsKhmerSymbols ()

int	xmlUCSIsKhmerSymbols		(int code)

Check whether the character is part of KhmerSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLao ()

int	xmlUCSIsLao			(int code)

Check whether the character is part of Lao UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLatin1Supplement ()

int	xmlUCSIsLatin1Supplement	(int code)

Check whether the character is part of Latin-1Supplement UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLatinExtendedA ()

int	xmlUCSIsLatinExtendedA		(int code)

Check whether the character is part of LatinExtended-A UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLatinExtendedAdditional ()

int	xmlUCSIsLatinExtendedAdditional	(int code)

Check whether the character is part of LatinExtendedAdditional UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLatinExtendedB ()

int	xmlUCSIsLatinExtendedB		(int code)

Check whether the character is part of LatinExtended-B UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLetterlikeSymbols ()

int	xmlUCSIsLetterlikeSymbols	(int code)

Check whether the character is part of LetterlikeSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLimbu ()

int	xmlUCSIsLimbu			(int code)

Check whether the character is part of Limbu UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLinearBIdeograms ()

int	xmlUCSIsLinearBIdeograms	(int code)

Check whether the character is part of LinearBIdeograms UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLinearBSyllabary ()

int	xmlUCSIsLinearBSyllabary	(int code)

Check whether the character is part of LinearBSyllabary UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsLowSurrogates ()

int	xmlUCSIsLowSurrogates		(int code)

Check whether the character is part of LowSurrogates UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMalayalam ()

int	xmlUCSIsMalayalam		(int code)

Check whether the character is part of Malayalam UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMathematicalAlphanumericSymbols ()

int	xmlUCSIsMathematicalAlphanumericSymbols	(int code)

Check whether the character is part of MathematicalAlphanumericSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMathematicalOperators ()

int	xmlUCSIsMathematicalOperators	(int code)

Check whether the character is part of MathematicalOperators UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMiscellaneousMathematicalSymbolsA ()

int	xmlUCSIsMiscellaneousMathematicalSymbolsA	(int code)

Check whether the character is part of MiscellaneousMathematicalSymbols-A UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMiscellaneousMathematicalSymbolsB ()

int	xmlUCSIsMiscellaneousMathematicalSymbolsB	(int code)

Check whether the character is part of MiscellaneousMathematicalSymbols-B UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMiscellaneousSymbols ()

int	xmlUCSIsMiscellaneousSymbols	(int code)

Check whether the character is part of MiscellaneousSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMiscellaneousSymbolsandArrows ()

int	xmlUCSIsMiscellaneousSymbolsandArrows	(int code)

Check whether the character is part of MiscellaneousSymbolsandArrows UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMiscellaneousTechnical ()

int	xmlUCSIsMiscellaneousTechnical	(int code)

Check whether the character is part of MiscellaneousTechnical UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMongolian ()

int	xmlUCSIsMongolian		(int code)

Check whether the character is part of Mongolian UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMusicalSymbols ()

int	xmlUCSIsMusicalSymbols		(int code)

Check whether the character is part of MusicalSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsMyanmar ()

int	xmlUCSIsMyanmar			(int code)

Check whether the character is part of Myanmar UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsNumberForms ()

int	xmlUCSIsNumberForms		(int code)

Check whether the character is part of NumberForms UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsOgham ()

int	xmlUCSIsOgham			(int code)

Check whether the character is part of Ogham UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsOldItalic ()

int	xmlUCSIsOldItalic		(int code)

Check whether the character is part of OldItalic UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsOpticalCharacterRecognition ()

int	xmlUCSIsOpticalCharacterRecognition	(int code)

Check whether the character is part of OpticalCharacterRecognition UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsOriya ()

int	xmlUCSIsOriya			(int code)

Check whether the character is part of Oriya UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsOsmanya ()

int	xmlUCSIsOsmanya			(int code)

Check whether the character is part of Osmanya UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsPhoneticExtensions ()

int	xmlUCSIsPhoneticExtensions	(int code)

Check whether the character is part of PhoneticExtensions UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsPrivateUse ()

int	xmlUCSIsPrivateUse		(int code)

Check whether the character is part of PrivateUse UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsPrivateUseArea ()

int	xmlUCSIsPrivateUseArea		(int code)

Check whether the character is part of PrivateUseArea UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsRunic ()

int	xmlUCSIsRunic			(int code)

Check whether the character is part of Runic UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsShavian ()

int	xmlUCSIsShavian			(int code)

Check whether the character is part of Shavian UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSinhala ()

int	xmlUCSIsSinhala			(int code)

Check whether the character is part of Sinhala UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSmallFormVariants ()

int	xmlUCSIsSmallFormVariants	(int code)

Check whether the character is part of SmallFormVariants UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSpacingModifierLetters ()

int	xmlUCSIsSpacingModifierLetters	(int code)

Check whether the character is part of SpacingModifierLetters UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSpecials ()

int	xmlUCSIsSpecials		(int code)

Check whether the character is part of Specials UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSuperscriptsandSubscripts ()

int	xmlUCSIsSuperscriptsandSubscripts	(int code)

Check whether the character is part of SuperscriptsandSubscripts UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSupplementalArrowsA ()

int	xmlUCSIsSupplementalArrowsA	(int code)

Check whether the character is part of SupplementalArrows-A UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSupplementalArrowsB ()

int	xmlUCSIsSupplementalArrowsB	(int code)

Check whether the character is part of SupplementalArrows-B UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSupplementalMathematicalOperators ()

int	xmlUCSIsSupplementalMathematicalOperators	(int code)

Check whether the character is part of SupplementalMathematicalOperators UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSupplementaryPrivateUseAreaA ()

int	xmlUCSIsSupplementaryPrivateUseAreaA	(int code)

Check whether the character is part of SupplementaryPrivateUseArea-A UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSupplementaryPrivateUseAreaB ()

int	xmlUCSIsSupplementaryPrivateUseAreaB	(int code)

Check whether the character is part of SupplementaryPrivateUseArea-B UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsSyriac ()

int	xmlUCSIsSyriac			(int code)

Check whether the character is part of Syriac UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsTagalog ()

int	xmlUCSIsTagalog			(int code)

Check whether the character is part of Tagalog UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsTagbanwa ()

int	xmlUCSIsTagbanwa		(int code)

Check whether the character is part of Tagbanwa UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsTags ()

int	xmlUCSIsTags			(int code)

Check whether the character is part of Tags UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsTaiLe ()

int	xmlUCSIsTaiLe			(int code)

Check whether the character is part of TaiLe UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsTaiXuanJingSymbols ()

int	xmlUCSIsTaiXuanJingSymbols	(int code)

Check whether the character is part of TaiXuanJingSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsTamil ()

int	xmlUCSIsTamil			(int code)

Check whether the character is part of Tamil UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsTelugu ()

int	xmlUCSIsTelugu			(int code)

Check whether the character is part of Telugu UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsThaana ()

int	xmlUCSIsThaana			(int code)

Check whether the character is part of Thaana UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsThai ()

int	xmlUCSIsThai			(int code)

Check whether the character is part of Thai UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsTibetan ()

int	xmlUCSIsTibetan			(int code)

Check whether the character is part of Tibetan UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsUgaritic ()

int	xmlUCSIsUgaritic		(int code)

Check whether the character is part of Ugaritic UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsUnifiedCanadianAboriginalSyllabics ()

int	xmlUCSIsUnifiedCanadianAboriginalSyllabics	(int code)

Check whether the character is part of UnifiedCanadianAboriginalSyllabics UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsVariationSelectors ()

int	xmlUCSIsVariationSelectors	(int code)

Check whether the character is part of VariationSelectors UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsVariationSelectorsSupplement ()

int	xmlUCSIsVariationSelectorsSupplement	(int code)

Check whether the character is part of VariationSelectorsSupplement UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsYiRadicals ()

int	xmlUCSIsYiRadicals		(int code)

Check whether the character is part of YiRadicals UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsYiSyllables ()

int	xmlUCSIsYiSyllables		(int code)

Check whether the character is part of YiSyllables UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

xmlUCSIsYijingHexagramSymbols ()

int	xmlUCSIsYijingHexagramSymbols	(int code)

Check whether the character is part of YijingHexagramSymbols UCS Block

code: UCS code point
Returns: 1 if true 0 otherwise

PK!.iilibxml2-valid.htmlnu[ valid: The DTD validation

valid

valid - The DTD validation

API for the DTD handling and the validity checking

Author(s): Daniel Veillard

Synopsis

#define XML_VCTXT_DTD_VALIDATED;
#define XML_VCTXT_USE_PCTXT;
typedef struct _xmlHashTable xmlAttributeTable;
typedef xmlAttributeTable * xmlAttributeTablePtr;
typedef struct _xmlHashTable xmlElementTable;
typedef xmlElementTable * xmlElementTablePtr;
typedef struct _xmlHashTable xmlIDTable;
typedef xmlIDTable * xmlIDTablePtr;
typedef struct _xmlHashTable xmlNotationTable;
typedef xmlNotationTable * xmlNotationTablePtr;
typedef struct _xmlHashTable xmlRefTable;
typedef xmlRefTable * xmlRefTablePtr;
typedef struct _xmlValidCtxt xmlValidCtxt;
typedef xmlValidCtxt * xmlValidCtxtPtr;
typedef struct _xmlValidState xmlValidState;
typedef xmlValidState * xmlValidStatePtr;
xmlAttributePtr	xmlAddAttributeDecl	(xmlValidCtxtPtr ctxt, 
xmlDtdPtr dtd,
const xmlChar * elem,
const xmlChar * name,
const xmlChar * ns,
xmlAttributeType type,
xmlAttributeDefault def,
const xmlChar * defaultValue,
xmlEnumerationPtr tree); xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar * name,
xmlElementTypeVal type,
xmlElementContentPtr content); xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar * value,
xmlAttrPtr attr); xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar * name,
const xmlChar * PublicID,
const xmlChar * SystemID); xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar * value,
xmlAttrPtr attr); xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table); xmlElementContentPtr xmlCopyDocElementContent (xmlDocPtr doc,
xmlElementContentPtr cur); xmlElementContentPtr xmlCopyElementContent (xmlElementContentPtr cur); xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table); xmlEnumerationPtr xmlCopyEnumeration (xmlEnumerationPtr cur); xmlNotationTablePtr xmlCopyNotationTable (xmlNotationTablePtr table); xmlEnumerationPtr xmlCreateEnumeration (const xmlChar * name); void xmlDumpAttributeDecl (xmlBufferPtr buf,
xmlAttributePtr attr); void xmlDumpAttributeTable (xmlBufferPtr buf,
xmlAttributeTablePtr table); void xmlDumpElementDecl (xmlBufferPtr buf,
xmlElementPtr elem); void xmlDumpElementTable (xmlBufferPtr buf,
xmlElementTablePtr table); void xmlDumpNotationDecl (xmlBufferPtr buf,
xmlNotationPtr nota); void xmlDumpNotationTable (xmlBufferPtr buf,
xmlNotationTablePtr table); void xmlFreeAttributeTable (xmlAttributeTablePtr table); void xmlFreeDocElementContent (xmlDocPtr doc,
xmlElementContentPtr cur); void xmlFreeElementContent (xmlElementContentPtr cur); void xmlFreeElementTable (xmlElementTablePtr table); void xmlFreeEnumeration (xmlEnumerationPtr cur); void xmlFreeIDTable (xmlIDTablePtr table); void xmlFreeNotationTable (xmlNotationTablePtr table); void xmlFreeRefTable (xmlRefTablePtr table); void xmlFreeValidCtxt (xmlValidCtxtPtr cur); xmlAttributePtr xmlGetDtdAttrDesc (xmlDtdPtr dtd,
const xmlChar * elem,
const xmlChar * name); xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd,
const xmlChar * name); xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd,
const xmlChar * name); xmlAttributePtr xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
const xmlChar * elem,
const xmlChar * name,
const xmlChar * prefix); xmlElementPtr xmlGetDtdQElementDesc (xmlDtdPtr dtd,
const xmlChar * name,
const xmlChar * prefix); xmlAttrPtr xmlGetID (xmlDocPtr doc,
const xmlChar * ID); xmlListPtr xmlGetRefs (xmlDocPtr doc,
const xmlChar * ID); int xmlIsID (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr); int xmlIsMixedElement (xmlDocPtr doc,
const xmlChar * name); int xmlIsRef (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr); xmlElementContentPtr xmlNewDocElementContent (xmlDocPtr doc,
const xmlChar * name,
xmlElementContentType type); xmlElementContentPtr xmlNewElementContent (const xmlChar * name,
xmlElementContentType type); xmlValidCtxtPtr xmlNewValidCtxt (void); int xmlRemoveID (xmlDocPtr doc,
xmlAttrPtr attr); int xmlRemoveRef (xmlDocPtr doc,
xmlAttrPtr attr); void xmlSnprintfElementContent (char * buf,
int size,
xmlElementContentPtr content,
int englob); void xmlSprintfElementContent (char * buf,
xmlElementContentPtr content,
int englob); int xmlValidBuildContentModel (xmlValidCtxtPtr ctxt,
xmlElementPtr elem); xmlChar * xmlValidCtxtNormalizeAttributeValue (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * name,
const xmlChar * value); int xmlValidGetPotentialChildren (xmlElementContent * ctree,
const xmlChar ** names,
int * len,
int max); int xmlValidGetValidElements (xmlNode * prev,
xmlNode * next,
const xmlChar ** names,
int max); xmlChar * xmlValidNormalizeAttributeValue (xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * name,
const xmlChar * value); int xmlValidateAttributeDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlAttributePtr attr); int xmlValidateAttributeValue (xmlAttributeType type,
const xmlChar * value); int xmlValidateDocument (xmlValidCtxtPtr ctxt,
xmlDocPtr doc); int xmlValidateDocumentFinal (xmlValidCtxtPtr ctxt,
xmlDocPtr doc); int xmlValidateDtd (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlDtdPtr dtd); int xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
xmlDocPtr doc); int xmlValidateElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem); int xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlElementPtr elem); int xmlValidateNameValue (const xmlChar * value); int xmlValidateNamesValue (const xmlChar * value); int xmlValidateNmtokenValue (const xmlChar * value); int xmlValidateNmtokensValue (const xmlChar * value); int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNotationPtr nota); int xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar * notationName); int xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr,
const xmlChar * value); int xmlValidateOneElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem); int xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * prefix,
xmlNsPtr ns,
const xmlChar * value); int xmlValidatePopElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * qname); int xmlValidatePushCData (xmlValidCtxtPtr ctxt,
const xmlChar * data,
int len); int xmlValidatePushElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * qname); int xmlValidateRoot (xmlValidCtxtPtr ctxt,
xmlDocPtr doc); typedef void xmlValidityErrorFunc (void * ctx,
const char * msg,
... ...); typedef void xmlValidityWarningFunc (void * ctx,
const char * msg,
... ...);

Description

Details

Macro XML_VCTXT_DTD_VALIDATED

#define XML_VCTXT_DTD_VALIDATED;

Set after xmlValidateDtdFinal was called.


Macro XML_VCTXT_USE_PCTXT

#define XML_VCTXT_USE_PCTXT;

Set if the validation context is part of a parser context.


Structure xmlAttributeTable

struct _xmlHashTable {
The content of this structure is not made public by the API.
} xmlAttributeTable;


Typedef xmlAttributeTablePtr

xmlAttributeTable * xmlAttributeTablePtr;


Structure xmlElementTable

struct _xmlHashTable {
The content of this structure is not made public by the API.
} xmlElementTable;


Typedef xmlElementTablePtr

xmlElementTable * xmlElementTablePtr;


Structure xmlIDTable

struct _xmlHashTable {
The content of this structure is not made public by the API.
} xmlIDTable;


Typedef xmlIDTablePtr

xmlIDTable * xmlIDTablePtr;


Structure xmlNotationTable

struct _xmlHashTable {
The content of this structure is not made public by the API.
} xmlNotationTable;


Typedef xmlNotationTablePtr

xmlNotationTable * xmlNotationTablePtr;


Structure xmlRefTable

struct _xmlHashTable {
The content of this structure is not made public by the API.
} xmlRefTable;


Typedef xmlRefTablePtr

xmlRefTable * xmlRefTablePtr;


Structure xmlValidCtxt

struct _xmlValidCtxt {
    void *	userData	: user specific data block
    xmlValidityErrorFunc	error	: the callback in case of errors
    xmlValidityWarningFunc	warning	: the callback in case of warning Node analysis stack used when validat
    xmlNodePtr	node	: Current parsed Node
    int	nodeNr	: Depth of the parsing stack
    int	nodeMax	: Max depth of the parsing stack
    xmlNodePtr *	nodeTab	: array of nodes
    unsigned int	flags	: internal flags
    xmlDocPtr	doc	: the document
    int	valid	: temporary validity check result state state used for non-determinist
    xmlValidState *	vstate	: current state
    int	vstateNr	: Depth of the validation stack
    int	vstateMax	: Max depth of the validation stack
    xmlValidState *	vstateTab	: array of validation states
    xmlAutomataPtr	am	: the automata
    xmlAutomataStatePtr	state	: used to build the automata
    void *	am
    void *	state
} xmlValidCtxt;


Typedef xmlValidCtxtPtr

xmlValidCtxt * xmlValidCtxtPtr;


Structure xmlValidState

struct _xmlValidState {
The content of this structure is not made public by the API.
} xmlValidState;


Typedef xmlValidStatePtr

xmlValidState * xmlValidStatePtr;


Function type xmlValidityErrorFunc

void	xmlValidityErrorFunc		(void * ctx, 
const char * msg,
... ...)

Callback called when a validity error is found. This is a message oriented function similar to an *printf function.

ctx: usually an xmlValidCtxtPtr to a validity error context, but comes from ctxt->userData (which normally contains such a pointer); ctxt->userData can be changed by the user.
msg: the string to format *printf like vararg
...: remaining arguments to the format

Function type xmlValidityWarningFunc

void	xmlValidityWarningFunc		(void * ctx, 
const char * msg,
... ...)

Callback called when a validity warning is found. This is a message oriented function similar to an *printf function.

ctx: usually an xmlValidCtxtPtr to a validity error context, but comes from ctxt->userData (which normally contains such a pointer); ctxt->userData can be changed by the user.
msg: the string to format *printf like vararg
...: remaining arguments to the format

xmlAddAttributeDecl ()

xmlAttributePtr	xmlAddAttributeDecl	(xmlValidCtxtPtr ctxt, 
xmlDtdPtr dtd,
const xmlChar * elem,
const xmlChar * name,
const xmlChar * ns,
xmlAttributeType type,
xmlAttributeDefault def,
const xmlChar * defaultValue,
xmlEnumerationPtr tree)

Register a new attribute declaration Note that @tree becomes the ownership of the DTD

ctxt: the validation context
dtd: pointer to the DTD
elem: the element name
name: the attribute name
ns: the attribute namespace prefix
type: the attribute type
def: the attribute default type
defaultValue: the attribute default value
tree: if it's an enumeration, the associated list
Returns: NULL if not new, otherwise the attribute decl

xmlAddElementDecl ()

xmlElementPtr	xmlAddElementDecl	(xmlValidCtxtPtr ctxt, 
xmlDtdPtr dtd,
const xmlChar * name,
xmlElementTypeVal type,
xmlElementContentPtr content)

Register a new element declaration

ctxt: the validation context
dtd: pointer to the DTD
name: the entity name
type: the element type
content: the element content tree or NULL
Returns: NULL if not, otherwise the entity

xmlAddID ()

xmlIDPtr	xmlAddID		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
const xmlChar * value,
xmlAttrPtr attr)

Register a new id declaration

ctxt: the validation context
doc: pointer to the document
value: the value name
attr: the attribute holding the ID
Returns: NULL if not, otherwise the new xmlIDPtr

xmlAddNotationDecl ()

xmlNotationPtr	xmlAddNotationDecl	(xmlValidCtxtPtr ctxt, 
xmlDtdPtr dtd,
const xmlChar * name,
const xmlChar * PublicID,
const xmlChar * SystemID)

Register a new notation declaration

ctxt: the validation context
dtd: pointer to the DTD
name: the entity name
PublicID: the public identifier or NULL
SystemID: the system identifier or NULL
Returns: NULL if not, otherwise the entity

xmlAddRef ()

xmlRefPtr	xmlAddRef		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
const xmlChar * value,
xmlAttrPtr attr)

DEPRECATED, do not use. This function will be removed from the public API. Register a new ref declaration

ctxt: the validation context
doc: pointer to the document
value: the value name
attr: the attribute holding the Ref
Returns: NULL if not, otherwise the new xmlRefPtr

xmlCopyAttributeTable ()

xmlAttributeTablePtr	xmlCopyAttributeTable	(xmlAttributeTablePtr table)

Build a copy of an attribute table.

table: An attribute table
Returns: the new xmlAttributeTablePtr or NULL in case of error.

xmlCopyDocElementContent ()

xmlElementContentPtr	xmlCopyDocElementContent	(xmlDocPtr doc, 
xmlElementContentPtr cur)

Build a copy of an element content description.

doc: the document owning the element declaration
cur: An element content pointer.
Returns: the new xmlElementContentPtr or NULL in case of error.

xmlCopyElementContent ()

xmlElementContentPtr	xmlCopyElementContent	(xmlElementContentPtr cur)

Build a copy of an element content description. Deprecated, use xmlCopyDocElementContent instead

cur: An element content pointer.
Returns: the new xmlElementContentPtr or NULL in case of error.

xmlCopyElementTable ()

xmlElementTablePtr	xmlCopyElementTable	(xmlElementTablePtr table)

Build a copy of an element table.

table: An element table
Returns: the new xmlElementTablePtr or NULL in case of error.

xmlCopyEnumeration ()

xmlEnumerationPtr	xmlCopyEnumeration	(xmlEnumerationPtr cur)

Copy an enumeration attribute node (recursive).

cur: the tree to copy.
Returns: the xmlEnumerationPtr just created or NULL in case of error.

xmlCopyNotationTable ()

xmlNotationTablePtr	xmlCopyNotationTable	(xmlNotationTablePtr table)

Build a copy of a notation table.

table: A notation table
Returns: the new xmlNotationTablePtr or NULL in case of error.

xmlCreateEnumeration ()

xmlEnumerationPtr	xmlCreateEnumeration	(const xmlChar * name)

create and initialize an enumeration attribute node.

name: the enumeration name or NULL
Returns: the xmlEnumerationPtr just created or NULL in case of error.

xmlDumpAttributeDecl ()

void	xmlDumpAttributeDecl		(xmlBufferPtr buf, 
xmlAttributePtr attr)

This will dump the content of the attribute declaration as an XML DTD definition

buf: the XML buffer output
attr: An attribute declaration

xmlDumpAttributeTable ()

void	xmlDumpAttributeTable		(xmlBufferPtr buf, 
xmlAttributeTablePtr table)

This will dump the content of the attribute table as an XML DTD definition

buf: the XML buffer output
table: An attribute table

xmlDumpElementDecl ()

void	xmlDumpElementDecl		(xmlBufferPtr buf, 
xmlElementPtr elem)

This will dump the content of the element declaration as an XML DTD definition

buf: the XML buffer output
elem: An element table

xmlDumpElementTable ()

void	xmlDumpElementTable		(xmlBufferPtr buf, 
xmlElementTablePtr table)

This will dump the content of the element table as an XML DTD definition

buf: the XML buffer output
table: An element table

xmlDumpNotationDecl ()

void	xmlDumpNotationDecl		(xmlBufferPtr buf, 
xmlNotationPtr nota)

This will dump the content the notation declaration as an XML DTD definition

buf: the XML buffer output
nota: A notation declaration

xmlDumpNotationTable ()

void	xmlDumpNotationTable		(xmlBufferPtr buf, 
xmlNotationTablePtr table)

This will dump the content of the notation table as an XML DTD definition

buf: the XML buffer output
table: A notation table

xmlFreeAttributeTable ()

void	xmlFreeAttributeTable		(xmlAttributeTablePtr table)

Deallocate the memory used by an entities hash table.

table: An attribute table

xmlFreeDocElementContent ()

void	xmlFreeDocElementContent	(xmlDocPtr doc, 
xmlElementContentPtr cur)

Free an element content structure. The whole subtree is removed.

doc: the document owning the element declaration
cur: the element content tree to free

xmlFreeElementContent ()

void	xmlFreeElementContent		(xmlElementContentPtr cur)

Free an element content structure. The whole subtree is removed. Deprecated, use xmlFreeDocElementContent instead

cur: the element content tree to free

xmlFreeElementTable ()

void	xmlFreeElementTable		(xmlElementTablePtr table)

Deallocate the memory used by an element hash table.

table: An element table

xmlFreeEnumeration ()

void	xmlFreeEnumeration		(xmlEnumerationPtr cur)

free an enumeration attribute node (recursive).

cur: the tree to free.

xmlFreeIDTable ()

void	xmlFreeIDTable			(xmlIDTablePtr table)

Deallocate the memory used by an ID hash table.

table: An id table

xmlFreeNotationTable ()

void	xmlFreeNotationTable		(xmlNotationTablePtr table)

Deallocate the memory used by an entities hash table.

table: An notation table

xmlFreeRefTable ()

void	xmlFreeRefTable			(xmlRefTablePtr table)

DEPRECATED, do not use. This function will be removed from the public API. Deallocate the memory used by an Ref hash table.

table: An ref table

xmlFreeValidCtxt ()

void	xmlFreeValidCtxt		(xmlValidCtxtPtr cur)

Free a validation context structure.

cur: the validation context to free

xmlGetDtdAttrDesc ()

xmlAttributePtr	xmlGetDtdAttrDesc	(xmlDtdPtr dtd, 
const xmlChar * elem,
const xmlChar * name)

Search the DTD for the description of this attribute on this element.

dtd: a pointer to the DtD to search
elem: the element name
name: the attribute name
Returns: the xmlAttributePtr if found or NULL

xmlGetDtdElementDesc ()

xmlElementPtr	xmlGetDtdElementDesc	(xmlDtdPtr dtd, 
const xmlChar * name)

Search the DTD for the description of this element

dtd: a pointer to the DtD to search
name: the element name
Returns: the xmlElementPtr if found or NULL

xmlGetDtdNotationDesc ()

xmlNotationPtr	xmlGetDtdNotationDesc	(xmlDtdPtr dtd, 
const xmlChar * name)

Search the DTD for the description of this notation

dtd: a pointer to the DtD to search
name: the notation name
Returns: the xmlNotationPtr if found or NULL

xmlGetDtdQAttrDesc ()

xmlAttributePtr	xmlGetDtdQAttrDesc	(xmlDtdPtr dtd, 
const xmlChar * elem,
const xmlChar * name,
const xmlChar * prefix)

Search the DTD for the description of this qualified attribute on this element.

dtd: a pointer to the DtD to search
elem: the element name
name: the attribute name
prefix: the attribute namespace prefix
Returns: the xmlAttributePtr if found or NULL

xmlGetDtdQElementDesc ()

xmlElementPtr	xmlGetDtdQElementDesc	(xmlDtdPtr dtd, 
const xmlChar * name,
const xmlChar * prefix)

Search the DTD for the description of this element

dtd: a pointer to the DtD to search
name: the element name
prefix: the element namespace prefix
Returns: the xmlElementPtr if found or NULL

xmlGetID ()

xmlAttrPtr	xmlGetID		(xmlDocPtr doc, 
const xmlChar * ID)

Search the attribute declaring the given ID

doc: pointer to the document
ID: the ID value
Returns: NULL if not found, otherwise the xmlAttrPtr defining the ID

xmlGetRefs ()

xmlListPtr	xmlGetRefs		(xmlDocPtr doc, 
const xmlChar * ID)

DEPRECATED, do not use. This function will be removed from the public API. Find the set of references for the supplied ID.

doc: pointer to the document
ID: the ID value
Returns: NULL if not found, otherwise node set for the ID.

xmlIsID ()

int	xmlIsID			(xmlDocPtr doc, 
xmlNodePtr elem,
xmlAttrPtr attr)

Determine whether an attribute is of type ID. In case we have DTD(s) then this is done if DTD loading has been requested. In the case of HTML documents parsed with the HTML parser, then ID detection is done systematically.

doc: the document
elem: the element carrying the attribute
attr: the attribute
Returns: 0 or 1 depending on the lookup result

xmlIsMixedElement ()

int	xmlIsMixedElement		(xmlDocPtr doc, 
const xmlChar * name)

Search in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs

doc: the document
name: the element name
Returns: 0 if no, 1 if yes, and -1 if no element description is available

xmlIsRef ()

int	xmlIsRef			(xmlDocPtr doc, 
xmlNodePtr elem,
xmlAttrPtr attr)

DEPRECATED, do not use. This function will be removed from the public API. Determine whether an attribute is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase).

doc: the document
elem: the element carrying the attribute
attr: the attribute
Returns: 0 or 1 depending on the lookup result

xmlNewDocElementContent ()

xmlElementContentPtr	xmlNewDocElementContent	(xmlDocPtr doc, 
const xmlChar * name,
xmlElementContentType type)

Allocate an element content structure for the document.

doc: the document
name: the subelement name or NULL
type: the type of element content decl
Returns: NULL if not, otherwise the new element content structure

xmlNewElementContent ()

xmlElementContentPtr	xmlNewElementContent	(const xmlChar * name, 
xmlElementContentType type)

Allocate an element content structure. Deprecated in favor of xmlNewDocElementContent

name: the subelement name or NULL
type: the type of element content decl
Returns: NULL if not, otherwise the new element content structure

xmlNewValidCtxt ()

xmlValidCtxtPtr	xmlNewValidCtxt		(void)

Allocate a validation context structure.

Returns: NULL if not, otherwise the new validation context structure

xmlRemoveID ()

int	xmlRemoveID			(xmlDocPtr doc, 
xmlAttrPtr attr)

Remove the given attribute from the ID table maintained internally.

doc: the document
attr: the attribute
Returns: -1 if the lookup failed and 0 otherwise

xmlRemoveRef ()

int	xmlRemoveRef			(xmlDocPtr doc, 
xmlAttrPtr attr)

DEPRECATED, do not use. This function will be removed from the public API. Remove the given attribute from the Ref table maintained internally.

doc: the document
attr: the attribute
Returns: -1 if the lookup failed and 0 otherwise

xmlSnprintfElementContent ()

void	xmlSnprintfElementContent	(char * buf, 
int size,
xmlElementContentPtr content,
int englob)

This will dump the content of the element content definition Intended just for the debug routine

buf: an output buffer
size: the buffer size
content: An element table
englob: 1 if one must print the englobing parenthesis, 0 otherwise

xmlSprintfElementContent ()

void	xmlSprintfElementContent	(char * buf, 
xmlElementContentPtr content,
int englob)

Deprecated, unsafe, use xmlSnprintfElementContent

buf: an output buffer
content: An element table
englob: 1 if one must print the englobing parenthesis, 0 otherwise

xmlValidBuildContentModel ()

int	xmlValidBuildContentModel	(xmlValidCtxtPtr ctxt, 
xmlElementPtr elem)

(Re)Build the automata associated to the content model of this element

ctxt: a validation context
elem: an element declaration node
Returns: 1 in case of success, 0 in case of error

xmlValidCtxtNormalizeAttributeValue ()

xmlChar *	xmlValidCtxtNormalizeAttributeValue	(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * name,
const xmlChar * value)

Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly

ctxt: the validation context or NULL
doc: the document
elem: the parent
name: the attribute name
value: the attribute value
Returns: a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.

xmlValidGetPotentialChildren ()

int	xmlValidGetPotentialChildren	(xmlElementContent * ctree, 
const xmlChar ** names,
int * len,
int max)

Build/extend a list of potential children allowed by the content tree

ctree: an element content tree
names: an array to store the list of child names
len: a pointer to the number of element in the list
max: the size of the array
Returns: the number of element in the list, or -1 in case of error.

xmlValidGetValidElements ()

int	xmlValidGetValidElements	(xmlNode * prev, 
xmlNode * next,
const xmlChar ** names,
int max)

This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node->prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node->next, ... to replace 'node': xmlValidGetValidElements(node->prev, node->next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs, to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.

prev: an element to insert after
next: an element to insert next
names: an array to store the list of child names
max: the size of the array
Returns: the number of element in the list, or -1 in case of error. If the function returns the value @max the caller is invited to grow the receiving array and retry.

xmlValidNormalizeAttributeValue ()

xmlChar *	xmlValidNormalizeAttributeValue	(xmlDocPtr doc, 
xmlNodePtr elem,
const xmlChar * name,
const xmlChar * value)

Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character.

doc: the document
elem: the parent
name: the attribute name
value: the attribute value
Returns: a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.

xmlValidateAttributeDecl ()

int	xmlValidateAttributeDecl	(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlAttributePtr attr)

Try to validate a single attribute definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Default Legal ] - [ VC: Enumeration ] - [ VC: ID Attribute Default ] The ID/IDREF uniqueness and matching are done separately

ctxt: the validation context
doc: a document instance
attr: an attribute definition
Returns: 1 if valid or 0 otherwise

xmlValidateAttributeValue ()

int	xmlValidateAttributeValue	(xmlAttributeType type, 
const xmlChar * value)

Validate that the given attribute value match the proper production [ VC: ID ] Values of type ID must match the Name production.... [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names ... [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names ... [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.

type: an attribute type
value: an attribute value
Returns: 1 if valid or 0 otherwise

xmlValidateDocument ()

int	xmlValidateDocument		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)

Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree.

ctxt: the validation context
doc: a document instance
Returns: 1 if valid or 0 otherwise

xmlValidateDocumentFinal ()

int	xmlValidateDocumentFinal	(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)

Does the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec Check all the IDREF/IDREFS attributes definition for validity

ctxt: the validation context
doc: a document instance
Returns: 1 if valid or 0 otherwise

xmlValidateDtd ()

int	xmlValidateDtd			(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlDtdPtr dtd)

Try to validate the document against the dtd instance Basically it does check all the definitions in the DtD. Note the the internal subset (if present) is de-coupled (i.e. not used), which could give problems if ID or IDREF is present.

ctxt: the validation context
doc: a document instance
dtd: a dtd instance
Returns: 1 if valid or 0 otherwise

xmlValidateDtdFinal ()

int	xmlValidateDtdFinal		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)

Does the final step for the dtds validation once all the subsets have been parsed basically it does the following checks described by the XML Rec - check that ENTITY and ENTITIES type attributes default or possible values matches one of the defined entities. - check that NOTATION type attributes default or possible values matches one of the defined notations.

ctxt: the validation context
doc: a document instance
Returns: 1 if valid or 0 if invalid and -1 if not well-formed

xmlValidateElement ()

int	xmlValidateElement		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem)

Try to validate the subtree under an element

ctxt: the validation context
doc: a document instance
elem: an element instance
Returns: 1 if valid or 0 otherwise

xmlValidateElementDecl ()

int	xmlValidateElementDecl		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlElementPtr elem)

Try to validate a single element definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: One ID per Element Type ] - [ VC: No Duplicate Types ] - [ VC: Unique Element Type Declaration ]

ctxt: the validation context
doc: a document instance
elem: an element definition
Returns: 1 if valid or 0 otherwise

xmlValidateNameValue ()

int	xmlValidateNameValue		(const xmlChar * value)

Validate that the given value match Name production

value: an Name value
Returns: 1 if valid or 0 otherwise

xmlValidateNamesValue ()

int	xmlValidateNamesValue		(const xmlChar * value)

Validate that the given value match Names production

value: an Names value
Returns: 1 if valid or 0 otherwise

xmlValidateNmtokenValue ()

int	xmlValidateNmtokenValue		(const xmlChar * value)

Validate that the given value match Nmtoken production [ VC: Name Token ]

value: an Nmtoken value
Returns: 1 if valid or 0 otherwise

xmlValidateNmtokensValue ()

int	xmlValidateNmtokensValue	(const xmlChar * value)

Validate that the given value match Nmtokens production [ VC: Name Token ]

value: an Nmtokens value
Returns: 1 if valid or 0 otherwise

xmlValidateNotationDecl ()

int	xmlValidateNotationDecl		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNotationPtr nota)

Try to validate a single notation definition basically it does the following checks as described by the XML-1.0 recommendation: - it seems that no validity constraint exists on notation declarations But this function get called anyway ...

ctxt: the validation context
doc: a document instance
nota: a notation definition
Returns: 1 if valid or 0 otherwise

xmlValidateNotationUse ()

int	xmlValidateNotationUse		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
const xmlChar * notationName)

Validate that the given name match a notation declaration. - [ VC: Notation Declared ]

ctxt: the validation context
doc: the document
notationName: the notation name to check
Returns: 1 if valid or 0 otherwise

xmlValidateOneAttribute ()

int	xmlValidateOneAttribute		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr,
const xmlChar * value)

Try to validate a single attribute for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately

ctxt: the validation context
doc: a document instance
elem: an element instance
attr: an attribute instance
value: the attribute value (without entities processing)
Returns: 1 if valid or 0 otherwise

xmlValidateOneElement ()

int	xmlValidateOneElement		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem)

Try to validate a single element and it's attributes, basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC: Required Attribute ] Then call xmlValidateOneAttribute() for each attribute present. The ID/IDREF checkings are done separately

ctxt: the validation context
doc: a document instance
elem: an element instance
Returns: 1 if valid or 0 otherwise

xmlValidateOneNamespace ()

int	xmlValidateOneNamespace		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * prefix,
xmlNsPtr ns,
const xmlChar * value)

Try to validate a single namespace declaration for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately

ctxt: the validation context
doc: a document instance
elem: an element instance
prefix: the namespace prefix
ns: an namespace declaration instance
value: the attribute value (without entities processing)
Returns: 1 if valid or 0 otherwise

xmlValidatePopElement ()

int	xmlValidatePopElement		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * qname)

Pop the element end from the validation stack.

ctxt: the validation context
doc: a document instance
elem: an element instance
qname: the qualified name as appearing in the serialization
Returns: 1 if no validation problem was found or 0 otherwise

xmlValidatePushCData ()

int	xmlValidatePushCData		(xmlValidCtxtPtr ctxt, 
const xmlChar * data,
int len)

check the CData parsed for validation in the current stack

ctxt: the validation context
data: some character data read
len: the length of the data
Returns: 1 if no validation problem was found or 0 otherwise

xmlValidatePushElement ()

int	xmlValidatePushElement		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * qname)

Push a new element start on the validation stack.

ctxt: the validation context
doc: a document instance
elem: an element instance
qname: the qualified name as appearing in the serialization
Returns: 1 if no validation problem was found or 0 otherwise

xmlValidateRoot ()

int	xmlValidateRoot			(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)

Try to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn't try to recurse or apply other check to the element

ctxt: the validation context
doc: a document instance
Returns: 1 if valid or 0 otherwise

PK!CZ up.pngnu[PNG  IHDRw=bKGD pHYs  ~tIME2.E#IDATx=J@Fo] !+2[Z<@/9|t$D9nnBjBRIsI:H8UPN1fcsN95M㧖ɵ 束1~pEe$I 7nrDf!;`'ykI䲤sI_]y^^I>O>?YBIENDB`PK!Dleft.pngnu[PNG  IHDRw=bKGD pHYs  ~tIME1&[(XIDATx!OPE*ID%~ꊯ"p'ŏ`sܖrKf hmiIz}ܯI.p\`x l?l[,Hk<#c%\AUx[S7n6rzEs1j@NL$ݤi0 5/}\EKIo͓$a0jdFbkIAh>WlC'?tk;|/t*INZ^`y4Nr]׮ J<ڐt`X1@p䀸dZ')hK $V?%]+LsgUK"w53OIENDB`PK!Eybyblibxml2-xpointer.htmlnu[ xpointer: API to handle XML Pointers

xpointer

xpointer - API to handle XML Pointers

API to handle XML Pointers Base implementation was made accordingly to W3C Candidate Recommendation 7 June 2000

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlLocationSet xmlLocationSet;
typedef xmlLocationSet * xmlLocationSetPtr;
xmlNodePtr	xmlXPtrBuildNodeList	(xmlXPathObjectPtr obj);
xmlXPathObjectPtr	xmlXPtrEval	(const xmlChar * str, 
xmlXPathContextPtr ctx); void xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt); void xmlXPtrFreeLocationSet (xmlLocationSetPtr obj); void xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
xmlXPathObjectPtr val); xmlLocationSetPtr xmlXPtrLocationSetCreate (xmlXPathObjectPtr val); void xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
xmlXPathObjectPtr val); xmlLocationSetPtr xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
xmlLocationSetPtr val2); void xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
int val); xmlXPathObjectPtr xmlXPtrNewCollapsedRange (xmlNodePtr start); xmlXPathContextPtr xmlXPtrNewContext (xmlDocPtr doc,
xmlNodePtr here,
xmlNodePtr origin); xmlXPathObjectPtr xmlXPtrNewLocationSetNodeSet (xmlNodeSetPtr set); xmlXPathObjectPtr xmlXPtrNewLocationSetNodes (xmlNodePtr start,
xmlNodePtr end); xmlXPathObjectPtr xmlXPtrNewRange (xmlNodePtr start,
int startindex,
xmlNodePtr end,
int endindex); xmlXPathObjectPtr xmlXPtrNewRangeNodeObject (xmlNodePtr start,
xmlXPathObjectPtr end); xmlXPathObjectPtr xmlXPtrNewRangeNodePoint (xmlNodePtr start,
xmlXPathObjectPtr end); xmlXPathObjectPtr xmlXPtrNewRangeNodes (xmlNodePtr start,
xmlNodePtr end); xmlXPathObjectPtr xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
xmlNodePtr end); xmlXPathObjectPtr xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
xmlXPathObjectPtr end); void xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
int nargs); xmlXPathObjectPtr xmlXPtrWrapLocationSet (xmlLocationSetPtr val);

Description

Details

Structure xmlLocationSet

struct _xmlLocationSet {
    int	locNr	: number of locations in the set
    int	locMax	: size of the array as allocated
    xmlXPathObjectPtr *	locTab	: array of locations
} xmlLocationSet;


Typedef xmlLocationSetPtr

xmlLocationSet * xmlLocationSetPtr;


xmlXPtrBuildNodeList ()

xmlNodePtr	xmlXPtrBuildNodeList	(xmlXPathObjectPtr obj)

Build a node list tree copy of the XPointer result. This will drop Attributes and Namespace declarations.

obj: the XPointer result from the evaluation.
Returns: an xmlNodePtr list or NULL. the caller has to free the node tree.

xmlXPtrEval ()

xmlXPathObjectPtr	xmlXPtrEval	(const xmlChar * str, 
xmlXPathContextPtr ctx)

Evaluate the XPath Location Path in the given context.

str: the XPointer expression
ctx: the XPointer context
Returns: the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

xmlXPtrEvalRangePredicate ()

void	xmlXPtrEvalRangePredicate	(xmlXPathParserContextPtr ctxt)

[8] Predicate ::= '[' PredicateExpr ']' [9] PredicateExpr ::= Expr Evaluate a predicate as in xmlXPathEvalPredicate() but for a Location Set instead of a node set

ctxt: the XPointer Parser context

xmlXPtrFreeLocationSet ()

void	xmlXPtrFreeLocationSet		(xmlLocationSetPtr obj)

Free the LocationSet compound (not the actual ranges !).

obj: the xmlLocationSetPtr to free

xmlXPtrLocationSetAdd ()

void	xmlXPtrLocationSetAdd		(xmlLocationSetPtr cur, 
xmlXPathObjectPtr val)

add a new xmlXPathObjectPtr to an existing LocationSet If the location already exist in the set @val is freed.

cur: the initial range set
val: a new xmlXPathObjectPtr

xmlXPtrLocationSetCreate ()

xmlLocationSetPtr	xmlXPtrLocationSetCreate	(xmlXPathObjectPtr val)

Create a new xmlLocationSetPtr of type double and of value @val

val: an initial xmlXPathObjectPtr, or NULL
Returns: the newly created object.

xmlXPtrLocationSetDel ()

void	xmlXPtrLocationSetDel		(xmlLocationSetPtr cur, 
xmlXPathObjectPtr val)

Removes an xmlXPathObjectPtr from an existing LocationSet

cur: the initial range set
val: an xmlXPathObjectPtr

xmlXPtrLocationSetMerge ()

xmlLocationSetPtr	xmlXPtrLocationSetMerge	(xmlLocationSetPtr val1, 
xmlLocationSetPtr val2)

Merges two rangesets, all ranges from @val2 are added to @val1

val1: the first LocationSet
val2: the second LocationSet
Returns: val1 once extended or NULL in case of error.

xmlXPtrLocationSetRemove ()

void	xmlXPtrLocationSetRemove	(xmlLocationSetPtr cur, 
int val)

Removes an entry from an existing LocationSet list.

cur: the initial range set
val: the index to remove

xmlXPtrNewCollapsedRange ()

xmlXPathObjectPtr	xmlXPtrNewCollapsedRange	(xmlNodePtr start)

Create a new xmlXPathObjectPtr of type range using a single nodes

start: the starting and ending node
Returns: the newly created object.

xmlXPtrNewContext ()

xmlXPathContextPtr	xmlXPtrNewContext	(xmlDocPtr doc, 
xmlNodePtr here,
xmlNodePtr origin)

Create a new XPointer context

doc: the XML document
here: the node that directly contains the XPointer being evaluated or NULL
origin: the element from which a user or program initiated traversal of the link, or NULL.
Returns: the xmlXPathContext just allocated.

xmlXPtrNewLocationSetNodeSet ()

xmlXPathObjectPtr	xmlXPtrNewLocationSetNodeSet	(xmlNodeSetPtr set)

Create a new xmlXPathObjectPtr of type LocationSet and initialize it with all the nodes from @set

set: a node set
Returns: the newly created object.

xmlXPtrNewLocationSetNodes ()

xmlXPathObjectPtr	xmlXPtrNewLocationSetNodes	(xmlNodePtr start, 
xmlNodePtr end)

Create a new xmlXPathObjectPtr of type LocationSet and initialize it with the single range made of the two nodes @start and @end

start: the start NodePtr value
end: the end NodePtr value or NULL
Returns: the newly created object.

xmlXPtrNewRange ()

xmlXPathObjectPtr	xmlXPtrNewRange	(xmlNodePtr start, 
int startindex,
xmlNodePtr end,
int endindex)

Create a new xmlXPathObjectPtr of type range

start: the starting node
startindex: the start index
end: the ending point
endindex: the ending index
Returns: the newly created object.

xmlXPtrNewRangeNodeObject ()

xmlXPathObjectPtr	xmlXPtrNewRangeNodeObject	(xmlNodePtr start, 
xmlXPathObjectPtr end)

Create a new xmlXPathObjectPtr of type range from a not to an object

start: the starting node
end: the ending object
Returns: the newly created object.

xmlXPtrNewRangeNodePoint ()

xmlXPathObjectPtr	xmlXPtrNewRangeNodePoint	(xmlNodePtr start, 
xmlXPathObjectPtr end)

Create a new xmlXPathObjectPtr of type range from a node to a point

start: the starting node
end: the ending point
Returns: the newly created object.

xmlXPtrNewRangeNodes ()

xmlXPathObjectPtr	xmlXPtrNewRangeNodes	(xmlNodePtr start, 
xmlNodePtr end)

Create a new xmlXPathObjectPtr of type range using 2 nodes

start: the starting node
end: the ending node
Returns: the newly created object.

xmlXPtrNewRangePointNode ()

xmlXPathObjectPtr	xmlXPtrNewRangePointNode	(xmlXPathObjectPtr start, 
xmlNodePtr end)

Create a new xmlXPathObjectPtr of type range from a point to a node

start: the starting point
end: the ending node
Returns: the newly created object.

xmlXPtrNewRangePoints ()

xmlXPathObjectPtr	xmlXPtrNewRangePoints	(xmlXPathObjectPtr start, 
xmlXPathObjectPtr end)

Create a new xmlXPathObjectPtr of type range using 2 Points

start: the starting point
end: the ending point
Returns: the newly created object.

xmlXPtrRangeToFunction ()

void	xmlXPtrRangeToFunction		(xmlXPathParserContextPtr ctxt, 
int nargs)

Implement the range-to() XPointer function Obsolete. range-to is not a real function but a special type of location step which is handled in xpath.c.

ctxt: the XPointer Parser context
nargs: the number of args

xmlXPtrWrapLocationSet ()

xmlXPathObjectPtr	xmlXPtrWrapLocationSet	(xmlLocationSetPtr val)

Wrap the LocationSet @val in a new xmlXPathObjectPtr

val: the LocationSet value
Returns: the newly created object.

PK!Elibxml2-tree.htmlnu[ tree: interfaces for tree manipulation

tree

tree - interfaces for tree manipulation

this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree

Author(s): Daniel Veillard

Synopsis

#define BASE_BUFFER_SIZE;
#define LIBXML2_NEW_BUFFER;
#define XML_DOCB_DOCUMENT_NODE;
#define XML_GET_CONTENT;
#define XML_GET_LINE;
#define XML_LOCAL_NAMESPACE;
#define XML_XML_ID;
#define XML_XML_NAMESPACE;
#define xmlChildrenNode;
#define xmlRootNode;
typedef struct _xmlAttr xmlAttr;
typedef xmlAttr * xmlAttrPtr;
typedef struct _xmlAttribute xmlAttribute;
typedef enum xmlAttributeDefault;
typedef xmlAttribute * xmlAttributePtr;
typedef enum xmlAttributeType;
typedef struct _xmlBuf xmlBuf;
typedef xmlBuf * xmlBufPtr;
typedef struct _xmlBuffer xmlBuffer;
typedef enum xmlBufferAllocationScheme;
typedef xmlBuffer * xmlBufferPtr;
typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
typedef xmlDOMWrapCtxt * xmlDOMWrapCtxtPtr;
typedef struct _xmlDoc xmlDoc;
typedef enum xmlDocProperties;
typedef xmlDoc * xmlDocPtr;
typedef struct _xmlDtd xmlDtd;
typedef xmlDtd * xmlDtdPtr;
typedef struct _xmlElement xmlElement;
typedef struct _xmlElementContent xmlElementContent;
typedef enum xmlElementContentOccur;
typedef xmlElementContent * xmlElementContentPtr;
typedef enum xmlElementContentType;
typedef xmlElement * xmlElementPtr;
typedef enum xmlElementType;
typedef enum xmlElementTypeVal;
typedef struct _xmlEntity xmlEntity;
typedef xmlEntity * xmlEntityPtr;
typedef struct _xmlEnumeration xmlEnumeration;
typedef xmlEnumeration * xmlEnumerationPtr;
typedef struct _xmlID xmlID;
typedef xmlID * xmlIDPtr;
typedef struct _xmlNode xmlNode;
typedef xmlNode * xmlNodePtr;
typedef struct _xmlNotation xmlNotation;
typedef xmlNotation * xmlNotationPtr;
typedef struct _xmlNs xmlNs;
typedef xmlNs * xmlNsPtr;
typedef xmlElementType xmlNsType;
typedef struct _xmlOutputBuffer xmlOutputBuffer;
typedef xmlOutputBuffer * xmlOutputBufferPtr;
typedef struct _xmlParserCtxt xmlParserCtxt;
typedef xmlParserCtxt * xmlParserCtxtPtr;
typedef struct _xmlParserInput xmlParserInput;
typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
typedef xmlParserInputBuffer * xmlParserInputBufferPtr;
typedef xmlParserInput * xmlParserInputPtr;
typedef struct _xmlRef xmlRef;
typedef xmlRef * xmlRefPtr;
typedef struct _xmlSAXHandler xmlSAXHandler;
typedef xmlSAXHandler * xmlSAXHandlerPtr;
typedef struct _xmlSAXLocator xmlSAXLocator;
typedef xmlSAXLocator * xmlSAXLocatorPtr;
xmlNodePtr	xmlAddChild		(xmlNodePtr parent, 
xmlNodePtr cur); xmlNodePtr xmlAddChildList (xmlNodePtr parent,
xmlNodePtr cur); xmlNodePtr xmlAddNextSibling (xmlNodePtr cur,
xmlNodePtr elem); xmlNodePtr xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem); xmlNodePtr xmlAddSibling (xmlNodePtr cur,
xmlNodePtr elem); void xmlAttrSerializeTxtContent (xmlBufferPtr buf,
xmlDocPtr doc,
xmlAttrPtr attr,
const xmlChar * string); xmlChar * xmlBufContent (const xmlBuf * buf); xmlChar * xmlBufEnd (xmlBufPtr buf); int xmlBufGetNodeContent (xmlBufPtr buf,
const xmlNode * cur); size_t xmlBufNodeDump (xmlBufPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format); size_t xmlBufShrink (xmlBufPtr buf,
size_t len); size_t xmlBufUse (const xmlBufPtr buf); int xmlBufferAdd (xmlBufferPtr buf,
const xmlChar * str,
int len); int xmlBufferAddHead (xmlBufferPtr buf,
const xmlChar * str,
int len); int xmlBufferCCat (xmlBufferPtr buf,
const char * str); int xmlBufferCat (xmlBufferPtr buf,
const xmlChar * str); const xmlChar * xmlBufferContent (const xmlBuffer * buf); xmlBufferPtr xmlBufferCreate (void); xmlBufferPtr xmlBufferCreateSize (size_t size); xmlBufferPtr xmlBufferCreateStatic (void * mem,
size_t size); xmlChar * xmlBufferDetach (xmlBufferPtr buf); int xmlBufferDump (FILE * file,
xmlBufferPtr buf); void xmlBufferEmpty (xmlBufferPtr buf); void xmlBufferFree (xmlBufferPtr buf); int xmlBufferGrow (xmlBufferPtr buf,
unsigned int len); int xmlBufferLength (const xmlBuffer * buf); int xmlBufferResize (xmlBufferPtr buf,
unsigned int size); void xmlBufferSetAllocationScheme (xmlBufferPtr buf,
xmlBufferAllocationScheme scheme); int xmlBufferShrink (xmlBufferPtr buf,
unsigned int len); void xmlBufferWriteCHAR (xmlBufferPtr buf,
const xmlChar * string); void xmlBufferWriteChar (xmlBufferPtr buf,
const char * string); void xmlBufferWriteQuotedString (xmlBufferPtr buf,
const xmlChar * string); xmlChar * xmlBuildQName (const xmlChar * ncname,
const xmlChar * prefix,
xmlChar * memory,
int len); unsigned long xmlChildElementCount (xmlNodePtr parent); xmlDocPtr xmlCopyDoc (xmlDocPtr doc,
int recursive); xmlDtdPtr xmlCopyDtd (xmlDtdPtr dtd); xmlNsPtr xmlCopyNamespace (xmlNsPtr cur); xmlNsPtr xmlCopyNamespaceList (xmlNsPtr cur); xmlNodePtr xmlCopyNode (xmlNodePtr node,
int extended); xmlNodePtr xmlCopyNodeList (xmlNodePtr node); xmlAttrPtr xmlCopyProp (xmlNodePtr target,
xmlAttrPtr cur); xmlAttrPtr xmlCopyPropList (xmlNodePtr target,
xmlAttrPtr cur); xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc,
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID); typedef xmlNsPtr xmlDOMWrapAcquireNsFunction (xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr node,
const xmlChar * nsName,
const xmlChar * nsPrefix); int xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int options); int xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlNodePtr * resNode,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int deep,
int options); void xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt); xmlDOMWrapCtxtPtr xmlDOMWrapNewCtxt (void); int xmlDOMWrapReconcileNamespaces (xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr elem,
int options); int xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr node,
int options); xmlNodePtr xmlDocCopyNode (xmlNodePtr node,
xmlDocPtr doc,
int extended); xmlNodePtr xmlDocCopyNodeList (xmlDocPtr doc,
xmlNodePtr node); int xmlDocDump (FILE * f,
xmlDocPtr cur); void xmlDocDumpFormatMemory (xmlDocPtr cur,
xmlChar ** mem,
int * size,
int format); void xmlDocDumpFormatMemoryEnc (xmlDocPtr out_doc,
xmlChar ** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding,
int format); void xmlDocDumpMemory (xmlDocPtr cur,
xmlChar ** mem,
int * size); void xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar ** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding); int xmlDocFormatDump (FILE * f,
xmlDocPtr cur,
int format); xmlNodePtr xmlDocGetRootElement (const xmlDoc * doc); xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root); void xmlElemDump (FILE * f,
xmlDocPtr doc,
xmlNodePtr cur); xmlNodePtr xmlFirstElementChild (xmlNodePtr parent); void xmlFreeDoc (xmlDocPtr cur); void xmlFreeDtd (xmlDtdPtr cur); void xmlFreeNode (xmlNodePtr cur); void xmlFreeNodeList (xmlNodePtr cur); void xmlFreeNs (xmlNsPtr cur); void xmlFreeNsList (xmlNsPtr cur); void xmlFreeProp (xmlAttrPtr cur); void xmlFreePropList (xmlAttrPtr cur); xmlBufferAllocationScheme xmlGetBufferAllocationScheme (void); int xmlGetCompressMode (void); int xmlGetDocCompressMode (const xmlDoc * doc); xmlDtdPtr xmlGetIntSubset (const xmlDoc * doc); xmlNodePtr xmlGetLastChild (const xmlNode * parent); long xmlGetLineNo (const xmlNode * node); xmlChar * xmlGetNoNsProp (const xmlNode * node,
const xmlChar * name); xmlChar * xmlGetNodePath (const xmlNode * node); xmlNsPtr * xmlGetNsList (const xmlDoc * doc,
const xmlNode * node); xmlChar * xmlGetNsProp (const xmlNode * node,
const xmlChar * name,
const xmlChar * nameSpace); xmlChar * xmlGetProp (const xmlNode * node,
const xmlChar * name); xmlAttrPtr xmlHasNsProp (const xmlNode * node,
const xmlChar * name,
const xmlChar * nameSpace); xmlAttrPtr xmlHasProp (const xmlNode * node,
const xmlChar * name); int xmlIsBlankNode (const xmlNode * node); int xmlIsXHTML (const xmlChar * systemID,
const xmlChar * publicID); xmlNodePtr xmlLastElementChild (xmlNodePtr parent); xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc,
const xmlChar * content,
int len); xmlNodePtr xmlNewCharRef (xmlDocPtr doc,
const xmlChar * name); xmlNodePtr xmlNewChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content); xmlNodePtr xmlNewComment (const xmlChar * content); xmlDocPtr xmlNewDoc (const xmlChar * version); xmlNodePtr xmlNewDocComment (xmlDocPtr doc,
const xmlChar * content); xmlNodePtr xmlNewDocFragment (xmlDocPtr doc); xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content); xmlNodePtr xmlNewDocNodeEatName (xmlDocPtr doc,
xmlNsPtr ns,
xmlChar * name,
const xmlChar * content); xmlNodePtr xmlNewDocPI (xmlDocPtr doc,
const xmlChar * name,
const xmlChar * content); xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
const xmlChar * name,
const xmlChar * value); xmlNodePtr xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content); xmlNodePtr xmlNewDocText (const xmlDoc * doc,
const xmlChar * content); xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc,
const xmlChar * content,
int len); xmlDtdPtr xmlNewDtd (xmlDocPtr doc,
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID); xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc,
const xmlChar * href,
const xmlChar * prefix); xmlNodePtr xmlNewNode (xmlNsPtr ns,
const xmlChar * name); xmlNodePtr xmlNewNodeEatName (xmlNsPtr ns,
xmlChar * name); xmlNsPtr xmlNewNs (xmlNodePtr node,
const xmlChar * href,
const xmlChar * prefix); xmlAttrPtr xmlNewNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * value); xmlAttrPtr xmlNewNsPropEatName (xmlNodePtr node,
xmlNsPtr ns,
xmlChar * name,
const xmlChar * value); xmlNodePtr xmlNewPI (const xmlChar * name,
const xmlChar * content); xmlAttrPtr xmlNewProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * value); xmlNodePtr xmlNewReference (const xmlDoc * doc,
const xmlChar * name); xmlNodePtr xmlNewText (const xmlChar * content); xmlNodePtr xmlNewTextChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content); xmlNodePtr xmlNewTextLen (const xmlChar * content,
int len); xmlNodePtr xmlNextElementSibling (xmlNodePtr node); void xmlNodeAddContent (xmlNodePtr cur,
const xmlChar * content); void xmlNodeAddContentLen (xmlNodePtr cur,
const xmlChar * content,
int len); int xmlNodeBufGetContent (xmlBufferPtr buffer,
const xmlNode * cur); int xmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format); void xmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format,
const char * encoding); xmlChar * xmlNodeGetBase (const xmlDoc * doc,
const xmlNode * cur); xmlChar * xmlNodeGetContent (const xmlNode * cur); xmlChar * xmlNodeGetLang (const xmlNode * cur); int xmlNodeGetSpacePreserve (const xmlNode * cur); int xmlNodeIsText (const xmlNode * node); xmlChar * xmlNodeListGetRawString (const xmlDoc * doc,
const xmlNode * list,
int inLine); xmlChar * xmlNodeListGetString (xmlDocPtr doc,
const xmlNode * list,
int inLine); void xmlNodeSetBase (xmlNodePtr cur,
const xmlChar * uri); void xmlNodeSetContent (xmlNodePtr cur,
const xmlChar * content); void xmlNodeSetContentLen (xmlNodePtr cur,
const xmlChar * content,
int len); void xmlNodeSetLang (xmlNodePtr cur,
const xmlChar * lang); void xmlNodeSetName (xmlNodePtr cur,
const xmlChar * name); void xmlNodeSetSpacePreserve (xmlNodePtr cur,
int val); xmlNodePtr xmlPreviousElementSibling (xmlNodePtr node); int xmlReconciliateNs (xmlDocPtr doc,
xmlNodePtr tree); int xmlRemoveProp (xmlAttrPtr cur); xmlNodePtr xmlReplaceNode (xmlNodePtr old,
xmlNodePtr cur); int xmlSaveFile (const char * filename,
xmlDocPtr cur); int xmlSaveFileEnc (const char * filename,
xmlDocPtr cur,
const char * encoding); int xmlSaveFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char * encoding); int xmlSaveFormatFile (const char * filename,
xmlDocPtr cur,
int format); int xmlSaveFormatFileEnc (const char * filename,
xmlDocPtr cur,
const char * encoding,
int format); int xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char * encoding,
int format); xmlNsPtr xmlSearchNs (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar * nameSpace); xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar * href); void xmlSetBufferAllocationScheme (xmlBufferAllocationScheme scheme); void xmlSetCompressMode (int mode); void xmlSetDocCompressMode (xmlDocPtr doc,
int mode); void xmlSetListDoc (xmlNodePtr list,
xmlDocPtr doc); void xmlSetNs (xmlNodePtr node,
xmlNsPtr ns); xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * value); xmlAttrPtr xmlSetProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * value); void xmlSetTreeDoc (xmlNodePtr tree,
xmlDocPtr doc); xmlChar * xmlSplitQName2 (const xmlChar * name,
xmlChar ** prefix); const xmlChar * xmlSplitQName3 (const xmlChar * name,
int * len); xmlNodePtr xmlStringGetNodeList (const xmlDoc * doc,
const xmlChar * value); xmlNodePtr xmlStringLenGetNodeList (const xmlDoc * doc,
const xmlChar * value,
int len); int xmlTextConcat (xmlNodePtr node,
const xmlChar * content,
int len); xmlNodePtr xmlTextMerge (xmlNodePtr first,
xmlNodePtr second); void xmlUnlinkNode (xmlNodePtr cur); int xmlUnsetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar * name); int xmlUnsetProp (xmlNodePtr node,
const xmlChar * name); int xmlValidateNCName (const xmlChar * value,
int space); int xmlValidateNMToken (const xmlChar * value,
int space); int xmlValidateName (const xmlChar * value,
int space); int xmlValidateQName (const xmlChar * value,
int space);

Description

Details

Macro BASE_BUFFER_SIZE

#define BASE_BUFFER_SIZE;

default buffer size 4000.


Macro LIBXML2_NEW_BUFFER

#define LIBXML2_NEW_BUFFER;

Macro used to express that the API use the new buffers for xmlParserInputBuffer and xmlOutputBuffer. The change was introduced in 2.9.0.


Macro XML_DOCB_DOCUMENT_NODE

#define XML_DOCB_DOCUMENT_NODE;


Macro XML_GET_CONTENT

#define XML_GET_CONTENT;

Macro to extract the content pointer of a node.


Macro XML_GET_LINE

#define XML_GET_LINE;

Macro to extract the line number of an element node.


Macro XML_LOCAL_NAMESPACE

#define XML_LOCAL_NAMESPACE;

A namespace declaration node.


Macro XML_XML_ID

#define XML_XML_ID;

This is the name for the special xml:id attribute


Macro XML_XML_NAMESPACE

#define XML_XML_NAMESPACE;

This is the namespace for the special xml: prefix predefined in the XML Namespace specification.


Macro xmlChildrenNode

#define xmlChildrenNode;

Macro for compatibility naming layer with libxml1. Maps to "children."


Macro xmlRootNode

#define xmlRootNode;

Macro for compatibility naming layer with libxml1. Maps to "children".


Structure xmlAttr

struct _xmlAttr {
    void *	_private	: application data
    xmlElementType	type	: XML_ATTRIBUTE_NODE, must be second !
    const xmlChar *	name	: the name of the property
    struct _xmlNode *	children	: the value of the property
    struct _xmlNode *	last	: NULL
    struct _xmlNode *	parent	: child->parent link
    struct _xmlAttr *	next	: next sibling link
    struct _xmlAttr *	prev	: previous sibling link
    struct _xmlDoc *	doc	: the containing document
    xmlNs *	ns	: pointer to the associated namespace
    xmlAttributeType	atype	: the attribute type if validating
    void *	psvi	: for type/PSVI information
} xmlAttr;


Typedef xmlAttrPtr

xmlAttr * xmlAttrPtr;


Structure xmlAttribute

struct _xmlAttribute {
    void *	_private	: application data
    xmlElementType	type	: XML_ATTRIBUTE_DECL, must be second !
    const xmlChar *	name	: Attribute name
    struct _xmlNode *	children	: NULL
    struct _xmlNode *	last	: NULL
    struct _xmlDtd *	parent	: -> DTD
    struct _xmlNode *	next	: next sibling link
    struct _xmlNode *	prev	: previous sibling link
    struct _xmlDoc *	doc	: the containing document
    struct _xmlAttribute *	nexth	: next in hash table
    xmlAttributeType	atype	: The attribute type
    xmlAttributeDefault	def	: the default
    const xmlChar *	defaultValue	: or the default value
    xmlEnumerationPtr	tree	: or the enumeration tree if any
    const xmlChar *	prefix	: the namespace prefix if any
    const xmlChar *	elem	: Element holding the attribute
} xmlAttribute;



Typedef xmlAttributePtr

xmlAttribute * xmlAttributePtr;



Structure xmlBuf

struct _xmlBuf {
The content of this structure is not made public by the API.
} xmlBuf;


Typedef xmlBufPtr

xmlBuf * xmlBufPtr;

A pointer to a buffer structure, the actual structure internals are not public


Structure xmlBuffer

struct _xmlBuffer {
    xmlChar *	content	: The buffer content UTF8
    unsigned int	use	: The buffer size used
    unsigned int	size	: The buffer size
    xmlBufferAllocationScheme	alloc	: The realloc method
    xmlChar *	contentIO	: in IO mode we may have a different base
} xmlBuffer;


Enum xmlBufferAllocationScheme

enum xmlBufferAllocationScheme {
    XML_BUFFER_ALLOC_DOUBLEIT = 1 /* double each time one need to grow */
    XML_BUFFER_ALLOC_EXACT = 2 /* grow only to the minimal size */
    XML_BUFFER_ALLOC_IMMUTABLE = 3 /* immutable buffer */
    XML_BUFFER_ALLOC_IO = 4 /* special allocation scheme used for I/O */
    XML_BUFFER_ALLOC_HYBRID = 5 /* exact up to a threshold, and doubleit thereafter */
    XML_BUFFER_ALLOC_BOUNDED = 6 /*  limit the upper size of the buffer */
};


Typedef xmlBufferPtr

xmlBuffer * xmlBufferPtr;


Structure xmlDOMWrapCtxt

struct _xmlDOMWrapCtxt {
    void *	_private	: * The type of this context, just in case we need specialized * context
    int	type	: * Internal namespace map used for various operations. *
    void *	namespaceMap	: * Use this one to acquire an xmlNsPtr intended for node->ns. * (Note t
    xmlDOMWrapAcquireNsFunction	getNsForNodeFunc
} xmlDOMWrapCtxt;


Typedef xmlDOMWrapCtxtPtr

xmlDOMWrapCtxt * xmlDOMWrapCtxtPtr;


Structure xmlDoc

struct _xmlDoc {
    void *	_private	: application data
    xmlElementType	type	: XML_DOCUMENT_NODE, must be second !
    char *	name	: name/filename/URI of the document
    struct _xmlNode *	children	: the document tree
    struct _xmlNode *	last	: last child link
    struct _xmlNode *	parent	: child->parent link
    struct _xmlNode *	next	: next sibling link
    struct _xmlNode *	prev	: previous sibling link
    struct _xmlDoc *	doc	: autoreference to itself End of common part
    int	compression	: level of zlib compression
    int	standalone	: standalone document (no external refs) 1 if standalone="yes" 0 if sta
    struct _xmlDtd *	intSubset	: the document internal subset
    struct _xmlDtd *	extSubset	: the document external subset
    struct _xmlNs *	oldNs	: Global namespace, the old way
    const xmlChar *	version	: the XML version string
    const xmlChar *	encoding	: external initial encoding, if any
    void *	ids	: Hash table for ID attributes if any
    void *	refs	: Hash table for IDREFs attributes if any
    const xmlChar *	URL	: The URI for that document
    int	charset	: Internal flag for charset handling, actually an xmlCharEncoding
    struct _xmlDict *	dict	: dict used to allocate names or NULL
    void *	psvi	: for type/PSVI information
    int	parseFlags	: set of xmlParserOption used to parse the document
    int	properties	: set of xmlDocProperties for this document set at the end of parsing
} xmlDoc;


Enum xmlDocProperties

enum xmlDocProperties {
    XML_DOC_WELLFORMED = 1 /* document is XML well formed */
    XML_DOC_NSVALID = 2 /* document is Namespace valid */
    XML_DOC_OLD10 = 4 /* parsed with old XML-1.0 parser */
    XML_DOC_DTDVALID = 8 /* DTD validation was successful */
    XML_DOC_XINCLUDE = 16 /* XInclude substitution was done */
    XML_DOC_USERBUILT = 32 /* Document was built using the API and not by parsing an instance */
    XML_DOC_INTERNAL = 64 /* built for internal processing */
    XML_DOC_HTML = 128 /*  parsed or built HTML document */
};


Typedef xmlDocPtr

xmlDoc * xmlDocPtr;


Structure xmlDtd

struct _xmlDtd {
    void *	_private	: application data
    xmlElementType	type	: XML_DTD_NODE, must be second !
    const xmlChar *	name	: Name of the DTD
    struct _xmlNode *	children	: the value of the property link
    struct _xmlNode *	last	: last child link
    struct _xmlDoc *	parent	: child->parent link
    struct _xmlNode *	next	: next sibling link
    struct _xmlNode *	prev	: previous sibling link
    struct _xmlDoc *	doc	: the containing document End of common part
    void *	notations	: Hash table for notations if any
    void *	elements	: Hash table for elements if any
    void *	attributes	: Hash table for attributes if any
    void *	entities	: Hash table for entities if any
    const xmlChar *	ExternalID	: External identifier for PUBLIC DTD
    const xmlChar *	SystemID	: URI for a SYSTEM or PUBLIC DTD
    void *	pentities	: Hash table for param entities if any
} xmlDtd;


Typedef xmlDtdPtr

xmlDtd * xmlDtdPtr;


Structure xmlElement

struct _xmlElement {
    void *	_private	: application data
    xmlElementType	type	: XML_ELEMENT_DECL, must be second !
    const xmlChar *	name	: Element name
    struct _xmlNode *	children	: NULL
    struct _xmlNode *	last	: NULL
    struct _xmlDtd *	parent	: -> DTD
    struct _xmlNode *	next	: next sibling link
    struct _xmlNode *	prev	: previous sibling link
    struct _xmlDoc *	doc	: the containing document
    xmlElementTypeVal	etype	: The type
    xmlElementContentPtr	content	: the allowed element content
    xmlAttributePtr	attributes	: List of the declared attributes
    const xmlChar *	prefix	: the namespace prefix if any
    xmlRegexpPtr	contModel	: the validating regexp
    void *	contModel
} xmlElement;


Structure xmlElementContent

struct _xmlElementContent {
    xmlElementContentType	type	: PCDATA, ELEMENT, SEQ or OR
    xmlElementContentOccur	ocur	: ONCE, OPT, MULT or PLUS
    const xmlChar *	name	: Element name
    struct _xmlElementContent *	c1	: first child
    struct _xmlElementContent *	c2	: second child
    struct _xmlElementContent *	parent	: parent
    const xmlChar *	prefix	: Namespace prefix
} xmlElementContent;



Typedef xmlElementContentPtr

xmlElementContent * xmlElementContentPtr;



Typedef xmlElementPtr

xmlElement * xmlElementPtr;




Structure xmlEntity

struct _xmlEntity {
    void *	_private	: application data
    xmlElementType	type	: XML_ENTITY_DECL, must be second !
    const xmlChar *	name	: Entity name
    struct _xmlNode *	children	: First child link
    struct _xmlNode *	last	: Last child link
    struct _xmlDtd *	parent	: -> DTD
    struct _xmlNode *	next	: next sibling link
    struct _xmlNode *	prev	: previous sibling link
    struct _xmlDoc *	doc	: the containing document
    xmlChar *	orig	: content without ref substitution
    xmlChar *	content	: content or ndata if unparsed
    int	length	: the content length
    xmlEntityType	etype	: The entity type
    const xmlChar *	ExternalID	: External identifier for PUBLIC
    const xmlChar *	SystemID	: URI for a SYSTEM or PUBLIC Entity
    struct _xmlEntity *	nexte	: unused
    const xmlChar *	URI	: the full URI as computed
    int	owner	: does the entity own the childrens
    int	checked	: was the entity content checked this is also used to count entities *
} xmlEntity;


Typedef xmlEntityPtr

xmlEntity * xmlEntityPtr;


Structure xmlEnumeration

struct _xmlEnumeration {
    struct _xmlEnumeration *	next	: next one
    const xmlChar *	name	: Enumeration name
} xmlEnumeration;


Typedef xmlEnumerationPtr

xmlEnumeration * xmlEnumerationPtr;


Structure xmlID

struct _xmlID {
    struct _xmlID *	next	: next ID
    const xmlChar *	value	: The ID name
    xmlAttrPtr	attr	: The attribute holding it
    const xmlChar *	name	: The attribute if attr is not available
    int	lineno	: The line number if attr is not available
    struct _xmlDoc *	doc	: The document holding the ID
} xmlID;


Typedef xmlIDPtr

xmlID * xmlIDPtr;


Structure xmlNode

struct _xmlNode {
    void *	_private	: application data
    xmlElementType	type	: type number, must be second !
    const xmlChar *	name	: the name of the node, or the entity
    struct _xmlNode *	children	: parent->childs link
    struct _xmlNode *	last	: last child link
    struct _xmlNode *	parent	: child->parent link
    struct _xmlNode *	next	: next sibling link
    struct _xmlNode *	prev	: previous sibling link
    struct _xmlDoc *	doc	: the containing document End of common part
    xmlNs *	ns	: pointer to the associated namespace
    xmlChar *	content	: the content
    struct _xmlAttr *	properties	: properties list
    xmlNs *	nsDef	: namespace definitions on this node
    void *	psvi	: for type/PSVI information
    unsigned short	line	: line number
    unsigned short	extra	: extra data for XPath/XSLT
} xmlNode;


Typedef xmlNodePtr

xmlNode * xmlNodePtr;


Structure xmlNotation

struct _xmlNotation {
    const xmlChar *	name	: Notation name
    const xmlChar *	PublicID	: Public identifier, if any
    const xmlChar *	SystemID	: System identifier, if any
} xmlNotation;


Typedef xmlNotationPtr

xmlNotation * xmlNotationPtr;


Structure xmlNs

struct _xmlNs {
    struct _xmlNs *	next	: next Ns link for this node
    xmlNsType	type	: global or local
    const xmlChar *	href	: URL for the namespace
    const xmlChar *	prefix	: prefix for the namespace
    void *	_private	: application data
    struct _xmlDoc *	context	: normally an xmlDoc
} xmlNs;


Typedef xmlNsPtr

xmlNs * xmlNsPtr;


Typedef xmlNsType

xmlElementType xmlNsType;


Structure xmlOutputBuffer

struct _xmlOutputBuffer {
    void *	context
    xmlOutputWriteCallback	writecallback
    xmlOutputCloseCallback	closecallback
    xmlCharEncodingHandlerPtr	encoder	: I18N conversions to UTF-8
    xmlBufPtr	buffer	: Local buffer encoded in UTF-8 or ISOLatin
    xmlBufPtr	conv	: if encoder != NULL buffer for output
    int	written	: total number of byte written
    int	error
} xmlOutputBuffer;


Typedef xmlOutputBufferPtr

xmlOutputBuffer * xmlOutputBufferPtr;


Structure xmlParserCtxt

struct _xmlParserCtxt {
    struct _xmlSAXHandler *	sax	: The SAX handler
    void *	userData	: For SAX interface only, used by DOM build
    xmlDocPtr	myDoc	: the document being built
    int	wellFormed	: is the document well formed
    int	replaceEntities	: shall we replace entities ?
    const xmlChar *	version	: the XML version string
    const xmlChar *	encoding	: the declared encoding, if any
    int	standalone	: standalone document
    int	html	: an HTML(1) document * 3 is HTML after <head> * 10 is HTML after <body
    xmlParserInputPtr	input	: Current input stream
    int	inputNr	: Number of current input streams
    int	inputMax	: Max number of input streams
    xmlParserInputPtr *	inputTab	: stack of inputs Node analysis stack only used for DOM building
    xmlNodePtr	node	: Current parsed Node
    int	nodeNr	: Depth of the parsing stack
    int	nodeMax	: Max depth of the parsing stack
    xmlNodePtr *	nodeTab	: array of nodes
    int	record_info	: Whether node info should be kept
    xmlParserNodeInfoSeq	node_seq	: info about each node parsed
    int	errNo	: error code
    int	hasExternalSubset	: reference and external subset
    int	hasPErefs	: the internal subset has PE refs
    int	external	: are we parsing an external entity
    int	valid	: is the document valid
    int	validate	: shall we try to validate ?
    xmlValidCtxt	vctxt	: The validity context
    xmlParserInputState	instate	: current type of input
    int	token	: next char look-ahead
    char *	directory	: the data directory Node name stack
    const xmlChar *	name	: Current parsed Node
    int	nameNr	: Depth of the parsing stack
    int	nameMax	: Max depth of the parsing stack
    const xmlChar * *	nameTab	: array of nodes
    long	nbChars	: unused
    long	checkIndex	: used by progressive parsing lookup
    int	keepBlanks	: ugly but ...
    int	disableSAX	: SAX callbacks are disabled
    int	inSubset	: Parsing is in int 1/ext 2 subset
    const xmlChar *	intSubName	: name of subset
    xmlChar *	extSubURI	: URI of external subset
    xmlChar *	extSubSystem	: SYSTEM ID of external subset xml:space values
    int *	space	: Should the parser preserve spaces
    int	spaceNr	: Depth of the parsing stack
    int	spaceMax	: Max depth of the parsing stack
    int *	spaceTab	: array of space infos
    int	depth	: to prevent entity substitution loops
    xmlParserInputPtr	entity	: used to check entities boundaries
    int	charset	: encoding of the in-memory content actually an xmlCharEncoding
    int	nodelen	: Those two fields are there to
    int	nodemem	: Speed up large node parsing
    int	pedantic	: signal pedantic warnings
    void *	_private	: For user data, libxml won't touch it
    int	loadsubset	: should the external subset be loaded
    int	linenumbers	: set line number in element content
    void *	catalogs	: document's own catalog
    int	recovery	: run in recovery mode
    int	progressive	: is this a progressive parsing
    xmlDictPtr	dict	: dictionary for the parser
    const xmlChar * *	atts	: array for the attributes callbacks
    int	maxatts	: the size of the array
    int	docdict	: * pre-interned strings *
    const xmlChar *	str_xml
    const xmlChar *	str_xmlns
    const xmlChar *	str_xml_ns	: * Everything below is used only by the new SAX mode *
    int	sax2	: operating in the new SAX mode
    int	nsNr	: the number of inherited namespaces
    int	nsMax	: the size of the arrays
    const xmlChar * *	nsTab	: the array of prefix/namespace name
    int *	attallocs	: which attribute were allocated
    xmlStartTag *	pushTab	: array of data for push
    xmlHashTablePtr	attsDefault	: defaulted attributes if any
    xmlHashTablePtr	attsSpecial	: non-CDATA attributes if any
    int	nsWellFormed	: is the document XML Namespace okay
    int	options	: * Those fields are needed only for streaming parsing so far *
    int	dictNames	: Use dictionary names for the tree
    int	freeElemsNr	: number of freed element nodes
    xmlNodePtr	freeElems	: List of freed element nodes
    int	freeAttrsNr	: number of freed attributes nodes
    xmlAttrPtr	freeAttrs	: * the complete error information for the last error. *
    xmlError	lastError
    xmlParserMode	parseMode	: the parser mode
    unsigned long	nbentities	: number of entities references
    unsigned long	sizeentities	: size of parsed entities for use by HTML non-recursive parser
    xmlParserNodeInfo *	nodeInfo	: Current NodeInfo
    int	nodeInfoNr	: Depth of the parsing stack
    int	nodeInfoMax	: Max depth of the parsing stack
    xmlParserNodeInfo *	nodeInfoTab	: array of nodeInfos
    int	input_id	: we need to label inputs
    unsigned long	sizeentcopy	: volume of entity copy
} xmlParserCtxt;


Typedef xmlParserCtxtPtr

xmlParserCtxt * xmlParserCtxtPtr;


Structure xmlParserInput

struct _xmlParserInput {
    xmlParserInputBufferPtr	buf	: UTF-8 encoded buffer
    const char *	filename	: The file analyzed, if any
    const char *	directory	: the directory/base of the file
    const xmlChar *	base	: Base of the array to parse
    const xmlChar *	cur	: Current char being parsed
    const xmlChar *	end	: end of the array to parse
    int	length	: length if known
    int	line	: Current line
    int	col	: * NOTE: consumed is only tested for equality in the parser code, *
    unsigned long	consumed	: How many xmlChars already consumed
    xmlParserInputDeallocate	free	: function to deallocate the base
    const xmlChar *	encoding	: the encoding string for entity
    const xmlChar *	version	: the version string for entity
    int	standalone	: Was that entity marked standalone
    int	id	: an unique identifier for the entity
} xmlParserInput;


Structure xmlParserInputBuffer

struct _xmlParserInputBuffer {
    void *	context
    xmlInputReadCallback	readcallback
    xmlInputCloseCallback	closecallback
    xmlCharEncodingHandlerPtr	encoder	: I18N conversions to UTF-8
    xmlBufPtr	buffer	: Local buffer encoded in UTF-8
    xmlBufPtr	raw	: if encoder != NULL buffer for raw input
    int	compressed	: -1=unknown, 0=not compressed, 1=compressed
    int	error
    unsigned long	rawconsumed	: amount consumed from raw
} xmlParserInputBuffer;


Typedef xmlParserInputBufferPtr

xmlParserInputBuffer * xmlParserInputBufferPtr;


Typedef xmlParserInputPtr

xmlParserInput * xmlParserInputPtr;


Structure xmlRef

struct _xmlRef {
    struct _xmlRef *	next	: next Ref
    const xmlChar *	value	: The Ref name
    xmlAttrPtr	attr	: The attribute holding it
    const xmlChar *	name	: The attribute if attr is not available
    int	lineno	: The line number if attr is not available
} xmlRef;


Typedef xmlRefPtr

xmlRef * xmlRefPtr;


Structure xmlSAXHandler

struct _xmlSAXHandler {
    internalSubsetSAXFunc	internalSubset
    isStandaloneSAXFunc	isStandalone
    hasInternalSubsetSAXFunc	hasInternalSubset
    hasExternalSubsetSAXFunc	hasExternalSubset
    resolveEntitySAXFunc	resolveEntity
    getEntitySAXFunc	getEntity
    entityDeclSAXFunc	entityDecl
    notationDeclSAXFunc	notationDecl
    attributeDeclSAXFunc	attributeDecl
    elementDeclSAXFunc	elementDecl
    unparsedEntityDeclSAXFunc	unparsedEntityDecl
    setDocumentLocatorSAXFunc	setDocumentLocator
    startDocumentSAXFunc	startDocument
    endDocumentSAXFunc	endDocument
    startElementSAXFunc	startElement
    endElementSAXFunc	endElement
    referenceSAXFunc	reference
    charactersSAXFunc	characters
    ignorableWhitespaceSAXFunc	ignorableWhitespace
    processingInstructionSAXFunc	processingInstruction
    commentSAXFunc	comment
    warningSAXFunc	warning
    errorSAXFunc	error
    fatalErrorSAXFunc	fatalError	: unused error() get all the errors
    getParameterEntitySAXFunc	getParameterEntity
    cdataBlockSAXFunc	cdataBlock
    externalSubsetSAXFunc	externalSubset
    unsigned int	initialized	: The following fields are extensions available only on version 2
    void *	_private
    startElementNsSAX2Func	startElementNs
    endElementNsSAX2Func	endElementNs
    xmlStructuredErrorFunc	serror
} xmlSAXHandler;


Typedef xmlSAXHandlerPtr

xmlSAXHandler * xmlSAXHandlerPtr;


Structure xmlSAXLocator

struct _xmlSAXLocator {
    const xmlChar *(*getPublicId)	getPublicId
    const xmlChar *(*getSystemId)	getSystemId
    int(*getLineNumber)	getLineNumber
    int(*getColumnNumber)	getColumnNumber
} xmlSAXLocator;


Typedef xmlSAXLocatorPtr

xmlSAXLocator * xmlSAXLocatorPtr;


Function type xmlDOMWrapAcquireNsFunction

xmlNsPtr	xmlDOMWrapAcquireNsFunction	(xmlDOMWrapCtxtPtr ctxt, 
xmlNodePtr node,
const xmlChar * nsName,
const xmlChar * nsPrefix)

A function called to acquire namespaces (xmlNs) from the wrapper.

ctxt: a DOM wrapper context
node: the context node (element or attribute)
nsName: the requested namespace name
nsPrefix: the requested namespace prefix
Returns: an xmlNsPtr or NULL in case of an error.

xmlAddChild ()

xmlNodePtr	xmlAddChild		(xmlNodePtr parent, 
xmlNodePtr cur)

Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. All tree manipulation functions can safely move nodes within a document. But when moving nodes from one document to another, references to namespaces in element or attribute nodes are NOT fixed. In this case, you MUST call xmlReconciliateNs after the move operation to avoid memory errors.

parent: the parent node
cur: the child node
Returns: the child or NULL in case of error.

xmlAddChildList ()

xmlNodePtr	xmlAddChildList		(xmlNodePtr parent, 
xmlNodePtr cur)

Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed) See the note regarding namespaces in xmlAddChild.

parent: the parent node
cur: the first node in the list
Returns: the last child or NULL in case of error.

xmlAddNextSibling ()

xmlNodePtr	xmlAddNextSibling	(xmlNodePtr cur, 
xmlNodePtr elem)

Add a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging @elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. See the note regarding namespaces in xmlAddChild.

cur: the child node
elem: the new node
Returns: the new node or NULL in case of error.

xmlAddPrevSibling ()

xmlNodePtr	xmlAddPrevSibling	(xmlNodePtr cur, 
xmlNodePtr elem)

Add a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. See the note regarding namespaces in xmlAddChild.

cur: the child node
elem: the new node
Returns: the new node or NULL in case of error.

xmlAddSibling ()

xmlNodePtr	xmlAddSibling		(xmlNodePtr cur, 
xmlNodePtr elem)

Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context. See the note regarding namespaces in xmlAddChild.

cur: the child node
elem: the new node
Returns: the new element or NULL in case of error.

xmlAttrSerializeTxtContent ()

void	xmlAttrSerializeTxtContent	(xmlBufferPtr buf, 
xmlDocPtr doc,
xmlAttrPtr attr,
const xmlChar * string)

Serialize text attribute values to an xml simple buffer

buf: the XML buffer output
doc: the document
attr: the attribute node
string: the text content

xmlBufContent ()

xmlChar *	xmlBufContent		(const xmlBuf * buf)

Function to extract the content of a buffer

buf: the buffer
Returns: the internal content

xmlBufEnd ()

xmlChar *	xmlBufEnd		(xmlBufPtr buf)

Function to extract the end of the content of a buffer

buf: the buffer
Returns: the end of the internal content or NULL in case of error

xmlBufGetNodeContent ()

int	xmlBufGetNodeContent		(xmlBufPtr buf, 
const xmlNode * cur)

Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buf with this value

buf: a buffer xmlBufPtr
cur: the node being read
Returns: 0 in case of success and -1 in case of error.

xmlBufNodeDump ()

size_t	xmlBufNodeDump			(xmlBufPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

buf: the XML buffer output
doc: the document
cur: the current node
level: the imbrication level for indenting
format: is formatting allowed
Returns: the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error

xmlBufShrink ()

size_t	xmlBufShrink			(xmlBufPtr buf, 
size_t len)

Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.

buf: the buffer to dump
len: the number of xmlChar to remove
Returns: the number of byte removed or 0 in case of failure

xmlBufUse ()

size_t	xmlBufUse			(const xmlBufPtr buf)

Function to get the length of a buffer

buf: the buffer
Returns: the length of data in the internal content

xmlBufferAdd ()

int	xmlBufferAdd			(xmlBufferPtr buf, 
const xmlChar * str,
int len)

Add a string range to an XML buffer. if len == -1, the length of str is recomputed.

buf: the buffer to dump
str: the #xmlChar string
len: the number of #xmlChar to add
Returns: 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

xmlBufferAddHead ()

int	xmlBufferAddHead		(xmlBufferPtr buf, 
const xmlChar * str,
int len)

Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.

buf: the buffer
str: the #xmlChar string
len: the number of #xmlChar to add
Returns: 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

xmlBufferCCat ()

int	xmlBufferCCat			(xmlBufferPtr buf, 
const char * str)

Append a zero terminated C string to an XML buffer.

buf: the buffer to dump
str: the C char string
Returns: 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

xmlBufferCat ()

int	xmlBufferCat			(xmlBufferPtr buf, 
const xmlChar * str)

Append a zero terminated string to an XML buffer.

buf: the buffer to add to
str: the #xmlChar string
Returns: 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

xmlBufferContent ()

const xmlChar *	xmlBufferContent	(const xmlBuffer * buf)

Function to extract the content of a buffer

buf: the buffer
Returns: the internal content

xmlBufferCreate ()

xmlBufferPtr	xmlBufferCreate		(void)

routine to create an XML buffer.

Returns: the new structure.

xmlBufferCreateSize ()

xmlBufferPtr	xmlBufferCreateSize	(size_t size)

routine to create an XML buffer.

size: initial size of buffer
Returns: the new structure.

xmlBufferCreateStatic ()

xmlBufferPtr	xmlBufferCreateStatic	(void * mem, 
size_t size)

routine to create an XML buffer from an immutable memory area. The area won't be modified nor copied, and is expected to be present until the end of the buffer lifetime.

mem: the memory area
size: the size in byte
Returns: the new structure.

xmlBufferDetach ()

xmlChar *	xmlBufferDetach		(xmlBufferPtr buf)

Remove the string contained in a buffer and gie it back to the caller. The buffer is reset to an empty content. This doesn't work with immutable buffers as they can't be reset.

buf: the buffer
Returns: the previous string contained by the buffer.

xmlBufferDump ()

int	xmlBufferDump			(FILE * file, 
xmlBufferPtr buf)

Dumps an XML buffer to a FILE *.

file: the file output
buf: the buffer to dump
Returns: the number of #xmlChar written

xmlBufferEmpty ()

void	xmlBufferEmpty			(xmlBufferPtr buf)

empty a buffer.

buf: the buffer

xmlBufferFree ()

void	xmlBufferFree			(xmlBufferPtr buf)

Frees an XML buffer. It frees both the content and the structure which encapsulate it.

buf: the buffer to free

xmlBufferGrow ()

int	xmlBufferGrow			(xmlBufferPtr buf, 
unsigned int len)

Grow the available space of an XML buffer.

buf: the buffer
len: the minimum free size to allocate
Returns: the new available space or -1 in case of error

xmlBufferLength ()

int	xmlBufferLength			(const xmlBuffer * buf)

Function to get the length of a buffer

buf: the buffer
Returns: the length of data in the internal content

xmlBufferResize ()

int	xmlBufferResize			(xmlBufferPtr buf, 
unsigned int size)

Resize a buffer to accommodate minimum size of @size.

buf: the buffer to resize
size: the desired size
Returns: 0 in case of problems, 1 otherwise

xmlBufferSetAllocationScheme ()

void	xmlBufferSetAllocationScheme	(xmlBufferPtr buf, 
xmlBufferAllocationScheme scheme)

Sets the allocation scheme for this buffer

buf: the buffer to tune
scheme: allocation scheme to use

xmlBufferShrink ()

int	xmlBufferShrink			(xmlBufferPtr buf, 
unsigned int len)

Remove the beginning of an XML buffer.

buf: the buffer to dump
len: the number of xmlChar to remove
Returns: the number of #xmlChar removed, or -1 in case of failure.

xmlBufferWriteCHAR ()

void	xmlBufferWriteCHAR		(xmlBufferPtr buf, 
const xmlChar * string)

routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer.

buf: the XML buffer
string: the string to add

xmlBufferWriteChar ()

void	xmlBufferWriteChar		(xmlBufferPtr buf, 
const char * string)

routine which manage and grows an output buffer. This one add C chars at the end of the array.

buf: the XML buffer output
string: the string to add

xmlBufferWriteQuotedString ()

void	xmlBufferWriteQuotedString	(xmlBufferPtr buf, 
const xmlChar * string)

routine which manage and grows an output buffer. This one writes a quoted or double quoted #xmlChar string, checking first if it holds quote or double-quotes internally

buf: the XML buffer output
string: the string to add

xmlBuildQName ()

xmlChar *	xmlBuildQName		(const xmlChar * ncname, 
const xmlChar * prefix,
xmlChar * memory,
int len)

Builds the QName @prefix:@ncname in @memory if there is enough space and prefix is not NULL nor empty, otherwise allocate a new string. If prefix is NULL or empty it returns ncname.

ncname: the Name
prefix: the prefix
memory: preallocated memory
len: preallocated memory length
Returns: the new string which must be freed by the caller if different from @memory and @ncname or NULL in case of error

xmlChildElementCount ()

unsigned long	xmlChildElementCount	(xmlNodePtr parent)

Finds the current number of child nodes of that element which are element nodes. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.

parent: the parent node
Returns: the count of element child or 0 if not available

xmlCopyDoc ()

xmlDocPtr	xmlCopyDoc		(xmlDocPtr doc, 
int recursive)

Do a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities.

doc: the document
recursive: if not zero do a recursive copy.
Returns: a new #xmlDocPtr, or NULL in case of error.

xmlCopyDtd ()

xmlDtdPtr	xmlCopyDtd		(xmlDtdPtr dtd)

Do a copy of the dtd.

dtd: the dtd
Returns: a new #xmlDtdPtr, or NULL in case of error.

xmlCopyNamespace ()

xmlNsPtr	xmlCopyNamespace	(xmlNsPtr cur)

Do a copy of the namespace.

cur: the namespace
Returns: a new #xmlNsPtr, or NULL in case of error.

xmlCopyNamespaceList ()

xmlNsPtr	xmlCopyNamespaceList	(xmlNsPtr cur)

Do a copy of an namespace list.

cur: the first namespace
Returns: a new #xmlNsPtr, or NULL in case of error.

xmlCopyNode ()

xmlNodePtr	xmlCopyNode		(xmlNodePtr node, 
int extended)

Do a copy of the node.

node: the node
extended: if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)
Returns: a new #xmlNodePtr, or NULL in case of error.

xmlCopyNodeList ()

xmlNodePtr	xmlCopyNodeList		(xmlNodePtr node)

Do a recursive copy of the node list. Use xmlDocCopyNodeList() if possible to ensure string interning.

node: the first node in the list.
Returns: a new #xmlNodePtr, or NULL in case of error.

xmlCopyProp ()

xmlAttrPtr	xmlCopyProp		(xmlNodePtr target, 
xmlAttrPtr cur)

Do a copy of the attribute.

target: the element where the attribute will be grafted
cur: the attribute
Returns: a new #xmlAttrPtr, or NULL in case of error.

xmlCopyPropList ()

xmlAttrPtr	xmlCopyPropList		(xmlNodePtr target, 
xmlAttrPtr cur)

Do a copy of an attribute list.

target: the element where the attributes will be grafted
cur: the first attribute
Returns: a new #xmlAttrPtr, or NULL in case of error.

xmlCreateIntSubset ()

xmlDtdPtr	xmlCreateIntSubset	(xmlDocPtr doc, 
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID)

Create the internal subset of a document

doc: the document pointer
name: the DTD name
ExternalID: the external (PUBLIC) ID
SystemID: the system ID
Returns: a pointer to the new DTD structure

xmlDOMWrapAdoptNode ()

int	xmlDOMWrapAdoptNode		(xmlDOMWrapCtxtPtr ctxt, 
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int options)

References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc->oldNs entries are used This is the case when you have an unlinked node and just want to move it to the context of If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. NOTE: This function was not intensively tested.

ctxt: the optional context for custom processing
sourceDoc: the optional sourceDoc
node: the node to start with
destDoc: the destination doc
destParent: the optional new parent of @node in @destDoc
options: option flags
Returns: 0 if the operation succeeded, 1 if a node of unsupported type was given, 2 if a node of not yet supported type was given and -1 on API/internal errors.

xmlDOMWrapCloneNode ()

int	xmlDOMWrapCloneNode		(xmlDOMWrapCtxtPtr ctxt, 
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlNodePtr * resNode,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int deep,
int options)

References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc->oldNs entries are used. This is the case when you don't know already where the cloned branch will be added to. If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. TODO: 1) What to do with XInclude? Currently this returns an error for XInclude.

ctxt: the optional context for custom processing
sourceDoc: the optional sourceDoc
node: the node to start with
resNode: the clone of the given @node
destDoc: the destination doc
destParent: the optional new parent of @node in @destDoc
deep: descend into child if set
options: option flags
Returns: 0 if the operation succeeded, 1 if a node of unsupported (or not yet supported) type was given, -1 on API/internal errors.

xmlDOMWrapFreeCtxt ()

void	xmlDOMWrapFreeCtxt		(xmlDOMWrapCtxtPtr ctxt)

Frees the DOM-wrapper context.

ctxt: the DOM-wrapper context

xmlDOMWrapNewCtxt ()

xmlDOMWrapCtxtPtr	xmlDOMWrapNewCtxt	(void)

Allocates and initializes a new DOM-wrapper context.

Returns: the xmlDOMWrapCtxtPtr or NULL in case of an internal error.

xmlDOMWrapReconcileNamespaces ()

int	xmlDOMWrapReconcileNamespaces	(xmlDOMWrapCtxtPtr ctxt, 
xmlNodePtr elem,
int options)

Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. NOTE: This function was not intensively tested.

ctxt: DOM wrapper context, unused at the moment
elem: the element-node
options: option flags
Returns: 0 if succeeded, -1 otherwise and on API/internal errors.

xmlDOMWrapRemoveNode ()

int	xmlDOMWrapRemoveNode		(xmlDOMWrapCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr node,
int options)

Unlinks the given node from its owner. This will substitute ns-references to node->nsDef for ns-references to doc->oldNs, thus ensuring the removed branch to be autark wrt ns-references. NOTE: This function was not intensively tested.

ctxt: a DOM wrapper context
doc: the doc
node: the node to be removed.
options: set of options, unused at the moment
Returns: 0 on success, 1 if the node is not supported, -1 on API and internal errors.

xmlDocCopyNode ()

xmlNodePtr	xmlDocCopyNode		(xmlNodePtr node, 
xmlDocPtr doc,
int extended)

Do a copy of the node to a given document.

node: the node
doc: the document
extended: if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)
Returns: a new #xmlNodePtr, or NULL in case of error.

xmlDocCopyNodeList ()

xmlNodePtr	xmlDocCopyNodeList	(xmlDocPtr doc, 
xmlNodePtr node)

Do a recursive copy of the node list.

doc: the target document
node: the first node in the list.
Returns: a new #xmlNodePtr, or NULL in case of error.

xmlDocDump ()

int	xmlDocDump			(FILE * f, 
xmlDocPtr cur)

Dump an XML document to an open FILE.

f: the FILE*
cur: the document
Returns: the number of bytes written or -1 in case of failure.

xmlDocDumpFormatMemory ()

void	xmlDocDumpFormatMemory		(xmlDocPtr cur, 
xmlChar ** mem,
int * size,
int format)

Dump an XML document in memory and return the #xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

cur: the document
mem: OUT: the memory pointer
size: OUT: the memory length
format: should formatting spaces been added

xmlDocDumpFormatMemoryEnc ()

void	xmlDocDumpFormatMemoryEnc	(xmlDocPtr out_doc, 
xmlChar ** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding,
int format)

Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

out_doc: Document to generate XML text from
doc_txt_ptr: Memory pointer for allocated XML text
doc_txt_len: Length of the generated XML text
txt_encoding: Character encoding to use when generating XML text
format: should formatting spaces been added

xmlDocDumpMemory ()

void	xmlDocDumpMemory		(xmlDocPtr cur, 
xmlChar ** mem,
int * size)

Dump an XML document in memory and return the #xmlChar * and it's size in bytes. It's up to the caller to free the memory with xmlFree(). The resulting byte array is zero terminated, though the last 0 is not included in the returned size.

cur: the document
mem: OUT: the memory pointer
size: OUT: the memory length

xmlDocDumpMemoryEnc ()

void	xmlDocDumpMemoryEnc		(xmlDocPtr out_doc, 
xmlChar ** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding)

Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree().

out_doc: Document to generate XML text from
doc_txt_ptr: Memory pointer for allocated XML text
doc_txt_len: Length of the generated XML text
txt_encoding: Character encoding to use when generating XML text

xmlDocFormatDump ()

int	xmlDocFormatDump		(FILE * f, 
xmlDocPtr cur,
int format)

Dump an XML document to an open FILE.

f: the FILE*
cur: the document
format: should formatting spaces been added
Returns: the number of bytes written or -1 in case of failure. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

xmlDocGetRootElement ()

xmlNodePtr	xmlDocGetRootElement	(const xmlDoc * doc)

Get the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...).

doc: the document
Returns: the #xmlNodePtr for the root or NULL

xmlDocSetRootElement ()

xmlNodePtr	xmlDocSetRootElement	(xmlDocPtr doc, 
xmlNodePtr root)

Set the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...).

doc: the document
root: the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead.
Returns: the old root element if any was found, NULL if root was NULL

xmlElemDump ()

void	xmlElemDump			(FILE * f, 
xmlDocPtr doc,
xmlNodePtr cur)

Dump an XML/HTML node, recursive behaviour, children are printed too.

f: the FILE * for the output
doc: the document
cur: the current node

xmlFirstElementChild ()

xmlNodePtr	xmlFirstElementChild	(xmlNodePtr parent)

Finds the first child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.

parent: the parent node
Returns: the first element child or NULL if not available

xmlFreeDoc ()

void	xmlFreeDoc			(xmlDocPtr cur)

Free up all the structures used by a document, tree included.

cur: pointer to the document

xmlFreeDtd ()

void	xmlFreeDtd			(xmlDtdPtr cur)

Free a DTD structure.

cur: the DTD structure to free up

xmlFreeNode ()

void	xmlFreeNode			(xmlNodePtr cur)

Free a node, this is a recursive behaviour, all the children are freed too. This doesn't unlink the child from the list, use xmlUnlinkNode() first.

cur: the node

xmlFreeNodeList ()

void	xmlFreeNodeList			(xmlNodePtr cur)

Free a node and all its siblings, this is a recursive behaviour, all the children are freed too.

cur: the first node in the list

xmlFreeNs ()

void	xmlFreeNs			(xmlNsPtr cur)

Free up the structures associated to a namespace

cur: the namespace pointer

xmlFreeNsList ()

void	xmlFreeNsList			(xmlNsPtr cur)

Free up all the structures associated to the chained namespaces.

cur: the first namespace pointer

xmlFreeProp ()

void	xmlFreeProp			(xmlAttrPtr cur)

Free one attribute, all the content is freed too

cur: an attribute

xmlFreePropList ()

void	xmlFreePropList			(xmlAttrPtr cur)

Free a property and all its siblings, all the children are freed too.

cur: the first property in the list

xmlGetBufferAllocationScheme ()

xmlBufferAllocationScheme	xmlGetBufferAllocationScheme	(void)

Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance XML_BUFFER_ALLOC_HYBRID - use exact sizes on small strings to keep memory usage tight in normal usage, and doubleit on large strings to avoid pathological performance.

Returns: the current allocation scheme

xmlGetCompressMode ()

int	xmlGetCompressMode		(void)

get the default compression mode used, ZLIB based.

Returns: 0 (uncompressed) to 9 (max compression)

xmlGetDocCompressMode ()

int	xmlGetDocCompressMode		(const xmlDoc * doc)

get the compression ratio for a document, ZLIB based

doc: the document
Returns: 0 (uncompressed) to 9 (max compression)

xmlGetIntSubset ()

xmlDtdPtr	xmlGetIntSubset		(const xmlDoc * doc)

Get the internal subset of a document

doc: the document pointer
Returns: a pointer to the DTD structure or NULL if not found

xmlGetLastChild ()

xmlNodePtr	xmlGetLastChild		(const xmlNode * parent)

Search the last child of a node.

parent: the parent node
Returns: the last child or NULL if none.

xmlGetLineNo ()

long	xmlGetLineNo			(const xmlNode * node)

Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used

node: valid node
Returns: the line number if successful, -1 otherwise

xmlGetNoNsProp ()

xmlChar *	xmlGetNoNsProp		(const xmlNode * node, 
const xmlChar * name)

Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. This function is similar to xmlGetProp except it will accept only an attribute in no namespace.

node: the node
name: the attribute name
Returns: the attribute value or NULL if not found. It's up to the caller to free the memory with xmlFree().

xmlGetNodePath ()

xmlChar *	xmlGetNodePath		(const xmlNode * node)

Build a structure based Path for the given node

node: a node
Returns: the new path or NULL in case of error. The caller must free the returned string

xmlGetNsList ()

xmlNsPtr *	xmlGetNsList		(const xmlDoc * doc, 
const xmlNode * node)

Search all the namespace applying to a given element.

doc: the document
node: the current node
Returns: an NULL terminated array of all the #xmlNsPtr found that need to be freed by the caller or NULL if no namespace if defined

xmlGetNsProp ()

xmlChar *	xmlGetNsProp		(const xmlNode * node, 
const xmlChar * name,
const xmlChar * nameSpace)

Search and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off.

node: the node
name: the attribute name
nameSpace: the URI of the namespace
Returns: the attribute value or NULL if not found. It's up to the caller to free the memory with xmlFree().

xmlGetProp ()

xmlChar *	xmlGetProp		(const xmlNode * node, 
const xmlChar * name)

Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. NOTE: this function acts independently of namespaces associated to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp() for namespace aware processing.

node: the node
name: the attribute name
Returns: the attribute value or NULL if not found. It's up to the caller to free the memory with xmlFree().

xmlHasNsProp ()

xmlAttrPtr	xmlHasNsProp		(const xmlNode * node, 
const xmlChar * name,
const xmlChar * nameSpace)

Search for an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. Note that a namespace of NULL indicates to use the default namespace.

node: the node
name: the attribute name
nameSpace: the URI of the namespace
Returns: the attribute or the attribute declaration or NULL if neither was found.

xmlHasProp ()

xmlAttrPtr	xmlHasProp		(const xmlNode * node, 
const xmlChar * name)

Search an attribute associated to a node This function also looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off.

node: the node
name: the attribute name
Returns: the attribute or the attribute declaration or NULL if neither was found.

xmlIsBlankNode ()

int	xmlIsBlankNode			(const xmlNode * node)

Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.

node: the node
Returns: 1 yes, 0 no

xmlIsXHTML ()

int	xmlIsXHTML			(const xmlChar * systemID, 
const xmlChar * publicID)

Try to find if the document correspond to an XHTML DTD

systemID: the system identifier
publicID: the public identifier
Returns: 1 if true, 0 if not and -1 in case of error

xmlLastElementChild ()

xmlNodePtr	xmlLastElementChild	(xmlNodePtr parent)

Finds the last child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.

parent: the parent node
Returns: the last element child or NULL if not available

xmlNewCDataBlock ()

xmlNodePtr	xmlNewCDataBlock	(xmlDocPtr doc, 
const xmlChar * content,
int len)

Creation of a new node containing a CDATA block.

doc: the document
content: the CDATA block content content
len: the length of the block
Returns: a pointer to the new node object.

xmlNewCharRef ()

xmlNodePtr	xmlNewCharRef		(xmlDocPtr doc, 
const xmlChar * name)

Creation of a new character reference node.

doc: the document
name: the char ref string, starting with # or "&# ... ;"
Returns: a pointer to the new node object.

xmlNewChild ()

xmlNodePtr	xmlNewChild		(xmlNodePtr parent, 
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content)

Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used.

parent: the parent node
ns: a namespace if any
name: the name of the child
content: the XML content of the child if any.
Returns: a pointer to the new node object.

xmlNewComment ()

xmlNodePtr	xmlNewComment		(const xmlChar * content)

Use of this function is DISCOURAGED in favor of xmlNewDocComment. Creation of a new node containing a comment.

content: the comment content
Returns: a pointer to the new node object.

xmlNewDoc ()

xmlDocPtr	xmlNewDoc		(const xmlChar * version)

Creates a new XML document

version: xmlChar string giving the version of XML "1.0"
Returns: a new document

xmlNewDocComment ()

xmlNodePtr	xmlNewDocComment	(xmlDocPtr doc, 
const xmlChar * content)

Creation of a new node containing a comment within a document.

doc: the document
content: the comment content
Returns: a pointer to the new node object.

xmlNewDocFragment ()

xmlNodePtr	xmlNewDocFragment	(xmlDocPtr doc)

Creation of a new Fragment node.

doc: the document owning the fragment
Returns: a pointer to the new node object.

xmlNewDocNode ()

xmlNodePtr	xmlNewDocNode		(xmlDocPtr doc, 
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content)

Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.

doc: the document
ns: namespace if any
name: the node name
content: the XML text content if any
Returns: a pointer to the new node object.

xmlNewDocNodeEatName ()

xmlNodePtr	xmlNewDocNodeEatName	(xmlDocPtr doc, 
xmlNsPtr ns,
xmlChar * name,
const xmlChar * content)

Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.

doc: the document
ns: namespace if any
name: the node name
content: the XML text content if any
Returns: a pointer to the new node object.

xmlNewDocPI ()

xmlNodePtr	xmlNewDocPI		(xmlDocPtr doc, 
const xmlChar * name,
const xmlChar * content)

Creation of a processing instruction element.

doc: the target document
name: the processing instruction name
content: the PI content
Returns: a pointer to the new node object.

xmlNewDocProp ()

xmlAttrPtr	xmlNewDocProp		(xmlDocPtr doc, 
const xmlChar * name,
const xmlChar * value)

Create a new property carried by a document. NOTE: @value is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewProp() if you don't need entities support.

doc: the document
name: the name of the attribute
value: the value of the attribute
Returns: a pointer to the attribute

xmlNewDocRawNode ()

xmlNodePtr	xmlNewDocRawNode	(xmlDocPtr doc, 
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content)

Creation of a new node element within a document. @ns and @content are optional (NULL).

doc: the document
ns: namespace if any
name: the node name
content: the text content if any
Returns: a pointer to the new node object.

xmlNewDocText ()

xmlNodePtr	xmlNewDocText		(const xmlDoc * doc, 
const xmlChar * content)

Creation of a new text node within a document.

doc: the document
content: the text content
Returns: a pointer to the new node object.

xmlNewDocTextLen ()

xmlNodePtr	xmlNewDocTextLen	(xmlDocPtr doc, 
const xmlChar * content,
int len)

Creation of a new text node with an extra content length parameter. The text node pertain to a given document.

doc: the document
content: the text content
len: the text len.
Returns: a pointer to the new node object.

xmlNewDtd ()

xmlDtdPtr	xmlNewDtd		(xmlDocPtr doc, 
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID)

Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().

doc: the document pointer
name: the DTD name
ExternalID: the external ID
SystemID: the system ID
Returns: a pointer to the new DTD structure

xmlNewGlobalNs ()

xmlNsPtr	xmlNewGlobalNs		(xmlDocPtr doc, 
const xmlChar * href,
const xmlChar * prefix)

Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!

doc: the document carrying the namespace
href: the URI associated
prefix: the prefix for the namespace
Returns: NULL this functionality had been removed

xmlNewNode ()

xmlNodePtr	xmlNewNode		(xmlNsPtr ns, 
const xmlChar * name)

Creation of a new node element. @ns is optional (NULL). Use of this function is DISCOURAGED in favor of xmlNewDocNode.

ns: namespace if any
name: the node name
Returns: a pointer to the new node object. Uses xmlStrdup() to make copy of @name.

xmlNewNodeEatName ()

xmlNodePtr	xmlNewNodeEatName	(xmlNsPtr ns, 
xmlChar * name)

Creation of a new node element. @ns is optional (NULL). Use of this function is DISCOURAGED in favor of xmlNewDocNodeEatName.

ns: namespace if any
name: the node name
Returns: a pointer to the new node object, with pointer @name as new node's name. Use xmlNewNode() if a copy of @name string is is needed as new node's name.

xmlNewNs ()

xmlNsPtr	xmlNewNs		(xmlNodePtr node, 
const xmlChar * href,
const xmlChar * prefix)

Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. Note that for a default namespace, @prefix should be NULL. We use href==NULL in the case of an element creation where the namespace was not defined.

node: the element carrying the namespace
href: the URI associated
prefix: the prefix for the namespace
Returns: a new namespace pointer or NULL

xmlNewNsProp ()

xmlAttrPtr	xmlNewNsProp		(xmlNodePtr node, 
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * value)

Create a new property tagged with a namespace and carried by a node.

node: the holding node
ns: the namespace
name: the name of the attribute
value: the value of the attribute
Returns: a pointer to the attribute

xmlNewNsPropEatName ()

xmlAttrPtr	xmlNewNsPropEatName	(xmlNodePtr node, 
xmlNsPtr ns,
xmlChar * name,
const xmlChar * value)

Create a new property tagged with a namespace and carried by a node.

node: the holding node
ns: the namespace
name: the name of the attribute
value: the value of the attribute
Returns: a pointer to the attribute

xmlNewPI ()

xmlNodePtr	xmlNewPI		(const xmlChar * name, 
const xmlChar * content)

Creation of a processing instruction element. Use of this function is DISCOURAGED in favor of xmlNewDocPI.

name: the processing instruction name
content: the PI content
Returns: a pointer to the new node object.

xmlNewProp ()

xmlAttrPtr	xmlNewProp		(xmlNodePtr node, 
const xmlChar * name,
const xmlChar * value)

Create a new property carried by a node.

node: the holding node
name: the name of the attribute
value: the value of the attribute
Returns: a pointer to the attribute

xmlNewReference ()

xmlNodePtr	xmlNewReference		(const xmlDoc * doc, 
const xmlChar * name)

Creation of a new reference node.

doc: the document
name: the reference name, or the reference string with & and ;
Returns: a pointer to the new node object.

xmlNewText ()

xmlNodePtr	xmlNewText		(const xmlChar * content)

Creation of a new text node. Use of this function is DISCOURAGED in favor of xmlNewDocText.

content: the text content
Returns: a pointer to the new node object.

xmlNewTextChild ()

xmlNodePtr	xmlNewTextChild		(xmlNodePtr parent, 
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content)

Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations.

parent: the parent node
ns: a namespace if any
name: the name of the child
content: the text content of the child if any.
Returns: a pointer to the new node object.

xmlNewTextLen ()

xmlNodePtr	xmlNewTextLen		(const xmlChar * content, 
int len)

Use of this function is DISCOURAGED in favor of xmlNewDocTextLen. Creation of a new text node with an extra parameter for the content's length

content: the text content
len: the text len.
Returns: a pointer to the new node object.

xmlNextElementSibling ()

xmlNodePtr	xmlNextElementSibling	(xmlNodePtr node)

Finds the first closest next sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.

node: the current node
Returns: the next element sibling or NULL if not available

xmlNodeAddContent ()

void	xmlNodeAddContent		(xmlNodePtr cur, 
const xmlChar * content)

Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.

cur: the node being modified
content: extra content

xmlNodeAddContentLen ()

void	xmlNodeAddContentLen		(xmlNodePtr cur, 
const xmlChar * content,
int len)

Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.

cur: the node being modified
content: extra content
len: the size of @content

xmlNodeBufGetContent ()

int	xmlNodeBufGetContent		(xmlBufferPtr buffer, 
const xmlNode * cur)

Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value

buffer: a buffer
cur: the node being read
Returns: 0 in case of success and -1 in case of error.

xmlNodeDump ()

int	xmlNodeDump			(xmlBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called. Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlNodeDumpOutput() instead.

buf: the XML buffer output
doc: the document
cur: the current node
level: the imbrication level for indenting
format: is formatting allowed
Returns: the number of bytes written to the buffer or -1 in case of error

xmlNodeDumpOutput ()

void	xmlNodeDumpOutput		(xmlOutputBufferPtr buf, 
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format,
const char * encoding)

Dump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

buf: the XML buffer output
doc: the document
cur: the current node
level: the imbrication level for indenting
format: is formatting allowed
encoding: an optional encoding string

xmlNodeGetBase ()

xmlChar *	xmlNodeGetBase		(const xmlDoc * doc, 
const xmlNode * cur)

Searches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use doc->URL in this case

doc: the document the node pertains to
cur: the node being checked
Returns: a pointer to the base URL, or NULL if not found It's up to the caller to free the memory with xmlFree().

xmlNodeGetContent ()

xmlChar *	xmlNodeGetContent	(const xmlNode * cur)

Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted.

cur: the node being read
Returns: a new #xmlChar * or NULL if no content is available. It's up to the caller to free the memory with xmlFree().

xmlNodeGetLang ()

xmlChar *	xmlNodeGetLang		(const xmlNode * cur)

Searches the language of a node, i.e. the values of the xml:lang attribute or the one carried by the nearest ancestor.

cur: the node being checked
Returns: a pointer to the lang value, or NULL if not found It's up to the caller to free the memory with xmlFree().

xmlNodeGetSpacePreserve ()

int	xmlNodeGetSpacePreserve		(const xmlNode * cur)

Searches the space preserving behaviour of a node, i.e. the values of the xml:space attribute or the one carried by the nearest ancestor.

cur: the node being checked
Returns: -1 if xml:space is not inherited, 0 if "default", 1 if "preserve"

xmlNodeIsText ()

int	xmlNodeIsText			(const xmlNode * node)

Is this node a Text node ?

node: the node
Returns: 1 yes, 0 no

xmlNodeListGetRawString ()

xmlChar *	xmlNodeListGetRawString	(const xmlDoc * doc, 
const xmlNode * list,
int inLine)

Builds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling.

doc: the document
list: a Node list
inLine: should we replace entity contents or show their external form
Returns: a pointer to the string copy, the caller must free it with xmlFree().

xmlNodeListGetString ()

xmlChar *	xmlNodeListGetString	(xmlDocPtr doc, 
const xmlNode * list,
int inLine)

Build the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs

doc: the document
list: a Node list
inLine: should we replace entity contents or show their external form
Returns: a pointer to the string copy, the caller must free it with xmlFree().

xmlNodeSetBase ()

void	xmlNodeSetBase			(xmlNodePtr cur, 
const xmlChar * uri)

Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute.

cur: the node being changed
uri: the new base URI

xmlNodeSetContent ()

void	xmlNodeSetContent		(xmlNodePtr cur, 
const xmlChar * content)

Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().

cur: the node being modified
content: the new value of the content

xmlNodeSetContentLen ()

void	xmlNodeSetContentLen		(xmlNodePtr cur, 
const xmlChar * content,
int len)

Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().

cur: the node being modified
content: the new value of the content
len: the size of @content

xmlNodeSetLang ()

void	xmlNodeSetLang			(xmlNodePtr cur, 
const xmlChar * lang)

Set the language of a node, i.e. the values of the xml:lang attribute.

cur: the node being changed
lang: the language description

xmlNodeSetName ()

void	xmlNodeSetName			(xmlNodePtr cur, 
const xmlChar * name)

Set (or reset) the name of a node.

cur: the node being changed
name: the new tag name

xmlNodeSetSpacePreserve ()

void	xmlNodeSetSpacePreserve		(xmlNodePtr cur, 
int val)

Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute.

cur: the node being changed
val: the xml:space value ("0": default, 1: "preserve")

xmlPreviousElementSibling ()

xmlNodePtr	xmlPreviousElementSibling	(xmlNodePtr node)

Finds the first closest previous sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.

node: the current node
Returns: the previous element sibling or NULL if not available

xmlReconciliateNs ()

int	xmlReconciliateNs		(xmlDocPtr doc, 
xmlNodePtr tree)

This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree.

doc: the document
tree: a node defining the subtree to reconciliate
Returns: the number of namespace declarations created or -1 in case of error.

xmlRemoveProp ()

int	xmlRemoveProp			(xmlAttrPtr cur)

Unlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes

cur: an attribute
Returns: 0 if success and -1 in case of error.

xmlReplaceNode ()

xmlNodePtr	xmlReplaceNode		(xmlNodePtr old, 
xmlNodePtr cur)

Unlink the old node from its current context, prune the new one at the same place. If @cur was already inserted in a document it is first unlinked from its existing context. See the note regarding namespaces in xmlAddChild.

old: the old node
cur: the node
Returns: the @old node

xmlSaveFile ()

int	xmlSaveFile			(const char * filename, 
xmlDocPtr cur)

Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used.

filename: the filename (or URL)
cur: the document
Returns: the number of bytes written or -1 in case of failure.

xmlSaveFileEnc ()

int	xmlSaveFileEnc			(const char * filename, 
xmlDocPtr cur,
const char * encoding)

Dump an XML document, converting it to the given encoding

filename: the filename (or URL)
cur: the document
encoding: the name of an encoding (or NULL)
Returns: the number of bytes written or -1 in case of failure.

xmlSaveFileTo ()

int	xmlSaveFileTo			(xmlOutputBufferPtr buf, 
xmlDocPtr cur,
const char * encoding)

Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.

buf: an output I/O buffer
cur: the document
encoding: the encoding if any assuming the I/O layer handles the transcoding
Returns: the number of bytes written or -1 in case of failure.

xmlSaveFormatFile ()

int	xmlSaveFormatFile		(const char * filename, 
xmlDocPtr cur,
int format)

Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

filename: the filename (or URL)
cur: the document
format: should formatting spaces been added
Returns: the number of bytes written or -1 in case of failure.

xmlSaveFormatFileEnc ()

int	xmlSaveFormatFileEnc		(const char * filename, 
xmlDocPtr cur,
const char * encoding,
int format)

Dump an XML document to a file or an URL.

filename: the filename or URL to output
cur: the document being saved
encoding: the name of the encoding to use or NULL.
format: should formatting spaces be added.
Returns: the number of bytes written or -1 in case of error. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

xmlSaveFormatFileTo ()

int	xmlSaveFormatFileTo		(xmlOutputBufferPtr buf, 
xmlDocPtr cur,
const char * encoding,
int format)

Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.

buf: an output I/O buffer
cur: the document
encoding: the encoding if any assuming the I/O layer handles the transcoding
format: should formatting spaces been added
Returns: the number of bytes written or -1 in case of failure.

xmlSearchNs ()

xmlNsPtr	xmlSearchNs		(xmlDocPtr doc, 
xmlNodePtr node,
const xmlChar * nameSpace)

Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. @nameSpace can be NULL, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case.

doc: the document
node: the current node
nameSpace: the namespace prefix
Returns: the namespace pointer or NULL.

xmlSearchNsByHref ()

xmlNsPtr	xmlSearchNsByHref	(xmlDocPtr doc, 
xmlNodePtr node,
const xmlChar * href)

Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.

doc: the document
node: the current node
href: the namespace value
Returns: the namespace pointer or NULL.

xmlSetBufferAllocationScheme ()

void	xmlSetBufferAllocationScheme	(xmlBufferAllocationScheme scheme)

Set the buffer allocation method. Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance

scheme: allocation method to use

xmlSetCompressMode ()

void	xmlSetCompressMode		(int mode)

set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)

mode: the compression ratio

xmlSetDocCompressMode ()

void	xmlSetDocCompressMode		(xmlDocPtr doc, 
int mode)

set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)

doc: the document
mode: the compression ratio

xmlSetListDoc ()

void	xmlSetListDoc			(xmlNodePtr list, 
xmlDocPtr doc)

update all nodes in the list to point to the right document

list: the first element
doc: the document

xmlSetNs ()

void	xmlSetNs			(xmlNodePtr node, 
xmlNsPtr ns)

Associate a namespace to a node, a posteriori.

node: a node in the document
ns: a namespace pointer

xmlSetNsProp ()

xmlAttrPtr	xmlSetNsProp		(xmlNodePtr node, 
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * value)

Set (or reset) an attribute carried by a node. The ns structure must be in scope, this is not checked

node: the node
ns: the namespace definition
name: the attribute name
value: the attribute value
Returns: the attribute pointer.

xmlSetProp ()

xmlAttrPtr	xmlSetProp		(xmlNodePtr node, 
const xmlChar * name,
const xmlChar * value)

Set (or reset) an attribute carried by a node. If @name has a prefix, then the corresponding namespace-binding will be used, if in scope; it is an error it there's no such ns-binding for the prefix in scope.

node: the node
name: the attribute name (a QName)
value: the attribute value
Returns: the attribute pointer.

xmlSetTreeDoc ()

void	xmlSetTreeDoc			(xmlNodePtr tree, 
xmlDocPtr doc)

update all nodes under the tree to point to the right document

tree: the top element
doc: the document

xmlSplitQName2 ()

xmlChar *	xmlSplitQName2		(const xmlChar * name, 
xmlChar ** prefix)

parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName

name: the full QName
prefix: a xmlChar **
Returns: NULL if the name doesn't have a prefix. Otherwise, returns the local part, and prefix is updated to get the Prefix. Both the return value and the prefix must be freed by the caller.

xmlSplitQName3 ()

const xmlChar *	xmlSplitQName3		(const xmlChar * name, 
int * len)

parse an XML qualified name string,i

name: the full QName
len: an int *
Returns: NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix

xmlStringGetNodeList ()

xmlNodePtr	xmlStringGetNodeList	(const xmlDoc * doc, 
const xmlChar * value)

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

doc: the document
value: the value of the attribute
Returns: a pointer to the first child

xmlStringLenGetNodeList ()

xmlNodePtr	xmlStringLenGetNodeList	(const xmlDoc * doc, 
const xmlChar * value,
int len)

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

doc: the document
value: the value of the text
len: the length of the string value
Returns: a pointer to the first child

xmlTextConcat ()

int	xmlTextConcat			(xmlNodePtr node, 
const xmlChar * content,
int len)

Concat the given string at the end of the existing node content

node: the node
content: the content
len: @content length
Returns: -1 in case of error, 0 otherwise

xmlTextMerge ()

xmlNodePtr	xmlTextMerge		(xmlNodePtr first, 
xmlNodePtr second)

Merge two text nodes into one

first: the first text node
second: the second text node being merged
Returns: the first text node augmented

xmlUnlinkNode ()

void	xmlUnlinkNode			(xmlNodePtr cur)

Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent.

cur: the node

xmlUnsetNsProp ()

int	xmlUnsetNsProp			(xmlNodePtr node, 
xmlNsPtr ns,
const xmlChar * name)

Remove an attribute carried by a node.

node: the node
ns: the namespace definition
name: the attribute name
Returns: 0 if successful, -1 if not found

xmlUnsetProp ()

int	xmlUnsetProp			(xmlNodePtr node, 
const xmlChar * name)

Remove an attribute carried by a node. This handles only attributes in no namespace.

node: the node
name: the attribute name
Returns: 0 if successful, -1 if not found

xmlValidateNCName ()

int	xmlValidateNCName		(const xmlChar * value, 
int space)

Check that a value conforms to the lexical space of NCName

value: the value to check
space: allow spaces in front and end of the string
Returns: 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

xmlValidateNMToken ()

int	xmlValidateNMToken		(const xmlChar * value, 
int space)

Check that a value conforms to the lexical space of NMToken

value: the value to check
space: allow spaces in front and end of the string
Returns: 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

xmlValidateName ()

int	xmlValidateName			(const xmlChar * value, 
int space)

Check that a value conforms to the lexical space of Name

value: the value to check
space: allow spaces in front and end of the string
Returns: 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

xmlValidateQName ()

int	xmlValidateQName		(const xmlChar * value, 
int space)

Check that a value conforms to the lexical space of QName

value: the value to check
space: allow spaces in front and end of the string
Returns: 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

PK!lk right.pngnu[PNG  IHDRw=bKGD pHYs  ~tIME2 I%=eIDATx!o@.'**M0$$?1~vIeEuLl&4䝠Bݛ|>$ݶoc xmlerror: error handling

xmlerror

xmlerror - error handling

the API used to report errors

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlError xmlError;
typedef enum xmlErrorDomain;
typedef enum xmlErrorLevel;
typedef xmlError * xmlErrorPtr;
typedef enum xmlParserErrors;
void	initGenericErrorDefaultFunc	(xmlGenericErrorFunc * handler);
int	xmlCopyError			(xmlErrorPtr from, 
xmlErrorPtr to); xmlErrorPtr xmlCtxtGetLastError (void * ctx); void xmlCtxtResetLastError (void * ctx); typedef void xmlGenericErrorFunc (void * ctx,
const char * msg,
... ...); xmlErrorPtr xmlGetLastError (void); void xmlParserError (void * ctx,
const char * msg,
... ...); void xmlParserPrintFileContext (xmlParserInputPtr input); void xmlParserPrintFileInfo (xmlParserInputPtr input); void xmlParserValidityError (void * ctx,
const char * msg,
... ...); void xmlParserValidityWarning (void * ctx,
const char * msg,
... ...); void xmlParserWarning (void * ctx,
const char * msg,
... ...); void xmlResetError (xmlErrorPtr err); void xmlResetLastError (void); void xmlSetGenericErrorFunc (void * ctx,
xmlGenericErrorFunc handler); void xmlSetStructuredErrorFunc (void * ctx,
xmlStructuredErrorFunc handler); typedef void xmlStructuredErrorFunc (void * userData,
xmlErrorPtr error);

Description

Details

Structure xmlError

struct _xmlError {
    int	domain	: What part of the library raised this error
    int	code	: The error code, e.g. an xmlParserError
    char *	message	: human-readable informative error message
    xmlErrorLevel	level	: how consequent is the error
    char *	file	: the filename
    int	line	: the line number if available
    char *	str1	: extra string information
    char *	str2	: extra string information
    char *	str3	: extra string information
    int	int1	: extra number information
    int	int2	: error column # or 0 if N/A (todo: rename field when we would brk ABI)
    void *	ctxt	: the parser context if available
    void *	node	: the node in the tree
} xmlError;


Enum xmlErrorDomain

enum xmlErrorDomain {
    XML_FROM_NONE = 0
    XML_FROM_PARSER = 1 /* The XML parser */
    XML_FROM_TREE = 2 /* The tree module */
    XML_FROM_NAMESPACE = 3 /* The XML Namespace module */
    XML_FROM_DTD = 4 /* The XML DTD validation with parser contex */
    XML_FROM_HTML = 5 /* The HTML parser */
    XML_FROM_MEMORY = 6 /* The memory allocator */
    XML_FROM_OUTPUT = 7 /* The serialization code */
    XML_FROM_IO = 8 /* The Input/Output stack */
    XML_FROM_FTP = 9 /* The FTP module */
    XML_FROM_HTTP = 10 /* The HTTP module */
    XML_FROM_XINCLUDE = 11 /* The XInclude processing */
    XML_FROM_XPATH = 12 /* The XPath module */
    XML_FROM_XPOINTER = 13 /* The XPointer module */
    XML_FROM_REGEXP = 14 /* The regular expressions module */
    XML_FROM_DATATYPE = 15 /* The W3C XML Schemas Datatype module */
    XML_FROM_SCHEMASP = 16 /* The W3C XML Schemas parser module */
    XML_FROM_SCHEMASV = 17 /* The W3C XML Schemas validation module */
    XML_FROM_RELAXNGP = 18 /* The Relax-NG parser module */
    XML_FROM_RELAXNGV = 19 /* The Relax-NG validator module */
    XML_FROM_CATALOG = 20 /* The Catalog module */
    XML_FROM_C14N = 21 /* The Canonicalization module */
    XML_FROM_XSLT = 22 /* The XSLT engine from libxslt */
    XML_FROM_VALID = 23 /* The XML DTD validation with valid context */
    XML_FROM_CHECK = 24 /* The error checking module */
    XML_FROM_WRITER = 25 /* The xmlwriter module */
    XML_FROM_MODULE = 26 /* The dynamically loaded module modul */
    XML_FROM_I18N = 27 /* The module handling character conversion */
    XML_FROM_SCHEMATRONV = 28 /* The Schematron validator module */
    XML_FROM_BUFFER = 29 /* The buffers module */
    XML_FROM_URI = 30 /*  The URI module */
};


Enum xmlErrorLevel

enum xmlErrorLevel {
    XML_ERR_NONE = 0
    XML_ERR_WARNING = 1 /* A simple warning */
    XML_ERR_ERROR = 2 /* A recoverable error */
    XML_ERR_FATAL = 3 /*  A fatal error */
};


Typedef xmlErrorPtr

xmlError * xmlErrorPtr;


Enum xmlParserErrors

enum xmlParserErrors {
    XML_ERR_OK = 0
    XML_ERR_INTERNAL_ERROR = 1 /* 1 */
    XML_ERR_NO_MEMORY = 2 /* 2 */
    XML_ERR_DOCUMENT_START = 3 /* 3 */
    XML_ERR_DOCUMENT_EMPTY = 4 /* 4 */
    XML_ERR_DOCUMENT_END = 5 /* 5 */
    XML_ERR_INVALID_HEX_CHARREF = 6 /* 6 */
    XML_ERR_INVALID_DEC_CHARREF = 7 /* 7 */
    XML_ERR_INVALID_CHARREF = 8 /* 8 */
    XML_ERR_INVALID_CHAR = 9 /* 9 */
    XML_ERR_CHARREF_AT_EOF = 10 /* 10 */
    XML_ERR_CHARREF_IN_PROLOG = 11 /* 11 */
    XML_ERR_CHARREF_IN_EPILOG = 12 /* 12 */
    XML_ERR_CHARREF_IN_DTD = 13 /* 13 */
    XML_ERR_ENTITYREF_AT_EOF = 14 /* 14 */
    XML_ERR_ENTITYREF_IN_PROLOG = 15 /* 15 */
    XML_ERR_ENTITYREF_IN_EPILOG = 16 /* 16 */
    XML_ERR_ENTITYREF_IN_DTD = 17 /* 17 */
    XML_ERR_PEREF_AT_EOF = 18 /* 18 */
    XML_ERR_PEREF_IN_PROLOG = 19 /* 19 */
    XML_ERR_PEREF_IN_EPILOG = 20 /* 20 */
    XML_ERR_PEREF_IN_INT_SUBSET = 21 /* 21 */
    XML_ERR_ENTITYREF_NO_NAME = 22 /* 22 */
    XML_ERR_ENTITYREF_SEMICOL_MISSING = 23 /* 23 */
    XML_ERR_PEREF_NO_NAME = 24 /* 24 */
    XML_ERR_PEREF_SEMICOL_MISSING = 25 /* 25 */
    XML_ERR_UNDECLARED_ENTITY = 26 /* 26 */
    XML_WAR_UNDECLARED_ENTITY = 27 /* 27 */
    XML_ERR_UNPARSED_ENTITY = 28 /* 28 */
    XML_ERR_ENTITY_IS_EXTERNAL = 29 /* 29 */
    XML_ERR_ENTITY_IS_PARAMETER = 30 /* 30 */
    XML_ERR_UNKNOWN_ENCODING = 31 /* 31 */
    XML_ERR_UNSUPPORTED_ENCODING = 32 /* 32 */
    XML_ERR_STRING_NOT_STARTED = 33 /* 33 */
    XML_ERR_STRING_NOT_CLOSED = 34 /* 34 */
    XML_ERR_NS_DECL_ERROR = 35 /* 35 */
    XML_ERR_ENTITY_NOT_STARTED = 36 /* 36 */
    XML_ERR_ENTITY_NOT_FINISHED = 37 /* 37 */
    XML_ERR_LT_IN_ATTRIBUTE = 38 /* 38 */
    XML_ERR_ATTRIBUTE_NOT_STARTED = 39 /* 39 */
    XML_ERR_ATTRIBUTE_NOT_FINISHED = 40 /* 40 */
    XML_ERR_ATTRIBUTE_WITHOUT_VALUE = 41 /* 41 */
    XML_ERR_ATTRIBUTE_REDEFINED = 42 /* 42 */
    XML_ERR_LITERAL_NOT_STARTED = 43 /* 43 */
    XML_ERR_LITERAL_NOT_FINISHED = 44 /* 44 */
    XML_ERR_COMMENT_NOT_FINISHED = 45 /* 45 */
    XML_ERR_PI_NOT_STARTED = 46 /* 46 */
    XML_ERR_PI_NOT_FINISHED = 47 /* 47 */
    XML_ERR_NOTATION_NOT_STARTED = 48 /* 48 */
    XML_ERR_NOTATION_NOT_FINISHED = 49 /* 49 */
    XML_ERR_ATTLIST_NOT_STARTED = 50 /* 50 */
    XML_ERR_ATTLIST_NOT_FINISHED = 51 /* 51 */
    XML_ERR_MIXED_NOT_STARTED = 52 /* 52 */
    XML_ERR_MIXED_NOT_FINISHED = 53 /* 53 */
    XML_ERR_ELEMCONTENT_NOT_STARTED = 54 /* 54 */
    XML_ERR_ELEMCONTENT_NOT_FINISHED = 55 /* 55 */
    XML_ERR_XMLDECL_NOT_STARTED = 56 /* 56 */
    XML_ERR_XMLDECL_NOT_FINISHED = 57 /* 57 */
    XML_ERR_CONDSEC_NOT_STARTED = 58 /* 58 */
    XML_ERR_CONDSEC_NOT_FINISHED = 59 /* 59 */
    XML_ERR_EXT_SUBSET_NOT_FINISHED = 60 /* 60 */
    XML_ERR_DOCTYPE_NOT_FINISHED = 61 /* 61 */
    XML_ERR_MISPLACED_CDATA_END = 62 /* 62 */
    XML_ERR_CDATA_NOT_FINISHED = 63 /* 63 */
    XML_ERR_RESERVED_XML_NAME = 64 /* 64 */
    XML_ERR_SPACE_REQUIRED = 65 /* 65 */
    XML_ERR_SEPARATOR_REQUIRED = 66 /* 66 */
    XML_ERR_NMTOKEN_REQUIRED = 67 /* 67 */
    XML_ERR_NAME_REQUIRED = 68 /* 68 */
    XML_ERR_PCDATA_REQUIRED = 69 /* 69 */
    XML_ERR_URI_REQUIRED = 70 /* 70 */
    XML_ERR_PUBID_REQUIRED = 71 /* 71 */
    XML_ERR_LT_REQUIRED = 72 /* 72 */
    XML_ERR_GT_REQUIRED = 73 /* 73 */
    XML_ERR_LTSLASH_REQUIRED = 74 /* 74 */
    XML_ERR_EQUAL_REQUIRED = 75 /* 75 */
    XML_ERR_TAG_NAME_MISMATCH = 76 /* 76 */
    XML_ERR_TAG_NOT_FINISHED = 77 /* 77 */
    XML_ERR_STANDALONE_VALUE = 78 /* 78 */
    XML_ERR_ENCODING_NAME = 79 /* 79 */
    XML_ERR_HYPHEN_IN_COMMENT = 80 /* 80 */
    XML_ERR_INVALID_ENCODING = 81 /* 81 */
    XML_ERR_EXT_ENTITY_STANDALONE = 82 /* 82 */
    XML_ERR_CONDSEC_INVALID = 83 /* 83 */
    XML_ERR_VALUE_REQUIRED = 84 /* 84 */
    XML_ERR_NOT_WELL_BALANCED = 85 /* 85 */
    XML_ERR_EXTRA_CONTENT = 86 /* 86 */
    XML_ERR_ENTITY_CHAR_ERROR = 87 /* 87 */
    XML_ERR_ENTITY_PE_INTERNAL = 88 /* 88 */
    XML_ERR_ENTITY_LOOP = 89 /* 89 */
    XML_ERR_ENTITY_BOUNDARY = 90 /* 90 */
    XML_ERR_INVALID_URI = 91 /* 91 */
    XML_ERR_URI_FRAGMENT = 92 /* 92 */
    XML_WAR_CATALOG_PI = 93 /* 93 */
    XML_ERR_NO_DTD = 94 /* 94 */
    XML_ERR_CONDSEC_INVALID_KEYWORD = 95 /* 95 */
    XML_ERR_VERSION_MISSING = 96 /* 96 */
    XML_WAR_UNKNOWN_VERSION = 97 /* 97 */
    XML_WAR_LANG_VALUE = 98 /* 98 */
    XML_WAR_NS_URI = 99 /* 99 */
    XML_WAR_NS_URI_RELATIVE = 100 /* 100 */
    XML_ERR_MISSING_ENCODING = 101 /* 101 */
    XML_WAR_SPACE_VALUE = 102 /* 102 */
    XML_ERR_NOT_STANDALONE = 103 /* 103 */
    XML_ERR_ENTITY_PROCESSING = 104 /* 104 */
    XML_ERR_NOTATION_PROCESSING = 105 /* 105 */
    XML_WAR_NS_COLUMN = 106 /* 106 */
    XML_WAR_ENTITY_REDEFINED = 107 /* 107 */
    XML_ERR_UNKNOWN_VERSION = 108 /* 108 */
    XML_ERR_VERSION_MISMATCH = 109 /* 109 */
    XML_ERR_NAME_TOO_LONG = 110 /* 110 */
    XML_ERR_USER_STOP = 111 /* 111 */
    XML_ERR_COMMENT_ABRUPTLY_ENDED = 112 /* 112 */
    XML_NS_ERR_XML_NAMESPACE = 200
    XML_NS_ERR_UNDEFINED_NAMESPACE = 201 /* 201 */
    XML_NS_ERR_QNAME = 202 /* 202 */
    XML_NS_ERR_ATTRIBUTE_REDEFINED = 203 /* 203 */
    XML_NS_ERR_EMPTY = 204 /* 204 */
    XML_NS_ERR_COLON = 205 /* 205 */
    XML_DTD_ATTRIBUTE_DEFAULT = 500
    XML_DTD_ATTRIBUTE_REDEFINED = 501 /* 501 */
    XML_DTD_ATTRIBUTE_VALUE = 502 /* 502 */
    XML_DTD_CONTENT_ERROR = 503 /* 503 */
    XML_DTD_CONTENT_MODEL = 504 /* 504 */
    XML_DTD_CONTENT_NOT_DETERMINIST = 505 /* 505 */
    XML_DTD_DIFFERENT_PREFIX = 506 /* 506 */
    XML_DTD_ELEM_DEFAULT_NAMESPACE = 507 /* 507 */
    XML_DTD_ELEM_NAMESPACE = 508 /* 508 */
    XML_DTD_ELEM_REDEFINED = 509 /* 509 */
    XML_DTD_EMPTY_NOTATION = 510 /* 510 */
    XML_DTD_ENTITY_TYPE = 511 /* 511 */
    XML_DTD_ID_FIXED = 512 /* 512 */
    XML_DTD_ID_REDEFINED = 513 /* 513 */
    XML_DTD_ID_SUBSET = 514 /* 514 */
    XML_DTD_INVALID_CHILD = 515 /* 515 */
    XML_DTD_INVALID_DEFAULT = 516 /* 516 */
    XML_DTD_LOAD_ERROR = 517 /* 517 */
    XML_DTD_MISSING_ATTRIBUTE = 518 /* 518 */
    XML_DTD_MIXED_CORRUPT = 519 /* 519 */
    XML_DTD_MULTIPLE_ID = 520 /* 520 */
    XML_DTD_NO_DOC = 521 /* 521 */
    XML_DTD_NO_DTD = 522 /* 522 */
    XML_DTD_NO_ELEM_NAME = 523 /* 523 */
    XML_DTD_NO_PREFIX = 524 /* 524 */
    XML_DTD_NO_ROOT = 525 /* 525 */
    XML_DTD_NOTATION_REDEFINED = 526 /* 526 */
    XML_DTD_NOTATION_VALUE = 527 /* 527 */
    XML_DTD_NOT_EMPTY = 528 /* 528 */
    XML_DTD_NOT_PCDATA = 529 /* 529 */
    XML_DTD_NOT_STANDALONE = 530 /* 530 */
    XML_DTD_ROOT_NAME = 531 /* 531 */
    XML_DTD_STANDALONE_WHITE_SPACE = 532 /* 532 */
    XML_DTD_UNKNOWN_ATTRIBUTE = 533 /* 533 */
    XML_DTD_UNKNOWN_ELEM = 534 /* 534 */
    XML_DTD_UNKNOWN_ENTITY = 535 /* 535 */
    XML_DTD_UNKNOWN_ID = 536 /* 536 */
    XML_DTD_UNKNOWN_NOTATION = 537 /* 537 */
    XML_DTD_STANDALONE_DEFAULTED = 538 /* 538 */
    XML_DTD_XMLID_VALUE = 539 /* 539 */
    XML_DTD_XMLID_TYPE = 540 /* 540 */
    XML_DTD_DUP_TOKEN = 541 /* 541 */
    XML_HTML_STRUCURE_ERROR = 800
    XML_HTML_UNKNOWN_TAG = 801 /* 801 */
    XML_HTML_INCORRECTLY_OPENED_COMMENT = 802 /* 802 */
    XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000
    XML_RNGP_ATTR_CONFLICT = 1001 /* 1001 */
    XML_RNGP_ATTRIBUTE_CHILDREN = 1002 /* 1002 */
    XML_RNGP_ATTRIBUTE_CONTENT = 1003 /* 1003 */
    XML_RNGP_ATTRIBUTE_EMPTY = 1004 /* 1004 */
    XML_RNGP_ATTRIBUTE_NOOP = 1005 /* 1005 */
    XML_RNGP_CHOICE_CONTENT = 1006 /* 1006 */
    XML_RNGP_CHOICE_EMPTY = 1007 /* 1007 */
    XML_RNGP_CREATE_FAILURE = 1008 /* 1008 */
    XML_RNGP_DATA_CONTENT = 1009 /* 1009 */
    XML_RNGP_DEF_CHOICE_AND_INTERLEAVE = 1010 /* 1010 */
    XML_RNGP_DEFINE_CREATE_FAILED = 1011 /* 1011 */
    XML_RNGP_DEFINE_EMPTY = 1012 /* 1012 */
    XML_RNGP_DEFINE_MISSING = 1013 /* 1013 */
    XML_RNGP_DEFINE_NAME_MISSING = 1014 /* 1014 */
    XML_RNGP_ELEM_CONTENT_EMPTY = 1015 /* 1015 */
    XML_RNGP_ELEM_CONTENT_ERROR = 1016 /* 1016 */
    XML_RNGP_ELEMENT_EMPTY = 1017 /* 1017 */
    XML_RNGP_ELEMENT_CONTENT = 1018 /* 1018 */
    XML_RNGP_ELEMENT_NAME = 1019 /* 1019 */
    XML_RNGP_ELEMENT_NO_CONTENT = 1020 /* 1020 */
    XML_RNGP_ELEM_TEXT_CONFLICT = 1021 /* 1021 */
    XML_RNGP_EMPTY = 1022 /* 1022 */
    XML_RNGP_EMPTY_CONSTRUCT = 1023 /* 1023 */
    XML_RNGP_EMPTY_CONTENT = 1024 /* 1024 */
    XML_RNGP_EMPTY_NOT_EMPTY = 1025 /* 1025 */
    XML_RNGP_ERROR_TYPE_LIB = 1026 /* 1026 */
    XML_RNGP_EXCEPT_EMPTY = 1027 /* 1027 */
    XML_RNGP_EXCEPT_MISSING = 1028 /* 1028 */
    XML_RNGP_EXCEPT_MULTIPLE = 1029 /* 1029 */
    XML_RNGP_EXCEPT_NO_CONTENT = 1030 /* 1030 */
    XML_RNGP_EXTERNALREF_EMTPY = 1031 /* 1031 */
    XML_RNGP_EXTERNAL_REF_FAILURE = 1032 /* 1032 */
    XML_RNGP_EXTERNALREF_RECURSE = 1033 /* 1033 */
    XML_RNGP_FORBIDDEN_ATTRIBUTE = 1034 /* 1034 */
    XML_RNGP_FOREIGN_ELEMENT = 1035 /* 1035 */
    XML_RNGP_GRAMMAR_CONTENT = 1036 /* 1036 */
    XML_RNGP_GRAMMAR_EMPTY = 1037 /* 1037 */
    XML_RNGP_GRAMMAR_MISSING = 1038 /* 1038 */
    XML_RNGP_GRAMMAR_NO_START = 1039 /* 1039 */
    XML_RNGP_GROUP_ATTR_CONFLICT = 1040 /* 1040 */
    XML_RNGP_HREF_ERROR = 1041 /* 1041 */
    XML_RNGP_INCLUDE_EMPTY = 1042 /* 1042 */
    XML_RNGP_INCLUDE_FAILURE = 1043 /* 1043 */
    XML_RNGP_INCLUDE_RECURSE = 1044 /* 1044 */
    XML_RNGP_INTERLEAVE_ADD = 1045 /* 1045 */
    XML_RNGP_INTERLEAVE_CREATE_FAILED = 1046 /* 1046 */
    XML_RNGP_INTERLEAVE_EMPTY = 1047 /* 1047 */
    XML_RNGP_INTERLEAVE_NO_CONTENT = 1048 /* 1048 */
    XML_RNGP_INVALID_DEFINE_NAME = 1049 /* 1049 */
    XML_RNGP_INVALID_URI = 1050 /* 1050 */
    XML_RNGP_INVALID_VALUE = 1051 /* 1051 */
    XML_RNGP_MISSING_HREF = 1052 /* 1052 */
    XML_RNGP_NAME_MISSING = 1053 /* 1053 */
    XML_RNGP_NEED_COMBINE = 1054 /* 1054 */
    XML_RNGP_NOTALLOWED_NOT_EMPTY = 1055 /* 1055 */
    XML_RNGP_NSNAME_ATTR_ANCESTOR = 1056 /* 1056 */
    XML_RNGP_NSNAME_NO_NS = 1057 /* 1057 */
    XML_RNGP_PARAM_FORBIDDEN = 1058 /* 1058 */
    XML_RNGP_PARAM_NAME_MISSING = 1059 /* 1059 */
    XML_RNGP_PARENTREF_CREATE_FAILED = 1060 /* 1060 */
    XML_RNGP_PARENTREF_NAME_INVALID = 1061 /* 1061 */
    XML_RNGP_PARENTREF_NO_NAME = 1062 /* 1062 */
    XML_RNGP_PARENTREF_NO_PARENT = 1063 /* 1063 */
    XML_RNGP_PARENTREF_NOT_EMPTY = 1064 /* 1064 */
    XML_RNGP_PARSE_ERROR = 1065 /* 1065 */
    XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME = 1066 /* 1066 */
    XML_RNGP_PAT_ATTR_ATTR = 1067 /* 1067 */
    XML_RNGP_PAT_ATTR_ELEM = 1068 /* 1068 */
    XML_RNGP_PAT_DATA_EXCEPT_ATTR = 1069 /* 1069 */
    XML_RNGP_PAT_DATA_EXCEPT_ELEM = 1070 /* 1070 */
    XML_RNGP_PAT_DATA_EXCEPT_EMPTY = 1071 /* 1071 */
    XML_RNGP_PAT_DATA_EXCEPT_GROUP = 1072 /* 1072 */
    XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE = 1073 /* 1073 */
    XML_RNGP_PAT_DATA_EXCEPT_LIST = 1074 /* 1074 */
    XML_RNGP_PAT_DATA_EXCEPT_ONEMORE = 1075 /* 1075 */
    XML_RNGP_PAT_DATA_EXCEPT_REF = 1076 /* 1076 */
    XML_RNGP_PAT_DATA_EXCEPT_TEXT = 1077 /* 1077 */
    XML_RNGP_PAT_LIST_ATTR = 1078 /* 1078 */
    XML_RNGP_PAT_LIST_ELEM = 1079 /* 1079 */
    XML_RNGP_PAT_LIST_INTERLEAVE = 1080 /* 1080 */
    XML_RNGP_PAT_LIST_LIST = 1081 /* 1081 */
    XML_RNGP_PAT_LIST_REF = 1082 /* 1082 */
    XML_RNGP_PAT_LIST_TEXT = 1083 /* 1083 */
    XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME = 1084 /* 1084 */
    XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME = 1085 /* 1085 */
    XML_RNGP_PAT_ONEMORE_GROUP_ATTR = 1086 /* 1086 */
    XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR = 1087 /* 1087 */
    XML_RNGP_PAT_START_ATTR = 1088 /* 1088 */
    XML_RNGP_PAT_START_DATA = 1089 /* 1089 */
    XML_RNGP_PAT_START_EMPTY = 1090 /* 1090 */
    XML_RNGP_PAT_START_GROUP = 1091 /* 1091 */
    XML_RNGP_PAT_START_INTERLEAVE = 1092 /* 1092 */
    XML_RNGP_PAT_START_LIST = 1093 /* 1093 */
    XML_RNGP_PAT_START_ONEMORE = 1094 /* 1094 */
    XML_RNGP_PAT_START_TEXT = 1095 /* 1095 */
    XML_RNGP_PAT_START_VALUE = 1096 /* 1096 */
    XML_RNGP_PREFIX_UNDEFINED = 1097 /* 1097 */
    XML_RNGP_REF_CREATE_FAILED = 1098 /* 1098 */
    XML_RNGP_REF_CYCLE = 1099 /* 1099 */
    XML_RNGP_REF_NAME_INVALID = 1100 /* 1100 */
    XML_RNGP_REF_NO_DEF = 1101 /* 1101 */
    XML_RNGP_REF_NO_NAME = 1102 /* 1102 */
    XML_RNGP_REF_NOT_EMPTY = 1103 /* 1103 */
    XML_RNGP_START_CHOICE_AND_INTERLEAVE = 1104 /* 1104 */
    XML_RNGP_START_CONTENT = 1105 /* 1105 */
    XML_RNGP_START_EMPTY = 1106 /* 1106 */
    XML_RNGP_START_MISSING = 1107 /* 1107 */
    XML_RNGP_TEXT_EXPECTED = 1108 /* 1108 */
    XML_RNGP_TEXT_HAS_CHILD = 1109 /* 1109 */
    XML_RNGP_TYPE_MISSING = 1110 /* 1110 */
    XML_RNGP_TYPE_NOT_FOUND = 1111 /* 1111 */
    XML_RNGP_TYPE_VALUE = 1112 /* 1112 */
    XML_RNGP_UNKNOWN_ATTRIBUTE = 1113 /* 1113 */
    XML_RNGP_UNKNOWN_COMBINE = 1114 /* 1114 */
    XML_RNGP_UNKNOWN_CONSTRUCT = 1115 /* 1115 */
    XML_RNGP_UNKNOWN_TYPE_LIB = 1116 /* 1116 */
    XML_RNGP_URI_FRAGMENT = 1117 /* 1117 */
    XML_RNGP_URI_NOT_ABSOLUTE = 1118 /* 1118 */
    XML_RNGP_VALUE_EMPTY = 1119 /* 1119 */
    XML_RNGP_VALUE_NO_CONTENT = 1120 /* 1120 */
    XML_RNGP_XMLNS_NAME = 1121 /* 1121 */
    XML_RNGP_XML_NS = 1122 /* 1122 */
    XML_XPATH_EXPRESSION_OK = 1200
    XML_XPATH_NUMBER_ERROR = 1201 /* 1201 */
    XML_XPATH_UNFINISHED_LITERAL_ERROR = 1202 /* 1202 */
    XML_XPATH_START_LITERAL_ERROR = 1203 /* 1203 */
    XML_XPATH_VARIABLE_REF_ERROR = 1204 /* 1204 */
    XML_XPATH_UNDEF_VARIABLE_ERROR = 1205 /* 1205 */
    XML_XPATH_INVALID_PREDICATE_ERROR = 1206 /* 1206 */
    XML_XPATH_EXPR_ERROR = 1207 /* 1207 */
    XML_XPATH_UNCLOSED_ERROR = 1208 /* 1208 */
    XML_XPATH_UNKNOWN_FUNC_ERROR = 1209 /* 1209 */
    XML_XPATH_INVALID_OPERAND = 1210 /* 1210 */
    XML_XPATH_INVALID_TYPE = 1211 /* 1211 */
    XML_XPATH_INVALID_ARITY = 1212 /* 1212 */
    XML_XPATH_INVALID_CTXT_SIZE = 1213 /* 1213 */
    XML_XPATH_INVALID_CTXT_POSITION = 1214 /* 1214 */
    XML_XPATH_MEMORY_ERROR = 1215 /* 1215 */
    XML_XPTR_SYNTAX_ERROR = 1216 /* 1216 */
    XML_XPTR_RESOURCE_ERROR = 1217 /* 1217 */
    XML_XPTR_SUB_RESOURCE_ERROR = 1218 /* 1218 */
    XML_XPATH_UNDEF_PREFIX_ERROR = 1219 /* 1219 */
    XML_XPATH_ENCODING_ERROR = 1220 /* 1220 */
    XML_XPATH_INVALID_CHAR_ERROR = 1221 /* 1221 */
    XML_TREE_INVALID_HEX = 1300
    XML_TREE_INVALID_DEC = 1301 /* 1301 */
    XML_TREE_UNTERMINATED_ENTITY = 1302 /* 1302 */
    XML_TREE_NOT_UTF8 = 1303 /* 1303 */
    XML_SAVE_NOT_UTF8 = 1400
    XML_SAVE_CHAR_INVALID = 1401 /* 1401 */
    XML_SAVE_NO_DOCTYPE = 1402 /* 1402 */
    XML_SAVE_UNKNOWN_ENCODING = 1403 /* 1403 */
    XML_REGEXP_COMPILE_ERROR = 1450
    XML_IO_UNKNOWN = 1500
    XML_IO_EACCES = 1501 /* 1501 */
    XML_IO_EAGAIN = 1502 /* 1502 */
    XML_IO_EBADF = 1503 /* 1503 */
    XML_IO_EBADMSG = 1504 /* 1504 */
    XML_IO_EBUSY = 1505 /* 1505 */
    XML_IO_ECANCELED = 1506 /* 1506 */
    XML_IO_ECHILD = 1507 /* 1507 */
    XML_IO_EDEADLK = 1508 /* 1508 */
    XML_IO_EDOM = 1509 /* 1509 */
    XML_IO_EEXIST = 1510 /* 1510 */
    XML_IO_EFAULT = 1511 /* 1511 */
    XML_IO_EFBIG = 1512 /* 1512 */
    XML_IO_EINPROGRESS = 1513 /* 1513 */
    XML_IO_EINTR = 1514 /* 1514 */
    XML_IO_EINVAL = 1515 /* 1515 */
    XML_IO_EIO = 1516 /* 1516 */
    XML_IO_EISDIR = 1517 /* 1517 */
    XML_IO_EMFILE = 1518 /* 1518 */
    XML_IO_EMLINK = 1519 /* 1519 */
    XML_IO_EMSGSIZE = 1520 /* 1520 */
    XML_IO_ENAMETOOLONG = 1521 /* 1521 */
    XML_IO_ENFILE = 1522 /* 1522 */
    XML_IO_ENODEV = 1523 /* 1523 */
    XML_IO_ENOENT = 1524 /* 1524 */
    XML_IO_ENOEXEC = 1525 /* 1525 */
    XML_IO_ENOLCK = 1526 /* 1526 */
    XML_IO_ENOMEM = 1527 /* 1527 */
    XML_IO_ENOSPC = 1528 /* 1528 */
    XML_IO_ENOSYS = 1529 /* 1529 */
    XML_IO_ENOTDIR = 1530 /* 1530 */
    XML_IO_ENOTEMPTY = 1531 /* 1531 */
    XML_IO_ENOTSUP = 1532 /* 1532 */
    XML_IO_ENOTTY = 1533 /* 1533 */
    XML_IO_ENXIO = 1534 /* 1534 */
    XML_IO_EPERM = 1535 /* 1535 */
    XML_IO_EPIPE = 1536 /* 1536 */
    XML_IO_ERANGE = 1537 /* 1537 */
    XML_IO_EROFS = 1538 /* 1538 */
    XML_IO_ESPIPE = 1539 /* 1539 */
    XML_IO_ESRCH = 1540 /* 1540 */
    XML_IO_ETIMEDOUT = 1541 /* 1541 */
    XML_IO_EXDEV = 1542 /* 1542 */
    XML_IO_NETWORK_ATTEMPT = 1543 /* 1543 */
    XML_IO_ENCODER = 1544 /* 1544 */
    XML_IO_FLUSH = 1545 /* 1545 */
    XML_IO_WRITE = 1546 /* 1546 */
    XML_IO_NO_INPUT = 1547 /* 1547 */
    XML_IO_BUFFER_FULL = 1548 /* 1548 */
    XML_IO_LOAD_ERROR = 1549 /* 1549 */
    XML_IO_ENOTSOCK = 1550 /* 1550 */
    XML_IO_EISCONN = 1551 /* 1551 */
    XML_IO_ECONNREFUSED = 1552 /* 1552 */
    XML_IO_ENETUNREACH = 1553 /* 1553 */
    XML_IO_EADDRINUSE = 1554 /* 1554 */
    XML_IO_EALREADY = 1555 /* 1555 */
    XML_IO_EAFNOSUPPORT = 1556 /* 1556 */
    XML_XINCLUDE_RECURSION = 1600
    XML_XINCLUDE_PARSE_VALUE = 1601 /* 1601 */
    XML_XINCLUDE_ENTITY_DEF_MISMATCH = 1602 /* 1602 */
    XML_XINCLUDE_NO_HREF = 1603 /* 1603 */
    XML_XINCLUDE_NO_FALLBACK = 1604 /* 1604 */
    XML_XINCLUDE_HREF_URI = 1605 /* 1605 */
    XML_XINCLUDE_TEXT_FRAGMENT = 1606 /* 1606 */
    XML_XINCLUDE_TEXT_DOCUMENT = 1607 /* 1607 */
    XML_XINCLUDE_INVALID_CHAR = 1608 /* 1608 */
    XML_XINCLUDE_BUILD_FAILED = 1609 /* 1609 */
    XML_XINCLUDE_UNKNOWN_ENCODING = 1610 /* 1610 */
    XML_XINCLUDE_MULTIPLE_ROOT = 1611 /* 1611 */
    XML_XINCLUDE_XPTR_FAILED = 1612 /* 1612 */
    XML_XINCLUDE_XPTR_RESULT = 1613 /* 1613 */
    XML_XINCLUDE_INCLUDE_IN_INCLUDE = 1614 /* 1614 */
    XML_XINCLUDE_FALLBACKS_IN_INCLUDE = 1615 /* 1615 */
    XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE = 1616 /* 1616 */
    XML_XINCLUDE_DEPRECATED_NS = 1617 /* 1617 */
    XML_XINCLUDE_FRAGMENT_ID = 1618 /* 1618 */
    XML_CATALOG_MISSING_ATTR = 1650
    XML_CATALOG_ENTRY_BROKEN = 1651 /* 1651 */
    XML_CATALOG_PREFER_VALUE = 1652 /* 1652 */
    XML_CATALOG_NOT_CATALOG = 1653 /* 1653 */
    XML_CATALOG_RECURSION = 1654 /* 1654 */
    XML_SCHEMAP_PREFIX_UNDEFINED = 1700
    XML_SCHEMAP_ATTRFORMDEFAULT_VALUE = 1701 /* 1701 */
    XML_SCHEMAP_ATTRGRP_NONAME_NOREF = 1702 /* 1702 */
    XML_SCHEMAP_ATTR_NONAME_NOREF = 1703 /* 1703 */
    XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF = 1704 /* 1704 */
    XML_SCHEMAP_ELEMFORMDEFAULT_VALUE = 1705 /* 1705 */
    XML_SCHEMAP_ELEM_NONAME_NOREF = 1706 /* 1706 */
    XML_SCHEMAP_EXTENSION_NO_BASE = 1707 /* 1707 */
    XML_SCHEMAP_FACET_NO_VALUE = 1708 /* 1708 */
    XML_SCHEMAP_FAILED_BUILD_IMPORT = 1709 /* 1709 */
    XML_SCHEMAP_GROUP_NONAME_NOREF = 1710 /* 1710 */
    XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI = 1711 /* 1711 */
    XML_SCHEMAP_IMPORT_REDEFINE_NSNAME = 1712 /* 1712 */
    XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI = 1713 /* 1713 */
    XML_SCHEMAP_INVALID_BOOLEAN = 1714 /* 1714 */
    XML_SCHEMAP_INVALID_ENUM = 1715 /* 1715 */
    XML_SCHEMAP_INVALID_FACET = 1716 /* 1716 */
    XML_SCHEMAP_INVALID_FACET_VALUE = 1717 /* 1717 */
    XML_SCHEMAP_INVALID_MAXOCCURS = 1718 /* 1718 */
    XML_SCHEMAP_INVALID_MINOCCURS = 1719 /* 1719 */
    XML_SCHEMAP_INVALID_REF_AND_SUBTYPE = 1720 /* 1720 */
    XML_SCHEMAP_INVALID_WHITE_SPACE = 1721 /* 1721 */
    XML_SCHEMAP_NOATTR_NOREF = 1722 /* 1722 */
    XML_SCHEMAP_NOTATION_NO_NAME = 1723 /* 1723 */
    XML_SCHEMAP_NOTYPE_NOREF = 1724 /* 1724 */
    XML_SCHEMAP_REF_AND_SUBTYPE = 1725 /* 1725 */
    XML_SCHEMAP_RESTRICTION_NONAME_NOREF = 1726 /* 1726 */
    XML_SCHEMAP_SIMPLETYPE_NONAME = 1727 /* 1727 */
    XML_SCHEMAP_TYPE_AND_SUBTYPE = 1728 /* 1728 */
    XML_SCHEMAP_UNKNOWN_ALL_CHILD = 1729 /* 1729 */
    XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD = 1730 /* 1730 */
    XML_SCHEMAP_UNKNOWN_ATTR_CHILD = 1731 /* 1731 */
    XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD = 1732 /* 1732 */
    XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP = 1733 /* 1733 */
    XML_SCHEMAP_UNKNOWN_BASE_TYPE = 1734 /* 1734 */
    XML_SCHEMAP_UNKNOWN_CHOICE_CHILD = 1735 /* 1735 */
    XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD = 1736 /* 1736 */
    XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD = 1737 /* 1737 */
    XML_SCHEMAP_UNKNOWN_ELEM_CHILD = 1738 /* 1738 */
    XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD = 1739 /* 1739 */
    XML_SCHEMAP_UNKNOWN_FACET_CHILD = 1740 /* 1740 */
    XML_SCHEMAP_UNKNOWN_FACET_TYPE = 1741 /* 1741 */
    XML_SCHEMAP_UNKNOWN_GROUP_CHILD = 1742 /* 1742 */
    XML_SCHEMAP_UNKNOWN_IMPORT_CHILD = 1743 /* 1743 */
    XML_SCHEMAP_UNKNOWN_LIST_CHILD = 1744 /* 1744 */
    XML_SCHEMAP_UNKNOWN_NOTATION_CHILD = 1745 /* 1745 */
    XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD = 1746 /* 1746 */
    XML_SCHEMAP_UNKNOWN_REF = 1747 /* 1747 */
    XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD = 1748 /* 1748 */
    XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD = 1749 /* 1749 */
    XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD = 1750 /* 1750 */
    XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD = 1751 /* 1751 */
    XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD = 1752 /* 1752 */
    XML_SCHEMAP_UNKNOWN_TYPE = 1753 /* 1753 */
    XML_SCHEMAP_UNKNOWN_UNION_CHILD = 1754 /* 1754 */
    XML_SCHEMAP_ELEM_DEFAULT_FIXED = 1755 /* 1755 */
    XML_SCHEMAP_REGEXP_INVALID = 1756 /* 1756 */
    XML_SCHEMAP_FAILED_LOAD = 1757 /* 1757 */
    XML_SCHEMAP_NOTHING_TO_PARSE = 1758 /* 1758 */
    XML_SCHEMAP_NOROOT = 1759 /* 1759 */
    XML_SCHEMAP_REDEFINED_GROUP = 1760 /* 1760 */
    XML_SCHEMAP_REDEFINED_TYPE = 1761 /* 1761 */
    XML_SCHEMAP_REDEFINED_ELEMENT = 1762 /* 1762 */
    XML_SCHEMAP_REDEFINED_ATTRGROUP = 1763 /* 1763 */
    XML_SCHEMAP_REDEFINED_ATTR = 1764 /* 1764 */
    XML_SCHEMAP_REDEFINED_NOTATION = 1765 /* 1765 */
    XML_SCHEMAP_FAILED_PARSE = 1766 /* 1766 */
    XML_SCHEMAP_UNKNOWN_PREFIX = 1767 /* 1767 */
    XML_SCHEMAP_DEF_AND_PREFIX = 1768 /* 1768 */
    XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD = 1769 /* 1769 */
    XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770 /* 1770 */
    XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771 /* 1771 */
    XML_SCHEMAP_NOT_SCHEMA = 1772 /* 1772 */
    XML_SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773 /* 1773 */
    XML_SCHEMAP_INVALID_ATTR_USE = 1774 /* 1774 */
    XML_SCHEMAP_RECURSIVE = 1775 /* 1775 */
    XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE = 1776 /* 1776 */
    XML_SCHEMAP_INVALID_ATTR_COMBINATION = 1777 /* 1777 */
    XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION = 1778 /* 1778 */
    XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD = 1779 /* 1779 */
    XML_SCHEMAP_INVALID_ATTR_NAME = 1780 /* 1780 */
    XML_SCHEMAP_REF_AND_CONTENT = 1781 /* 1781 */
    XML_SCHEMAP_CT_PROPS_CORRECT_1 = 1782 /* 1782 */
    XML_SCHEMAP_CT_PROPS_CORRECT_2 = 1783 /* 1783 */
    XML_SCHEMAP_CT_PROPS_CORRECT_3 = 1784 /* 1784 */
    XML_SCHEMAP_CT_PROPS_CORRECT_4 = 1785 /* 1785 */
    XML_SCHEMAP_CT_PROPS_CORRECT_5 = 1786 /* 1786 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 = 1787 /* 1787 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 = 1788 /* 1788 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 = 1789 /* 1789 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 = 1790 /* 1790 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3 = 1791 /* 1791 */
    XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER = 1792 /* 1792 */
    XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE = 1793 /* 1793 */
    XML_SCHEMAP_UNION_NOT_EXPRESSIBLE = 1794 /* 1794 */
    XML_SCHEMAP_SRC_IMPORT_3_1 = 1795 /* 1795 */
    XML_SCHEMAP_SRC_IMPORT_3_2 = 1796 /* 1796 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 = 1797 /* 1797 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 = 1798 /* 1798 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 = 1799 /* 1799 */
    XML_SCHEMAP_COS_CT_EXTENDS_1_3 = 1800 /* 1800 */
    XML_SCHEMAV_NOROOT = 1801
    XML_SCHEMAV_UNDECLAREDELEM = 1802 /* 1802 */
    XML_SCHEMAV_NOTTOPLEVEL = 1803 /* 1803 */
    XML_SCHEMAV_MISSING = 1804 /* 1804 */
    XML_SCHEMAV_WRONGELEM = 1805 /* 1805 */
    XML_SCHEMAV_NOTYPE = 1806 /* 1806 */
    XML_SCHEMAV_NOROLLBACK = 1807 /* 1807 */
    XML_SCHEMAV_ISABSTRACT = 1808 /* 1808 */
    XML_SCHEMAV_NOTEMPTY = 1809 /* 1809 */
    XML_SCHEMAV_ELEMCONT = 1810 /* 1810 */
    XML_SCHEMAV_HAVEDEFAULT = 1811 /* 1811 */
    XML_SCHEMAV_NOTNILLABLE = 1812 /* 1812 */
    XML_SCHEMAV_EXTRACONTENT = 1813 /* 1813 */
    XML_SCHEMAV_INVALIDATTR = 1814 /* 1814 */
    XML_SCHEMAV_INVALIDELEM = 1815 /* 1815 */
    XML_SCHEMAV_NOTDETERMINIST = 1816 /* 1816 */
    XML_SCHEMAV_CONSTRUCT = 1817 /* 1817 */
    XML_SCHEMAV_INTERNAL = 1818 /* 1818 */
    XML_SCHEMAV_NOTSIMPLE = 1819 /* 1819 */
    XML_SCHEMAV_ATTRUNKNOWN = 1820 /* 1820 */
    XML_SCHEMAV_ATTRINVALID = 1821 /* 1821 */
    XML_SCHEMAV_VALUE = 1822 /* 1822 */
    XML_SCHEMAV_FACET = 1823 /* 1823 */
    XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1 = 1824 /* 1824 */
    XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2 = 1825 /* 1825 */
    XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3 = 1826 /* 1826 */
    XML_SCHEMAV_CVC_TYPE_3_1_1 = 1827 /* 1827 */
    XML_SCHEMAV_CVC_TYPE_3_1_2 = 1828 /* 1828 */
    XML_SCHEMAV_CVC_FACET_VALID = 1829 /* 1829 */
    XML_SCHEMAV_CVC_LENGTH_VALID = 1830 /* 1830 */
    XML_SCHEMAV_CVC_MINLENGTH_VALID = 1831 /* 1831 */
    XML_SCHEMAV_CVC_MAXLENGTH_VALID = 1832 /* 1832 */
    XML_SCHEMAV_CVC_MININCLUSIVE_VALID = 1833 /* 1833 */
    XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID = 1834 /* 1834 */
    XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID = 1835 /* 1835 */
    XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID = 1836 /* 1836 */
    XML_SCHEMAV_CVC_TOTALDIGITS_VALID = 1837 /* 1837 */
    XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID = 1838 /* 1838 */
    XML_SCHEMAV_CVC_PATTERN_VALID = 1839 /* 1839 */
    XML_SCHEMAV_CVC_ENUMERATION_VALID = 1840 /* 1840 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1 = 1841 /* 1841 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2 = 1842 /* 1842 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3 = 1843 /* 1843 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4 = 1844 /* 1844 */
    XML_SCHEMAV_CVC_ELT_1 = 1845 /* 1845 */
    XML_SCHEMAV_CVC_ELT_2 = 1846 /* 1846 */
    XML_SCHEMAV_CVC_ELT_3_1 = 1847 /* 1847 */
    XML_SCHEMAV_CVC_ELT_3_2_1 = 1848 /* 1848 */
    XML_SCHEMAV_CVC_ELT_3_2_2 = 1849 /* 1849 */
    XML_SCHEMAV_CVC_ELT_4_1 = 1850 /* 1850 */
    XML_SCHEMAV_CVC_ELT_4_2 = 1851 /* 1851 */
    XML_SCHEMAV_CVC_ELT_4_3 = 1852 /* 1852 */
    XML_SCHEMAV_CVC_ELT_5_1_1 = 1853 /* 1853 */
    XML_SCHEMAV_CVC_ELT_5_1_2 = 1854 /* 1854 */
    XML_SCHEMAV_CVC_ELT_5_2_1 = 1855 /* 1855 */
    XML_SCHEMAV_CVC_ELT_5_2_2_1 = 1856 /* 1856 */
    XML_SCHEMAV_CVC_ELT_5_2_2_2_1 = 1857 /* 1857 */
    XML_SCHEMAV_CVC_ELT_5_2_2_2_2 = 1858 /* 1858 */
    XML_SCHEMAV_CVC_ELT_6 = 1859 /* 1859 */
    XML_SCHEMAV_CVC_ELT_7 = 1860 /* 1860 */
    XML_SCHEMAV_CVC_ATTRIBUTE_1 = 1861 /* 1861 */
    XML_SCHEMAV_CVC_ATTRIBUTE_2 = 1862 /* 1862 */
    XML_SCHEMAV_CVC_ATTRIBUTE_3 = 1863 /* 1863 */
    XML_SCHEMAV_CVC_ATTRIBUTE_4 = 1864 /* 1864 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1 = 1865 /* 1865 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 = 1866 /* 1866 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 = 1867 /* 1867 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_4 = 1868 /* 1868 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1 = 1869 /* 1869 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2 = 1870 /* 1870 */
    XML_SCHEMAV_ELEMENT_CONTENT = 1871 /* 1871 */
    XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING = 1872 /* 1872 */
    XML_SCHEMAV_CVC_COMPLEX_TYPE_1 = 1873 /* 1873 */
    XML_SCHEMAV_CVC_AU = 1874 /* 1874 */
    XML_SCHEMAV_CVC_TYPE_1 = 1875 /* 1875 */
    XML_SCHEMAV_CVC_TYPE_2 = 1876 /* 1876 */
    XML_SCHEMAV_CVC_IDC = 1877 /* 1877 */
    XML_SCHEMAV_CVC_WILDCARD = 1878 /* 1878 */
    XML_SCHEMAV_MISC = 1879 /* 1879 */
    XML_XPTR_UNKNOWN_SCHEME = 1900
    XML_XPTR_CHILDSEQ_START = 1901 /* 1901 */
    XML_XPTR_EVAL_FAILED = 1902 /* 1902 */
    XML_XPTR_EXTRA_OBJECTS = 1903 /* 1903 */
    XML_C14N_CREATE_CTXT = 1950
    XML_C14N_REQUIRES_UTF8 = 1951 /* 1951 */
    XML_C14N_CREATE_STACK = 1952 /* 1952 */
    XML_C14N_INVALID_NODE = 1953 /* 1953 */
    XML_C14N_UNKNOW_NODE = 1954 /* 1954 */
    XML_C14N_RELATIVE_NAMESPACE = 1955 /* 1955 */
    XML_FTP_PASV_ANSWER = 2000
    XML_FTP_EPSV_ANSWER = 2001 /* 2001 */
    XML_FTP_ACCNT = 2002 /* 2002 */
    XML_FTP_URL_SYNTAX = 2003 /* 2003 */
    XML_HTTP_URL_SYNTAX = 2020
    XML_HTTP_USE_IP = 2021 /* 2021 */
    XML_HTTP_UNKNOWN_HOST = 2022 /* 2022 */
    XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000
    XML_SCHEMAP_SRC_SIMPLE_TYPE_2 = 3001 /* 3001 */
    XML_SCHEMAP_SRC_SIMPLE_TYPE_3 = 3002 /* 3002 */
    XML_SCHEMAP_SRC_SIMPLE_TYPE_4 = 3003 /* 3003 */
    XML_SCHEMAP_SRC_RESOLVE = 3004 /* 3004 */
    XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE = 3005 /* 3005 */
    XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE = 3006 /* 3006 */
    XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES = 3007 /* 3007 */
    XML_SCHEMAP_ST_PROPS_CORRECT_1 = 3008 /* 3008 */
    XML_SCHEMAP_ST_PROPS_CORRECT_2 = 3009 /* 3009 */
    XML_SCHEMAP_ST_PROPS_CORRECT_3 = 3010 /* 3010 */
    XML_SCHEMAP_COS_ST_RESTRICTS_1_1 = 3011 /* 3011 */
    XML_SCHEMAP_COS_ST_RESTRICTS_1_2 = 3012 /* 3012 */
    XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1 = 3013 /* 3013 */
    XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2 = 3014 /* 3014 */
    XML_SCHEMAP_COS_ST_RESTRICTS_2_1 = 3015 /* 3015 */
    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 = 3016 /* 3016 */
    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 = 3017 /* 3017 */
    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 = 3018 /* 3018 */
    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 = 3019 /* 3019 */
    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 = 3020 /* 3020 */
    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 = 3021 /* 3021 */
    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 = 3022 /* 3022 */
    XML_SCHEMAP_COS_ST_RESTRICTS_3_1 = 3023 /* 3023 */
    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1 = 3024 /* 3024 */
    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 = 3025 /* 3025 */
    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 = 3026 /* 3026 */
    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 = 3027 /* 3027 */
    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 = 3028 /* 3028 */
    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 = 3029 /* 3029 */
    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 = 3030 /* 3030 */
    XML_SCHEMAP_COS_ST_DERIVED_OK_2_1 = 3031 /* 3031 */
    XML_SCHEMAP_COS_ST_DERIVED_OK_2_2 = 3032 /* 3032 */
    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED = 3033 /* 3033 */
    XML_SCHEMAP_S4S_ELEM_MISSING = 3034 /* 3034 */
    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED = 3035 /* 3035 */
    XML_SCHEMAP_S4S_ATTR_MISSING = 3036 /* 3036 */
    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE = 3037 /* 3037 */
    XML_SCHEMAP_SRC_ELEMENT_1 = 3038 /* 3038 */
    XML_SCHEMAP_SRC_ELEMENT_2_1 = 3039 /* 3039 */
    XML_SCHEMAP_SRC_ELEMENT_2_2 = 3040 /* 3040 */
    XML_SCHEMAP_SRC_ELEMENT_3 = 3041 /* 3041 */
    XML_SCHEMAP_P_PROPS_CORRECT_1 = 3042 /* 3042 */
    XML_SCHEMAP_P_PROPS_CORRECT_2_1 = 3043 /* 3043 */
    XML_SCHEMAP_P_PROPS_CORRECT_2_2 = 3044 /* 3044 */
    XML_SCHEMAP_E_PROPS_CORRECT_2 = 3045 /* 3045 */
    XML_SCHEMAP_E_PROPS_CORRECT_3 = 3046 /* 3046 */
    XML_SCHEMAP_E_PROPS_CORRECT_4 = 3047 /* 3047 */
    XML_SCHEMAP_E_PROPS_CORRECT_5 = 3048 /* 3048 */
    XML_SCHEMAP_E_PROPS_CORRECT_6 = 3049 /* 3049 */
    XML_SCHEMAP_SRC_INCLUDE = 3050 /* 3050 */
    XML_SCHEMAP_SRC_ATTRIBUTE_1 = 3051 /* 3051 */
    XML_SCHEMAP_SRC_ATTRIBUTE_2 = 3052 /* 3052 */
    XML_SCHEMAP_SRC_ATTRIBUTE_3_1 = 3053 /* 3053 */
    XML_SCHEMAP_SRC_ATTRIBUTE_3_2 = 3054 /* 3054 */
    XML_SCHEMAP_SRC_ATTRIBUTE_4 = 3055 /* 3055 */
    XML_SCHEMAP_NO_XMLNS = 3056 /* 3056 */
    XML_SCHEMAP_NO_XSI = 3057 /* 3057 */
    XML_SCHEMAP_COS_VALID_DEFAULT_1 = 3058 /* 3058 */
    XML_SCHEMAP_COS_VALID_DEFAULT_2_1 = 3059 /* 3059 */
    XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1 = 3060 /* 3060 */
    XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2 = 3061 /* 3061 */
    XML_SCHEMAP_CVC_SIMPLE_TYPE = 3062 /* 3062 */
    XML_SCHEMAP_COS_CT_EXTENDS_1_1 = 3063 /* 3063 */
    XML_SCHEMAP_SRC_IMPORT_1_1 = 3064 /* 3064 */
    XML_SCHEMAP_SRC_IMPORT_1_2 = 3065 /* 3065 */
    XML_SCHEMAP_SRC_IMPORT_2 = 3066 /* 3066 */
    XML_SCHEMAP_SRC_IMPORT_2_1 = 3067 /* 3067 */
    XML_SCHEMAP_SRC_IMPORT_2_2 = 3068 /* 3068 */
    XML_SCHEMAP_INTERNAL = 3069 /* 3069 non-W3C */
    XML_SCHEMAP_NOT_DETERMINISTIC = 3070 /* 3070 non-W3C */
    XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071 /* 3071 */
    XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072 /* 3072 */
    XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073 /* 3073 */
    XML_SCHEMAP_MG_PROPS_CORRECT_1 = 3074 /* 3074 */
    XML_SCHEMAP_MG_PROPS_CORRECT_2 = 3075 /* 3075 */
    XML_SCHEMAP_SRC_CT_1 = 3076 /* 3076 */
    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 = 3077 /* 3077 */
    XML_SCHEMAP_AU_PROPS_CORRECT_2 = 3078 /* 3078 */
    XML_SCHEMAP_A_PROPS_CORRECT_2 = 3079 /* 3079 */
    XML_SCHEMAP_C_PROPS_CORRECT = 3080 /* 3080 */
    XML_SCHEMAP_SRC_REDEFINE = 3081 /* 3081 */
    XML_SCHEMAP_SRC_IMPORT = 3082 /* 3082 */
    XML_SCHEMAP_WARN_SKIP_SCHEMA = 3083 /* 3083 */
    XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084 /* 3084 */
    XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085 /* 3085 */
    XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086 /* 3085 */
    XML_SCHEMAP_AG_PROPS_CORRECT = 3087 /* 3086 */
    XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088 /* 3087 */
    XML_SCHEMAP_AU_PROPS_CORRECT = 3089 /* 3088 */
    XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090 /* 3089 */
    XML_SCHEMAP_COS_ALL_LIMITED = 3091 /* 3090 */
    XML_SCHEMATRONV_ASSERT = 4000 /* 4000 */
    XML_SCHEMATRONV_REPORT = 4001
    XML_MODULE_OPEN = 4900 /* 4900 */
    XML_MODULE_CLOSE = 4901 /* 4901 */
    XML_CHECK_FOUND_ELEMENT = 5000
    XML_CHECK_FOUND_ATTRIBUTE = 5001 /* 5001 */
    XML_CHECK_FOUND_TEXT = 5002 /* 5002 */
    XML_CHECK_FOUND_CDATA = 5003 /* 5003 */
    XML_CHECK_FOUND_ENTITYREF = 5004 /* 5004 */
    XML_CHECK_FOUND_ENTITY = 5005 /* 5005 */
    XML_CHECK_FOUND_PI = 5006 /* 5006 */
    XML_CHECK_FOUND_COMMENT = 5007 /* 5007 */
    XML_CHECK_FOUND_DOCTYPE = 5008 /* 5008 */
    XML_CHECK_FOUND_FRAGMENT = 5009 /* 5009 */
    XML_CHECK_FOUND_NOTATION = 5010 /* 5010 */
    XML_CHECK_UNKNOWN_NODE = 5011 /* 5011 */
    XML_CHECK_ENTITY_TYPE = 5012 /* 5012 */
    XML_CHECK_NO_PARENT = 5013 /* 5013 */
    XML_CHECK_NO_DOC = 5014 /* 5014 */
    XML_CHECK_NO_NAME = 5015 /* 5015 */
    XML_CHECK_NO_ELEM = 5016 /* 5016 */
    XML_CHECK_WRONG_DOC = 5017 /* 5017 */
    XML_CHECK_NO_PREV = 5018 /* 5018 */
    XML_CHECK_WRONG_PREV = 5019 /* 5019 */
    XML_CHECK_NO_NEXT = 5020 /* 5020 */
    XML_CHECK_WRONG_NEXT = 5021 /* 5021 */
    XML_CHECK_NOT_DTD = 5022 /* 5022 */
    XML_CHECK_NOT_ATTR = 5023 /* 5023 */
    XML_CHECK_NOT_ATTR_DECL = 5024 /* 5024 */
    XML_CHECK_NOT_ELEM_DECL = 5025 /* 5025 */
    XML_CHECK_NOT_ENTITY_DECL = 5026 /* 5026 */
    XML_CHECK_NOT_NS_DECL = 5027 /* 5027 */
    XML_CHECK_NO_HREF = 5028 /* 5028 */
    XML_CHECK_WRONG_PARENT = 5029 /* 5029 */
    XML_CHECK_NS_SCOPE = 5030 /* 5030 */
    XML_CHECK_NS_ANCESTOR = 5031 /* 5031 */
    XML_CHECK_NOT_UTF8 = 5032 /* 5032 */
    XML_CHECK_NO_DICT = 5033 /* 5033 */
    XML_CHECK_NOT_NCNAME = 5034 /* 5034 */
    XML_CHECK_OUTSIDE_DICT = 5035 /* 5035 */
    XML_CHECK_WRONG_NAME = 5036 /* 5036 */
    XML_CHECK_NAME_NOT_NULL = 5037 /* 5037 */
    XML_I18N_NO_NAME = 6000
    XML_I18N_NO_HANDLER = 6001 /* 6001 */
    XML_I18N_EXCESS_HANDLER = 6002 /* 6002 */
    XML_I18N_CONV_FAILED = 6003 /* 6003 */
    XML_I18N_NO_OUTPUT = 6004 /* 6004 */
    XML_BUF_OVERFLOW = 7000
};


Function type xmlGenericErrorFunc

void	xmlGenericErrorFunc		(void * ctx, 
const char * msg,
... ...)

Signature of the function to use when there is an error and no parsing or validity context available .

ctx: a parsing context
msg: the message
...: the extra arguments of the varargs to format the message

Function type xmlStructuredErrorFunc

void	xmlStructuredErrorFunc		(void * userData, 
xmlErrorPtr error)

Signature of the function to use when there is an error and the module handles the new error reporting mechanism.

userData: user provided data for the error callback
error: the error being raised.

initGenericErrorDefaultFunc ()

void	initGenericErrorDefaultFunc	(xmlGenericErrorFunc * handler)

Set or reset (if NULL) the default handler for generic errors to the builtin error function.

handler: the handler

xmlCopyError ()

int	xmlCopyError			(xmlErrorPtr from, 
xmlErrorPtr to)

Save the original error to the new place.

from: a source error
to: a target error
Returns: 0 in case of success and -1 in case of error.

xmlCtxtGetLastError ()

xmlErrorPtr	xmlCtxtGetLastError	(void * ctx)

Get the last parsing error registered.

ctx: an XML parser context
Returns: NULL if no error occurred or a pointer to the error

xmlCtxtResetLastError ()

void	xmlCtxtResetLastError		(void * ctx)

Cleanup the last global error registered. For parsing error this does not change the well-formedness result.

ctx: an XML parser context

xmlGetLastError ()

xmlErrorPtr	xmlGetLastError		(void)

Get the last global error registered. This is per thread if compiled with thread support.

Returns: NULL if no error occurred or a pointer to the error

xmlParserError ()

void	xmlParserError			(void * ctx, 
const char * msg,
... ...)

Display and format an error messages, gives file, line, position and extra parameters.

ctx: an XML parser context
msg: the message to display/transmit
...: extra parameters for the message display

xmlParserPrintFileContext ()

void	xmlParserPrintFileContext	(xmlParserInputPtr input)

Displays current context within the input content for error tracking

input: an xmlParserInputPtr input

xmlParserPrintFileInfo ()

void	xmlParserPrintFileInfo		(xmlParserInputPtr input)

Displays the associated file and line information for the current input

input: an xmlParserInputPtr input

xmlParserValidityError ()

void	xmlParserValidityError		(void * ctx, 
const char * msg,
... ...)

Display and format an validity error messages, gives file, line, position and extra parameters.

ctx: an XML parser context
msg: the message to display/transmit
...: extra parameters for the message display

xmlParserValidityWarning ()

void	xmlParserValidityWarning	(void * ctx, 
const char * msg,
... ...)

Display and format a validity warning messages, gives file, line, position and extra parameters.

ctx: an XML parser context
msg: the message to display/transmit
...: extra parameters for the message display

xmlParserWarning ()

void	xmlParserWarning		(void * ctx, 
const char * msg,
... ...)

Display and format a warning messages, gives file, line, position and extra parameters.

ctx: an XML parser context
msg: the message to display/transmit
...: extra parameters for the message display

xmlResetError ()

void	xmlResetError			(xmlErrorPtr err)

Cleanup the error.

err: pointer to the error.

xmlResetLastError ()

void	xmlResetLastError		(void)

Cleanup the last global error registered. For parsing error this does not change the well-formedness result.


xmlSetGenericErrorFunc ()

void	xmlSetGenericErrorFunc		(void * ctx, 
xmlGenericErrorFunc handler)

Function to reset the handler and the error context for out of context error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler One can simply force messages to be emitted to another FILE * than stderr by setting @ctx to this file handle and @handler to NULL. For multi-threaded applications, this must be set separately for each thread.

ctx: the new error handling context
handler: the new handler function

xmlSetStructuredErrorFunc ()

void	xmlSetStructuredErrorFunc	(void * ctx, 
xmlStructuredErrorFunc handler)

Function to reset the handler and the error context for out of context structured error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler For multi-threaded applications, this must be set separately for each thread.

ctx: the new error handling context
handler: the new handler function

PK!e%WWlibxml2-parserInternals.htmlnu[ parserInternals: internals routines and limits exported by the parser.

parserInternals

parserInternals - internals routines and limits exported by the parser.

this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing.

Author(s): Daniel Veillard

Synopsis

#define INPUT_CHUNK;
#define IS_ASCII_DIGIT(c);
#define IS_ASCII_LETTER(c);
#define IS_BASECHAR(c);
#define IS_BLANK(c);
#define IS_BLANK_CH(c);
#define IS_BYTE_CHAR(c);
#define IS_CHAR(c);
#define IS_CHAR_CH(c);
#define IS_COMBINING(c);
#define IS_COMBINING_CH(c);
#define IS_DIGIT(c);
#define IS_DIGIT_CH(c);
#define IS_EXTENDER(c);
#define IS_EXTENDER_CH(c);
#define IS_IDEOGRAPHIC(c);
#define IS_LETTER(c);
#define IS_LETTER_CH(c);
#define IS_PUBIDCHAR(c);
#define IS_PUBIDCHAR_CH(c);
#define MOVETO_ENDTAG(p);
#define MOVETO_STARTTAG(p);
#define SKIP_EOL(p);
#define XML_MAX_DICTIONARY_LIMIT;
#define XML_MAX_LOOKUP_LIMIT;
#define XML_MAX_NAMELEN;
#define XML_MAX_NAME_LENGTH;
#define XML_MAX_TEXT_LENGTH;
#define XML_SUBSTITUTE_BOTH;
#define XML_SUBSTITUTE_NONE;
#define XML_SUBSTITUTE_PEREF;
#define XML_SUBSTITUTE_REF;
htmlParserCtxtPtr	htmlCreateFileParserCtxt	(const char * filename, 
const char * encoding); void htmlInitAutoClose (void); xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt); int inputPush (xmlParserCtxtPtr ctxt,
xmlParserInputPtr value); const xmlChar * namePop (xmlParserCtxtPtr ctxt); int namePush (xmlParserCtxtPtr ctxt,
const xmlChar * value); xmlNodePtr nodePop (xmlParserCtxtPtr ctxt); int nodePush (xmlParserCtxtPtr ctxt,
xmlNodePtr value); int xmlCheckLanguageID (const xmlChar * lang); int xmlCopyChar (int len,
xmlChar * out,
int val); int xmlCopyCharMultiByte (xmlChar * out,
int val); xmlParserCtxtPtr xmlCreateEntityParserCtxt (const xmlChar * URL,
const xmlChar * ID,
const xmlChar * base); xmlParserCtxtPtr xmlCreateFileParserCtxt (const char * filename); xmlParserCtxtPtr xmlCreateMemoryParserCtxt (const char * buffer,
int size); xmlParserCtxtPtr xmlCreateURLParserCtxt (const char * filename,
int options); int xmlCurrentChar (xmlParserCtxtPtr ctxt,
int * len); xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt,
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3); typedef void xmlEntityReferenceFunc (xmlEntityPtr ent,
xmlNodePtr firstNode,
xmlNodePtr lastNode); void xmlErrMemory (xmlParserCtxtPtr ctxt,
const char * extra); void xmlFreeInputStream (xmlParserInputPtr input); void xmlHandleEntity (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity); int xmlIsLetter (int c); xmlChar * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); xmlChar * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); xmlChar * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
xmlChar ** prefix); xmlParserInputPtr xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity); xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
const char * filename); xmlParserInputPtr xmlNewInputStream (xmlParserCtxtPtr ctxt); xmlParserInputPtr xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
const xmlChar * buffer); void xmlNextChar (xmlParserCtxtPtr ctxt); xmlChar * xmlParseAttValue (xmlParserCtxtPtr ctxt); const xmlChar * xmlParseAttribute (xmlParserCtxtPtr ctxt,
xmlChar ** value); void xmlParseAttributeListDecl (xmlParserCtxtPtr ctxt); int xmlParseAttributeType (xmlParserCtxtPtr ctxt,
xmlEnumerationPtr * tree); void xmlParseCDSect (xmlParserCtxtPtr ctxt); void xmlParseCharData (xmlParserCtxtPtr ctxt,
int cdata); int xmlParseCharRef (xmlParserCtxtPtr ctxt); void xmlParseComment (xmlParserCtxtPtr ctxt); void xmlParseContent (xmlParserCtxtPtr ctxt); int xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
xmlChar ** value); void xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); void xmlParseElement (xmlParserCtxtPtr ctxt); xmlElementContentPtr xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt,
int inputchk); int xmlParseElementContentDecl (xmlParserCtxtPtr ctxt,
const xmlChar * name,
xmlElementContentPtr * result); int xmlParseElementDecl (xmlParserCtxtPtr ctxt); xmlElementContentPtr xmlParseElementMixedContentDecl (xmlParserCtxtPtr ctxt,
int inputchk); xmlChar * xmlParseEncName (xmlParserCtxtPtr ctxt); const xmlChar * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); void xmlParseEndTag (xmlParserCtxtPtr ctxt); void xmlParseEntityDecl (xmlParserCtxtPtr ctxt); xmlEntityPtr xmlParseEntityRef (xmlParserCtxtPtr ctxt); xmlChar * xmlParseEntityValue (xmlParserCtxtPtr ctxt,
xmlChar ** orig); int xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
xmlEnumerationPtr * tree); xmlEnumerationPtr xmlParseEnumerationType (xmlParserCtxtPtr ctxt); xmlChar * xmlParseExternalID (xmlParserCtxtPtr ctxt,
xmlChar ** publicID,
int strict); void xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
const xmlChar * ExternalID,
const xmlChar * SystemID); void xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); void xmlParseMisc (xmlParserCtxtPtr ctxt); const xmlChar * xmlParseName (xmlParserCtxtPtr ctxt); void xmlParseNamespace (xmlParserCtxtPtr ctxt); xmlChar * xmlParseNmtoken (xmlParserCtxtPtr ctxt); void xmlParseNotationDecl (xmlParserCtxtPtr ctxt); xmlEnumerationPtr xmlParseNotationType (xmlParserCtxtPtr ctxt); void xmlParsePEReference (xmlParserCtxtPtr ctxt); void xmlParsePI (xmlParserCtxtPtr ctxt); const xmlChar * xmlParsePITarget (xmlParserCtxtPtr ctxt); xmlChar * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt); void xmlParseReference (xmlParserCtxtPtr ctxt); int xmlParseSDDecl (xmlParserCtxtPtr ctxt); const xmlChar * xmlParseStartTag (xmlParserCtxtPtr ctxt); xmlChar * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); void xmlParseTextDecl (xmlParserCtxtPtr ctxt); xmlChar * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); xmlChar * xmlParseVersionNum (xmlParserCtxtPtr ctxt); void xmlParseXMLDecl (xmlParserCtxtPtr ctxt); void xmlParserHandlePEReference (xmlParserCtxtPtr ctxt); void xmlParserHandleReference (xmlParserCtxtPtr ctxt); void xmlParserInputShrink (xmlParserInputPtr in); xmlChar xmlPopInput (xmlParserCtxtPtr ctxt); int xmlPushInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input); xmlChar * xmlScanName (xmlParserCtxtPtr ctxt); void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func); int xmlSkipBlankChars (xmlParserCtxtPtr ctxt); xmlChar * xmlSplitQName (xmlParserCtxtPtr ctxt,
const xmlChar * name,
xmlChar ** prefix); int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
const xmlChar * cur,
int * len); xmlChar * xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
const xmlChar * str,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3); xmlChar * xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
const xmlChar * str,
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3); int xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncoding enc); int xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler); int xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncodingHandlerPtr handler);

Description

Details

Macro INPUT_CHUNK

#define INPUT_CHUNK;

The parser tries to always have that amount of input ready. One of the point is providing context when reporting errors.


Macro IS_ASCII_DIGIT

#define IS_ASCII_DIGIT(c);

Macro to check [0-9]

c: an xmlChar value

Macro IS_ASCII_LETTER

#define IS_ASCII_LETTER(c);

Macro to check [a-zA-Z]

c: an xmlChar value

Macro IS_BASECHAR

#define IS_BASECHAR(c);

Macro to check the following production in the XML spec: [85] BaseChar ::= ... long list see REC ...

c: an UNICODE value (int)

Macro IS_BLANK

#define IS_BLANK(c);

Macro to check the following production in the XML spec: [3] S ::= (#x20 | #x9 | #xD | #xA)+

c: an UNICODE value (int)

Macro IS_BLANK_CH

#define IS_BLANK_CH(c);

Behaviour same as IS_BLANK

c: an xmlChar value (normally unsigned char)

Macro IS_BYTE_CHAR

#define IS_BYTE_CHAR(c);

Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20...] any byte character in the accepted range

c: an byte value (int)

Macro IS_CHAR

#define IS_CHAR(c);

Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.

c: an UNICODE value (int)

Macro IS_CHAR_CH

#define IS_CHAR_CH(c);

Behaves like IS_CHAR on single-byte value

c: an xmlChar (usually an unsigned char)

Macro IS_COMBINING

#define IS_COMBINING(c);

Macro to check the following production in the XML spec: [87] CombiningChar ::= ... long list see REC ...

c: an UNICODE value (int)

Macro IS_COMBINING_CH

#define IS_COMBINING_CH(c);

Always false (all combining chars > 0xff)

c: an xmlChar (usually an unsigned char)

Macro IS_DIGIT

#define IS_DIGIT(c);

Macro to check the following production in the XML spec: [88] Digit ::= ... long list see REC ...

c: an UNICODE value (int)

Macro IS_DIGIT_CH

#define IS_DIGIT_CH(c);

Behaves like IS_DIGIT but with a single byte argument

c: an xmlChar value (usually an unsigned char)

Macro IS_EXTENDER

#define IS_EXTENDER(c);

Macro to check the following production in the XML spec: [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]

c: an UNICODE value (int)

Macro IS_EXTENDER_CH

#define IS_EXTENDER_CH(c);

Behaves like IS_EXTENDER but with a single-byte argument

c: an xmlChar value (usually an unsigned char)

Macro IS_IDEOGRAPHIC

#define IS_IDEOGRAPHIC(c);

Macro to check the following production in the XML spec: [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]

c: an UNICODE value (int)

Macro IS_LETTER

#define IS_LETTER(c);

Macro to check the following production in the XML spec: [84] Letter ::= BaseChar | Ideographic

c: an UNICODE value (int)

Macro IS_LETTER_CH

#define IS_LETTER_CH(c);

Macro behaves like IS_LETTER, but only check base chars

c: an xmlChar value (normally unsigned char)

Macro IS_PUBIDCHAR

#define IS_PUBIDCHAR(c);

Macro to check the following production in the XML spec: [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]

c: an UNICODE value (int)

Macro IS_PUBIDCHAR_CH

#define IS_PUBIDCHAR_CH(c);

Same as IS_PUBIDCHAR but for single-byte value

c: an xmlChar value (normally unsigned char)

Macro MOVETO_ENDTAG

#define MOVETO_ENDTAG(p);

Skips to the next '>' char.

p: and UTF8 string pointer

Macro MOVETO_STARTTAG

#define MOVETO_STARTTAG(p);

Skips to the next '<' char.

p: and UTF8 string pointer

Macro SKIP_EOL

#define SKIP_EOL(p);

Skips the end of line chars.

p: and UTF8 string pointer

Macro XML_MAX_DICTIONARY_LIMIT

#define XML_MAX_DICTIONARY_LIMIT;

Maximum size allowed by the parser for a dictionary by default This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0


Macro XML_MAX_LOOKUP_LIMIT

#define XML_MAX_LOOKUP_LIMIT;

Maximum size allowed by the parser for ahead lookup This is an upper boundary enforced by the parser to avoid bad behaviour on "unfriendly' content Introduced in 2.9.0


Macro XML_MAX_NAMELEN

#define XML_MAX_NAMELEN;

Identifiers can be longer, but this will be more costly at runtime.


Macro XML_MAX_NAME_LENGTH

#define XML_MAX_NAME_LENGTH;

Maximum size allowed for a markup identifier. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Note that with the use of parsing dictionaries overriding the limit may result in more runtime memory usage in face of "unfriendly' content Introduced in 2.9.0


Macro XML_MAX_TEXT_LENGTH

#define XML_MAX_TEXT_LENGTH;

Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0


Macro XML_SUBSTITUTE_BOTH

#define XML_SUBSTITUTE_BOTH;

Both general and parameter entities need to be substituted.


Macro XML_SUBSTITUTE_NONE

#define XML_SUBSTITUTE_NONE;

If no entities need to be substituted.


Macro XML_SUBSTITUTE_PEREF

#define XML_SUBSTITUTE_PEREF;

Whether parameter entities need to be substituted.


Macro XML_SUBSTITUTE_REF

#define XML_SUBSTITUTE_REF;

Whether general entities need to be substituted.


Function type xmlEntityReferenceFunc

void	xmlEntityReferenceFunc		(xmlEntityPtr ent, 
xmlNodePtr firstNode,
xmlNodePtr lastNode)

Callback function used when one needs to be able to track back the provenance of a chunk of nodes inherited from an entity replacement.

ent: the entity
firstNode: the fist node in the chunk
lastNode: the last nod in the chunk

Variable xmlParserMaxDepth

unsigned int xmlParserMaxDepth;


Variable xmlStringComment

const xmlCharxmlStringComment[] xmlStringComment;


Variable xmlStringText

const xmlCharxmlStringText[] xmlStringText;


Variable xmlStringTextNoenc

const xmlCharxmlStringTextNoenc[] xmlStringTextNoenc;


htmlCreateFileParserCtxt ()

htmlParserCtxtPtr	htmlCreateFileParserCtxt	(const char * filename, 
const char * encoding)

Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

filename: the filename
encoding: a free form C string describing the HTML document encoding, or NULL
Returns: the new parser context or NULL

htmlInitAutoClose ()

void	htmlInitAutoClose		(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. This is a no-op now.


inputPop ()

xmlParserInputPtr	inputPop	(xmlParserCtxtPtr ctxt)

Pops the top parser input from the input stack

ctxt: an XML parser context
Returns: the input just removed

inputPush ()

int	inputPush			(xmlParserCtxtPtr ctxt, 
xmlParserInputPtr value)

Pushes a new parser input on top of the input stack

ctxt: an XML parser context
value: the parser input
Returns: -1 in case of error, the index in the stack otherwise

namePop ()

const xmlChar *	namePop			(xmlParserCtxtPtr ctxt)

Pops the top element name from the name stack

ctxt: an XML parser context
Returns: the name just removed

namePush ()

int	namePush			(xmlParserCtxtPtr ctxt, 
const xmlChar * value)

Pushes a new element name on top of the name stack

ctxt: an XML parser context
value: the element name
Returns: -1 in case of error, the index in the stack otherwise

nodePop ()

xmlNodePtr	nodePop			(xmlParserCtxtPtr ctxt)

Pops the top element node from the node stack

ctxt: an XML parser context
Returns: the node just removed

nodePush ()

int	nodePush			(xmlParserCtxtPtr ctxt, 
xmlNodePtr value)

Pushes a new element node on top of the node stack

ctxt: an XML parser context
value: the element node
Returns: -1 in case of error, the index in the stack otherwise

xmlCheckLanguageID ()

int	xmlCheckLanguageID		(const xmlChar * lang)

Checks that the value conforms to the LanguageID production: NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition. [33] LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The current REC reference the successors of RFC 1766, currently 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag = language ["-" script] ["-" region] *("-" variant) *("-" extension) ["-" privateuse] language = 2*3ALPHA ; shortest ISO 639 code ["-" extlang] ; sometimes followed by ; extended language subtags / 4ALPHA ; or reserved for future use / 5*8ALPHA ; or registered language subtag extlang = 3ALPHA ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently reserved script = 4ALPHA ; ISO 15924 code region = 2ALPHA ; ISO 3166-1 code / 3DIGIT ; UN M.49 code variant = 5*8alphanum ; registered variants / (DIGIT 3alphanum) extension = singleton 1*("-" (2*8alphanum)) ; Single alphanumerics ; "x" reserved for private use singleton = DIGIT ; 0 - 9 / %x41-57 ; A - W / %x59-5A ; Y - Z / %x61-77 ; a - w / %x79-7A ; y - z it sounds right to still allow Irregular i-xxx IANA and user codes too The parser below doesn't try to cope with extension or privateuse that could be added but that's not interoperable anyway

lang: pointer to the string value
Returns: 1 if correct 0 otherwise

xmlCopyChar ()

int	xmlCopyChar			(int len, 
xmlChar * out,
int val)

append the char value in the array

len: Ignored, compatibility
out: pointer to an array of xmlChar
val: the char value
Returns: the number of xmlChar written

xmlCopyCharMultiByte ()

int	xmlCopyCharMultiByte		(xmlChar * out, 
int val)

append the char value in the array

out: pointer to an array of xmlChar
val: the char value
Returns: the number of xmlChar written

xmlCreateEntityParserCtxt ()

xmlParserCtxtPtr	xmlCreateEntityParserCtxt	(const xmlChar * URL, 
const xmlChar * ID,
const xmlChar * base)

Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

URL: the entity URL
ID: the entity PUBLIC ID
base: a possible base for the target URI
Returns: the new parser context or NULL

xmlCreateFileParserCtxt ()

xmlParserCtxtPtr	xmlCreateFileParserCtxt	(const char * filename)

Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

filename: the filename
Returns: the new parser context or NULL

xmlCreateMemoryParserCtxt ()

xmlParserCtxtPtr	xmlCreateMemoryParserCtxt	(const char * buffer, 
int size)

Create a parser context for an XML in-memory document.

buffer: a pointer to a char array
size: the size of the array
Returns: the new parser context or NULL

xmlCreateURLParserCtxt ()

xmlParserCtxtPtr	xmlCreateURLParserCtxt	(const char * filename, 
int options)

Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses

filename: the filename or URL
options: a combination of xmlParserOption
Returns: the new parser context or NULL

xmlCurrentChar ()

int	xmlCurrentChar			(xmlParserCtxtPtr ctxt, 
int * len)

The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence "#xD#xA" or a standalone literal #xD, an XML processor must pass to the application the single character #xA. This behavior can conveniently be produced by normalizing all line breaks to #xA on input, before parsing.)

ctxt: the XML parser context
len: pointer to the length of the char read
Returns: the current char value and its length

xmlDecodeEntities ()

xmlChar *	xmlDecodeEntities	(xmlParserCtxtPtr ctxt, 
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3)

This function is deprecated, we now always process entities content through xmlStringDecodeEntities TODO: remove it in next major release. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'

ctxt: the parser context
len: the len to decode (in bytes !), -1 for no size limit
what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
end: an end marker xmlChar, 0 if none
end2: an end marker xmlChar, 0 if none
end3: an end marker xmlChar, 0 if none
Returns: A newly allocated string with the substitution done. The caller must deallocate it !

xmlErrMemory ()

void	xmlErrMemory			(xmlParserCtxtPtr ctxt, 
const char * extra)

Handle a redefinition of attribute error

ctxt: an XML parser context
extra: extra information

xmlFreeInputStream ()

void	xmlFreeInputStream		(xmlParserInputPtr input)

Free up an input stream.

input: an xmlParserInputPtr

xmlHandleEntity ()

void	xmlHandleEntity			(xmlParserCtxtPtr ctxt, 
xmlEntityPtr entity)

Default handling of defined entities, when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point.

ctxt: an XML parser context
entity: an XML entity pointer.

xmlIsLetter ()

int	xmlIsLetter			(int c)

Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic

c: an unicode character (int)
Returns: 0 if not, non-zero otherwise

xmlNamespaceParseNCName ()

xmlChar *	xmlNamespaceParseNCName	(xmlParserCtxtPtr ctxt)

parse an XML namespace name. TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender

ctxt: an XML parser context
Returns: the namespace name or NULL

xmlNamespaceParseNSDef ()

xmlChar *	xmlNamespaceParseNSDef	(xmlParserCtxtPtr ctxt)

parse a namespace prefix declaration TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 1] NSDef ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::= 'xmlns' (':' NCName)?

ctxt: an XML parser context
Returns: the namespace name

xmlNamespaceParseQName ()

xmlChar *	xmlNamespaceParseQName	(xmlParserCtxtPtr ctxt, 
xmlChar ** prefix)

TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. parse an XML qualified name [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName

ctxt: an XML parser context
prefix: a xmlChar **
Returns: the local part, and prefix is updated to get the Prefix if any.

xmlNewEntityInputStream ()

xmlParserInputPtr	xmlNewEntityInputStream	(xmlParserCtxtPtr ctxt, 
xmlEntityPtr entity)

Create a new input stream based on an xmlEntityPtr

ctxt: an XML parser context
entity: an Entity pointer
Returns: the new input stream or NULL

xmlNewInputFromFile ()

xmlParserInputPtr	xmlNewInputFromFile	(xmlParserCtxtPtr ctxt, 
const char * filename)

Create a new input stream based on a file or an URL.

ctxt: an XML parser context
filename: the filename to use as entity
Returns: the new input stream or NULL in case of error

xmlNewInputStream ()

xmlParserInputPtr	xmlNewInputStream	(xmlParserCtxtPtr ctxt)

Create a new input stream structure.

ctxt: an XML parser context
Returns: the new input stream or NULL

xmlNewStringInputStream ()

xmlParserInputPtr	xmlNewStringInputStream	(xmlParserCtxtPtr ctxt, 
const xmlChar * buffer)

Create a new input stream based on a memory buffer.

ctxt: an XML parser context
buffer: an memory buffer
Returns: the new input stream

xmlNextChar ()

void	xmlNextChar			(xmlParserCtxtPtr ctxt)

Skip to the next char input char.

ctxt: the XML parser context

xmlParseAttValue ()

xmlChar *	xmlParseAttValue	(xmlParserCtxtPtr ctxt)

parse a value for an attribute Note: the parser won't do substitution of entities here, this will be handled later in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3 Attribute-Value Normalization: Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize it as follows: - a character reference is processed by appending the referenced character to the attribute value - an entity reference is processed by recursively processing the replacement text of the entity - a whitespace character (#x20, #xD, #xA, #x9) is processed by appending #x20 to the normalized value, except that only a single #x20 is appended for a "#xD#xA" sequence that is part of an external parsed entity or the literal entity value of an internal parsed entity - other characters are processed by appending them to the normalized value If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character. All attributes for which no declaration has been read should be treated by a non-validating parser as if declared CDATA.

ctxt: an XML parser context
Returns: the AttValue parsed or NULL. The value has to be freed by the caller.

xmlParseAttribute ()

const xmlChar *	xmlParseAttribute	(xmlParserCtxtPtr ctxt, 
xmlChar ** value)

parse an attribute [41] Attribute ::= Name Eq AttValue [ WFC: No External Entity References ] Attribute values cannot contain direct or indirect entity references to external entities. [ WFC: No < in Attribute Values ] The replacement text of any entity referred to directly or indirectly in an attribute value (other than "&lt;") must not contain a <. [ VC: Attribute Value Type ] The attribute must have been declared; the value must be of the type declared for it. [25] Eq ::= S? '=' S? With namespace: [NS 11] Attribute ::= QName Eq AttValue Also the case QName == xmlns:??? is handled independently as a namespace definition.

ctxt: an XML parser context
value: a xmlChar ** used to store the value of the attribute
Returns: the attribute name, and the value in *value.

xmlParseAttributeListDecl ()

void	xmlParseAttributeListDecl	(xmlParserCtxtPtr ctxt)

: parse the Attribute list def for an element [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53] AttDef ::= S Name S AttType S DefaultDecl

ctxt: an XML parser context

xmlParseAttributeType ()

int	xmlParseAttributeType		(xmlParserCtxtPtr ctxt, 
xmlEnumerationPtr * tree)

parse the Attribute list def for an element [54] AttType ::= StringType | TokenizedType | EnumeratedType [55] StringType ::= 'CDATA' [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS' Validity constraints for attribute values syntax are checked in xmlValidateAttributeValue() [ VC: ID ] Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. [ VC: One ID per Element Type ] No element type may have more than one ID attribute specified. [ VC: ID Attribute Default ] An ID attribute must have a declared default of #IMPLIED or #REQUIRED. [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each IDREF Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute. [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD. [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.

ctxt: an XML parser context
tree: the enumeration tree built while parsing
Returns: the attribute type

xmlParseCDSect ()

void	xmlParseCDSect			(xmlParserCtxtPtr ctxt)

Parse escaped pure raw content. [18] CDSect ::= CDStart CData CDEnd [19] CDStart ::= '<![CDATA[' [20] Data ::= (Char* - (Char* ']]>' Char*)) [21] CDEnd ::= ']]>'

ctxt: an XML parser context

xmlParseCharData ()

void	xmlParseCharData		(xmlParserCtxtPtr ctxt, 
int cdata)

parse a CharData section. if we are within a CDATA section ']]>' marks an end of section. The right angle bracket (>) may be represented using the string "&gt;", and must, for compatibility, be escaped using "&gt;" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section. [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

ctxt: an XML parser context
cdata: int indicating whether we are within a CDATA section

xmlParseCharRef ()

int	xmlParseCharRef			(xmlParserCtxtPtr ctxt)

parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ] Characters referred to using character references must match the production for Char.

ctxt: an XML parser context
Returns: the value parsed (as an int), 0 in case of error

xmlParseComment ()

void	xmlParseComment			(xmlParserCtxtPtr ctxt)

Skip an XML (SGML) comment <!-- .... --> The spec says that "For compatibility, the string "--" (double-hyphen) must not occur within comments. " [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

ctxt: an XML parser context

xmlParseContent ()

void	xmlParseContent			(xmlParserCtxtPtr ctxt)

Parse a content sequence. Stops at EOF or '</'. [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

ctxt: an XML parser context

xmlParseDefaultDecl ()

int	xmlParseDefaultDecl		(xmlParserCtxtPtr ctxt, 
xmlChar ** value)

Parse an attribute default declaration [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue) [ VC: Required Attribute ] if the default declaration is the keyword #REQUIRED, then the attribute must be specified for all elements of the type in the attribute-list declaration. [ VC: Attribute Default Legal ] The declared default value must meet the lexical constraints of the declared attribute type c.f. xmlValidateAttributeDecl() [ VC: Fixed Attribute Default ] if an attribute has a default value declared with the #FIXED keyword, instances of that attribute must match the default value. [ WFC: No < in Attribute Values ] handled in xmlParseAttValue()

ctxt: an XML parser context
value: Receive a possible fixed default value for the attribute
Returns: XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED or XML_ATTRIBUTE_FIXED.

xmlParseDocTypeDecl ()

void	xmlParseDocTypeDecl		(xmlParserCtxtPtr ctxt)

parse a DOCTYPE declaration [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | PEReference | S)* ']' S?)? '>' [ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element.

ctxt: an XML parser context

xmlParseElement ()

void	xmlParseElement			(xmlParserCtxtPtr ctxt)

parse an XML element [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag.

ctxt: an XML parser context

xmlParseElementChildrenContentDecl ()

xmlElementContentPtr	xmlParseElementChildrenContentDecl	(xmlParserCtxtPtr ctxt, 
int inputchk)

parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl [47] children ::= (choice | seq) ('?' | '*' | '+')? [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).

ctxt: an XML parser context
inputchk: the input used for the current entity, needed for boundary checks
Returns: the tree of xmlElementContentPtr describing the element hierarchy.

xmlParseElementContentDecl ()

int	xmlParseElementContentDecl	(xmlParserCtxtPtr ctxt, 
const xmlChar * name,
xmlElementContentPtr * result)

parse the declaration for an Element content either Mixed or Children, the cases EMPTY and ANY are handled directly in xmlParseElementDecl [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children

ctxt: an XML parser context
name: the name of the element being defined.
result: the Element Content pointer will be stored here if any
Returns: the type of element content XML_ELEMENT_TYPE_xxx

xmlParseElementDecl ()

int	xmlParseElementDecl		(xmlParserCtxtPtr ctxt)

parse an Element declaration. [45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>' [ VC: Unique Element Type Declaration ] No element type may be declared more than once

ctxt: an XML parser context
Returns: the type of the element, or -1 in case of error

xmlParseElementMixedContentDecl ()

xmlElementContentPtr	xmlParseElementMixedContentDecl	(xmlParserCtxtPtr ctxt, 
int inputchk)

parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')' [ VC: Proper Group/PE Nesting ] applies to [51] too (see [49]) [ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration.

ctxt: an XML parser context
inputchk: the input used for the current entity, needed for boundary checks
Returns: the list of the xmlElementContentPtr describing the element choices

xmlParseEncName ()

xmlChar *	xmlParseEncName		(xmlParserCtxtPtr ctxt)

parse the XML encoding name [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*

ctxt: an XML parser context
Returns: the encoding name value or NULL

xmlParseEncodingDecl ()

const xmlChar *	xmlParseEncodingDecl	(xmlParserCtxtPtr ctxt)

parse the XML encoding declaration [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this setups the conversion filters.

ctxt: an XML parser context
Returns: the encoding value or NULL

xmlParseEndTag ()

void	xmlParseEndTag			(xmlParserCtxtPtr ctxt)

parse an end of tag [42] ETag ::= '</' Name S? '>' With namespace [NS 9] ETag ::= '</' QName S? '>'

ctxt: an XML parser context

xmlParseEntityDecl ()

void	xmlParseEntityDecl		(xmlParserCtxtPtr ctxt)

parse <!ENTITY declarations [70] EntityDecl ::= GEDecl | PEDecl [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>' [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>' [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::= S 'NDATA' S Name [ VC: Notation Declared ] The Name must match the declared name of a notation.

ctxt: an XML parser context

xmlParseEntityRef ()

xmlEntityPtr	xmlParseEntityRef	(xmlParserCtxtPtr ctxt)

parse ENTITY references declarations [68] EntityRef ::= '&' Name ';' [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration. Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity

ctxt: an XML parser context
Returns: the xmlEntityPtr if found, or NULL otherwise.

xmlParseEntityValue ()

xmlChar *	xmlParseEntityValue	(xmlParserCtxtPtr ctxt, 
xmlChar ** orig)

parse a value for ENTITY declarations [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"

ctxt: an XML parser context
orig: if non-NULL store a copy of the original entity value
Returns: the EntityValue parsed with reference substituted or NULL

xmlParseEnumeratedType ()

int	xmlParseEnumeratedType		(xmlParserCtxtPtr ctxt, 
xmlEnumerationPtr * tree)

parse an Enumerated attribute type. [57] EnumeratedType ::= NotationType | Enumeration [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'

ctxt: an XML parser context
tree: the enumeration tree built while parsing
Returns: XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION

xmlParseEnumerationType ()

xmlEnumerationPtr	xmlParseEnumerationType	(xmlParserCtxtPtr ctxt)

parse an Enumeration attribute type. [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [ VC: Enumeration ] Values of this type must match one of the Nmtoken tokens in the declaration

ctxt: an XML parser context
Returns: the enumeration attribute tree built while parsing

xmlParseExternalID ()

xmlChar *	xmlParseExternalID	(xmlParserCtxtPtr ctxt, 
xmlChar ** publicID,
int strict)

Parse an External ID or a Public ID NOTE: Productions [75] and [83] interact badly since [75] can generate 'PUBLIC' S PubidLiteral S SystemLiteral [75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral [83] PublicID ::= 'PUBLIC' S PubidLiteral

ctxt: an XML parser context
publicID: a xmlChar** receiving PubidLiteral
strict: indicate whether we should restrict parsing to only production [75], see NOTE below
Returns: the function returns SystemLiteral and in the second case publicID receives PubidLiteral, is strict is off it is possible to return NULL and have publicID set.

xmlParseExternalSubset ()

void	xmlParseExternalSubset		(xmlParserCtxtPtr ctxt, 
const xmlChar * ExternalID,
const xmlChar * SystemID)

parse Markup declarations from an external subset [30] extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) *

ctxt: an XML parser context
ExternalID: the external identifier
SystemID: the system identifier (or URL)

xmlParseMarkupDecl ()

void	xmlParseMarkupDecl		(xmlParserCtxtPtr ctxt)

parse Markup declarations [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text. [ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)

ctxt: an XML parser context

xmlParseMisc ()

void	xmlParseMisc			(xmlParserCtxtPtr ctxt)

parse an XML Misc* optional field. [27] Misc ::= Comment | PI | S

ctxt: an XML parser context

xmlParseName ()

const xmlChar *	xmlParseName		(xmlParserCtxtPtr ctxt)

parse an XML name. [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20 Name)*

ctxt: an XML parser context
Returns: the Name parsed or NULL

xmlParseNamespace ()

void	xmlParseNamespace		(xmlParserCtxtPtr ctxt)

xmlParseNamespace: parse specific PI '<?namespace ...' constructs. This is what the older xml-name Working Draft specified, a bunch of other stuff may still rely on it, so support is still here as if it was declared on the root of the Tree:-( TODO: remove from library To be removed at next drop of binary compatibility

ctxt: an XML parser context

xmlParseNmtoken ()

xmlChar *	xmlParseNmtoken		(xmlParserCtxtPtr ctxt)

parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*

ctxt: an XML parser context
Returns: the Nmtoken parsed or NULL

xmlParseNotationDecl ()

void	xmlParseNotationDecl		(xmlParserCtxtPtr ctxt)

parse a notation declaration [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>' Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S SystemLiteral See the NOTE on xmlParseExternalID().

ctxt: an XML parser context

xmlParseNotationType ()

xmlEnumerationPtr	xmlParseNotationType	(xmlParserCtxtPtr ctxt)

parse an Notation attribute type. Note: the leading 'NOTATION' S part has already being parsed... [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [ VC: Notation Attributes ] Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared.

ctxt: an XML parser context
Returns: the notation attribute tree built while parsing

xmlParsePEReference ()

void	xmlParsePEReference		(xmlParserCtxtPtr ctxt)

parse PEReference declarations The entity content is handled directly by pushing it's content as a new input stream. [69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any reference to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any reference to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled.

ctxt: an XML parser context

xmlParsePI ()

void	xmlParsePI			(xmlParserCtxtPtr ctxt)

parse an XML Processing Instruction. [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' The processing is transferred to SAX once parsed.

ctxt: an XML parser context

xmlParsePITarget ()

const xmlChar *	xmlParsePITarget	(xmlParserCtxtPtr ctxt)

parse the name of a PI [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

ctxt: an XML parser context
Returns: the PITarget name or NULL

xmlParsePubidLiteral ()

xmlChar *	xmlParsePubidLiteral	(xmlParserCtxtPtr ctxt)

parse an XML public literal [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"

ctxt: an XML parser context
Returns: the PubidLiteral parsed or NULL.

xmlParseQuotedString ()

xmlChar *	xmlParseQuotedString	(xmlParserCtxtPtr ctxt)

Parse and return a string between quotes or doublequotes TODO: Deprecated, to be removed at next drop of binary compatibility

ctxt: an XML parser context
Returns: the string parser or NULL.

xmlParseReference ()

void	xmlParseReference		(xmlParserCtxtPtr ctxt)

parse and handle entity references in content, depending on the SAX interface, this may end-up in a call to character() if this is a CharRef, a predefined entity, if there is no reference() callback. or if the parser was asked to switch to that mode. [67] Reference ::= EntityRef | CharRef

ctxt: an XML parser context

xmlParseSDDecl ()

int	xmlParseSDDecl			(xmlParserCtxtPtr ctxt)

parse the XML standalone declaration [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"')) [ VC: Standalone Document Declaration ] TODO The standalone document declaration must have the value "no" if any external markup declarations contain declarations of: - attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or - entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or - attributes with values subject to normalization, where the attribute appears in the document with a value which will change as a result of normalization, or - element types with element content, if white space occurs directly within any instance of those types.

ctxt: an XML parser context
Returns: 1 if standalone="yes" 0 if standalone="no" -2 if standalone attribute is missing or invalid (A standalone value of -2 means that the XML declaration was found, but no value was specified for the standalone attribute).

xmlParseStartTag ()

const xmlChar *	xmlParseStartTag	(xmlParserCtxtPtr ctxt)

parse a start of tag either for rule element or EmptyElement. In both case we don't parse the tag closing chars. [40] STag ::= '<' Name (S Attribute)* S? '>' [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. With namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>' [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'

ctxt: an XML parser context
Returns: the element name parsed

xmlParseSystemLiteral ()

xmlChar *	xmlParseSystemLiteral	(xmlParserCtxtPtr ctxt)

parse an XML Literal [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")

ctxt: an XML parser context
Returns: the SystemLiteral parsed or NULL

xmlParseTextDecl ()

void	xmlParseTextDecl		(xmlParserCtxtPtr ctxt)

parse an XML declaration header for external entities [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'

ctxt: an XML parser context

xmlParseVersionInfo ()

xmlChar *	xmlParseVersionInfo	(xmlParserCtxtPtr ctxt)

parse the XML version. [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S?

ctxt: an XML parser context
Returns: the version string, e.g. "1.0"

xmlParseVersionNum ()

xmlChar *	xmlParseVersionNum	(xmlParserCtxtPtr ctxt)

parse the XML version value. [26] VersionNum ::= '1.' [0-9]+ In practice allow [0-9].[0-9]+ at that level

ctxt: an XML parser context
Returns: the string giving the XML version number, or NULL

xmlParseXMLDecl ()

void	xmlParseXMLDecl			(xmlParserCtxtPtr ctxt)

parse an XML declaration header [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

ctxt: an XML parser context

xmlParserHandlePEReference ()

void	xmlParserHandlePEReference	(xmlParserCtxtPtr ctxt)

[69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any reference to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any reference to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled. A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc i.e. - Included in literal in entity values - Included as Parameter Entity reference within DTDs

ctxt: the parser context

xmlParserHandleReference ()

void	xmlParserHandleReference	(xmlParserCtxtPtr ctxt)

TODO: Remove, now deprecated ... the test is done directly in the content parsing routines. [67] Reference ::= EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [ WFC: Entity Declared ] the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc

ctxt: the parser context

xmlParserInputShrink ()

void	xmlParserInputShrink		(xmlParserInputPtr in)

This function removes used input for the parser.

in: an XML parser input

xmlPopInput ()

xmlChar	xmlPopInput			(xmlParserCtxtPtr ctxt)

xmlPopInput: the current input pointed by ctxt->input came to an end pop it and return the next char.

ctxt: an XML parser context
Returns: the current xmlChar in the parser context

xmlPushInput ()

int	xmlPushInput			(xmlParserCtxtPtr ctxt, 
xmlParserInputPtr input)

xmlPushInput: switch to a new input stream which is stacked on top of the previous one(s).

ctxt: an XML parser context
input: an XML parser input fragment (entity, XML fragment ...).
Returns: -1 in case of error or the index in the input stack

xmlScanName ()

xmlChar *	xmlScanName		(xmlParserCtxtPtr ctxt)

Trickery: parse an XML name but without consuming the input flow Needed for rollback cases. Used only when parsing entities references. TODO: seems deprecated now, only used in the default part of xmlParserHandleReference [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (S Name)*

ctxt: an XML parser context
Returns: the Name parsed or NULL

xmlSetEntityReferenceFunc ()

void	xmlSetEntityReferenceFunc	(xmlEntityReferenceFunc func)

Set the function to call call back when a xml reference has been made

func: A valid function

xmlSkipBlankChars ()

int	xmlSkipBlankChars		(xmlParserCtxtPtr ctxt)

skip all blanks character found at that point in the input streams. It pops up finished entities in the process if allowable at that point.

ctxt: the XML parser context
Returns: the number of space chars skipped

xmlSplitQName ()

xmlChar *	xmlSplitQName		(xmlParserCtxtPtr ctxt, 
const xmlChar * name,
xmlChar ** prefix)

parse an UTF8 encoded XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName

ctxt: an XML parser context
name: an XML parser context
prefix: a xmlChar **
Returns: the local part, and prefix is updated to get the Prefix if any.

xmlStringCurrentChar ()

int	xmlStringCurrentChar		(xmlParserCtxtPtr ctxt, 
const xmlChar * cur,
int * len)

The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.

ctxt: the XML parser context
cur: pointer to the beginning of the char
len: pointer to the length of the char read
Returns: the current char value and its length

xmlStringDecodeEntities ()

xmlChar *	xmlStringDecodeEntities	(xmlParserCtxtPtr ctxt, 
const xmlChar * str,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3)

Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'

ctxt: the parser context
str: the input string
what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
end: an end marker xmlChar, 0 if none
end2: an end marker xmlChar, 0 if none
end3: an end marker xmlChar, 0 if none
Returns: A newly allocated string with the substitution done. The caller must deallocate it !

xmlStringLenDecodeEntities ()

xmlChar *	xmlStringLenDecodeEntities	(xmlParserCtxtPtr ctxt, 
const xmlChar * str,
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3)

Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'

ctxt: the parser context
str: the input string
len: the string length
what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
end: an end marker xmlChar, 0 if none
end2: an end marker xmlChar, 0 if none
end3: an end marker xmlChar, 0 if none
Returns: A newly allocated string with the substitution done. The caller must deallocate it !

xmlSwitchEncoding ()

int	xmlSwitchEncoding		(xmlParserCtxtPtr ctxt, 
xmlCharEncoding enc)

change the input functions when discovering the character encoding of a given entity.

ctxt: the parser context
enc: the encoding value (number)
Returns: 0 in case of success, -1 otherwise

xmlSwitchInputEncoding ()

int	xmlSwitchInputEncoding		(xmlParserCtxtPtr ctxt, 
xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler)

DEPRECATED: Use xmlSwitchToEncoding change the input functions when discovering the character encoding of a given entity.

ctxt: the parser context
input: the input stream
handler: the encoding handler
Returns: 0 in case of success, -1 otherwise

xmlSwitchToEncoding ()

int	xmlSwitchToEncoding		(xmlParserCtxtPtr ctxt, 
xmlCharEncodingHandlerPtr handler)

change the input functions when discovering the character encoding of a given entity.

ctxt: the parser context
handler: the encoding handler
Returns: 0 in case of success, -1 otherwise

PK!e+ZZlibxml2-schemasInternals.htmlnu[ schemasInternals: internal interfaces for XML Schemas

schemasInternals

schemasInternals - internal interfaces for XML Schemas

internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not guaranteed to be API or ABI stable !

Author(s): Daniel Veillard

Synopsis

#define XML_SCHEMAS_ANYATTR_LAX;
#define XML_SCHEMAS_ANYATTR_SKIP;
#define XML_SCHEMAS_ANYATTR_STRICT;
#define XML_SCHEMAS_ANY_LAX;
#define XML_SCHEMAS_ANY_SKIP;
#define XML_SCHEMAS_ANY_STRICT;
#define XML_SCHEMAS_ATTRGROUP_GLOBAL;
#define XML_SCHEMAS_ATTRGROUP_HAS_REFS;
#define XML_SCHEMAS_ATTRGROUP_MARKED;
#define XML_SCHEMAS_ATTRGROUP_REDEFINED;
#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED;
#define XML_SCHEMAS_ATTR_FIXED;
#define XML_SCHEMAS_ATTR_GLOBAL;
#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED;
#define XML_SCHEMAS_ATTR_NSDEFAULT;
#define XML_SCHEMAS_ATTR_USE_OPTIONAL;
#define XML_SCHEMAS_ATTR_USE_PROHIBITED;
#define XML_SCHEMAS_ATTR_USE_REQUIRED;
#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION;
#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION;
#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION;
#define XML_SCHEMAS_ELEM_ABSTRACT;
#define XML_SCHEMAS_ELEM_BLOCK_ABSENT;
#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION;
#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION;
#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION;
#define XML_SCHEMAS_ELEM_CIRCULAR;
#define XML_SCHEMAS_ELEM_DEFAULT;
#define XML_SCHEMAS_ELEM_FINAL_ABSENT;
#define XML_SCHEMAS_ELEM_FINAL_EXTENSION;
#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION;
#define XML_SCHEMAS_ELEM_FIXED;
#define XML_SCHEMAS_ELEM_GLOBAL;
#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED;
#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED;
#define XML_SCHEMAS_ELEM_NILLABLE;
#define XML_SCHEMAS_ELEM_NSDEFAULT;
#define XML_SCHEMAS_ELEM_REF;
#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD;
#define XML_SCHEMAS_ELEM_TOPLEVEL;
#define XML_SCHEMAS_FACET_COLLAPSE;
#define XML_SCHEMAS_FACET_PRESERVE;
#define XML_SCHEMAS_FACET_REPLACE;
#define XML_SCHEMAS_FACET_UNKNOWN;
#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION;
#define XML_SCHEMAS_FINAL_DEFAULT_LIST;
#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION;
#define XML_SCHEMAS_FINAL_DEFAULT_UNION;
#define XML_SCHEMAS_INCLUDING_CONVERT_NS;
#define XML_SCHEMAS_QUALIF_ATTR;
#define XML_SCHEMAS_QUALIF_ELEM;
#define XML_SCHEMAS_TYPE_ABSTRACT;
#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT;
#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION;
#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION;
#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE;
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION;
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION;
#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE;
#define XML_SCHEMAS_TYPE_FINAL_DEFAULT;
#define XML_SCHEMAS_TYPE_FINAL_EXTENSION;
#define XML_SCHEMAS_TYPE_FINAL_LIST;
#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION;
#define XML_SCHEMAS_TYPE_FINAL_UNION;
#define XML_SCHEMAS_TYPE_FIXUP_1;
#define XML_SCHEMAS_TYPE_GLOBAL;
#define XML_SCHEMAS_TYPE_HAS_FACETS;
#define XML_SCHEMAS_TYPE_INTERNAL_INVALID;
#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED;
#define XML_SCHEMAS_TYPE_MARKED;
#define XML_SCHEMAS_TYPE_MIXED;
#define XML_SCHEMAS_TYPE_NORMVALUENEEDED;
#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD;
#define XML_SCHEMAS_TYPE_REDEFINED;
#define XML_SCHEMAS_TYPE_VARIETY_ABSENT;
#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC;
#define XML_SCHEMAS_TYPE_VARIETY_LIST;
#define XML_SCHEMAS_TYPE_VARIETY_UNION;
#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE;
#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE;
#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE;
#define XML_SCHEMAS_WILDCARD_COMPLETE;
typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
typedef xmlSchemaAnnot * xmlSchemaAnnotPtr;
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
typedef xmlSchemaAttributeGroup * xmlSchemaAttributeGroupPtr;
typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
typedef xmlSchemaAttributeLink * xmlSchemaAttributeLinkPtr;
typedef xmlSchemaAttribute * xmlSchemaAttributePtr;
typedef enum xmlSchemaContentType;
typedef struct _xmlSchemaElement xmlSchemaElement;
typedef xmlSchemaElement * xmlSchemaElementPtr;
typedef struct _xmlSchemaFacet xmlSchemaFacet;
typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
typedef xmlSchemaFacetLink * xmlSchemaFacetLinkPtr;
typedef xmlSchemaFacet * xmlSchemaFacetPtr;
typedef struct _xmlSchemaNotation xmlSchemaNotation;
typedef xmlSchemaNotation * xmlSchemaNotationPtr;
typedef struct _xmlSchemaType xmlSchemaType;
typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
typedef xmlSchemaTypeLink * xmlSchemaTypeLinkPtr;
typedef xmlSchemaType * xmlSchemaTypePtr;
typedef enum xmlSchemaTypeType;
typedef struct _xmlSchemaVal xmlSchemaVal;
typedef xmlSchemaVal * xmlSchemaValPtr;
typedef enum xmlSchemaValType;
typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
typedef xmlSchemaWildcardNs * xmlSchemaWildcardNsPtr;
typedef xmlSchemaWildcard * xmlSchemaWildcardPtr;
void	xmlSchemaFreeType		(xmlSchemaTypePtr type);
void	xmlSchemaFreeWildcard		(xmlSchemaWildcardPtr wildcard);

Description

Details

Macro XML_SCHEMAS_ANYATTR_LAX

#define XML_SCHEMAS_ANYATTR_LAX;

Ignore validation non definition on attributes Obsolete, not used anymore.


Macro XML_SCHEMAS_ANYATTR_SKIP

#define XML_SCHEMAS_ANYATTR_SKIP;

Skip unknown attribute from validation Obsolete, not used anymore.


Macro XML_SCHEMAS_ANYATTR_STRICT

#define XML_SCHEMAS_ANYATTR_STRICT;

Apply strict validation rules on attributes Obsolete, not used anymore.


Macro XML_SCHEMAS_ANY_LAX

#define XML_SCHEMAS_ANY_LAX;

Used by wildcards. Validate if type found, don't worry if not found


Macro XML_SCHEMAS_ANY_SKIP

#define XML_SCHEMAS_ANY_SKIP;

Skip unknown attribute from validation


Macro XML_SCHEMAS_ANY_STRICT

#define XML_SCHEMAS_ANY_STRICT;

Used by wildcards. Apply strict validation rules


Macro XML_SCHEMAS_ATTRGROUP_GLOBAL

#define XML_SCHEMAS_ATTRGROUP_GLOBAL;

The attribute group has been defined.


Macro XML_SCHEMAS_ATTRGROUP_HAS_REFS

#define XML_SCHEMAS_ATTRGROUP_HAS_REFS;

Whether this attr. group contains attr. group references.


Macro XML_SCHEMAS_ATTRGROUP_MARKED

#define XML_SCHEMAS_ATTRGROUP_MARKED;

Marks the attr group as marked; used for circular checks.


Macro XML_SCHEMAS_ATTRGROUP_REDEFINED

#define XML_SCHEMAS_ATTRGROUP_REDEFINED;

The attr group was redefined.


Macro XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED

#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED;

The attribute wildcard has been built.


Macro XML_SCHEMAS_ATTR_FIXED

#define XML_SCHEMAS_ATTR_FIXED;

the attribute has a fixed value


Macro XML_SCHEMAS_ATTR_GLOBAL

#define XML_SCHEMAS_ATTR_GLOBAL;

allow elements in no namespace


Macro XML_SCHEMAS_ATTR_INTERNAL_RESOLVED

#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED;

this is set when the "type" and "ref" references have been resolved.


Macro XML_SCHEMAS_ATTR_NSDEFAULT

#define XML_SCHEMAS_ATTR_NSDEFAULT;

allow elements in no namespace


Macro XML_SCHEMAS_ATTR_USE_OPTIONAL

#define XML_SCHEMAS_ATTR_USE_OPTIONAL;

The attribute is optional.


Macro XML_SCHEMAS_ATTR_USE_PROHIBITED

#define XML_SCHEMAS_ATTR_USE_PROHIBITED;

Used by wildcards. The attribute is prohibited.


Macro XML_SCHEMAS_ATTR_USE_REQUIRED

#define XML_SCHEMAS_ATTR_USE_REQUIRED;

The attribute is required.


Macro XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION

#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION;

the schema has "extension" in the set of blockDefault.


Macro XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION

#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION;

the schema has "restriction" in the set of blockDefault.


Macro XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION

#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION;

the schema has "substitution" in the set of blockDefault.


Macro XML_SCHEMAS_ELEM_ABSTRACT

#define XML_SCHEMAS_ELEM_ABSTRACT;

the element is abstract


Macro XML_SCHEMAS_ELEM_BLOCK_ABSENT

#define XML_SCHEMAS_ELEM_BLOCK_ABSENT;

the "block" attribute is absent


Macro XML_SCHEMAS_ELEM_BLOCK_EXTENSION

#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION;

disallowed substitutions are absent


Macro XML_SCHEMAS_ELEM_BLOCK_RESTRICTION

#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION;

disallowed substitutions: "restriction"


Macro XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION

#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION;

disallowed substitutions: "substitution"


Macro XML_SCHEMAS_ELEM_CIRCULAR

#define XML_SCHEMAS_ELEM_CIRCULAR;

a helper flag for the search of circular references.


Macro XML_SCHEMAS_ELEM_DEFAULT

#define XML_SCHEMAS_ELEM_DEFAULT;

the element has a default value


Macro XML_SCHEMAS_ELEM_FINAL_ABSENT

#define XML_SCHEMAS_ELEM_FINAL_ABSENT;

substitution group exclusions are absent


Macro XML_SCHEMAS_ELEM_FINAL_EXTENSION

#define XML_SCHEMAS_ELEM_FINAL_EXTENSION;

substitution group exclusions: "extension"


Macro XML_SCHEMAS_ELEM_FINAL_RESTRICTION

#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION;

substitution group exclusions: "restriction"


Macro XML_SCHEMAS_ELEM_FIXED

#define XML_SCHEMAS_ELEM_FIXED;

the element has a fixed value


Macro XML_SCHEMAS_ELEM_GLOBAL

#define XML_SCHEMAS_ELEM_GLOBAL;

the element is global


Macro XML_SCHEMAS_ELEM_INTERNAL_CHECKED

#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED;

this is set when the elem decl has been checked against all constraints


Macro XML_SCHEMAS_ELEM_INTERNAL_RESOLVED

#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED;

this is set when "type", "ref", "substitutionGroup" references have been resolved.


Macro XML_SCHEMAS_ELEM_NILLABLE

#define XML_SCHEMAS_ELEM_NILLABLE;

the element is nillable


Macro XML_SCHEMAS_ELEM_NSDEFAULT

#define XML_SCHEMAS_ELEM_NSDEFAULT;

allow elements in no namespace Obsolete, not used anymore.


Macro XML_SCHEMAS_ELEM_REF

#define XML_SCHEMAS_ELEM_REF;

the element is a reference to a type


Macro XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD

#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD;

the declaration is a substitution group head


Macro XML_SCHEMAS_ELEM_TOPLEVEL

#define XML_SCHEMAS_ELEM_TOPLEVEL;

the element is top level obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead


Macro XML_SCHEMAS_FACET_COLLAPSE

#define XML_SCHEMAS_FACET_COLLAPSE;

collapse the types of the facet


Macro XML_SCHEMAS_FACET_PRESERVE

#define XML_SCHEMAS_FACET_PRESERVE;

preserve the type of the facet


Macro XML_SCHEMAS_FACET_REPLACE

#define XML_SCHEMAS_FACET_REPLACE;

replace the type of the facet


Macro XML_SCHEMAS_FACET_UNKNOWN

#define XML_SCHEMAS_FACET_UNKNOWN;

unknown facet handling


Macro XML_SCHEMAS_FINAL_DEFAULT_EXTENSION

#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION;

the schema has "extension" in the set of finalDefault.


Macro XML_SCHEMAS_FINAL_DEFAULT_LIST

#define XML_SCHEMAS_FINAL_DEFAULT_LIST;

the schema has "list" in the set of finalDefault.


Macro XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION

#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION;

the schema has "restriction" in the set of finalDefault.


Macro XML_SCHEMAS_FINAL_DEFAULT_UNION

#define XML_SCHEMAS_FINAL_DEFAULT_UNION;

the schema has "union" in the set of finalDefault.


Macro XML_SCHEMAS_INCLUDING_CONVERT_NS

#define XML_SCHEMAS_INCLUDING_CONVERT_NS;

the schema is currently including an other schema with no target namespace.


Macro XML_SCHEMAS_QUALIF_ATTR

#define XML_SCHEMAS_QUALIF_ATTR;

Reflects attributeFormDefault == qualified in an XML schema document.


Macro XML_SCHEMAS_QUALIF_ELEM

#define XML_SCHEMAS_QUALIF_ELEM;

Reflects elementFormDefault == qualified in an XML schema document.


Macro XML_SCHEMAS_TYPE_ABSTRACT

#define XML_SCHEMAS_TYPE_ABSTRACT;

the simple/complexType is abstract.


Macro XML_SCHEMAS_TYPE_BLOCK_DEFAULT

#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT;

the complexType did not specify 'block' so use the default of the <schema> item.


Macro XML_SCHEMAS_TYPE_BLOCK_EXTENSION

#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION;

the complexType has a 'block' of "extension".


Macro XML_SCHEMAS_TYPE_BLOCK_RESTRICTION

#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION;

the complexType has a 'block' of "restriction".


Macro XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE

#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE;

Marks the item as a builtin primitive.


Macro XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION

#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION;

the simple or complex type has a derivation method of "extension".


Macro XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION

#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION;

the simple or complex type has a derivation method of "restriction".


Macro XML_SCHEMAS_TYPE_FACETSNEEDVALUE

#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE;

indicates if the facets need a computed value


Macro XML_SCHEMAS_TYPE_FINAL_DEFAULT

#define XML_SCHEMAS_TYPE_FINAL_DEFAULT;

the simpleType has a final of "default".


Macro XML_SCHEMAS_TYPE_FINAL_EXTENSION

#define XML_SCHEMAS_TYPE_FINAL_EXTENSION;

the complexType has a final of "extension".


Macro XML_SCHEMAS_TYPE_FINAL_LIST

#define XML_SCHEMAS_TYPE_FINAL_LIST;

the simpleType has a final of "list".


Macro XML_SCHEMAS_TYPE_FINAL_RESTRICTION

#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION;

the simpleType/complexType has a final of "restriction".


Macro XML_SCHEMAS_TYPE_FINAL_UNION

#define XML_SCHEMAS_TYPE_FINAL_UNION;

the simpleType has a final of "union".


Macro XML_SCHEMAS_TYPE_FIXUP_1

#define XML_SCHEMAS_TYPE_FIXUP_1;

First stage of fixup was done.


Macro XML_SCHEMAS_TYPE_GLOBAL

#define XML_SCHEMAS_TYPE_GLOBAL;

the type is global


Macro XML_SCHEMAS_TYPE_HAS_FACETS

#define XML_SCHEMAS_TYPE_HAS_FACETS;

has facets


Macro XML_SCHEMAS_TYPE_INTERNAL_INVALID

#define XML_SCHEMAS_TYPE_INTERNAL_INVALID;

indicates that the type is invalid


Macro XML_SCHEMAS_TYPE_INTERNAL_RESOLVED

#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED;

indicates that the type was typefixed


Macro XML_SCHEMAS_TYPE_MARKED

#define XML_SCHEMAS_TYPE_MARKED;

Marks the item as marked; used for circular checks.


Macro XML_SCHEMAS_TYPE_MIXED

#define XML_SCHEMAS_TYPE_MIXED;

the element content type is mixed


Macro XML_SCHEMAS_TYPE_NORMVALUENEEDED

#define XML_SCHEMAS_TYPE_NORMVALUENEEDED;

indicates if the facets (pattern) need a normalized value


Macro XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD

#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD;

the complexType owns an attribute wildcard, i.e. it can be freed by the complexType


Macro XML_SCHEMAS_TYPE_REDEFINED

#define XML_SCHEMAS_TYPE_REDEFINED;

The type was redefined.


Macro XML_SCHEMAS_TYPE_VARIETY_ABSENT

#define XML_SCHEMAS_TYPE_VARIETY_ABSENT;

the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.


Macro XML_SCHEMAS_TYPE_VARIETY_ATOMIC

#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC;

the simpleType has a variety of "union".


Macro XML_SCHEMAS_TYPE_VARIETY_LIST

#define XML_SCHEMAS_TYPE_VARIETY_LIST;

the simpleType has a variety of "list".


Macro XML_SCHEMAS_TYPE_VARIETY_UNION

#define XML_SCHEMAS_TYPE_VARIETY_UNION;

the simpleType has a variety of "union".


Macro XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE

#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE;

a whitespace-facet value of "collapse"


Macro XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE

#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE;

a whitespace-facet value of "preserve"


Macro XML_SCHEMAS_TYPE_WHITESPACE_REPLACE

#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE;

a whitespace-facet value of "replace"


Macro XML_SCHEMAS_WILDCARD_COMPLETE

#define XML_SCHEMAS_WILDCARD_COMPLETE;

If the wildcard is complete.


Structure xmlSchemaAnnot

struct _xmlSchemaAnnot {
    struct _xmlSchemaAnnot *	next
    xmlNodePtr	content	: the annotation
} xmlSchemaAnnot;


Typedef xmlSchemaAnnotPtr

xmlSchemaAnnot * xmlSchemaAnnotPtr;


Structure xmlSchemaAttribute

struct _xmlSchemaAttribute {
    xmlSchemaTypeType	type
    struct _xmlSchemaAttribute *	next	: the next attribute (not used?)
    const xmlChar *	name	: the name of the declaration
    const xmlChar *	id	: Deprecated; not used
    const xmlChar *	ref	: Deprecated; not used
    const xmlChar *	refNs	: Deprecated; not used
    const xmlChar *	typeName	: the local name of the type definition
    const xmlChar *	typeNs	: the ns URI of the type definition
    xmlSchemaAnnotPtr	annot
    xmlSchemaTypePtr	base	: Deprecated; not used
    int	occurs	: Deprecated; not used
    const xmlChar *	defValue	: The initial value of the value constraint
    xmlSchemaTypePtr	subtypes	: the type definition
    xmlNodePtr	node
    const xmlChar *	targetNamespace
    int	flags
    const xmlChar *	refPrefix	: Deprecated; not used
    xmlSchemaValPtr	defVal	: The compiled value constraint
    xmlSchemaAttributePtr	refDecl	: Deprecated; not used
} xmlSchemaAttribute;


Structure xmlSchemaAttributeGroup

struct _xmlSchemaAttributeGroup {
    xmlSchemaTypeType	type	: The kind of type
    struct _xmlSchemaAttribute *	next	: the next attribute if in a group ...
    const xmlChar *	name
    const xmlChar *	id
    const xmlChar *	ref	: Deprecated; not used
    const xmlChar *	refNs	: Deprecated; not used
    xmlSchemaAnnotPtr	annot
    xmlSchemaAttributePtr	attributes	: Deprecated; not used
    xmlNodePtr	node
    int	flags
    xmlSchemaWildcardPtr	attributeWildcard
    const xmlChar *	refPrefix	: Deprecated; not used
    xmlSchemaAttributeGroupPtr	refItem	: Deprecated; not used
    const xmlChar *	targetNamespace
    void *	attrUses
} xmlSchemaAttributeGroup;


Typedef xmlSchemaAttributeGroupPtr

xmlSchemaAttributeGroup * xmlSchemaAttributeGroupPtr;


Structure xmlSchemaAttributeLink

struct _xmlSchemaAttributeLink {
    struct _xmlSchemaAttributeLink *	next	: the next attribute link ...
    struct _xmlSchemaAttribute *	attr	: the linked attribute
} xmlSchemaAttributeLink;


Typedef xmlSchemaAttributeLinkPtr

xmlSchemaAttributeLink * xmlSchemaAttributeLinkPtr;


Typedef xmlSchemaAttributePtr

xmlSchemaAttribute * xmlSchemaAttributePtr;



Structure xmlSchemaElement

struct _xmlSchemaElement {
    xmlSchemaTypeType	type	: The kind of type
    struct _xmlSchemaType *	next	: Not used?
    const xmlChar *	name
    const xmlChar *	id	: Deprecated; not used
    const xmlChar *	ref	: Deprecated; not used
    const xmlChar *	refNs	: Deprecated; not used
    xmlSchemaAnnotPtr	annot
    xmlSchemaTypePtr	subtypes	: the type definition
    xmlSchemaAttributePtr	attributes
    xmlNodePtr	node
    int	minOccurs	: Deprecated; not used
    int	maxOccurs	: Deprecated; not used
    int	flags
    const xmlChar *	targetNamespace
    const xmlChar *	namedType
    const xmlChar *	namedTypeNs
    const xmlChar *	substGroup
    const xmlChar *	substGroupNs
    const xmlChar *	scope
    const xmlChar *	value	: The original value of the value constraint.
    struct _xmlSchemaElement *	refDecl	: This will now be used for the substitution group affiliation
    xmlRegexpPtr	contModel	: Obsolete for WXS, maybe used for RelaxNG
    xmlSchemaContentType	contentType
    const xmlChar *	refPrefix	: Deprecated; not used
    xmlSchemaValPtr	defVal	: The compiled value constraint.
    void *	idcs	: The identity-constraint defs
} xmlSchemaElement;


Typedef xmlSchemaElementPtr

xmlSchemaElement * xmlSchemaElementPtr;


Structure xmlSchemaFacet

struct _xmlSchemaFacet {
    xmlSchemaTypeType	type	: The kind of type
    struct _xmlSchemaFacet *	next	: the next type if in a sequence ...
    const xmlChar *	value	: The original value
    const xmlChar *	id	: Obsolete
    xmlSchemaAnnotPtr	annot
    xmlNodePtr	node
    int	fixed	: XML_SCHEMAS_FACET_PRESERVE, etc.
    int	whitespace
    xmlSchemaValPtr	val	: The compiled value
    xmlRegexpPtr	regexp	: The regex for patterns
} xmlSchemaFacet;


Structure xmlSchemaFacetLink

struct _xmlSchemaFacetLink {
    struct _xmlSchemaFacetLink *	next	: the next facet link ...
    xmlSchemaFacetPtr	facet	: the linked facet
} xmlSchemaFacetLink;


Typedef xmlSchemaFacetLinkPtr

xmlSchemaFacetLink * xmlSchemaFacetLinkPtr;


Typedef xmlSchemaFacetPtr

xmlSchemaFacet * xmlSchemaFacetPtr;


Structure xmlSchemaNotation

struct _xmlSchemaNotation {
    xmlSchemaTypeType	type	: The kind of type
    const xmlChar *	name
    xmlSchemaAnnotPtr	annot
    const xmlChar *	identifier
    const xmlChar *	targetNamespace
} xmlSchemaNotation;


Typedef xmlSchemaNotationPtr

xmlSchemaNotation * xmlSchemaNotationPtr;


Structure xmlSchemaType

struct _xmlSchemaType {
    xmlSchemaTypeType	type	: The kind of type
    struct _xmlSchemaType *	next	: the next type if in a sequence ...
    const xmlChar *	name
    const xmlChar *	id	: Deprecated; not used
    const xmlChar *	ref	: Deprecated; not used
    const xmlChar *	refNs	: Deprecated; not used
    xmlSchemaAnnotPtr	annot
    xmlSchemaTypePtr	subtypes
    xmlSchemaAttributePtr	attributes	: Deprecated; not used
    xmlNodePtr	node
    int	minOccurs	: Deprecated; not used
    int	maxOccurs	: Deprecated; not used
    int	flags
    xmlSchemaContentType	contentType
    const xmlChar *	base	: Base type's local name
    const xmlChar *	baseNs	: Base type's target namespace
    xmlSchemaTypePtr	baseType	: The base type component
    xmlSchemaFacetPtr	facets	: Local facets
    struct _xmlSchemaType *	redef	: Deprecated; not used
    int	recurse	: Obsolete
    xmlSchemaAttributeLinkPtr *	attributeUses	: Deprecated; not used
    xmlSchemaWildcardPtr	attributeWildcard
    int	builtInType	: Type of built-in types.
    xmlSchemaTypeLinkPtr	memberTypes	: member-types if a union type.
    xmlSchemaFacetLinkPtr	facetSet	: All facets (incl. inherited)
    const xmlChar *	refPrefix	: Deprecated; not used
    xmlSchemaTypePtr	contentTypeDef	: Used for the simple content of complex types. Could we use @subtypes
    xmlRegexpPtr	contModel	: Holds the automaton of the content model
    const xmlChar *	targetNamespace
    void *	attrUses
} xmlSchemaType;


Structure xmlSchemaTypeLink

struct _xmlSchemaTypeLink {
    struct _xmlSchemaTypeLink *	next	: the next type link ...
    xmlSchemaTypePtr	type	: the linked type
} xmlSchemaTypeLink;


Typedef xmlSchemaTypeLinkPtr

xmlSchemaTypeLink * xmlSchemaTypeLinkPtr;


Typedef xmlSchemaTypePtr

xmlSchemaType * xmlSchemaTypePtr;



Structure xmlSchemaVal

struct _xmlSchemaVal {
The content of this structure is not made public by the API.
} xmlSchemaVal;


Typedef xmlSchemaValPtr

xmlSchemaVal * xmlSchemaValPtr;



Structure xmlSchemaWildcard

struct _xmlSchemaWildcard {
    xmlSchemaTypeType	type	: The kind of type
    const xmlChar *	id	: Deprecated; not used
    xmlSchemaAnnotPtr	annot
    xmlNodePtr	node
    int	minOccurs	: Deprecated; not used
    int	maxOccurs	: Deprecated; not used
    int	processContents
    int	any	: Indicates if the ns constraint is of ##any
    xmlSchemaWildcardNsPtr	nsSet	: The list of allowed namespaces
    xmlSchemaWildcardNsPtr	negNsSet	: The negated namespace
    int	flags
} xmlSchemaWildcard;


Structure xmlSchemaWildcardNs

struct _xmlSchemaWildcardNs {
    struct _xmlSchemaWildcardNs *	next	: the next constraint link ...
    const xmlChar *	value	: the value
} xmlSchemaWildcardNs;


Typedef xmlSchemaWildcardNsPtr

xmlSchemaWildcardNs * xmlSchemaWildcardNsPtr;


Typedef xmlSchemaWildcardPtr

xmlSchemaWildcard * xmlSchemaWildcardPtr;


xmlSchemaFreeType ()

void	xmlSchemaFreeType		(xmlSchemaTypePtr type)

Deallocate a Schema Type structure.

type: a schema type structure

xmlSchemaFreeWildcard ()

void	xmlSchemaFreeWildcard		(xmlSchemaWildcardPtr wildcard)

Deallocates a wildcard structure.

wildcard: a wildcard structure

PK!xylibxml2-SAX2.htmlnu[ SAX2: SAX2 parser interface used to build the DOM tree

SAX2

SAX2 - SAX2 parser interface used to build the DOM tree

those are the default SAX2 interfaces used by the library when building DOM tree.

Author(s): Daniel Veillard

Synopsis

void	htmlDefaultSAXHandlerInit	(void);
void	xmlDefaultSAXHandlerInit	(void);
void	xmlSAX2AttributeDecl		(void * ctx, 
const xmlChar * elem,
const xmlChar * fullname,
int type,
int def,
const xmlChar * defaultValue,
xmlEnumerationPtr tree); void xmlSAX2CDataBlock (void * ctx,
const xmlChar * value,
int len); void xmlSAX2Characters (void * ctx,
const xmlChar * ch,
int len); void xmlSAX2Comment (void * ctx,
const xmlChar * value); void xmlSAX2ElementDecl (void * ctx,
const xmlChar * name,
int type,
xmlElementContentPtr content); void xmlSAX2EndDocument (void * ctx); void xmlSAX2EndElement (void * ctx,
const xmlChar * name); void xmlSAX2EndElementNs (void * ctx,
const xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI); void xmlSAX2EntityDecl (void * ctx,
const xmlChar * name,
int type,
const xmlChar * publicId,
const xmlChar * systemId,
xmlChar * content); void xmlSAX2ExternalSubset (void * ctx,
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID); int xmlSAX2GetColumnNumber (void * ctx); xmlEntityPtr xmlSAX2GetEntity (void * ctx,
const xmlChar * name); int xmlSAX2GetLineNumber (void * ctx); xmlEntityPtr xmlSAX2GetParameterEntity (void * ctx,
const xmlChar * name); const xmlChar * xmlSAX2GetPublicId (void * ctx); const xmlChar * xmlSAX2GetSystemId (void * ctx); int xmlSAX2HasExternalSubset (void * ctx); int xmlSAX2HasInternalSubset (void * ctx); void xmlSAX2IgnorableWhitespace (void * ctx,
const xmlChar * ch,
int len); void xmlSAX2InitDefaultSAXHandler (xmlSAXHandler * hdlr,
int warning); void xmlSAX2InitHtmlDefaultSAXHandler (xmlSAXHandler * hdlr); void xmlSAX2InternalSubset (void * ctx,
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID); int xmlSAX2IsStandalone (void * ctx); void xmlSAX2NotationDecl (void * ctx,
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId); void xmlSAX2ProcessingInstruction (void * ctx,
const xmlChar * target,
const xmlChar * data); void xmlSAX2Reference (void * ctx,
const xmlChar * name); xmlParserInputPtr xmlSAX2ResolveEntity (void * ctx,
const xmlChar * publicId,
const xmlChar * systemId); void xmlSAX2SetDocumentLocator (void * ctx,
xmlSAXLocatorPtr loc); void xmlSAX2StartDocument (void * ctx); void xmlSAX2StartElement (void * ctx,
const xmlChar * fullname,
const xmlChar ** atts); void xmlSAX2StartElementNs (void * ctx,
const xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI,
int nb_namespaces,
const xmlChar ** namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar ** attributes); void xmlSAX2UnparsedEntityDecl (void * ctx,
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId,
const xmlChar * notationName); int xmlSAXDefaultVersion (int version); int xmlSAXVersion (xmlSAXHandler * hdlr,
int version);

Description

Details

htmlDefaultSAXHandlerInit ()

void	htmlDefaultSAXHandlerInit	(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. Initialize the default SAX handler


xmlDefaultSAXHandlerInit ()

void	xmlDefaultSAXHandlerInit	(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. Initialize the default SAX2 handler


xmlSAX2AttributeDecl ()

void	xmlSAX2AttributeDecl		(void * ctx, 
const xmlChar * elem,
const xmlChar * fullname,
int type,
int def,
const xmlChar * defaultValue,
xmlEnumerationPtr tree)

An attribute definition has been parsed

ctx: the user data (XML parser context)
elem: the name of the element
fullname: the attribute name
type: the attribute type
def: the type of default value
defaultValue: the attribute default value
tree: the tree of enumerated value set

xmlSAX2CDataBlock ()

void	xmlSAX2CDataBlock		(void * ctx, 
const xmlChar * value,
int len)

called when a pcdata block has been parsed

ctx: the user data (XML parser context)
value: The pcdata content
len: the block length

xmlSAX2Characters ()

void	xmlSAX2Characters		(void * ctx, 
const xmlChar * ch,
int len)

receiving some chars from the parser.

ctx: the user data (XML parser context)
ch: a xmlChar string
len: the number of xmlChar

xmlSAX2Comment ()

void	xmlSAX2Comment			(void * ctx, 
const xmlChar * value)

A xmlSAX2Comment has been parsed.

ctx: the user data (XML parser context)
value: the xmlSAX2Comment content

xmlSAX2ElementDecl ()

void	xmlSAX2ElementDecl		(void * ctx, 
const xmlChar * name,
int type,
xmlElementContentPtr content)

An element definition has been parsed

ctx: the user data (XML parser context)
name: the element name
type: the element type
content: the element value tree

xmlSAX2EndDocument ()

void	xmlSAX2EndDocument		(void * ctx)

called when the document end has been detected.

ctx: the user data (XML parser context)

xmlSAX2EndElement ()

void	xmlSAX2EndElement		(void * ctx, 
const xmlChar * name)

called when the end of an element has been detected.

ctx: the user data (XML parser context)
name: The element name

xmlSAX2EndElementNs ()

void	xmlSAX2EndElementNs		(void * ctx, 
const xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI)

SAX2 callback when an element end has been detected by the parser. It provides the namespace information for the element.

ctx: the user data (XML parser context)
localname: the local name of the element
prefix: the element namespace prefix if available
URI: the element namespace name if available

xmlSAX2EntityDecl ()

void	xmlSAX2EntityDecl		(void * ctx, 
const xmlChar * name,
int type,
const xmlChar * publicId,
const xmlChar * systemId,
xmlChar * content)

An entity definition has been parsed

ctx: the user data (XML parser context)
name: the entity name
type: the entity type
publicId: The public ID of the entity
systemId: The system ID of the entity
content: the entity value (without processing).

xmlSAX2ExternalSubset ()

void	xmlSAX2ExternalSubset		(void * ctx, 
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID)

Callback on external subset declaration.

ctx: the user data (XML parser context)
name: the root element name
ExternalID: the external ID
SystemID: the SYSTEM ID (e.g. filename or URL)

xmlSAX2GetColumnNumber ()

int	xmlSAX2GetColumnNumber		(void * ctx)

Provide the column number of the current parsing point.

ctx: the user data (XML parser context)
Returns: an int

xmlSAX2GetEntity ()

xmlEntityPtr	xmlSAX2GetEntity	(void * ctx, 
const xmlChar * name)

Get an entity by name

ctx: the user data (XML parser context)
name: The entity name
Returns: the xmlEntityPtr if found.

xmlSAX2GetLineNumber ()

int	xmlSAX2GetLineNumber		(void * ctx)

Provide the line number of the current parsing point.

ctx: the user data (XML parser context)
Returns: an int

xmlSAX2GetParameterEntity ()

xmlEntityPtr	xmlSAX2GetParameterEntity	(void * ctx, 
const xmlChar * name)

Get a parameter entity by name

ctx: the user data (XML parser context)
name: The entity name
Returns: the xmlEntityPtr if found.

xmlSAX2GetPublicId ()

const xmlChar *	xmlSAX2GetPublicId	(void * ctx)

Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"

ctx: the user data (XML parser context)
Returns: a xmlChar *

xmlSAX2GetSystemId ()

const xmlChar *	xmlSAX2GetSystemId	(void * ctx)

Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd

ctx: the user data (XML parser context)
Returns: a xmlChar *

xmlSAX2HasExternalSubset ()

int	xmlSAX2HasExternalSubset	(void * ctx)

Does this document has an external subset

ctx: the user data (XML parser context)
Returns: 1 if true

xmlSAX2HasInternalSubset ()

int	xmlSAX2HasInternalSubset	(void * ctx)

Does this document has an internal subset

ctx: the user data (XML parser context)
Returns: 1 if true

xmlSAX2IgnorableWhitespace ()

void	xmlSAX2IgnorableWhitespace	(void * ctx, 
const xmlChar * ch,
int len)

receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use xmlSAX2Characters

ctx: the user data (XML parser context)
ch: a xmlChar string
len: the number of xmlChar

xmlSAX2InitDefaultSAXHandler ()

void	xmlSAX2InitDefaultSAXHandler	(xmlSAXHandler * hdlr, 
int warning)

Initialize the default XML SAX2 handler

hdlr: the SAX handler
warning: flag if non-zero sets the handler warning procedure

xmlSAX2InitHtmlDefaultSAXHandler ()

void	xmlSAX2InitHtmlDefaultSAXHandler	(xmlSAXHandler * hdlr)

Initialize the default HTML SAX2 handler

hdlr: the SAX handler

xmlSAX2InternalSubset ()

void	xmlSAX2InternalSubset		(void * ctx, 
const xmlChar * name,
const xmlChar * ExternalID,
const xmlChar * SystemID)

Callback on internal subset declaration.

ctx: the user data (XML parser context)
name: the root element name
ExternalID: the external ID
SystemID: the SYSTEM ID (e.g. filename or URL)

xmlSAX2IsStandalone ()

int	xmlSAX2IsStandalone		(void * ctx)

Is this document tagged standalone ?

ctx: the user data (XML parser context)
Returns: 1 if true

xmlSAX2NotationDecl ()

void	xmlSAX2NotationDecl		(void * ctx, 
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId)

What to do when a notation declaration has been parsed.

ctx: the user data (XML parser context)
name: The name of the notation
publicId: The public ID of the entity
systemId: The system ID of the entity

xmlSAX2ProcessingInstruction ()

void	xmlSAX2ProcessingInstruction	(void * ctx, 
const xmlChar * target,
const xmlChar * data)

A processing instruction has been parsed.

ctx: the user data (XML parser context)
target: the target name
data: the PI data's

xmlSAX2Reference ()

void	xmlSAX2Reference		(void * ctx, 
const xmlChar * name)

called when an entity xmlSAX2Reference is detected.

ctx: the user data (XML parser context)
name: The entity name

xmlSAX2ResolveEntity ()

xmlParserInputPtr	xmlSAX2ResolveEntity	(void * ctx, 
const xmlChar * publicId,
const xmlChar * systemId)

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

ctx: the user data (XML parser context)
publicId: The public ID of the entity
systemId: The system ID of the entity
Returns: the xmlParserInputPtr if inlined or NULL for DOM behaviour.

xmlSAX2SetDocumentLocator ()

void	xmlSAX2SetDocumentLocator	(void * ctx, 
xmlSAXLocatorPtr loc)

Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case.

ctx: the user data (XML parser context)
loc: A SAX Locator

xmlSAX2StartDocument ()

void	xmlSAX2StartDocument		(void * ctx)

called when the document start being processed.

ctx: the user data (XML parser context)

xmlSAX2StartElement ()

void	xmlSAX2StartElement		(void * ctx, 
const xmlChar * fullname,
const xmlChar ** atts)

called when an opening tag has been processed.

ctx: the user data (XML parser context)
fullname: The element name, including namespace prefix
atts: An array of name/value attributes pairs, NULL terminated

xmlSAX2StartElementNs ()

void	xmlSAX2StartElementNs		(void * ctx, 
const xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI,
int nb_namespaces,
const xmlChar ** namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar ** attributes)

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.

ctx: the user data (XML parser context)
localname: the local name of the element
prefix: the element namespace prefix if available
URI: the element namespace name if available
nb_namespaces: number of namespace definitions on that node
namespaces: pointer to the array of prefix/URI pairs namespace definitions
nb_attributes: the number of attributes on that node
nb_defaulted: the number of defaulted attributes.
attributes: pointer to the array of (localname/prefix/URI/value/end) attribute values.

xmlSAX2UnparsedEntityDecl ()

void	xmlSAX2UnparsedEntityDecl	(void * ctx, 
const xmlChar * name,
const xmlChar * publicId,
const xmlChar * systemId,
const xmlChar * notationName)

What to do when an unparsed entity declaration is parsed

ctx: the user data (XML parser context)
name: The name of the entity
publicId: The public ID of the entity
systemId: The system ID of the entity
notationName: the name of the notation

xmlSAXDefaultVersion ()

int	xmlSAXDefaultVersion		(int version)

Set the default version of SAX used globally by the library. By default, during initialization the default is set to 2. Note that it is generally a better coding style to use xmlSAXVersion() to set up the version explicitly for a given parsing context.

version: the version, 1 or 2
Returns: the previous value in case of success and -1 in case of error.

xmlSAXVersion ()

int	xmlSAXVersion			(xmlSAXHandler * hdlr, 
int version)

Initialize the default XML SAX handler according to the version

hdlr: the SAX handler
version: the version, 1 or 2
Returns: 0 in case of success and -1 in case of error.

PK!ARRlibxml2-hash.htmlnu[ hash: Chained hash tables

hash

hash - Chained hash tables

This module implements the hash table support used in various places in the library.

Author(s): Bjorn Reese <bjorn.reese@systematic.dk>

Synopsis

#define XML_CAST_FPTR(fptr);
typedef struct _xmlHashTable xmlHashTable;
typedef xmlHashTable * xmlHashTablePtr;
int	xmlHashAddEntry			(xmlHashTablePtr table, 
const xmlChar * name,
void * userdata); int xmlHashAddEntry2 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
void * userdata); int xmlHashAddEntry3 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
void * userdata); typedef void * xmlHashCopier (void * payload,
const xmlChar * name); xmlHashTablePtr xmlHashCopy (xmlHashTablePtr table,
xmlHashCopier f); xmlHashTablePtr xmlHashCreate (int size); xmlHashTablePtr xmlHashCreateDict (int size,
xmlDictPtr dict); typedef void xmlHashDeallocator (void * payload,
const xmlChar * name); void xmlHashDefaultDeallocator (void * entry,
const xmlChar * name); void xmlHashFree (xmlHashTablePtr table,
xmlHashDeallocator f); void * xmlHashLookup (xmlHashTablePtr table,
const xmlChar * name); void * xmlHashLookup2 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2); void * xmlHashLookup3 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3); void * xmlHashQLookup (xmlHashTablePtr table,
const xmlChar * prefix,
const xmlChar * name); void * xmlHashQLookup2 (xmlHashTablePtr table,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * prefix2,
const xmlChar * name2); void * xmlHashQLookup3 (xmlHashTablePtr table,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * prefix2,
const xmlChar * name2,
const xmlChar * prefix3,
const xmlChar * name3); int xmlHashRemoveEntry (xmlHashTablePtr table,
const xmlChar * name,
xmlHashDeallocator f); int xmlHashRemoveEntry2 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
xmlHashDeallocator f); int xmlHashRemoveEntry3 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashDeallocator f); void xmlHashScan (xmlHashTablePtr table,
xmlHashScanner f,
void * data); void xmlHashScan3 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashScanner f,
void * data); void xmlHashScanFull (xmlHashTablePtr table,
xmlHashScannerFull f,
void * data); void xmlHashScanFull3 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashScannerFull f,
void * data); typedef void xmlHashScanner (void * payload,
void * data,
const xmlChar * name); typedef void xmlHashScannerFull (void * payload,
void * data,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3); int xmlHashSize (xmlHashTablePtr table); int xmlHashUpdateEntry (xmlHashTablePtr table,
const xmlChar * name,
void * userdata,
xmlHashDeallocator f); int xmlHashUpdateEntry2 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
void * userdata,
xmlHashDeallocator f); int xmlHashUpdateEntry3 (xmlHashTablePtr table,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
void * userdata,
xmlHashDeallocator f);

Description

Details

Macro XML_CAST_FPTR

#define XML_CAST_FPTR(fptr);

Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) This macro violated ISO C aliasing rules (gcc4 on s390 broke) so it is disabled now

fptr: pointer to a function

Structure xmlHashTable

struct _xmlHashTable {
The content of this structure is not made public by the API.
} xmlHashTable;


Typedef xmlHashTablePtr

xmlHashTable * xmlHashTablePtr;


Function type xmlHashCopier

void *	xmlHashCopier			(void * payload, 
const xmlChar * name)

Callback to copy data from a hash.

payload: the data in the hash
name: the name associated
Returns: a copy of the data or NULL in case of error.

Function type xmlHashDeallocator

void	xmlHashDeallocator		(void * payload, 
const xmlChar * name)

Callback to free data from a hash.

payload: the data in the hash
name: the name associated

Function type xmlHashScanner

void	xmlHashScanner			(void * payload, 
void * data,
const xmlChar * name)

Callback when scanning data in a hash with the simple scanner.

payload: the data in the hash
data: extra scanner data
name: the name associated

Function type xmlHashScannerFull

void	xmlHashScannerFull		(void * payload, 
void * data,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3)

Callback when scanning data in a hash with the full scanner.

payload: the data in the hash
data: extra scanner data
name: the name associated
name2: the second name associated
name3: the third name associated

xmlHashAddEntry ()

int	xmlHashAddEntry			(xmlHashTablePtr table, 
const xmlChar * name,
void * userdata)

Add the @userdata to the hash @table. This can later be retrieved by using the @name. Duplicate names generate errors.

table: the hash table
name: the name of the userdata
userdata: a pointer to the userdata
Returns: 0 the addition succeeded and -1 in case of error.

xmlHashAddEntry2 ()

int	xmlHashAddEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
void * userdata)

Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Duplicate tuples generate errors.

table: the hash table
name: the name of the userdata
name2: a second name of the userdata
userdata: a pointer to the userdata
Returns: 0 the addition succeeded and -1 in case of error.

xmlHashAddEntry3 ()

int	xmlHashAddEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
void * userdata)

Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Duplicate entries generate errors.

table: the hash table
name: the name of the userdata
name2: a second name of the userdata
name3: a third name of the userdata
userdata: a pointer to the userdata
Returns: 0 the addition succeeded and -1 in case of error.

xmlHashCopy ()

xmlHashTablePtr	xmlHashCopy		(xmlHashTablePtr table, 
xmlHashCopier f)

Scan the hash @table and applied @f to each value.

table: the hash table
f: the copier function for items in the hash
Returns: the new table or NULL in case of error.

xmlHashCreate ()

xmlHashTablePtr	xmlHashCreate		(int size)

Create a new xmlHashTablePtr.

size: the size of the hash table
Returns: the newly created object, or NULL if an error occurred.

xmlHashCreateDict ()

xmlHashTablePtr	xmlHashCreateDict	(int size, 
xmlDictPtr dict)

Create a new xmlHashTablePtr which will use @dict as the internal dictionary

size: the size of the hash table
dict: a dictionary to use for the hash
Returns: the newly created object, or NULL if an error occurred.

xmlHashDefaultDeallocator ()

void	xmlHashDefaultDeallocator	(void * entry, 
const xmlChar * name)

Free a hash table entry with xmlFree.

entry: the hash table entry
name: the entry's name

xmlHashFree ()

void	xmlHashFree			(xmlHashTablePtr table, 
xmlHashDeallocator f)

Free the hash @table and its contents. The userdata is deallocated with @f if provided.

table: the hash table
f: the deallocator function for items in the hash

xmlHashLookup ()

void *	xmlHashLookup			(xmlHashTablePtr table, 
const xmlChar * name)

Find the userdata specified by the @name.

table: the hash table
name: the name of the userdata
Returns: the pointer to the userdata

xmlHashLookup2 ()

void *	xmlHashLookup2			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2)

Find the userdata specified by the (@name, @name2) tuple.

table: the hash table
name: the name of the userdata
name2: a second name of the userdata
Returns: the pointer to the userdata

xmlHashLookup3 ()

void *	xmlHashLookup3			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3)

Find the userdata specified by the (@name, @name2, @name3) tuple.

table: the hash table
name: the name of the userdata
name2: a second name of the userdata
name3: a third name of the userdata
Returns: the a pointer to the userdata

xmlHashQLookup ()

void *	xmlHashQLookup			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name)

Find the userdata specified by the QName @prefix:@name/@name.

table: the hash table
prefix: the prefix of the userdata
name: the name of the userdata
Returns: the pointer to the userdata

xmlHashQLookup2 ()

void *	xmlHashQLookup2			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * prefix2,
const xmlChar * name2)

Find the userdata specified by the QNames tuple

table: the hash table
prefix: the prefix of the userdata
name: the name of the userdata
prefix2: the second prefix of the userdata
name2: a second name of the userdata
Returns: the pointer to the userdata

xmlHashQLookup3 ()

void *	xmlHashQLookup3			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * prefix2,
const xmlChar * name2,
const xmlChar * prefix3,
const xmlChar * name3)

Find the userdata specified by the (@name, @name2, @name3) tuple.

table: the hash table
prefix: the prefix of the userdata
name: the name of the userdata
prefix2: the second prefix of the userdata
name2: a second name of the userdata
prefix3: the third prefix of the userdata
name3: a third name of the userdata
Returns: the a pointer to the userdata

xmlHashRemoveEntry ()

int	xmlHashRemoveEntry		(xmlHashTablePtr table, 
const xmlChar * name,
xmlHashDeallocator f)

Find the userdata specified by the @name and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.

table: the hash table
name: the name of the userdata
f: the deallocator function for removed item (if any)
Returns: 0 if the removal succeeded and -1 in case of error or not found.

xmlHashRemoveEntry2 ()

int	xmlHashRemoveEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
xmlHashDeallocator f)

Find the userdata specified by the (@name, @name2) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.

table: the hash table
name: the name of the userdata
name2: a second name of the userdata
f: the deallocator function for removed item (if any)
Returns: 0 if the removal succeeded and -1 in case of error or not found.

xmlHashRemoveEntry3 ()

int	xmlHashRemoveEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashDeallocator f)

Find the userdata specified by the (@name, @name2, @name3) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.

table: the hash table
name: the name of the userdata
name2: a second name of the userdata
name3: a third name of the userdata
f: the deallocator function for removed item (if any)
Returns: 0 if the removal succeeded and -1 in case of error or not found.

xmlHashScan ()

void	xmlHashScan			(xmlHashTablePtr table, 
xmlHashScanner f,
void * data)

Scan the hash @table and applied @f to each value.

table: the hash table
f: the scanner function for items in the hash
data: extra data passed to f

xmlHashScan3 ()

void	xmlHashScan3			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashScanner f,
void * data)

Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.

table: the hash table
name: the name of the userdata or NULL
name2: a second name of the userdata or NULL
name3: a third name of the userdata or NULL
f: the scanner function for items in the hash
data: extra data passed to f

xmlHashScanFull ()

void	xmlHashScanFull			(xmlHashTablePtr table, 
xmlHashScannerFull f,
void * data)

Scan the hash @table and applied @f to each value.

table: the hash table
f: the scanner function for items in the hash
data: extra data passed to f

xmlHashScanFull3 ()

void	xmlHashScanFull3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashScannerFull f,
void * data)

Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.

table: the hash table
name: the name of the userdata or NULL
name2: a second name of the userdata or NULL
name3: a third name of the userdata or NULL
f: the scanner function for items in the hash
data: extra data passed to f

xmlHashSize ()

int	xmlHashSize			(xmlHashTablePtr table)

Query the number of elements installed in the hash @table.

table: the hash table
Returns: the number of elements in the hash table or -1 in case of error

xmlHashUpdateEntry ()

int	xmlHashUpdateEntry		(xmlHashTablePtr table, 
const xmlChar * name,
void * userdata,
xmlHashDeallocator f)

Add the @userdata to the hash @table. This can later be retrieved by using the @name. Existing entry for this @name will be removed and freed with @f if found.

table: the hash table
name: the name of the userdata
userdata: a pointer to the userdata
f: the deallocator function for replaced item (if any)
Returns: 0 the addition succeeded and -1 in case of error.

xmlHashUpdateEntry2 ()

int	xmlHashUpdateEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
void * userdata,
xmlHashDeallocator f)

Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Existing entry for this tuple will be removed and freed with @f if found.

table: the hash table
name: the name of the userdata
name2: a second name of the userdata
userdata: a pointer to the userdata
f: the deallocator function for replaced item (if any)
Returns: 0 the addition succeeded and -1 in case of error.

xmlHashUpdateEntry3 ()

int	xmlHashUpdateEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
void * userdata,
xmlHashDeallocator f)

Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Existing entry for this tuple will be removed and freed with @f if found.

table: the hash table
name: the name of the userdata
name2: a second name of the userdata
name3: a third name of the userdata
userdata: a pointer to the userdata
f: the deallocator function for replaced item (if any)
Returns: 0 the addition succeeded and -1 in case of error.

PK!I44 style.cssnu[.synopsis, .classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } .programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } table.navigation { background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0.5em; margin-bottom: 0.5em; } .navigation a { color: #770000; } .navigation a:visited { color: #550000; } .navigation .title { font-size: 200%; } div.refnamediv { margin-top: 2em; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a { text-decoration: none; } a:hover { text-decoration: underline; color: #FF0000; } PK!! libxml2-relaxng.htmlnu[ relaxng: implementation of the Relax-NG validation

relaxng

relaxng - implementation of the Relax-NG validation

implementation of the Relax-NG validation

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlRelaxNG xmlRelaxNG;
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
typedef xmlRelaxNGParserCtxt * xmlRelaxNGParserCtxtPtr;
typedef enum xmlRelaxNGParserFlag;
typedef xmlRelaxNG * xmlRelaxNGPtr;
typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
typedef xmlRelaxNGValidCtxt * xmlRelaxNGValidCtxtPtr;
typedef enum xmlRelaxNGValidErr;
void	xmlRelaxNGCleanupTypes		(void);
void	xmlRelaxNGDump			(FILE * output, 
xmlRelaxNGPtr schema); void xmlRelaxNGDumpTree (FILE * output,
xmlRelaxNGPtr schema); void xmlRelaxNGFree (xmlRelaxNGPtr schema); void xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt); void xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt); int xmlRelaxNGGetParserErrors (xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc * err,
xmlRelaxNGValidityWarningFunc * warn,
void ** ctx); int xmlRelaxNGGetValidErrors (xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc * err,
xmlRelaxNGValidityWarningFunc * warn,
void ** ctx); int xmlRelaxNGInitTypes (void); xmlRelaxNGParserCtxtPtr xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc); xmlRelaxNGParserCtxtPtr xmlRelaxNGNewMemParserCtxt (const char * buffer,
int size); xmlRelaxNGParserCtxtPtr xmlRelaxNGNewParserCtxt (const char * URL); xmlRelaxNGValidCtxtPtr xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema); xmlRelaxNGPtr xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt); void xmlRelaxNGSetParserErrors (xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void * ctx); void xmlRelaxNGSetParserStructuredErrors (xmlRelaxNGParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void * ctx); void xmlRelaxNGSetValidErrors (xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void * ctx); void xmlRelaxNGSetValidStructuredErrors (xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void * ctx); int xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc); int xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem); int xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem); int xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
const xmlChar * data,
int len); int xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem); typedef void xmlRelaxNGValidityErrorFunc (void * ctx,
const char * msg,
... ...); typedef void xmlRelaxNGValidityWarningFunc (void * ctx,
const char * msg,
... ...); int xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
int flags);

Description

Details

Structure xmlRelaxNG

struct _xmlRelaxNG {
The content of this structure is not made public by the API.
} xmlRelaxNG;


Structure xmlRelaxNGParserCtxt

struct _xmlRelaxNGParserCtxt {
The content of this structure is not made public by the API.
} xmlRelaxNGParserCtxt;


Typedef xmlRelaxNGParserCtxtPtr

xmlRelaxNGParserCtxt * xmlRelaxNGParserCtxtPtr;



Typedef xmlRelaxNGPtr

xmlRelaxNG * xmlRelaxNGPtr;


Structure xmlRelaxNGValidCtxt

struct _xmlRelaxNGValidCtxt {
The content of this structure is not made public by the API.
} xmlRelaxNGValidCtxt;


Typedef xmlRelaxNGValidCtxtPtr

xmlRelaxNGValidCtxt * xmlRelaxNGValidCtxtPtr;



Function type xmlRelaxNGValidityErrorFunc

void	xmlRelaxNGValidityErrorFunc	(void * ctx, 
const char * msg,
... ...)

Signature of an error callback from a Relax-NG validation

ctx: the validation context
msg: the message
...: extra arguments

Function type xmlRelaxNGValidityWarningFunc

void	xmlRelaxNGValidityWarningFunc	(void * ctx, 
const char * msg,
... ...)

Signature of a warning callback from a Relax-NG validation

ctx: the validation context
msg: the message
...: extra arguments

xmlRelaxNGCleanupTypes ()

void	xmlRelaxNGCleanupTypes		(void)

DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Cleanup the default Schemas type library associated to RelaxNG


xmlRelaxNGDump ()

void	xmlRelaxNGDump			(FILE * output, 
xmlRelaxNGPtr schema)

Dump a RelaxNG structure back

output: the file output
schema: a schema structure

xmlRelaxNGDumpTree ()

void	xmlRelaxNGDumpTree		(FILE * output, 
xmlRelaxNGPtr schema)

Dump the transformed RelaxNG tree.

output: the file output
schema: a schema structure

xmlRelaxNGFree ()

void	xmlRelaxNGFree			(xmlRelaxNGPtr schema)

Deallocate a RelaxNG structure.

schema: a schema structure

xmlRelaxNGFreeParserCtxt ()

void	xmlRelaxNGFreeParserCtxt	(xmlRelaxNGParserCtxtPtr ctxt)

Free the resources associated to the schema parser context

ctxt: the schema parser context

xmlRelaxNGFreeValidCtxt ()

void	xmlRelaxNGFreeValidCtxt		(xmlRelaxNGValidCtxtPtr ctxt)

Free the resources associated to the schema validation context

ctxt: the schema validation context

xmlRelaxNGGetParserErrors ()

int	xmlRelaxNGGetParserErrors	(xmlRelaxNGParserCtxtPtr ctxt, 
xmlRelaxNGValidityErrorFunc * err,
xmlRelaxNGValidityWarningFunc * warn,
void ** ctx)

Get the callback information used to handle errors for a validation context

ctxt: a Relax-NG validation context
err: the error callback result
warn: the warning callback result
ctx: contextual data for the callbacks result
Returns: -1 in case of failure, 0 otherwise.

xmlRelaxNGGetValidErrors ()

int	xmlRelaxNGGetValidErrors	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlRelaxNGValidityErrorFunc * err,
xmlRelaxNGValidityWarningFunc * warn,
void ** ctx)

Get the error and warning callback information

ctxt: a Relax-NG validation context
err: the error function result
warn: the warning function result
ctx: the functions context result
Returns: -1 in case of error and 0 otherwise

xmlRelaxNGInitTypes ()

int	xmlRelaxNGInitTypes		(void)

Initialize the default type libraries.

Returns: 0 in case of success and -1 in case of error.

xmlRelaxNGNewDocParserCtxt ()

xmlRelaxNGParserCtxtPtr	xmlRelaxNGNewDocParserCtxt	(xmlDocPtr doc)

Create an XML RelaxNGs parser context for that document. Note: since the process of compiling a RelaxNG schemas modifies the document, the @doc parameter is duplicated internally.

doc: a preparsed document tree
Returns: the parser context or NULL in case of error

xmlRelaxNGNewMemParserCtxt ()

xmlRelaxNGParserCtxtPtr	xmlRelaxNGNewMemParserCtxt	(const char * buffer, 
int size)

Create an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file.

buffer: a pointer to a char array containing the schemas
size: the size of the array
Returns: the parser context or NULL in case of error

xmlRelaxNGNewParserCtxt ()

xmlRelaxNGParserCtxtPtr	xmlRelaxNGNewParserCtxt	(const char * URL)

Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file.

URL: the location of the schema
Returns: the parser context or NULL in case of error

xmlRelaxNGNewValidCtxt ()

xmlRelaxNGValidCtxtPtr	xmlRelaxNGNewValidCtxt	(xmlRelaxNGPtr schema)

Create an XML RelaxNGs validation context based on the given schema

schema: a precompiled XML RelaxNGs
Returns: the validation context or NULL in case of error

xmlRelaxNGParse ()

xmlRelaxNGPtr	xmlRelaxNGParse		(xmlRelaxNGParserCtxtPtr ctxt)

parse a schema definition resource and build an internal XML Schema structure which can be used to validate instances.

ctxt: a Relax-NG parser context
Returns: the internal XML RelaxNG structure built from the resource or NULL in case of error

xmlRelaxNGSetParserErrors ()

void	xmlRelaxNGSetParserErrors	(xmlRelaxNGParserCtxtPtr ctxt, 
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void * ctx)

Set the callback functions used to handle errors for a validation context

ctxt: a Relax-NG validation context
err: the error callback
warn: the warning callback
ctx: contextual data for the callbacks

xmlRelaxNGSetParserStructuredErrors ()

void	xmlRelaxNGSetParserStructuredErrors	(xmlRelaxNGParserCtxtPtr ctxt, 
xmlStructuredErrorFunc serror,
void * ctx)

Set the callback functions used to handle errors for a parsing context

ctxt: a Relax-NG parser context
serror: the error callback
ctx: contextual data for the callbacks

xmlRelaxNGSetValidErrors ()

void	xmlRelaxNGSetValidErrors	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void * ctx)

Set the error and warning callback information

ctxt: a Relax-NG validation context
err: the error function
warn: the warning function
ctx: the functions context

xmlRelaxNGSetValidStructuredErrors ()

void	xmlRelaxNGSetValidStructuredErrors	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlStructuredErrorFunc serror,
void * ctx)

Set the structured error callback

ctxt: a Relax-NG validation context
serror: the structured error function
ctx: the functions context

xmlRelaxNGValidateDoc ()

int	xmlRelaxNGValidateDoc		(xmlRelaxNGValidCtxtPtr ctxt, 
xmlDocPtr doc)

Validate a document tree in memory.

ctxt: a Relax-NG validation context
doc: a parsed document tree
Returns: 0 if the document is valid, a positive error code number otherwise and -1 in case of internal or API error.

xmlRelaxNGValidateFullElement ()

int	xmlRelaxNGValidateFullElement	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem)

Validate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded.

ctxt: the validation context
doc: a document instance
elem: an element instance
Returns: 1 if no validation problem was found or -1 in case of error.

xmlRelaxNGValidatePopElement ()

int	xmlRelaxNGValidatePopElement	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem)

Pop the element end from the RelaxNG validation stack.

ctxt: the RelaxNG validation context
doc: a document instance
elem: an element instance
Returns: 1 if no validation problem was found or 0 otherwise

xmlRelaxNGValidatePushCData ()

int	xmlRelaxNGValidatePushCData	(xmlRelaxNGValidCtxtPtr ctxt, 
const xmlChar * data,
int len)

check the CData parsed for validation in the current stack

ctxt: the RelaxNG validation context
data: some character data read
len: the length of the data
Returns: 1 if no validation problem was found or -1 otherwise

xmlRelaxNGValidatePushElement ()

int	xmlRelaxNGValidatePushElement	(xmlRelaxNGValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem)

Push a new element start on the RelaxNG validation stack.

ctxt: the validation context
doc: a document instance
elem: an element instance
Returns: 1 if no validation problem was found or 0 if validating the element requires a full node, and -1 in case of error.

xmlRelaxParserSetFlag ()

int	xmlRelaxParserSetFlag		(xmlRelaxNGParserCtxtPtr ctxt, 
int flags)

Semi private function used to pass information to a parser context which are a combination of xmlRelaxNGParserFlag .

ctxt: a RelaxNG parser context
flags: a set of flags values
Returns: 0 if success and -1 in case of error

PK!HHlibxml2-xmlversion.htmlnu[ xmlversion: compile-time version information

xmlversion

xmlversion - compile-time version information

compile-time version information for the XML library

Author(s): Daniel Veillard

Description

Details

Macro ATTRIBUTE_UNUSED

#define ATTRIBUTE_UNUSED;

Macro used to signal to GCC unused function parameters


Macro DEBUG_MEMORY_LOCATION

#define DEBUG_MEMORY_LOCATION;

Whether the memory debugging is configured in


Macro LIBXML_ATTR_ALLOC_SIZE

#define LIBXML_ATTR_ALLOC_SIZE;

Macro used to indicate to GCC this is an allocator function


Macro LIBXML_ATTR_FORMAT

#define LIBXML_ATTR_FORMAT;

Macro used to indicate to GCC the parameter are printf like


Macro LIBXML_AUTOMATA_ENABLED

#define LIBXML_AUTOMATA_ENABLED;

Whether the automata interfaces are compiled in


Macro LIBXML_C14N_ENABLED

#define LIBXML_C14N_ENABLED;

Whether the Canonicalization support is configured in


Macro LIBXML_CATALOG_ENABLED

#define LIBXML_CATALOG_ENABLED;

Whether the Catalog support is configured in


Macro LIBXML_DEBUG_ENABLED

#define LIBXML_DEBUG_ENABLED;

Whether Debugging module is configured in


Macro LIBXML_DEBUG_RUNTIME

#define LIBXML_DEBUG_RUNTIME;

Whether the runtime debugging is configured in


Macro LIBXML_DOTTED_VERSION

#define LIBXML_DOTTED_VERSION;

the version string like "1.2.3"


Macro LIBXML_EXPR_ENABLED

#define LIBXML_EXPR_ENABLED;

Whether the formal expressions interfaces are compiled in This code is unused and disabled unconditionally for now.


Macro LIBXML_FTP_ENABLED

#define LIBXML_FTP_ENABLED;

Whether the FTP support is configured in


Macro LIBXML_HTML_ENABLED

#define LIBXML_HTML_ENABLED;

Whether the HTML support is configured in


Macro LIBXML_HTTP_ENABLED

#define LIBXML_HTTP_ENABLED;

Whether the HTTP support is configured in


Macro LIBXML_ICONV_ENABLED

#define LIBXML_ICONV_ENABLED;

Whether iconv support is available


Macro LIBXML_ICU_ENABLED

#define LIBXML_ICU_ENABLED;

Whether icu support is available


Macro LIBXML_ISO8859X_ENABLED

#define LIBXML_ISO8859X_ENABLED;

Whether ISO-8859-* support is made available in case iconv is not


Macro LIBXML_LEGACY_ENABLED

#define LIBXML_LEGACY_ENABLED;

Whether the deprecated APIs are compiled in for compatibility


Macro LIBXML_LZMA_ENABLED

#define LIBXML_LZMA_ENABLED;

Whether the Lzma support is compiled in


Macro LIBXML_MODULES_ENABLED

#define LIBXML_MODULES_ENABLED;

Whether the module interfaces are compiled in


Macro LIBXML_MODULE_EXTENSION

#define LIBXML_MODULE_EXTENSION;

the string suffix used by dynamic modules (usually shared libraries)


Macro LIBXML_OUTPUT_ENABLED

#define LIBXML_OUTPUT_ENABLED;

Whether the serialization/saving support is configured in


Macro LIBXML_PATTERN_ENABLED

#define LIBXML_PATTERN_ENABLED;

Whether the xmlPattern node selection interface is configured in


Macro LIBXML_PUSH_ENABLED

#define LIBXML_PUSH_ENABLED;

Whether the push parsing interfaces are configured in


Macro LIBXML_READER_ENABLED

#define LIBXML_READER_ENABLED;

Whether the xmlReader parsing interface is configured in


Macro LIBXML_REGEXP_ENABLED

#define LIBXML_REGEXP_ENABLED;

Whether the regular expressions interfaces are compiled in


Macro LIBXML_SAX1_ENABLED

#define LIBXML_SAX1_ENABLED;

Whether the older SAX1 interface is configured in


Macro LIBXML_SCHEMAS_ENABLED

#define LIBXML_SCHEMAS_ENABLED;

Whether the Schemas validation interfaces are compiled in


Macro LIBXML_SCHEMATRON_ENABLED

#define LIBXML_SCHEMATRON_ENABLED;

Whether the Schematron validation interfaces are compiled in


Macro LIBXML_TEST_VERSION

#define LIBXML_TEST_VERSION;

Macro to check that the libxml version in use is compatible with the version the software has been compiled against


Macro LIBXML_THREAD_ALLOC_ENABLED

#define LIBXML_THREAD_ALLOC_ENABLED;

Whether the allocation hooks are per-thread


Macro LIBXML_THREAD_ENABLED

#define LIBXML_THREAD_ENABLED;

Whether the thread support is configured in


Macro LIBXML_TREE_ENABLED

#define LIBXML_TREE_ENABLED;

Whether the DOM like tree manipulation API support is configured in


Macro LIBXML_UNICODE_ENABLED

#define LIBXML_UNICODE_ENABLED;

Whether the Unicode related interfaces are compiled in


Macro LIBXML_VALID_ENABLED

#define LIBXML_VALID_ENABLED;

Whether the DTD validation support is configured in


Macro LIBXML_VERSION

#define LIBXML_VERSION;

the version number: 1.2.3 value is 10203


Macro LIBXML_VERSION_EXTRA

#define LIBXML_VERSION_EXTRA;

extra version information, used to show a git commit description


Macro LIBXML_VERSION_STRING

#define LIBXML_VERSION_STRING;

the version number string, 1.2.3 value is "10203"


Macro LIBXML_WRITER_ENABLED

#define LIBXML_WRITER_ENABLED;

Whether the xmlWriter saving interface is configured in


Macro LIBXML_XINCLUDE_ENABLED

#define LIBXML_XINCLUDE_ENABLED;

Whether XInclude is configured in


Macro LIBXML_XPATH_ENABLED

#define LIBXML_XPATH_ENABLED;

Whether XPath is configured in


Macro LIBXML_XPTR_ENABLED

#define LIBXML_XPTR_ENABLED;

Whether XPointer is configured in


Macro LIBXML_XPTR_LOCS_ENABLED

#define LIBXML_XPTR_LOCS_ENABLED;

Whether support for XPointer locations is configured in


Macro LIBXML_ZLIB_ENABLED

#define LIBXML_ZLIB_ENABLED;

Whether the Zlib support is compiled in


Macro WITHOUT_TRIO

#define WITHOUT_TRIO;

defined if the trio support should not be configured in


Macro WITH_TRIO

#define WITH_TRIO;

defined if the trio support need to be configured in


Macro XML_DEPRECATED

#define XML_DEPRECATED;

Macro used to indicate that a function, variable, type or struct member is deprecated.


xmlCheckVersion ()

void	xmlCheckVersion			(int version)

check the compiled lib version against the include one. This can warn or immediately kill the application

version: the include version number

PK!uX?8?8libxml2-xmlsave.htmlnu[ xmlsave: the XML document serializer

xmlsave

xmlsave - the XML document serializer

API to save document or subtree of document

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlSaveCtxt xmlSaveCtxt;
typedef xmlSaveCtxt * xmlSaveCtxtPtr;
typedef enum xmlSaveOption;
int	xmlSaveClose			(xmlSaveCtxtPtr ctxt);
long	xmlSaveDoc			(xmlSaveCtxtPtr ctxt, 
xmlDocPtr doc); int xmlSaveFlush (xmlSaveCtxtPtr ctxt); int xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape); int xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape); xmlSaveCtxtPtr xmlSaveToBuffer (xmlBufferPtr buffer,
const char * encoding,
int options); xmlSaveCtxtPtr xmlSaveToFd (int fd,
const char * encoding,
int options); xmlSaveCtxtPtr xmlSaveToFilename (const char * filename,
const char * encoding,
int options); xmlSaveCtxtPtr xmlSaveToIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void * ioctx,
const char * encoding,
int options); long xmlSaveTree (xmlSaveCtxtPtr ctxt,
xmlNodePtr cur);

Description

Details

Structure xmlSaveCtxt

struct _xmlSaveCtxt {
The content of this structure is not made public by the API.
} xmlSaveCtxt;


Typedef xmlSaveCtxtPtr

xmlSaveCtxt * xmlSaveCtxtPtr;


Enum xmlSaveOption

enum xmlSaveOption {
    XML_SAVE_FORMAT = 1 /* format save output */
    XML_SAVE_NO_DECL = 2 /* drop the xml declaration */
    XML_SAVE_NO_EMPTY = 4 /* no empty tags */
    XML_SAVE_NO_XHTML = 8 /* disable XHTML1 specific rules */
    XML_SAVE_XHTML = 16 /* force XHTML1 specific rules */
    XML_SAVE_AS_XML = 32 /* force XML serialization on HTML doc */
    XML_SAVE_AS_HTML = 64 /* force HTML serialization on XML doc */
    XML_SAVE_WSNONSIG = 128 /*  format with non-significant whitespace */
};


xmlSaveClose ()

int	xmlSaveClose			(xmlSaveCtxtPtr ctxt)

Close a document saving context, i.e. make sure that all bytes have been output and free the associated data.

ctxt: a document saving context
Returns: the number of byte written or -1 in case of error.

xmlSaveDoc ()

long	xmlSaveDoc			(xmlSaveCtxtPtr ctxt, 
xmlDocPtr doc)

Save a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead

ctxt: a document saving context
doc: a document
Returns: the number of byte written or -1 in case of error

xmlSaveFlush ()

int	xmlSaveFlush			(xmlSaveCtxtPtr ctxt)

Flush a document saving context, i.e. make sure that all bytes have been output.

ctxt: a document saving context
Returns: the number of byte written or -1 in case of error.

xmlSaveSetAttrEscape ()

int	xmlSaveSetAttrEscape		(xmlSaveCtxtPtr ctxt, 
xmlCharEncodingOutputFunc escape)

Set a custom escaping function to be used for text in attribute content

ctxt: a document saving context
escape: the escaping function
Returns: 0 if successful or -1 in case of error.

xmlSaveSetEscape ()

int	xmlSaveSetEscape		(xmlSaveCtxtPtr ctxt, 
xmlCharEncodingOutputFunc escape)

Set a custom escaping function to be used for text in element content

ctxt: a document saving context
escape: the escaping function
Returns: 0 if successful or -1 in case of error.

xmlSaveToBuffer ()

xmlSaveCtxtPtr	xmlSaveToBuffer		(xmlBufferPtr buffer, 
const char * encoding,
int options)

Create a document saving context serializing to a buffer with the encoding and the options given

buffer: a buffer
encoding: the encoding name to use or NULL
options: a set of xmlSaveOptions
Returns: a new serialization context or NULL in case of error.

xmlSaveToFd ()

xmlSaveCtxtPtr	xmlSaveToFd		(int fd, 
const char * encoding,
int options)

Create a document saving context serializing to a file descriptor with the encoding and the options given.

fd: a file descriptor number
encoding: the encoding name to use or NULL
options: a set of xmlSaveOptions
Returns: a new serialization context or NULL in case of error.

xmlSaveToFilename ()

xmlSaveCtxtPtr	xmlSaveToFilename	(const char * filename, 
const char * encoding,
int options)

Create a document saving context serializing to a filename or possibly to an URL (but this is less reliable) with the encoding and the options given.

filename: a file name or an URL
encoding: the encoding name to use or NULL
options: a set of xmlSaveOptions
Returns: a new serialization context or NULL in case of error.

xmlSaveToIO ()

xmlSaveCtxtPtr	xmlSaveToIO		(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback ioclose,
void * ioctx,
const char * encoding,
int options)

Create a document saving context serializing to a file descriptor with the encoding and the options given

iowrite: an I/O write function
ioclose: an I/O close function
ioctx: an I/O handler
encoding: the encoding name to use or NULL
options: a set of xmlSaveOptions
Returns: a new serialization context or NULL in case of error.

xmlSaveTree ()

long	xmlSaveTree			(xmlSaveCtxtPtr ctxt, 
xmlNodePtr cur)

Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead

ctxt: a document saving context
cur:
Returns: the number of byte written or -1 in case of error

PK!@5252libxml2-threads.htmlnu[ threads: interfaces for thread handling

threads

threads - interfaces for thread handling

set of generic threading related routines should work with pthreads, Windows native or TLS threads

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlMutex xmlMutex;
typedef xmlMutex * xmlMutexPtr;
typedef struct _xmlRMutex xmlRMutex;
typedef xmlRMutex * xmlRMutexPtr;
void	xmlCleanupThreads		(void);
int	xmlDllMain			(void * hinstDLL, 
unsigned long fdwReason,
void * lpvReserved); void xmlFreeMutex (xmlMutexPtr tok); void xmlFreeRMutex (xmlRMutexPtr tok); xmlGlobalStatePtr xmlGetGlobalState (void); int xmlGetThreadId (void); void xmlInitThreads (void); int xmlIsMainThread (void); void xmlLockLibrary (void); void xmlMutexLock (xmlMutexPtr tok); void xmlMutexUnlock (xmlMutexPtr tok); xmlMutexPtr xmlNewMutex (void); xmlRMutexPtr xmlNewRMutex (void); void xmlRMutexLock (xmlRMutexPtr tok); void xmlRMutexUnlock (xmlRMutexPtr tok); void xmlUnlockLibrary (void);

Description

Details

Structure xmlMutex

struct _xmlMutex {
The content of this structure is not made public by the API.
} xmlMutex;


Typedef xmlMutexPtr

xmlMutex * xmlMutexPtr;


Structure xmlRMutex

struct _xmlRMutex {
The content of this structure is not made public by the API.
} xmlRMutex;


Typedef xmlRMutexPtr

xmlRMutex * xmlRMutexPtr;


xmlCleanupThreads ()

void	xmlCleanupThreads		(void)

DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !


xmlDllMain ()

int	xmlDllMain			(void * hinstDLL, 
unsigned long fdwReason,
void * lpvReserved)

hinstDLL:
fdwReason:
lpvReserved:
Returns:

xmlFreeMutex ()

void	xmlFreeMutex			(xmlMutexPtr tok)

xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct.

tok: the simple mutex

xmlFreeRMutex ()

void	xmlFreeRMutex			(xmlRMutexPtr tok)

xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex.

tok: the reentrant mutex

xmlGetGlobalState ()

xmlGlobalStatePtr	xmlGetGlobalState	(void)

xmlGetGlobalState() is called to retrieve the global state for a thread.

Returns: the thread global state or NULL in case of error

xmlGetThreadId ()

int	xmlGetThreadId			(void)

xmlGetThreadId() find the current thread ID number Note that this is likely to be broken on some platforms using pthreads as the specification doesn't mandate pthread_t to be an integer type

Returns: the current thread ID number

xmlInitThreads ()

void	xmlInitThreads			(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.


xmlIsMainThread ()

int	xmlIsMainThread			(void)

xmlIsMainThread() check whether the current thread is the main thread.

Returns: 1 if the current thread is the main thread, 0 otherwise

xmlLockLibrary ()

void	xmlLockLibrary			(void)

xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.


xmlMutexLock ()

void	xmlMutexLock			(xmlMutexPtr tok)

xmlMutexLock() is used to lock a libxml2 token.

tok: the simple mutex

xmlMutexUnlock ()

void	xmlMutexUnlock			(xmlMutexPtr tok)

xmlMutexUnlock() is used to unlock a libxml2 token.

tok: the simple mutex

xmlNewMutex ()

xmlMutexPtr	xmlNewMutex		(void)

xmlNewMutex() is used to allocate a libxml2 token struct for use in synchronizing access to data.

Returns: a new simple mutex pointer or NULL in case of error

xmlNewRMutex ()

xmlRMutexPtr	xmlNewRMutex		(void)

xmlRNewMutex() is used to allocate a reentrant mutex for use in synchronizing access to data. token_r is a re-entrant lock and thus useful for synchronizing access to data structures that may be manipulated in a recursive fashion.

Returns: the new reentrant mutex pointer or NULL in case of error

xmlRMutexLock ()

void	xmlRMutexLock			(xmlRMutexPtr tok)

xmlRMutexLock() is used to lock a libxml2 token_r.

tok: the reentrant mutex

xmlRMutexUnlock ()

void	xmlRMutexUnlock			(xmlRMutexPtr tok)

xmlRMutexUnlock() is used to unlock a libxml2 token_r.

tok: the reentrant mutex

xmlUnlockLibrary ()

void	xmlUnlockLibrary		(void)

xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library.


PK!"G"libxml2.devhelp2nu[ PK! 6 general.htmlnu[ libxml2:

libxml2 API Modules

HTMLparser - interface for an HTML 4.0 non-verifying parser
HTMLtree - specific APIs to process HTML tree, especially serialization
SAX - Old SAX version 1 handler, deprecated
SAX2 - SAX2 parser interface used to build the DOM tree
c14n - Provide Canonical XML and Exclusive XML Canonicalization
catalog - interfaces to the Catalog handling system
chvalid - Unicode character range checking
debugXML - Tree debugging APIs
dict - string dictionary
encoding - interface for the encoding conversion functions
entities - interface for the XML entities handling
globals - interface for all global variables of the library
hash - Chained hash tables
list - lists interfaces
nanoftp - minimal FTP implementation
nanohttp - minimal HTTP implementation
parser - the core parser module
parserInternals - internals routines and limits exported by the parser.
pattern - pattern expression handling
relaxng - implementation of the Relax-NG validation
schemasInternals - internal interfaces for XML Schemas
schematron - XML Schematron implementation
threads - interfaces for thread handling
tree - interfaces for tree manipulation
uri - library of generic URI related routines
valid - The DTD validation
xinclude - implementation of XInclude
xlink - unfinished XLink detection module
xmlIO - interface for the I/O interfaces used by the parser
xmlautomata - API to build regexp automata
xmlerror - error handling
xmlexports - macros for marking symbols as exportable/importable.
xmlmemory - interface for the memory allocator
xmlmodule - dynamic module loading
xmlreader - the XMLReader implementation
xmlregexp - regular expressions handling
xmlsave - the XML document serializer
xmlschemas - incomplete XML Schemas structure implementation
xmlschemastypes - implementation of XML Schema Datatypes
xmlstring - set of routines to process strings
xmlunicode - Unicode character APIs
xmlversion - compile-time version information
xmlwriter - text writing API for XML
xpath - XML Path Language implementation
xpathInternals - internal interfaces for XML Path Language implementation
xpointer - API to handle XML Pointers

PK!"#XXlibxml2-entities.htmlnu[ entities: interface for the XML entities handling

entities

entities - interface for the XML entities handling

this module provides some of the entity API needed for the parser and applications.

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlHashTable xmlEntitiesTable;
typedef xmlEntitiesTable * xmlEntitiesTablePtr;
typedef enum xmlEntityType;
xmlEntityPtr	xmlAddDocEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content); xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc,
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content); void xmlCleanupPredefinedEntities (void); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); xmlEntitiesTablePtr xmlCreateEntitiesTable (void); void xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table); void xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent); const xmlChar * xmlEncodeEntities (xmlDocPtr doc,
const xmlChar * input); xmlChar * xmlEncodeEntitiesReentrant (xmlDocPtr doc,
const xmlChar * input); xmlChar * xmlEncodeSpecialChars (const xmlDoc * doc,
const xmlChar * input); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); xmlEntityPtr xmlGetDocEntity (const xmlDoc * doc,
const xmlChar * name); xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar * name); xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar * name); xmlEntityPtr xmlGetPredefinedEntity (const xmlChar * name); void xmlInitializePredefinedEntities (void); xmlEntityPtr xmlNewEntity (xmlDocPtr doc,
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content);

Description

Details

Structure xmlEntitiesTable

struct _xmlHashTable {
The content of this structure is not made public by the API.
} xmlEntitiesTable;


Typedef xmlEntitiesTablePtr

xmlEntitiesTable * xmlEntitiesTablePtr;



xmlAddDocEntity ()

xmlEntityPtr	xmlAddDocEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)

Register a new entity for this document.

doc: the document
name: the entity name
type: the entity type XML_xxx_yyy_ENTITY
ExternalID: the entity external ID if available
SystemID: the entity system ID if available
content: the entity content
Returns: a pointer to the entity or NULL in case of error

xmlAddDtdEntity ()

xmlEntityPtr	xmlAddDtdEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)

Register a new entity for this document DTD external subset.

doc: the document
name: the entity name
type: the entity type XML_xxx_yyy_ENTITY
ExternalID: the entity external ID if available
SystemID: the entity system ID if available
content: the entity content
Returns: a pointer to the entity or NULL in case of error

xmlCleanupPredefinedEntities ()

void	xmlCleanupPredefinedEntities	(void)

Cleanup up the predefined entities table. Deprecated call


xmlCopyEntitiesTable ()

xmlEntitiesTablePtr	xmlCopyEntitiesTable	(xmlEntitiesTablePtr table)

Build a copy of an entity table.

table: An entity table
Returns: the new xmlEntitiesTablePtr or NULL in case of error.

xmlCreateEntitiesTable ()

xmlEntitiesTablePtr	xmlCreateEntitiesTable	(void)

create and initialize an empty entities hash table. This really doesn't make sense and should be deprecated

Returns: the xmlEntitiesTablePtr just created or NULL in case of error.

xmlDumpEntitiesTable ()

void	xmlDumpEntitiesTable		(xmlBufferPtr buf, 
xmlEntitiesTablePtr table)

This will dump the content of the entity table as an XML DTD definition

buf: An XML buffer.
table: An entity table

xmlDumpEntityDecl ()

void	xmlDumpEntityDecl		(xmlBufferPtr buf, 
xmlEntityPtr ent)

This will dump the content of the entity table as an XML DTD definition

buf: An XML buffer.
ent: An entity table

xmlEncodeEntities ()

const xmlChar *	xmlEncodeEntities	(xmlDocPtr doc, 
const xmlChar * input)

TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to xmlEncodeEntitiesReentrant ! This routine will issue a warning when encountered.

doc: the document containing the string
input: A string to convert to XML.
Returns: NULL

xmlEncodeEntitiesReentrant ()

xmlChar *	xmlEncodeEntitiesReentrant	(xmlDocPtr doc, 
const xmlChar * input)

Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. Contrary to xmlEncodeEntities, this routine is reentrant, and result must be deallocated.

doc: the document containing the string
input: A string to convert to XML.
Returns: A newly allocated string with the substitution done.

xmlEncodeSpecialChars ()

xmlChar *	xmlEncodeSpecialChars	(const xmlDoc * doc, 
const xmlChar * input)

Do a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated.

doc: the document containing the string
input: A string to convert to XML.
Returns: A newly allocated string with the substitution done.

xmlFreeEntitiesTable ()

void	xmlFreeEntitiesTable		(xmlEntitiesTablePtr table)

Deallocate the memory used by an entities hash table.

table: An entity table

xmlGetDocEntity ()

xmlEntityPtr	xmlGetDocEntity		(const xmlDoc * doc, 
const xmlChar * name)

Do an entity lookup in the document entity hash table and

doc: the document referencing the entity
name: the entity name
Returns: the corresponding entity, otherwise a lookup is done in the predefined entities too. Returns A pointer to the entity structure or NULL if not found.

xmlGetDtdEntity ()

xmlEntityPtr	xmlGetDtdEntity		(xmlDocPtr doc, 
const xmlChar * name)

Do an entity lookup in the DTD entity hash table and

doc: the document referencing the entity
name: the entity name
Returns: the corresponding entity, if found. Note: the first argument is the document node, not the DTD node. Returns A pointer to the entity structure or NULL if not found.

xmlGetParameterEntity ()

xmlEntityPtr	xmlGetParameterEntity	(xmlDocPtr doc, 
const xmlChar * name)

Do an entity lookup in the internal and external subsets and

doc: the document referencing the entity
name: the entity name
Returns: the corresponding parameter entity, if found. Returns A pointer to the entity structure or NULL if not found.

xmlGetPredefinedEntity ()

xmlEntityPtr	xmlGetPredefinedEntity	(const xmlChar * name)

Check whether this name is an predefined entity.

name: the entity name
Returns: NULL if not, otherwise the entity

xmlInitializePredefinedEntities ()

void	xmlInitializePredefinedEntities	(void)

Set up the predefined entities. Deprecated call


xmlNewEntity ()

xmlEntityPtr	xmlNewEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)

Create a new entity, this differs from xmlAddDocEntity() that if the document is NULL or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsibility of the caller to link it to the document later or free it when not needed anymore.

doc: the document
name: the entity name
type: the entity type XML_xxx_yyy_ENTITY
ExternalID: the entity external ID if available
SystemID: the entity system ID if available
content: the entity content
Returns: a pointer to the entity or NULL in case of error

PK!9?  libxml2-xmlexports.htmlnu[ xmlexports: macros for marking symbols as exportable/importable.

xmlexports

xmlexports - macros for marking symbols as exportable/importable.

macros for marking symbols as exportable/importable.

Author(s):

Synopsis

#define LIBXML_DLL_IMPORT;
#define XMLCALL;
#define XMLCDECL;
#define XMLPUBFUN;
#define XMLPUBLIC;
#define XMLPUBVAR;

Description

Details

Macro LIBXML_DLL_IMPORT

#define LIBXML_DLL_IMPORT;


Macro XMLCALL

#define XMLCALL;

Macro which declares the calling convention for exported functions


Macro XMLCDECL

#define XMLCDECL;

Macro which declares the calling convention for exported functions that use '...'.


Macro XMLPUBFUN

#define XMLPUBFUN;

Macro which declares an exportable function


Macro XMLPUBLIC

#define XMLPUBLIC;

Macro which declares a public symbol


Macro XMLPUBVAR

#define XMLPUBVAR;

Macro which declares an exportable variable


PK!3SK<<libxml2-xinclude.htmlnu[ xinclude: implementation of XInclude

xinclude

xinclude - implementation of XInclude

API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003

Author(s): Daniel Veillard

Description

Details

Macro XINCLUDE_FALLBACK

#define XINCLUDE_FALLBACK;

Macro defining "fallback"


Macro XINCLUDE_HREF

#define XINCLUDE_HREF;

Macro defining "href"


Macro XINCLUDE_NODE

#define XINCLUDE_NODE;

Macro defining "include"


Macro XINCLUDE_NS

#define XINCLUDE_NS;

Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude


Macro XINCLUDE_OLD_NS

#define XINCLUDE_OLD_NS;

Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude


Macro XINCLUDE_PARSE

#define XINCLUDE_PARSE;

Macro defining "parse"


Macro XINCLUDE_PARSE_ENCODING

#define XINCLUDE_PARSE_ENCODING;

Macro defining "encoding"


Macro XINCLUDE_PARSE_TEXT

#define XINCLUDE_PARSE_TEXT;

Macro defining "text"


Macro XINCLUDE_PARSE_XML

#define XINCLUDE_PARSE_XML;

Macro defining "xml"


Macro XINCLUDE_PARSE_XPOINTER

#define XINCLUDE_PARSE_XPOINTER;

Macro defining "xpointer"


Structure xmlXIncludeCtxt

struct _xmlXIncludeCtxt {
The content of this structure is not made public by the API.
} xmlXIncludeCtxt;


Typedef xmlXIncludeCtxtPtr

xmlXIncludeCtxt * xmlXIncludeCtxtPtr;


xmlXIncludeFreeContext ()

void	xmlXIncludeFreeContext		(xmlXIncludeCtxtPtr ctxt)

Free an XInclude context

ctxt: the XInclude context

xmlXIncludeNewContext ()

xmlXIncludeCtxtPtr	xmlXIncludeNewContext	(xmlDocPtr doc)

Creates a new XInclude context

doc: an XML Document
Returns: the new set

xmlXIncludeProcess ()

int	xmlXIncludeProcess		(xmlDocPtr doc)

Implement the XInclude substitution on the XML document @doc

doc: an XML document
Returns: 0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

xmlXIncludeProcessFlags ()

int	xmlXIncludeProcessFlags		(xmlDocPtr doc, 
int flags)

Implement the XInclude substitution on the XML document @doc

doc: an XML document
flags: a set of xmlParserOption used for parsing XML includes
Returns: 0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

xmlXIncludeProcessFlagsData ()

int	xmlXIncludeProcessFlagsData	(xmlDocPtr doc, 
int flags,
void * data)

Implement the XInclude substitution on the XML document @doc

doc: an XML document
flags: a set of xmlParserOption used for parsing XML includes
data: application data that will be passed to the parser context in the _private field of the parser context(s)
Returns: 0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

xmlXIncludeProcessNode ()

int	xmlXIncludeProcessNode		(xmlXIncludeCtxtPtr ctxt, 
xmlNodePtr node)

Implement the XInclude substitution for the given subtree reusing the information and data coming from the given context.

ctxt: an existing XInclude context
node: a node in an XML document
Returns: 0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

xmlXIncludeProcessTree ()

int	xmlXIncludeProcessTree		(xmlNodePtr tree)

Implement the XInclude substitution for the given subtree

tree: a node in an XML document
Returns: 0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

xmlXIncludeProcessTreeFlags ()

int	xmlXIncludeProcessTreeFlags	(xmlNodePtr tree, 
int flags)

Implement the XInclude substitution for the given subtree

tree: a node in an XML document
flags: a set of xmlParserOption used for parsing XML includes
Returns: 0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

xmlXIncludeProcessTreeFlagsData ()

int	xmlXIncludeProcessTreeFlagsData	(xmlNodePtr tree, 
int flags,
void * data)

Implement the XInclude substitution on the XML node @tree

tree: an XML node
flags: a set of xmlParserOption used for parsing XML includes
data: application data that will be passed to the parser context in the _private field of the parser context(s)
Returns: 0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

xmlXIncludeSetFlags ()

int	xmlXIncludeSetFlags		(xmlXIncludeCtxtPtr ctxt, 
int flags)

Set the flags used for further processing of XML resources.

ctxt: an XInclude processing context
flags: a set of xmlParserOption used for parsing XML includes
Returns: 0 in case of success and -1 in case of error.

PK!h6~libxml2-xmlschemastypes.htmlnu[ xmlschemastypes: implementation of XML Schema Datatypes

xmlschemastypes

xmlschemastypes - implementation of XML Schema Datatypes

module providing the XML Schema Datatypes implementation both definition and validity checking

Author(s): Daniel Veillard

Synopsis

typedef enum xmlSchemaWhitespaceValueType;
int	xmlSchemaCheckFacet		(xmlSchemaFacetPtr facet, 
xmlSchemaTypePtr typeDecl,
xmlSchemaParserCtxtPtr pctxt,
const xmlChar * name); void xmlSchemaCleanupTypes (void); xmlChar * xmlSchemaCollapseString (const xmlChar * value); int xmlSchemaCompareValues (xmlSchemaValPtr x,
xmlSchemaValPtr y); int xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
xmlSchemaWhitespaceValueType xws,
xmlSchemaValPtr y,
xmlSchemaWhitespaceValueType yws); xmlSchemaValPtr xmlSchemaCopyValue (xmlSchemaValPtr val); void xmlSchemaFreeFacet (xmlSchemaFacetPtr facet); void xmlSchemaFreeValue (xmlSchemaValPtr value); xmlSchemaTypePtr xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type); xmlSchemaTypePtr xmlSchemaGetBuiltInType (xmlSchemaValType type); int xmlSchemaGetCanonValue (xmlSchemaValPtr val,
const xmlChar ** retValue); int xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
const xmlChar ** retValue,
xmlSchemaWhitespaceValueType ws); unsigned long xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet); xmlSchemaTypePtr xmlSchemaGetPredefinedType (const xmlChar * name,
const xmlChar * ns); xmlSchemaValType xmlSchemaGetValType (xmlSchemaValPtr val); void xmlSchemaInitTypes (void); int xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
int facetType); xmlSchemaFacetPtr xmlSchemaNewFacet (void); xmlSchemaValPtr xmlSchemaNewNOTATIONValue (const xmlChar * name,
const xmlChar * ns); xmlSchemaValPtr xmlSchemaNewQNameValue (const xmlChar * namespaceName,
const xmlChar * localName); xmlSchemaValPtr xmlSchemaNewStringValue (xmlSchemaValType type,
const xmlChar * value); int xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
const xmlChar * value,
xmlSchemaValPtr * val,
xmlNodePtr node); int xmlSchemaValPredefTypeNodeNoNorm (xmlSchemaTypePtr type,
const xmlChar * value,
xmlSchemaValPtr * val,
xmlNodePtr node); int xmlSchemaValidateFacet (xmlSchemaTypePtr base,
xmlSchemaFacetPtr facet,
const xmlChar * value,
xmlSchemaValPtr val); int xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
xmlSchemaWhitespaceValueType fws,
xmlSchemaValType valType,
const xmlChar * value,
xmlSchemaValPtr val,
xmlSchemaWhitespaceValueType ws); int xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
xmlSchemaFacetPtr facet,
const xmlChar * value,
xmlSchemaValPtr val,
unsigned long * length); int xmlSchemaValidateLengthFacetWhtsp (xmlSchemaFacetPtr facet,
xmlSchemaValType valType,
const xmlChar * value,
xmlSchemaValPtr val,
unsigned long * length,
xmlSchemaWhitespaceValueType ws); int xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
const xmlChar * value,
unsigned long actualLen,
unsigned long * expectedLen); int xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
const xmlChar * value,
xmlSchemaValPtr * val); int xmlSchemaValueAppend (xmlSchemaValPtr prev,
xmlSchemaValPtr cur); int xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val); const xmlChar * xmlSchemaValueGetAsString (xmlSchemaValPtr val); xmlSchemaValPtr xmlSchemaValueGetNext (xmlSchemaValPtr cur); xmlChar * xmlSchemaWhiteSpaceReplace (const xmlChar * value);

Description

Details


xmlSchemaCheckFacet ()

int	xmlSchemaCheckFacet		(xmlSchemaFacetPtr facet, 
xmlSchemaTypePtr typeDecl,
xmlSchemaParserCtxtPtr pctxt,
const xmlChar * name)

Checks and computes the values of facets.

facet: the facet
typeDecl: the schema type definition
pctxt: the schema parser context or NULL
name: the optional name of the type
Returns: 0 if valid, a positive error code if not valid and -1 in case of an internal or API error.

xmlSchemaCleanupTypes ()

void	xmlSchemaCleanupTypes		(void)

DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Cleanup the default XML Schemas type library


xmlSchemaCollapseString ()

xmlChar *	xmlSchemaCollapseString	(const xmlChar * value)

Removes and normalize white spaces in the string

value: a value
Returns: the new string or NULL if no change was required.

xmlSchemaCompareValues ()

int	xmlSchemaCompareValues		(xmlSchemaValPtr x, 
xmlSchemaValPtr y)

Compare 2 values

x: a first value
y: a second value
Returns: -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in case of error

xmlSchemaCompareValuesWhtsp ()

int	xmlSchemaCompareValuesWhtsp	(xmlSchemaValPtr x, 
xmlSchemaWhitespaceValueType xws,
xmlSchemaValPtr y,
xmlSchemaWhitespaceValueType yws)

Compare 2 values

x: a first value
xws: the whitespace value of x
y: a second value
yws: the whitespace value of y
Returns: -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in case of error

xmlSchemaCopyValue ()

xmlSchemaValPtr	xmlSchemaCopyValue	(xmlSchemaValPtr val)

Copies the precomputed value. This duplicates any string within.

val: the precomputed value to be copied
Returns: the copy or NULL if a copy for a data-type is not implemented.

xmlSchemaFreeFacet ()

void	xmlSchemaFreeFacet		(xmlSchemaFacetPtr facet)

Deallocate a Schema Facet structure.

facet: a schema facet structure

xmlSchemaFreeValue ()

void	xmlSchemaFreeValue		(xmlSchemaValPtr value)

Cleanup the default XML Schemas type library

value: the value to free

xmlSchemaGetBuiltInListSimpleTypeItemType ()

xmlSchemaTypePtr	xmlSchemaGetBuiltInListSimpleTypeItemType	(xmlSchemaTypePtr type)

Lookup function

type: the built-in simple type.
Returns: the item type of @type as defined by the built-in datatype hierarchy of XML Schema Part 2: Datatypes, or NULL in case of an error.

xmlSchemaGetBuiltInType ()

xmlSchemaTypePtr	xmlSchemaGetBuiltInType	(xmlSchemaValType type)

Gives you the type struct for a built-in type by its type id.

type: the type of the built in type
Returns: the type if found, NULL otherwise.

xmlSchemaGetCanonValue ()

int	xmlSchemaGetCanonValue		(xmlSchemaValPtr val, 
const xmlChar ** retValue)

Get the canonical lexical representation of the value. The caller has to FREE the returned retValue. WARNING: Some value types are not supported yet, resulting in a @retValue of "???". TODO: XML Schema 1.0 does not define canonical representations for: duration, gYearMonth, gYear, gMonthDay, gMonth, gDay, anyURI, QName, NOTATION. This will be fixed in XML Schema 1.1.

val: the precomputed value
retValue: the returned value
Returns: 0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.

xmlSchemaGetCanonValueWhtsp ()

int	xmlSchemaGetCanonValueWhtsp	(xmlSchemaValPtr val, 
const xmlChar ** retValue,
xmlSchemaWhitespaceValueType ws)

Get the canonical representation of the value. The caller has to free the returned @retValue.

val: the precomputed value
retValue: the returned value
ws: the whitespace type of the value
Returns: 0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.

xmlSchemaGetFacetValueAsULong ()

unsigned long	xmlSchemaGetFacetValueAsULong	(xmlSchemaFacetPtr facet)

Extract the value of a facet

facet: an schemas type facet
Returns: the value as a long

xmlSchemaGetPredefinedType ()

xmlSchemaTypePtr	xmlSchemaGetPredefinedType	(const xmlChar * name, 
const xmlChar * ns)

Lookup a type in the default XML Schemas type library

name: the type name
ns: the URI of the namespace usually "http://www.w3.org/2001/XMLSchema"
Returns: the type if found, NULL otherwise

xmlSchemaGetValType ()

xmlSchemaValType	xmlSchemaGetValType	(xmlSchemaValPtr val)

Accessor for the type of a value

val: a schemas value
Returns: the xmlSchemaValType of the value

xmlSchemaInitTypes ()

void	xmlSchemaInitTypes		(void)

Initialize the default XML Schemas type library


xmlSchemaIsBuiltInTypeFacet ()

int	xmlSchemaIsBuiltInTypeFacet	(xmlSchemaTypePtr type, 
int facetType)

Evaluates if a specific facet can be used in conjunction with a type.

type: the built-in type
facetType: the facet type
Returns: 1 if the facet can be used with the given built-in type, 0 otherwise and -1 in case the type is not a built-in type.

xmlSchemaNewFacet ()

xmlSchemaFacetPtr	xmlSchemaNewFacet	(void)

Allocate a new Facet structure.

Returns: the newly allocated structure or NULL in case or error

xmlSchemaNewNOTATIONValue ()

xmlSchemaValPtr	xmlSchemaNewNOTATIONValue	(const xmlChar * name, 
const xmlChar * ns)

Allocate a new NOTATION value. The given values are consumed and freed with the struct.

name: the notation name
ns: the notation namespace name or NULL
Returns: a pointer to the new value or NULL in case of error

xmlSchemaNewQNameValue ()

xmlSchemaValPtr	xmlSchemaNewQNameValue	(const xmlChar * namespaceName, 
const xmlChar * localName)

Allocate a new QName value. The given values are consumed and freed with the struct.

namespaceName: the namespace name
localName: the local name
Returns: a pointer to the new value or NULL in case of an error.

xmlSchemaNewStringValue ()

xmlSchemaValPtr	xmlSchemaNewStringValue	(xmlSchemaValType type, 
const xmlChar * value)

Allocate a new simple type value. The type can be of XML_SCHEMAS_STRING. WARNING: This one is intended to be expanded for other string based types. We need this for anySimpleType as well. The given value is consumed and freed with the struct.

type: the value type
value: the value
Returns: a pointer to the new value or NULL in case of error

xmlSchemaValPredefTypeNode ()

int	xmlSchemaValPredefTypeNode	(xmlSchemaTypePtr type, 
const xmlChar * value,
xmlSchemaValPtr * val,
xmlNodePtr node)

Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.

type: the predefined type
value: the value to check
val: the return computed value
node: the node containing the value
Returns: 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

xmlSchemaValPredefTypeNodeNoNorm ()

int	xmlSchemaValPredefTypeNodeNoNorm	(xmlSchemaTypePtr type, 
const xmlChar * value,
xmlSchemaValPtr * val,
xmlNodePtr node)

Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val. This one does apply any normalization to the value.

type: the predefined type
value: the value to check
val: the return computed value
node: the node containing the value
Returns: 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

xmlSchemaValidateFacet ()

int	xmlSchemaValidateFacet		(xmlSchemaTypePtr base, 
xmlSchemaFacetPtr facet,
const xmlChar * value,
xmlSchemaValPtr val)

Check a value against a facet condition

base: the base type
facet: the facet to check
value: the lexical repr of the value to validate
val: the precomputed value
Returns: 0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

xmlSchemaValidateFacetWhtsp ()

int	xmlSchemaValidateFacetWhtsp	(xmlSchemaFacetPtr facet, 
xmlSchemaWhitespaceValueType fws,
xmlSchemaValType valType,
const xmlChar * value,
xmlSchemaValPtr val,
xmlSchemaWhitespaceValueType ws)

Check a value against a facet condition. This takes value normalization according to the specified whitespace types into account. Note that @value needs to be the *normalized* value if the facet is of type "pattern".

facet: the facet to check
fws: the whitespace type of the facet's value
valType: the built-in type of the value
value: the lexical (or normalized for pattern) repr of the value to validate
val: the precomputed value
ws: the whitespace type of the value
Returns: 0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

xmlSchemaValidateLengthFacet ()

int	xmlSchemaValidateLengthFacet	(xmlSchemaTypePtr type, 
xmlSchemaFacetPtr facet,
const xmlChar * value,
xmlSchemaValPtr val,
unsigned long * length)

Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.

type: the built-in type
facet: the facet to check
value: the lexical repr. of the value to be validated
val: the precomputed value
length: the actual length of the value
Returns: 0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.

xmlSchemaValidateLengthFacetWhtsp ()

int	xmlSchemaValidateLengthFacetWhtsp	(xmlSchemaFacetPtr facet, 
xmlSchemaValType valType,
const xmlChar * value,
xmlSchemaValPtr val,
unsigned long * length,
xmlSchemaWhitespaceValueType ws)

Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.

facet: the facet to check
valType: the built-in type
value: the lexical repr. of the value to be validated
val: the precomputed value
length: the actual length of the value
ws: the whitespace type of the value
Returns: 0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.

xmlSchemaValidateListSimpleTypeFacet ()

int	xmlSchemaValidateListSimpleTypeFacet	(xmlSchemaFacetPtr facet, 
const xmlChar * value,
unsigned long actualLen,
unsigned long * expectedLen)

Checks the value of a list simple type against a facet.

facet: the facet to check
value: the lexical repr of the value to validate
actualLen: the number of list items
expectedLen: the resulting expected number of list items
Returns: 0 if the value is valid, a positive error code number otherwise and -1 in case of an internal error.

xmlSchemaValidatePredefinedType ()

int	xmlSchemaValidatePredefinedType	(xmlSchemaTypePtr type, 
const xmlChar * value,
xmlSchemaValPtr * val)

Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.

type: the predefined type
value: the value to check
val: the return computed value
Returns: 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

xmlSchemaValueAppend ()

int	xmlSchemaValueAppend		(xmlSchemaValPtr prev, 
xmlSchemaValPtr cur)

Appends a next sibling to a list of computed values.

prev: the value
cur: the value to be appended
Returns: 0 if succeeded and -1 on API errors.

xmlSchemaValueGetAsBoolean ()

int	xmlSchemaValueGetAsBoolean	(xmlSchemaValPtr val)

Accessor for the boolean value of a computed value.

val: the value
Returns: 1 if true and 0 if false, or in case of an error. Hmm.

xmlSchemaValueGetAsString ()

const xmlChar *	xmlSchemaValueGetAsString	(xmlSchemaValPtr val)

Accessor for the string value of a computed value.

val: the value
Returns: the string value or NULL if there was none, or on API errors.

xmlSchemaValueGetNext ()

xmlSchemaValPtr	xmlSchemaValueGetNext	(xmlSchemaValPtr cur)

Accessor for the next sibling of a list of computed values.

cur: the value
Returns: the next value or NULL if there was none, or on API errors.

xmlSchemaWhiteSpaceReplace ()

xmlChar *	xmlSchemaWhiteSpaceReplace	(const xmlChar * value)

Replaces 0xd, 0x9 and 0xa with a space.

value: a value
Returns: the new string or NULL if no change was required.

PK!55libxml2-dict.htmlnu[ dict: string dictionary

dict

dict - string dictionary

dictionary of reusable strings, just used to avoid allocation and freeing operations.

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlDict xmlDict;
typedef xmlDict * xmlDictPtr;
void	xmlDictCleanup			(void);
xmlDictPtr	xmlDictCreate		(void);
xmlDictPtr	xmlDictCreateSub	(xmlDictPtr sub);
const xmlChar *	xmlDictExists		(xmlDictPtr dict, 
const xmlChar * name,
int len); void xmlDictFree (xmlDictPtr dict); size_t xmlDictGetUsage (xmlDictPtr dict); const xmlChar * xmlDictLookup (xmlDictPtr dict,
const xmlChar * name,
int len); int xmlDictOwns (xmlDictPtr dict,
const xmlChar * str); const xmlChar * xmlDictQLookup (xmlDictPtr dict,
const xmlChar * prefix,
const xmlChar * name); int xmlDictReference (xmlDictPtr dict); size_t xmlDictSetLimit (xmlDictPtr dict,
size_t limit); int xmlDictSize (xmlDictPtr dict); int xmlInitializeDict (void);

Description

Details

Structure xmlDict

struct _xmlDict {
The content of this structure is not made public by the API.
} xmlDict;


Typedef xmlDictPtr

xmlDict * xmlDictPtr;


xmlDictCleanup ()

void	xmlDictCleanup			(void)

DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Free the dictionary mutex. Do not call unless sure the library is not in use anymore !


xmlDictCreate ()

xmlDictPtr	xmlDictCreate		(void)

Create a new dictionary

Returns: the newly created dictionary, or NULL if an error occurred.

xmlDictCreateSub ()

xmlDictPtr	xmlDictCreateSub	(xmlDictPtr sub)

Create a new dictionary, inheriting strings from the read-only dictionary @sub. On lookup, strings are first searched in the new dictionary, then in @sub, and if not found are created in the new dictionary.

sub: an existing dictionary
Returns: the newly created dictionary, or NULL if an error occurred.

xmlDictExists ()

const xmlChar *	xmlDictExists		(xmlDictPtr dict, 
const xmlChar * name,
int len)

Check if the @name exists in the dictionary @dict.

dict: the dictionary
name: the name of the userdata
len: the length of the name, if -1 it is recomputed
Returns: the internal copy of the name or NULL if not found.

xmlDictFree ()

void	xmlDictFree			(xmlDictPtr dict)

Free the hash @dict and its contents. The userdata is deallocated with @f if provided.

dict: the dictionary

xmlDictGetUsage ()

size_t	xmlDictGetUsage			(xmlDictPtr dict)

Get how much memory is used by a dictionary for strings Added in 2.9.0

dict: the dictionary
Returns: the amount of strings allocated

xmlDictLookup ()

const xmlChar *	xmlDictLookup		(xmlDictPtr dict, 
const xmlChar * name,
int len)

Add the @name to the dictionary @dict if not present.

dict: the dictionary
name: the name of the userdata
len: the length of the name, if -1 it is recomputed
Returns: the internal copy of the name or NULL in case of internal error

xmlDictOwns ()

int	xmlDictOwns			(xmlDictPtr dict, 
const xmlChar * str)

check if a string is owned by the dictionary

dict: the dictionary
str: the string
Returns: 1 if true, 0 if false and -1 in case of error -1 in case of error

xmlDictQLookup ()

const xmlChar *	xmlDictQLookup		(xmlDictPtr dict, 
const xmlChar * prefix,
const xmlChar * name)

Add the QName @prefix:@name to the hash @dict if not present.

dict: the dictionary
prefix: the prefix
name: the name
Returns: the internal copy of the QName or NULL in case of internal error

xmlDictReference ()

int	xmlDictReference		(xmlDictPtr dict)

Increment the reference counter of a dictionary

dict: the dictionary
Returns: 0 in case of success and -1 in case of error

xmlDictSetLimit ()

size_t	xmlDictSetLimit			(xmlDictPtr dict, 
size_t limit)

Set a size limit for the dictionary Added in 2.9.0

dict: the dictionary
limit: the limit in bytes
Returns: the previous limit of the dictionary or 0

xmlDictSize ()

int	xmlDictSize			(xmlDictPtr dict)

Query the number of elements installed in the hash @dict.

dict: the dictionary
Returns: the number of elements in the dictionary or -1 in case of error

xmlInitializeDict ()

int	xmlInitializeDict		(void)

DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. Do the dictionary mutex initialization.

Returns: 0 if initialization was already done, and 1 if that call led to the initialization

PK!@7libxml2-xmlIO.htmlnu[ xmlIO: interface for the I/O interfaces used by the parser

xmlIO

xmlIO - interface for the I/O interfaces used by the parser

interface for the I/O interfaces used by the parser

Author(s): Daniel Veillard

Synopsis

xmlOutputBufferPtr	xmlAllocOutputBuffer	(xmlCharEncodingHandlerPtr encoder);
xmlParserInputBufferPtr	xmlAllocParserInputBuffer	(xmlCharEncoding enc);
int	xmlCheckFilename		(const char * path);
xmlParserInputPtr	xmlCheckHTTPInput	(xmlParserCtxtPtr ctxt, 
xmlParserInputPtr ret); void xmlCleanupInputCallbacks (void); void xmlCleanupOutputCallbacks (void); int xmlFileClose (void * context); int xmlFileMatch (const char * filename); void * xmlFileOpen (const char * filename); int xmlFileRead (void * context,
char * buffer,
int len); void xmlFreeParserInputBuffer (xmlParserInputBufferPtr in); int xmlIOFTPClose (void * context); int xmlIOFTPMatch (const char * filename); void * xmlIOFTPOpen (const char * filename); int xmlIOFTPRead (void * context,
char * buffer,
int len); int xmlIOHTTPClose (void * context); int xmlIOHTTPMatch (const char * filename); void * xmlIOHTTPOpen (const char * filename); void * xmlIOHTTPOpenW (const char * post_uri,
int compression); int xmlIOHTTPRead (void * context,
char * buffer,
int len); typedef int xmlInputCloseCallback (void * context); typedef int xmlInputMatchCallback (char const * filename); typedef void * xmlInputOpenCallback (char const * filename); typedef int xmlInputReadCallback (void * context,
char * buffer,
int len); xmlParserInputPtr xmlNoNetExternalEntityLoader (const char * URL,
const char * ID,
xmlParserCtxtPtr ctxt); xmlChar * xmlNormalizeWindowsPath (const xmlChar * path); int xmlOutputBufferClose (xmlOutputBufferPtr out); xmlOutputBufferPtr xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
xmlCharEncodingHandlerPtr encoder); xmlOutputBufferPtr xmlOutputBufferCreateFd (int fd,
xmlCharEncodingHandlerPtr encoder); xmlOutputBufferPtr xmlOutputBufferCreateFile (FILE * file,
xmlCharEncodingHandlerPtr encoder); xmlOutputBufferPtr xmlOutputBufferCreateFilename (const char * URI,
xmlCharEncodingHandlerPtr encoder,
int compression); xmlOutputBufferPtr xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void * ioctx,
xmlCharEncodingHandlerPtr encoder); int xmlOutputBufferFlush (xmlOutputBufferPtr out); const xmlChar * xmlOutputBufferGetContent (xmlOutputBufferPtr out); size_t xmlOutputBufferGetSize (xmlOutputBufferPtr out); int xmlOutputBufferWrite (xmlOutputBufferPtr out,
int len,
const char * buf); int xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
const xmlChar * str,
xmlCharEncodingOutputFunc escaping); int xmlOutputBufferWriteString (xmlOutputBufferPtr out,
const char * str); typedef int xmlOutputCloseCallback (void * context); typedef int xmlOutputMatchCallback (char const * filename); typedef void * xmlOutputOpenCallback (char const * filename); typedef int xmlOutputWriteCallback (void * context,
const char * buffer,
int len); char * xmlParserGetDirectory (const char * filename); xmlParserInputBufferPtr xmlParserInputBufferCreateFd (int fd,
xmlCharEncoding enc); xmlParserInputBufferPtr xmlParserInputBufferCreateFile (FILE * file,
xmlCharEncoding enc); xmlParserInputBufferPtr xmlParserInputBufferCreateFilename (const char * URI,
xmlCharEncoding enc); xmlParserInputBufferPtr xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
xmlCharEncoding enc); xmlParserInputBufferPtr xmlParserInputBufferCreateMem (const char * mem,
int size,
xmlCharEncoding enc); xmlParserInputBufferPtr xmlParserInputBufferCreateStatic (const char * mem,
int size,
xmlCharEncoding enc); int xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
int len); int xmlParserInputBufferPush (xmlParserInputBufferPtr in,
int len,
const char * buf); int xmlParserInputBufferRead (xmlParserInputBufferPtr in,
int len); int xmlPopInputCallbacks (void); int xmlPopOutputCallbacks (void); void xmlRegisterDefaultInputCallbacks (void); void xmlRegisterDefaultOutputCallbacks (void); void xmlRegisterHTTPPostCallbacks (void); int xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
xmlInputOpenCallback openFunc,
xmlInputReadCallback readFunc,
xmlInputCloseCallback closeFunc); int xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
xmlOutputCloseCallback closeFunc);

Description

Details

Function type xmlInputCloseCallback

int	xmlInputCloseCallback		(void * context)

Callback used in the I/O Input API to close the resource

context: an Input context
Returns: 0 or -1 in case of error

Function type xmlInputMatchCallback

int	xmlInputMatchCallback		(char const * filename)

Callback used in the I/O Input API to detect if the current handler can provide input functionality for this resource.

filename: the filename or URI
Returns: 1 if yes and 0 if another Input module should be used

Function type xmlInputOpenCallback

void *	xmlInputOpenCallback		(char const * filename)

Callback used in the I/O Input API to open the resource

filename: the filename or URI
Returns: an Input context or NULL in case or error

Function type xmlInputReadCallback

int	xmlInputReadCallback		(void * context, 
char * buffer,
int len)

Callback used in the I/O Input API to read the resource

context: an Input context
buffer: the buffer to store data read
len: the length of the buffer in bytes
Returns: the number of bytes read or -1 in case of error

Function type xmlOutputCloseCallback

int	xmlOutputCloseCallback		(void * context)

Callback used in the I/O Output API to close the resource

context: an Output context
Returns: 0 or -1 in case of error

Function type xmlOutputMatchCallback

int	xmlOutputMatchCallback		(char const * filename)

Callback used in the I/O Output API to detect if the current handler can provide output functionality for this resource.

filename: the filename or URI
Returns: 1 if yes and 0 if another Output module should be used

Function type xmlOutputOpenCallback

void *	xmlOutputOpenCallback		(char const * filename)

Callback used in the I/O Output API to open the resource

filename: the filename or URI
Returns: an Output context or NULL in case or error

Function type xmlOutputWriteCallback

int	xmlOutputWriteCallback		(void * context, 
const char * buffer,
int len)

Callback used in the I/O Output API to write to the resource

context: an Output context
buffer: the buffer of data to write
len: the length of the buffer in bytes
Returns: the number of bytes written or -1 in case of error

xmlAllocOutputBuffer ()

xmlOutputBufferPtr	xmlAllocOutputBuffer	(xmlCharEncodingHandlerPtr encoder)

Create a buffered parser output

encoder: the encoding converter or NULL
Returns: the new parser output or NULL

xmlAllocParserInputBuffer ()

xmlParserInputBufferPtr	xmlAllocParserInputBuffer	(xmlCharEncoding enc)

Create a buffered parser input for progressive parsing

enc: the charset encoding if known
Returns: the new parser input or NULL

xmlCheckFilename ()

int	xmlCheckFilename		(const char * path)

function checks to see if @path is a valid source (file, socket...) for XML. if stat is not available on the target machine,

path: the path to check
Returns: 1. if stat fails, returns 0 (if calling stat on the filename fails, it can't be right). if stat succeeds and the file is a directory, returns 2. otherwise returns 1.

xmlCheckHTTPInput ()

xmlParserInputPtr	xmlCheckHTTPInput	(xmlParserCtxtPtr ctxt, 
xmlParserInputPtr ret)

Check an input in case it was created from an HTTP stream, in that case it will handle encoding and update of the base URL in case of redirection. It also checks for HTTP errors in which case the input is cleanly freed up and an appropriate error is raised in context

ctxt: an XML parser context
ret: an XML parser input
Returns: the input or NULL in case of HTTP error.

xmlCleanupInputCallbacks ()

void	xmlCleanupInputCallbacks	(void)

clears the entire input callback table. this includes the compiled-in I/O.


xmlCleanupOutputCallbacks ()

void	xmlCleanupOutputCallbacks	(void)

clears the entire output callback table. this includes the compiled-in I/O callbacks.


xmlFileClose ()

int	xmlFileClose			(void * context)

Close an I/O channel

context: the I/O context
Returns: 0 or -1 in case of error

xmlFileMatch ()

int	xmlFileMatch			(const char * filename)

input from FILE *

filename: the URI for matching
Returns: 1 if matches, 0 otherwise

xmlFileOpen ()

void *	xmlFileOpen			(const char * filename)

Wrapper around xmlFileOpen_real that try it with an unescaped version of @filename, if this fails fallback to @filename

filename: the URI for matching
Returns: a handler or NULL in case or failure

xmlFileRead ()

int	xmlFileRead			(void * context, 
char * buffer,
int len)

Read @len bytes to @buffer from the I/O channel.

context: the I/O context
buffer: where to drop data
len: number of bytes to write
Returns: the number of bytes written or < 0 in case of failure

xmlFreeParserInputBuffer ()

void	xmlFreeParserInputBuffer	(xmlParserInputBufferPtr in)

Free up the memory used by a buffered parser input

in: a buffered parser input

xmlIOFTPClose ()

int	xmlIOFTPClose			(void * context)

Close an FTP I/O channel

context: the I/O context
Returns: 0

xmlIOFTPMatch ()

int	xmlIOFTPMatch			(const char * filename)

check if the URI matches an FTP one

filename: the URI for matching
Returns: 1 if matches, 0 otherwise

xmlIOFTPOpen ()

void *	xmlIOFTPOpen			(const char * filename)

open an FTP I/O channel

filename: the URI for matching
Returns: an I/O context or NULL in case of error

xmlIOFTPRead ()

int	xmlIOFTPRead			(void * context, 
char * buffer,
int len)

Read @len bytes to @buffer from the I/O channel.

context: the I/O context
buffer: where to drop data
len: number of bytes to write
Returns: the number of bytes written

xmlIOHTTPClose ()

int	xmlIOHTTPClose			(void * context)

Close an HTTP I/O channel

context: the I/O context
Returns: 0

xmlIOHTTPMatch ()

int	xmlIOHTTPMatch			(const char * filename)

check if the URI matches an HTTP one

filename: the URI for matching
Returns: 1 if matches, 0 otherwise

xmlIOHTTPOpen ()

void *	xmlIOHTTPOpen			(const char * filename)

open an HTTP I/O channel

filename: the URI for matching
Returns: an I/O context or NULL in case of error

xmlIOHTTPOpenW ()

void *	xmlIOHTTPOpenW			(const char * post_uri, 
int compression)

Open a temporary buffer to collect the document for a subsequent HTTP POST request. Non-static as is called from the output buffer creation routine.

post_uri: The destination URI for the document
compression: The compression desired for the document.
Returns: an I/O context or NULL in case of error.

xmlIOHTTPRead ()

int	xmlIOHTTPRead			(void * context, 
char * buffer,
int len)

Read @len bytes to @buffer from the I/O channel.

context: the I/O context
buffer: where to drop data
len: number of bytes to write
Returns: the number of bytes written

xmlNoNetExternalEntityLoader ()

xmlParserInputPtr	xmlNoNetExternalEntityLoader	(const char * URL, 
const char * ID,
xmlParserCtxtPtr ctxt)

A specific entity loader disabling network accesses, though still allowing local catalog accesses for resolution.

URL: the URL for the entity to load
ID: the System ID for the entity to load
ctxt: the context in which the entity is called or NULL
Returns: a new allocated xmlParserInputPtr, or NULL.

xmlNormalizeWindowsPath ()

xmlChar *	xmlNormalizeWindowsPath	(const xmlChar * path)

This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.

path: the input file path
Returns: a canonicalized version of the path

xmlOutputBufferClose ()

int	xmlOutputBufferClose		(xmlOutputBufferPtr out)

flushes and close the output I/O channel and free up all the associated resources

out: a buffered output
Returns: the number of byte written or -1 in case of error.

xmlOutputBufferCreateBuffer ()

xmlOutputBufferPtr	xmlOutputBufferCreateBuffer	(xmlBufferPtr buffer, 
xmlCharEncodingHandlerPtr encoder)

Create a buffered output for the progressive saving to a xmlBuffer

buffer: a xmlBufferPtr
encoder: the encoding converter or NULL
Returns: the new parser output or NULL

xmlOutputBufferCreateFd ()

xmlOutputBufferPtr	xmlOutputBufferCreateFd	(int fd, 
xmlCharEncodingHandlerPtr encoder)

Create a buffered output for the progressive saving to a file descriptor

fd: a file descriptor number
encoder: the encoding converter or NULL
Returns: the new parser output or NULL

xmlOutputBufferCreateFile ()

xmlOutputBufferPtr	xmlOutputBufferCreateFile	(FILE * file, 
xmlCharEncodingHandlerPtr encoder)

Create a buffered output for the progressive saving to a FILE * buffered C I/O

file: a FILE*
encoder: the encoding converter or NULL
Returns: the new parser output or NULL

xmlOutputBufferCreateFilename ()

xmlOutputBufferPtr	xmlOutputBufferCreateFilename	(const char * URI, 
xmlCharEncodingHandlerPtr encoder,
int compression)

Create a buffered output for the progressive saving of a file If filename is "-' then we use stdout as the output. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. TODO: currently if compression is set, the library only support writing to a local file.

URI: a C string containing the URI or filename
encoder: the encoding converter or NULL
compression: the compression ration (0 none, 9 max).
Returns: the new output or NULL

xmlOutputBufferCreateIO ()

xmlOutputBufferPtr	xmlOutputBufferCreateIO	(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback ioclose,
void * ioctx,
xmlCharEncodingHandlerPtr encoder)

Create a buffered output for the progressive saving to an I/O handler

iowrite: an I/O write function
ioclose: an I/O close function
ioctx: an I/O handler
encoder: the charset encoding if known
Returns: the new parser output or NULL

xmlOutputBufferFlush ()

int	xmlOutputBufferFlush		(xmlOutputBufferPtr out)

flushes the output I/O channel

out: a buffered output
Returns: the number of byte written or -1 in case of error.

xmlOutputBufferGetContent ()

const xmlChar *	xmlOutputBufferGetContent	(xmlOutputBufferPtr out)

Gives a pointer to the data currently held in the output buffer

out: an xmlOutputBufferPtr
Returns: a pointer to the data or NULL in case of error

xmlOutputBufferGetSize ()

size_t	xmlOutputBufferGetSize		(xmlOutputBufferPtr out)

Gives the length of the data currently held in the output buffer

out: an xmlOutputBufferPtr
Returns: 0 in case or error or no data is held, the size otherwise

xmlOutputBufferWrite ()

int	xmlOutputBufferWrite		(xmlOutputBufferPtr out, 
int len,
const char * buf)

Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

out: a buffered parser output
len: the size in bytes of the array.
buf: an char array
Returns: the number of chars immediately written, or -1 in case of error.

xmlOutputBufferWriteEscape ()

int	xmlOutputBufferWriteEscape	(xmlOutputBufferPtr out, 
const xmlChar * str,
xmlCharEncodingOutputFunc escaping)

Write the content of the string in the output I/O buffer This routine escapes the characters and then handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

out: a buffered parser output
str: a zero terminated UTF-8 string
escaping: an optional escaping function (or NULL)
Returns: the number of chars immediately written, or -1 in case of error.

xmlOutputBufferWriteString ()

int	xmlOutputBufferWriteString	(xmlOutputBufferPtr out, 
const char * str)

Write the content of the string in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

out: a buffered parser output
str: a zero terminated C string
Returns: the number of chars immediately written, or -1 in case of error.

xmlParserGetDirectory ()

char *	xmlParserGetDirectory		(const char * filename)

lookup the directory for that file

filename: the path to a file
Returns: a new allocated string containing the directory, or NULL.

xmlParserInputBufferCreateFd ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateFd	(int fd, 
xmlCharEncoding enc)

Create a buffered parser input for the progressive parsing for the input from a file descriptor

fd: a file descriptor number
enc: the charset encoding if known
Returns: the new parser input or NULL

xmlParserInputBufferCreateFile ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateFile	(FILE * file, 
xmlCharEncoding enc)

Create a buffered parser input for the progressive parsing of a FILE * buffered C I/O

file: a FILE*
enc: the charset encoding if known
Returns: the new parser input or NULL

xmlParserInputBufferCreateFilename ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateFilename	(const char * URI, 
xmlCharEncoding enc)

Create a buffered parser input for the progressive parsing of a file If filename is "-' then we use stdin as the input. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Do an encoding check if enc == XML_CHAR_ENCODING_NONE

URI: a C string containing the URI or filename
enc: the charset encoding if known
Returns: the new parser input or NULL

xmlParserInputBufferCreateIO ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateIO	(xmlInputReadCallback ioread, 
xmlInputCloseCallback ioclose,
void * ioctx,
xmlCharEncoding enc)

Create a buffered parser input for the progressive parsing for the input from an I/O handler

ioread: an I/O read function
ioclose: an I/O close function
ioctx: an I/O handler
enc: the charset encoding if known
Returns: the new parser input or NULL

xmlParserInputBufferCreateMem ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateMem	(const char * mem, 
int size,
xmlCharEncoding enc)

Create a buffered parser input for the progressive parsing for the input from a memory area.

mem: the memory input
size: the length of the memory block
enc: the charset encoding if known
Returns: the new parser input or NULL

xmlParserInputBufferCreateStatic ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateStatic	(const char * mem, 
int size,
xmlCharEncoding enc)

Create a buffered parser input for the progressive parsing for the input from an immutable memory area. This will not copy the memory area to the buffer, but the memory is expected to be available until the end of the parsing, this is useful for example when using mmap'ed file.

mem: the memory input
size: the length of the memory block
enc: the charset encoding if known
Returns: the new parser input or NULL

xmlParserInputBufferGrow ()

int	xmlParserInputBufferGrow	(xmlParserInputBufferPtr in, 
int len)

Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in->buffer or in->raw

in: a buffered parser input
len: indicative value of the amount of chars to read
Returns: the number of chars read and stored in the buffer, or -1 in case of error.

xmlParserInputBufferPush ()

int	xmlParserInputBufferPush	(xmlParserInputBufferPtr in, 
int len,
const char * buf)

Push the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF-8 This is used when operating the parser in progressive (push) mode.

in: a buffered parser input
len: the size in bytes of the array.
buf: an char array
Returns: the number of chars read and stored in the buffer, or -1 in case of error.

xmlParserInputBufferRead ()

int	xmlParserInputBufferRead	(xmlParserInputBufferPtr in, 
int len)

Refresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8

in: a buffered parser input
len: indicative value of the amount of chars to read
Returns: the number of chars read and stored in the buffer, or -1 in case of error.

xmlPopInputCallbacks ()

int	xmlPopInputCallbacks		(void)

Clear the top input callback from the input stack. this includes the compiled-in I/O.

Returns: the number of input callback registered or -1 in case of error.

xmlPopOutputCallbacks ()

int	xmlPopOutputCallbacks		(void)

Remove the top output callbacks from the output stack. This includes the compiled-in I/O.

Returns: the number of output callback registered or -1 in case of error.

xmlRegisterDefaultInputCallbacks ()

void	xmlRegisterDefaultInputCallbacks	(void)

Registers the default compiled-in I/O handlers.


xmlRegisterDefaultOutputCallbacks ()

void	xmlRegisterDefaultOutputCallbacks	(void)

Registers the default compiled-in I/O handlers.


xmlRegisterHTTPPostCallbacks ()

void	xmlRegisterHTTPPostCallbacks	(void)

By default, libxml submits HTTP output requests using the "PUT" method. Calling this method changes the HTTP output method to use the "POST" method instead.


xmlRegisterInputCallbacks ()

int	xmlRegisterInputCallbacks	(xmlInputMatchCallback matchFunc, 
xmlInputOpenCallback openFunc,
xmlInputReadCallback readFunc,
xmlInputCloseCallback closeFunc)

Register a new set of I/O callback for handling parser input.

matchFunc: the xmlInputMatchCallback
openFunc: the xmlInputOpenCallback
readFunc: the xmlInputReadCallback
closeFunc: the xmlInputCloseCallback
Returns: the registered handler number or -1 in case of error

xmlRegisterOutputCallbacks ()

int	xmlRegisterOutputCallbacks	(xmlOutputMatchCallback matchFunc, 
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
xmlOutputCloseCallback closeFunc)

Register a new set of I/O callback for handling output.

matchFunc: the xmlOutputMatchCallback
openFunc: the xmlOutputOpenCallback
writeFunc: the xmlOutputWriteCallback
closeFunc: the xmlOutputCloseCallback
Returns: the registered handler number or -1 in case of error

PK!vnlibxml2-xmlreader.htmlnu[ xmlreader: the XMLReader implementation

xmlreader

xmlreader - the XMLReader implementation

API of the XML streaming API based on C# interfaces.

Author(s): Daniel Veillard

Synopsis

typedef enum xmlParserProperties;
typedef enum xmlParserSeverities;
typedef enum xmlReaderTypes;
typedef struct _xmlTextReader xmlTextReader;
typedef void * xmlTextReaderLocatorPtr;
typedef enum xmlTextReaderMode;
typedef xmlTextReader * xmlTextReaderPtr;
void	xmlFreeTextReader		(xmlTextReaderPtr reader);
xmlTextReaderPtr	xmlNewTextReader	(xmlParserInputBufferPtr input, 
const char * URI); xmlTextReaderPtr xmlNewTextReaderFilename (const char * URI); xmlTextReaderPtr xmlReaderForDoc (const xmlChar * cur,
const char * URL,
const char * encoding,
int options); xmlTextReaderPtr xmlReaderForFd (int fd,
const char * URL,
const char * encoding,
int options); xmlTextReaderPtr xmlReaderForFile (const char * filename,
const char * encoding,
int options); xmlTextReaderPtr xmlReaderForIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options); xmlTextReaderPtr xmlReaderForMemory (const char * buffer,
int size,
const char * URL,
const char * encoding,
int options); int xmlReaderNewDoc (xmlTextReaderPtr reader,
const xmlChar * cur,
const char * URL,
const char * encoding,
int options); int xmlReaderNewFd (xmlTextReaderPtr reader,
int fd,
const char * URL,
const char * encoding,
int options); int xmlReaderNewFile (xmlTextReaderPtr reader,
const char * filename,
const char * encoding,
int options); int xmlReaderNewIO (xmlTextReaderPtr reader,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options); int xmlReaderNewMemory (xmlTextReaderPtr reader,
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options); int xmlReaderNewWalker (xmlTextReaderPtr reader,
xmlDocPtr doc); xmlTextReaderPtr xmlReaderWalker (xmlDocPtr doc); int xmlTextReaderAttributeCount (xmlTextReaderPtr reader); xmlChar * xmlTextReaderBaseUri (xmlTextReaderPtr reader); long xmlTextReaderByteConsumed (xmlTextReaderPtr reader); int xmlTextReaderClose (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstBaseUri (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstEncoding (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstLocalName (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstName (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstNamespaceUri (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstPrefix (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstString (xmlTextReaderPtr reader,
const xmlChar * str); const xmlChar * xmlTextReaderConstValue (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstXmlLang (xmlTextReaderPtr reader); const xmlChar * xmlTextReaderConstXmlVersion (xmlTextReaderPtr reader); xmlDocPtr xmlTextReaderCurrentDoc (xmlTextReaderPtr reader); xmlNodePtr xmlTextReaderCurrentNode (xmlTextReaderPtr reader); int xmlTextReaderDepth (xmlTextReaderPtr reader); typedef void xmlTextReaderErrorFunc (void * arg,
const char * msg,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator); xmlNodePtr xmlTextReaderExpand (xmlTextReaderPtr reader); xmlChar * xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
const xmlChar * name); xmlChar * xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
int no); xmlChar * xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
const xmlChar * localName,
const xmlChar * namespaceURI); void xmlTextReaderGetErrorHandler (xmlTextReaderPtr reader,
xmlTextReaderErrorFunc * f,
void ** arg); int xmlTextReaderGetParserColumnNumber (xmlTextReaderPtr reader); int xmlTextReaderGetParserLineNumber (xmlTextReaderPtr reader); int xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
int prop); xmlParserInputBufferPtr xmlTextReaderGetRemainder (xmlTextReaderPtr reader); int xmlTextReaderHasAttributes (xmlTextReaderPtr reader); int xmlTextReaderHasValue (xmlTextReaderPtr reader); int xmlTextReaderIsDefault (xmlTextReaderPtr reader); int xmlTextReaderIsEmptyElement (xmlTextReaderPtr reader); int xmlTextReaderIsNamespaceDecl (xmlTextReaderPtr reader); int xmlTextReaderIsValid (xmlTextReaderPtr reader); xmlChar * xmlTextReaderLocalName (xmlTextReaderPtr reader); xmlChar * xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator); int xmlTextReaderLocatorLineNumber (xmlTextReaderLocatorPtr locator); xmlChar * xmlTextReaderLookupNamespace (xmlTextReaderPtr reader,
const xmlChar * prefix); int xmlTextReaderMoveToAttribute (xmlTextReaderPtr reader,
const xmlChar * name); int xmlTextReaderMoveToAttributeNo (xmlTextReaderPtr reader,
int no); int xmlTextReaderMoveToAttributeNs (xmlTextReaderPtr reader,
const xmlChar * localName,
const xmlChar * namespaceURI); int xmlTextReaderMoveToElement (xmlTextReaderPtr reader); int xmlTextReaderMoveToFirstAttribute (xmlTextReaderPtr reader); int xmlTextReaderMoveToNextAttribute (xmlTextReaderPtr reader); xmlChar * xmlTextReaderName (xmlTextReaderPtr reader); xmlChar * xmlTextReaderNamespaceUri (xmlTextReaderPtr reader); int xmlTextReaderNext (xmlTextReaderPtr reader); int xmlTextReaderNextSibling (xmlTextReaderPtr reader); int xmlTextReaderNodeType (xmlTextReaderPtr reader); int xmlTextReaderNormalization (xmlTextReaderPtr reader); xmlChar * xmlTextReaderPrefix (xmlTextReaderPtr reader); xmlNodePtr xmlTextReaderPreserve (xmlTextReaderPtr reader); int xmlTextReaderPreservePattern (xmlTextReaderPtr reader,
const xmlChar * pattern,
const xmlChar ** namespaces); int xmlTextReaderQuoteChar (xmlTextReaderPtr reader); int xmlTextReaderRead (xmlTextReaderPtr reader); int xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader); xmlChar * xmlTextReaderReadInnerXml (xmlTextReaderPtr reader); xmlChar * xmlTextReaderReadOuterXml (xmlTextReaderPtr reader); int xmlTextReaderReadState (xmlTextReaderPtr reader); xmlChar * xmlTextReaderReadString (xmlTextReaderPtr reader); int xmlTextReaderRelaxNGSetSchema (xmlTextReaderPtr reader,
xmlRelaxNGPtr schema); int xmlTextReaderRelaxNGValidate (xmlTextReaderPtr reader,
const char * rng); int xmlTextReaderRelaxNGValidateCtxt (xmlTextReaderPtr reader,
xmlRelaxNGValidCtxtPtr ctxt,
int options); int xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
const char * xsd); int xmlTextReaderSchemaValidateCtxt (xmlTextReaderPtr reader,
xmlSchemaValidCtxtPtr ctxt,
int options); void xmlTextReaderSetErrorHandler (xmlTextReaderPtr reader,
xmlTextReaderErrorFunc f,
void * arg); int xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
int prop,
int value); int xmlTextReaderSetSchema (xmlTextReaderPtr reader,
xmlSchemaPtr schema); void xmlTextReaderSetStructuredErrorHandler (xmlTextReaderPtr reader,
xmlStructuredErrorFunc f,
void * arg); int xmlTextReaderSetup (xmlTextReaderPtr reader,
xmlParserInputBufferPtr input,
const char * URL,
const char * encoding,
int options); int xmlTextReaderStandalone (xmlTextReaderPtr reader); xmlChar * xmlTextReaderValue (xmlTextReaderPtr reader); xmlChar * xmlTextReaderXmlLang (xmlTextReaderPtr reader);

Description

Details




Structure xmlTextReader

struct _xmlTextReader {
The content of this structure is not made public by the API.
} xmlTextReader;


Typedef xmlTextReaderLocatorPtr

void * xmlTextReaderLocatorPtr;



Typedef xmlTextReaderPtr

xmlTextReader * xmlTextReaderPtr;

Pointer to an xmlReader context.


Function type xmlTextReaderErrorFunc

void	xmlTextReaderErrorFunc		(void * arg, 
const char * msg,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator)

Signature of an error callback from a reader parser

arg: the user argument
msg: the message
severity: the severity of the error
locator: a locator indicating where the error occurred

xmlFreeTextReader ()

void	xmlFreeTextReader		(xmlTextReaderPtr reader)

Deallocate all the resources associated to the reader

reader: the xmlTextReaderPtr

xmlNewTextReader ()

xmlTextReaderPtr	xmlNewTextReader	(xmlParserInputBufferPtr input, 
const char * URI)

Create an xmlTextReader structure fed with @input

input: the xmlParserInputBufferPtr used to read data
URI: the URI information for the source if available
Returns: the new xmlTextReaderPtr or NULL in case of error

xmlNewTextReaderFilename ()

xmlTextReaderPtr	xmlNewTextReaderFilename	(const char * URI)

Create an xmlTextReader structure fed with the resource at @URI

URI: the URI of the resource to process
Returns: the new xmlTextReaderPtr or NULL in case of error

xmlReaderForDoc ()

xmlTextReaderPtr	xmlReaderForDoc	(const xmlChar * cur, 
const char * URL,
const char * encoding,
int options)

Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.

cur: a pointer to a zero terminated string
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the new reader or NULL in case of error.

xmlReaderForFd ()

xmlTextReaderPtr	xmlReaderForFd	(int fd, 
const char * URL,
const char * encoding,
int options)

Create an xmltextReader for an XML from a file descriptor. The parsing flags @options are a combination of xmlParserOption. NOTE that the file descriptor will not be closed when the reader is closed or reset.

fd: an open file descriptor
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the new reader or NULL in case of error.

xmlReaderForFile ()

xmlTextReaderPtr	xmlReaderForFile	(const char * filename, 
const char * encoding,
int options)

parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption.

filename: a file or URL
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the new reader or NULL in case of error.

xmlReaderForIO ()

xmlTextReaderPtr	xmlReaderForIO	(xmlInputReadCallback ioread, 
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)

Create an xmltextReader for an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption.

ioread: an I/O read function
ioclose: an I/O close function
ioctx: an I/O handler
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the new reader or NULL in case of error.

xmlReaderForMemory ()

xmlTextReaderPtr	xmlReaderForMemory	(const char * buffer, 
int size,
const char * URL,
const char * encoding,
int options)

Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.

buffer: a pointer to a char array
size: the size of the array
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: the new reader or NULL in case of error.

xmlReaderNewDoc ()

int	xmlReaderNewDoc			(xmlTextReaderPtr reader, 
const xmlChar * cur,
const char * URL,
const char * encoding,
int options)

Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.

reader: an XML reader
cur: a pointer to a zero terminated string
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: 0 in case of success and -1 in case of error

xmlReaderNewFd ()

int	xmlReaderNewFd			(xmlTextReaderPtr reader, 
int fd,
const char * URL,
const char * encoding,
int options)

Setup an xmltextReader to parse an XML from a file descriptor. NOTE that the file descriptor will not be closed when the reader is closed or reset. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.

reader: an XML reader
fd: an open file descriptor
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: 0 in case of success and -1 in case of error

xmlReaderNewFile ()

int	xmlReaderNewFile		(xmlTextReaderPtr reader, 
const char * filename,
const char * encoding,
int options)

parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.

reader: an XML reader
filename: a file or URL
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: 0 in case of success and -1 in case of error

xmlReaderNewIO ()

int	xmlReaderNewIO			(xmlTextReaderPtr reader, 
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)

Setup an xmltextReader to parse an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.

reader: an XML reader
ioread: an I/O read function
ioclose: an I/O close function
ioctx: an I/O handler
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: 0 in case of success and -1 in case of error

xmlReaderNewMemory ()

int	xmlReaderNewMemory		(xmlTextReaderPtr reader, 
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options)

Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.

reader: an XML reader
buffer: a pointer to a char array
size: the size of the array
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: 0 in case of success and -1 in case of error

xmlReaderNewWalker ()

int	xmlReaderNewWalker		(xmlTextReaderPtr reader, 
xmlDocPtr doc)

Setup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader.

reader: an XML reader
doc: a preparsed document
Returns: 0 in case of success and -1 in case of error

xmlReaderWalker ()

xmlTextReaderPtr	xmlReaderWalker	(xmlDocPtr doc)

Create an xmltextReader for a preparsed document.

doc: a preparsed document
Returns: the new reader or NULL in case of error.

xmlTextReaderAttributeCount ()

int	xmlTextReaderAttributeCount	(xmlTextReaderPtr reader)

Provides the number of attributes of the current node

reader: the xmlTextReaderPtr used
Returns: 0 i no attributes, -1 in case of error or the attribute count

xmlTextReaderBaseUri ()

xmlChar *	xmlTextReaderBaseUri	(xmlTextReaderPtr reader)

The base URI of the node.

reader: the xmlTextReaderPtr used
Returns: the base URI or NULL if not available, if non NULL it need to be freed by the caller.

xmlTextReaderByteConsumed ()

long	xmlTextReaderByteConsumed	(xmlTextReaderPtr reader)

This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.

reader: an XML reader
Returns: the index in bytes from the beginning of the entity or -1 in case the index could not be computed.

xmlTextReaderClose ()

int	xmlTextReaderClose		(xmlTextReaderPtr reader)

This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.

reader: the xmlTextReaderPtr used
Returns: 0 or -1 in case of error

xmlTextReaderConstBaseUri ()

const xmlChar *	xmlTextReaderConstBaseUri	(xmlTextReaderPtr reader)

The base URI of the node.

reader: the xmlTextReaderPtr used
Returns: the base URI or NULL if not available, the string will be deallocated with the reader

xmlTextReaderConstEncoding ()

const xmlChar *	xmlTextReaderConstEncoding	(xmlTextReaderPtr reader)

Determine the encoding of the document being read.

reader: the xmlTextReaderPtr used
Returns: a string containing the encoding of the document or NULL in case of error. The string is deallocated with the reader.

xmlTextReaderConstLocalName ()

const xmlChar *	xmlTextReaderConstLocalName	(xmlTextReaderPtr reader)

The local name of the node.

reader: the xmlTextReaderPtr used
Returns: the local name or NULL if not available, the string will be deallocated with the reader.

xmlTextReaderConstName ()

const xmlChar *	xmlTextReaderConstName	(xmlTextReaderPtr reader)

The qualified name of the node, equal to Prefix :LocalName.

reader: the xmlTextReaderPtr used
Returns: the local name or NULL if not available, the string is deallocated with the reader.

xmlTextReaderConstNamespaceUri ()

const xmlChar *	xmlTextReaderConstNamespaceUri	(xmlTextReaderPtr reader)

The URI defining the namespace associated with the node.

reader: the xmlTextReaderPtr used
Returns: the namespace URI or NULL if not available, the string will be deallocated with the reader

xmlTextReaderConstPrefix ()

const xmlChar *	xmlTextReaderConstPrefix	(xmlTextReaderPtr reader)

A shorthand reference to the namespace associated with the node.

reader: the xmlTextReaderPtr used
Returns: the prefix or NULL if not available, the string is deallocated with the reader.

xmlTextReaderConstString ()

const xmlChar *	xmlTextReaderConstString	(xmlTextReaderPtr reader, 
const xmlChar * str)

Get an interned string from the reader, allows for example to speedup string name comparisons

reader: the xmlTextReaderPtr used
str: the string to intern.
Returns: an interned copy of the string or NULL in case of error. The string will be deallocated with the reader.

xmlTextReaderConstValue ()

const xmlChar *	xmlTextReaderConstValue	(xmlTextReaderPtr reader)

Provides the text value of the node if present

reader: the xmlTextReaderPtr used
Returns: the string or NULL if not available. The result will be deallocated on the next Read() operation.

xmlTextReaderConstXmlLang ()

const xmlChar *	xmlTextReaderConstXmlLang	(xmlTextReaderPtr reader)

The xml:lang scope within which the node resides.

reader: the xmlTextReaderPtr used
Returns: the xml:lang value or NULL if none exists.

xmlTextReaderConstXmlVersion ()

const xmlChar *	xmlTextReaderConstXmlVersion	(xmlTextReaderPtr reader)

Determine the XML version of the document being read.

reader: the xmlTextReaderPtr used
Returns: a string containing the XML version of the document or NULL in case of error. The string is deallocated with the reader.

xmlTextReaderCurrentDoc ()

xmlDocPtr	xmlTextReaderCurrentDoc	(xmlTextReaderPtr reader)

Hacking interface allowing to get the xmlDocPtr corresponding to the current document being accessed by the xmlTextReader. NOTE: as a result of this call, the reader will not destroy the associated XML document and calling xmlFreeDoc() on the result is needed once the reader parsing has finished.

reader: the xmlTextReaderPtr used
Returns: the xmlDocPtr or NULL in case of error.

xmlTextReaderCurrentNode ()

xmlNodePtr	xmlTextReaderCurrentNode	(xmlTextReaderPtr reader)

Hacking interface allowing to get the xmlNodePtr corresponding to the current node being accessed by the xmlTextReader. This is dangerous because the underlying node may be destroyed on the next Reads.

reader: the xmlTextReaderPtr used
Returns: the xmlNodePtr or NULL in case of error.

xmlTextReaderDepth ()

int	xmlTextReaderDepth		(xmlTextReaderPtr reader)

The depth of the node in the tree.

reader: the xmlTextReaderPtr used
Returns: the depth or -1 in case of error

xmlTextReaderExpand ()

xmlNodePtr	xmlTextReaderExpand	(xmlTextReaderPtr reader)

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

reader: the xmlTextReaderPtr used
Returns: a node pointer valid until the next xmlTextReaderRead() call or NULL in case of error.

xmlTextReaderGetAttribute ()

xmlChar *	xmlTextReaderGetAttribute	(xmlTextReaderPtr reader, 
const xmlChar * name)

Provides the value of the attribute with the specified qualified name.

reader: the xmlTextReaderPtr used
name: the qualified name of the attribute.
Returns: a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.

xmlTextReaderGetAttributeNo ()

xmlChar *	xmlTextReaderGetAttributeNo	(xmlTextReaderPtr reader, 
int no)

Provides the value of the attribute with the specified index relative to the containing element.

reader: the xmlTextReaderPtr used
no: the zero-based index of the attribute relative to the containing element
Returns: a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.

xmlTextReaderGetAttributeNs ()

xmlChar *	xmlTextReaderGetAttributeNs	(xmlTextReaderPtr reader, 
const xmlChar * localName,
const xmlChar * namespaceURI)

Provides the value of the specified attribute

reader: the xmlTextReaderPtr used
localName: the local name of the attribute.
namespaceURI: the namespace URI of the attribute.
Returns: a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.

xmlTextReaderGetErrorHandler ()

void	xmlTextReaderGetErrorHandler	(xmlTextReaderPtr reader, 
xmlTextReaderErrorFunc * f,
void ** arg)

Retrieve the error callback function and user argument.

reader: the xmlTextReaderPtr used
f: the callback function or NULL is no callback has been registered
arg: a user argument

xmlTextReaderGetParserColumnNumber ()

int	xmlTextReaderGetParserColumnNumber	(xmlTextReaderPtr reader)

Provide the column number of the current parsing point.

reader: the user data (XML reader context)
Returns: an int or 0 if not available

xmlTextReaderGetParserLineNumber ()

int	xmlTextReaderGetParserLineNumber	(xmlTextReaderPtr reader)

Provide the line number of the current parsing point.

reader: the user data (XML reader context)
Returns: an int or 0 if not available

xmlTextReaderGetParserProp ()

int	xmlTextReaderGetParserProp	(xmlTextReaderPtr reader, 
int prop)

Read the parser internal property.

reader: the xmlTextReaderPtr used
prop: the xmlParserProperties to get
Returns: the value, usually 0 or 1, or -1 in case of error.

xmlTextReaderGetRemainder ()

xmlParserInputBufferPtr	xmlTextReaderGetRemainder	(xmlTextReaderPtr reader)

Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good, the parser certainly progressed past what's left in reader->input, and there is an allocation problem. Best would be to rewrite it differently.

reader: the xmlTextReaderPtr used
Returns: the xmlParserInputBufferPtr attached to the XML or NULL in case of error.

xmlTextReaderHasAttributes ()

int	xmlTextReaderHasAttributes	(xmlTextReaderPtr reader)

Whether the node has attributes.

reader: the xmlTextReaderPtr used
Returns: 1 if true, 0 if false, and -1 in case or error

xmlTextReaderHasValue ()

int	xmlTextReaderHasValue		(xmlTextReaderPtr reader)

Whether the node can have a text value.

reader: the xmlTextReaderPtr used
Returns: 1 if true, 0 if false, and -1 in case or error

xmlTextReaderIsDefault ()

int	xmlTextReaderIsDefault		(xmlTextReaderPtr reader)

Whether an Attribute node was generated from the default value defined in the DTD or schema.

reader: the xmlTextReaderPtr used
Returns: 0 if not defaulted, 1 if defaulted, and -1 in case of error

xmlTextReaderIsEmptyElement ()

int	xmlTextReaderIsEmptyElement	(xmlTextReaderPtr reader)

Check if the current node is empty

reader: the xmlTextReaderPtr used
Returns: 1 if empty, 0 if not and -1 in case of error

xmlTextReaderIsNamespaceDecl ()

int	xmlTextReaderIsNamespaceDecl	(xmlTextReaderPtr reader)

Determine whether the current node is a namespace declaration rather than a regular attribute.

reader: the xmlTextReaderPtr used
Returns: 1 if the current node is a namespace declaration, 0 if it is a regular attribute or other type of node, or -1 in case of error.

xmlTextReaderIsValid ()

int	xmlTextReaderIsValid		(xmlTextReaderPtr reader)

Retrieve the validity status from the parser context

reader: the xmlTextReaderPtr used
Returns: the flag value 1 if valid, 0 if no, and -1 in case of error

xmlTextReaderLocalName ()

xmlChar *	xmlTextReaderLocalName	(xmlTextReaderPtr reader)

The local name of the node.

reader: the xmlTextReaderPtr used
Returns: the local name or NULL if not available, if non NULL it need to be freed by the caller.

xmlTextReaderLocatorBaseURI ()

xmlChar *	xmlTextReaderLocatorBaseURI	(xmlTextReaderLocatorPtr locator)

Obtain the base URI for the given locator.

locator: the xmlTextReaderLocatorPtr used
Returns: the base URI or NULL in case of error, if non NULL it need to be freed by the caller.

xmlTextReaderLocatorLineNumber ()

int	xmlTextReaderLocatorLineNumber	(xmlTextReaderLocatorPtr locator)

Obtain the line number for the given locator.

locator: the xmlTextReaderLocatorPtr used
Returns: the line number or -1 in case of error.

xmlTextReaderLookupNamespace ()

xmlChar *	xmlTextReaderLookupNamespace	(xmlTextReaderPtr reader, 
const xmlChar * prefix)

Resolves a namespace prefix in the scope of the current element.

reader: the xmlTextReaderPtr used
prefix: the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL
Returns: a string containing the namespace URI to which the prefix maps or NULL in case of error. The string must be deallocated by the caller.

xmlTextReaderMoveToAttribute ()

int	xmlTextReaderMoveToAttribute	(xmlTextReaderPtr reader, 
const xmlChar * name)

Moves the position of the current instance to the attribute with the specified qualified name.

reader: the xmlTextReaderPtr used
name: the qualified name of the attribute.
Returns: 1 in case of success, -1 in case of error, 0 if not found

xmlTextReaderMoveToAttributeNo ()

int	xmlTextReaderMoveToAttributeNo	(xmlTextReaderPtr reader, 
int no)

Moves the position of the current instance to the attribute with the specified index relative to the containing element.

reader: the xmlTextReaderPtr used
no: the zero-based index of the attribute relative to the containing element.
Returns: 1 in case of success, -1 in case of error, 0 if not found

xmlTextReaderMoveToAttributeNs ()

int	xmlTextReaderMoveToAttributeNs	(xmlTextReaderPtr reader, 
const xmlChar * localName,
const xmlChar * namespaceURI)

Moves the position of the current instance to the attribute with the specified local name and namespace URI.

reader: the xmlTextReaderPtr used
localName: the local name of the attribute.
namespaceURI: the namespace URI of the attribute.
Returns: 1 in case of success, -1 in case of error, 0 if not found

xmlTextReaderMoveToElement ()

int	xmlTextReaderMoveToElement	(xmlTextReaderPtr reader)

Moves the position of the current instance to the node that contains the current Attribute node.

reader: the xmlTextReaderPtr used
Returns: 1 in case of success, -1 in case of error, 0 if not moved

xmlTextReaderMoveToFirstAttribute ()

int	xmlTextReaderMoveToFirstAttribute	(xmlTextReaderPtr reader)

Moves the position of the current instance to the first attribute associated with the current node.

reader: the xmlTextReaderPtr used
Returns: 1 in case of success, -1 in case of error, 0 if not found

xmlTextReaderMoveToNextAttribute ()

int	xmlTextReaderMoveToNextAttribute	(xmlTextReaderPtr reader)

Moves the position of the current instance to the next attribute associated with the current node.

reader: the xmlTextReaderPtr used
Returns: 1 in case of success, -1 in case of error, 0 if not found

xmlTextReaderName ()

xmlChar *	xmlTextReaderName	(xmlTextReaderPtr reader)

The qualified name of the node, equal to Prefix :LocalName.

reader: the xmlTextReaderPtr used
Returns: the local name or NULL if not available, if non NULL it need to be freed by the caller.

xmlTextReaderNamespaceUri ()

xmlChar *	xmlTextReaderNamespaceUri	(xmlTextReaderPtr reader)

The URI defining the namespace associated with the node.

reader: the xmlTextReaderPtr used
Returns: the namespace URI or NULL if not available, if non NULL it need to be freed by the caller.

xmlTextReaderNext ()

int	xmlTextReaderNext		(xmlTextReaderPtr reader)

Skip to the node following the current one in document order while avoiding the subtree if any.

reader: the xmlTextReaderPtr used
Returns: 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error

xmlTextReaderNextSibling ()

int	xmlTextReaderNextSibling	(xmlTextReaderPtr reader)

Skip to the node following the current one in document order while avoiding the subtree if any. Currently implemented only for Readers built on a document

reader: the xmlTextReaderPtr used
Returns: 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error

xmlTextReaderNodeType ()

int	xmlTextReaderNodeType		(xmlTextReaderPtr reader)

Get the node type of the current node Reference: http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html

reader: the xmlTextReaderPtr used
Returns: the xmlReaderTypes of the current node or -1 in case of error

xmlTextReaderNormalization ()

int	xmlTextReaderNormalization	(xmlTextReaderPtr reader)

The value indicating whether to normalize white space and attribute values. Since attribute value and end of line normalizations are a MUST in the XML specification only the value true is accepted. The broken behaviour of accepting out of range character entities like &#0; is of course not supported either.

reader: the xmlTextReaderPtr used
Returns: 1 or -1 in case of error.

xmlTextReaderPrefix ()

xmlChar *	xmlTextReaderPrefix	(xmlTextReaderPtr reader)

A shorthand reference to the namespace associated with the node.

reader: the xmlTextReaderPtr used
Returns: the prefix or NULL if not available, if non NULL it need to be freed by the caller.

xmlTextReaderPreserve ()

xmlNodePtr	xmlTextReaderPreserve	(xmlTextReaderPtr reader)

This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished

reader: the xmlTextReaderPtr used
Returns: the xmlNodePtr or NULL in case of error.

xmlTextReaderPreservePattern ()

int	xmlTextReaderPreservePattern	(xmlTextReaderPtr reader, 
const xmlChar * pattern,
const xmlChar ** namespaces)

This tells the XML Reader to preserve all nodes matched by the pattern. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished

reader: the xmlTextReaderPtr used
pattern: an XPath subset pattern
namespaces: the prefix definitions, array of [URI, prefix] or NULL
Returns: a non-negative number in case of success and -1 in case of error

xmlTextReaderQuoteChar ()

int	xmlTextReaderQuoteChar		(xmlTextReaderPtr reader)

The quotation mark character used to enclose the value of an attribute.

reader: the xmlTextReaderPtr used
Returns: " or ' and -1 in case of error

xmlTextReaderRead ()

int	xmlTextReaderRead		(xmlTextReaderPtr reader)

Moves the position of the current instance to the next node in the stream, exposing its properties.

reader: the xmlTextReaderPtr used
Returns: 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error

xmlTextReaderReadAttributeValue ()

int	xmlTextReaderReadAttributeValue	(xmlTextReaderPtr reader)

Parses an attribute value into one or more Text and EntityReference nodes.

reader: the xmlTextReaderPtr used
Returns: 1 in case of success, 0 if the reader was not positioned on an attribute node or all the attribute values have been read, or -1 in case of error.

xmlTextReaderReadInnerXml ()

xmlChar *	xmlTextReaderReadInnerXml	(xmlTextReaderPtr reader)

Reads the contents of the current node, including child nodes and markup.

reader: the xmlTextReaderPtr used
Returns: a string containing the XML content, or NULL if the current node is neither an element nor attribute, or has no child nodes. The string must be deallocated by the caller.

xmlTextReaderReadOuterXml ()

xmlChar *	xmlTextReaderReadOuterXml	(xmlTextReaderPtr reader)

Reads the contents of the current node, including child nodes and markup.

reader: the xmlTextReaderPtr used
Returns: a string containing the node and any XML content, or NULL if the current node cannot be serialized. The string must be deallocated by the caller.

xmlTextReaderReadState ()

int	xmlTextReaderReadState		(xmlTextReaderPtr reader)

Gets the read state of the reader.

reader: the xmlTextReaderPtr used
Returns: the state value, or -1 in case of error

xmlTextReaderReadString ()

xmlChar *	xmlTextReaderReadString	(xmlTextReaderPtr reader)

Reads the contents of an element or a text node as a string.

reader: the xmlTextReaderPtr used
Returns: a string containing the contents of the Element or Text node, or NULL if the reader is positioned on any other type of node. The string must be deallocated by the caller.

xmlTextReaderRelaxNGSetSchema ()

int	xmlTextReaderRelaxNGSetSchema	(xmlTextReaderPtr reader, 
xmlRelaxNGPtr schema)

Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then RelaxNG validation is deactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.

reader: the xmlTextReaderPtr used
schema: a precompiled RelaxNG schema
Returns: 0 in case the RelaxNG validation could be (de)activated and -1 in case of error.

xmlTextReaderRelaxNGValidate ()

int	xmlTextReaderRelaxNGValidate	(xmlTextReaderPtr reader, 
const char * rng)

Use RelaxNG schema to validate the document as it is processed. Activation is only possible before the first Read(). If @rng is NULL, then RelaxNG schema validation is deactivated.

reader: the xmlTextReaderPtr used
rng: the path to a RelaxNG schema or NULL
Returns: 0 in case the schemas validation could be (de)activated and -1 in case of error.

xmlTextReaderRelaxNGValidateCtxt ()

int	xmlTextReaderRelaxNGValidateCtxt	(xmlTextReaderPtr reader, 
xmlRelaxNGValidCtxtPtr ctxt,
int options)

Use RelaxNG schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then RelaxNG schema validation is deactivated.

reader: the xmlTextReaderPtr used
ctxt: the RelaxNG schema validation context or NULL
options: options (not used yet)
Returns: 0 in case the schemas validation could be (de)activated and -1 in case of error.

xmlTextReaderSchemaValidate ()

int	xmlTextReaderSchemaValidate	(xmlTextReaderPtr reader, 
const char * xsd)

Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.

reader: the xmlTextReaderPtr used
xsd: the path to a W3C XSD schema or NULL
Returns: 0 in case the schemas validation could be (de)activated and -1 in case of error.

xmlTextReaderSchemaValidateCtxt ()

int	xmlTextReaderSchemaValidateCtxt	(xmlTextReaderPtr reader, 
xmlSchemaValidCtxtPtr ctxt,
int options)

Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.

reader: the xmlTextReaderPtr used
ctxt: the XML Schema validation context or NULL
options: options (not used yet)
Returns: 0 in case the schemas validation could be (de)activated and -1 in case of error.

xmlTextReaderSetErrorHandler ()

void	xmlTextReaderSetErrorHandler	(xmlTextReaderPtr reader, 
xmlTextReaderErrorFunc f,
void * arg)

Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.

reader: the xmlTextReaderPtr used
f: the callback function to call on error and warnings
arg: a user argument to pass to the callback function

xmlTextReaderSetParserProp ()

int	xmlTextReaderSetParserProp	(xmlTextReaderPtr reader, 
int prop,
int value)

Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done.

reader: the xmlTextReaderPtr used
prop: the xmlParserProperties to set
value: usually 0 or 1 to (de)activate it
Returns: 0 if the call was successful, or -1 in case of error

xmlTextReaderSetSchema ()

int	xmlTextReaderSetSchema		(xmlTextReaderPtr reader, 
xmlSchemaPtr schema)

Use XSD Schema to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then Schema validation is deactivated. The @schema should not be freed until the reader is deallocated or its use has been deactivated.

reader: the xmlTextReaderPtr used
schema: a precompiled Schema schema
Returns: 0 in case the Schema validation could be (de)activated and -1 in case of error.

xmlTextReaderSetStructuredErrorHandler ()

void	xmlTextReaderSetStructuredErrorHandler	(xmlTextReaderPtr reader, 
xmlStructuredErrorFunc f,
void * arg)

Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.

reader: the xmlTextReaderPtr used
f: the callback function to call on error and warnings
arg: a user argument to pass to the callback function

xmlTextReaderSetup ()

int	xmlTextReaderSetup		(xmlTextReaderPtr reader, 
xmlParserInputBufferPtr input,
const char * URL,
const char * encoding,
int options)

Setup an XML reader with new options

reader: an XML reader
input: xmlParserInputBufferPtr used to feed the reader, will be destroyed with it.
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of xmlParserOption
Returns: 0 in case of success and -1 in case of error.

xmlTextReaderStandalone ()

int	xmlTextReaderStandalone		(xmlTextReaderPtr reader)

Determine the standalone status of the document being read.

reader: the xmlTextReaderPtr used
Returns: 1 if the document was declared to be standalone, 0 if it was declared to be not standalone, or -1 if the document did not specify its standalone status or in case of error.

xmlTextReaderValue ()

xmlChar *	xmlTextReaderValue	(xmlTextReaderPtr reader)

Provides the text value of the node if present

reader: the xmlTextReaderPtr used
Returns: the string or NULL if not available. The result must be deallocated with xmlFree()

xmlTextReaderXmlLang ()

xmlChar *	xmlTextReaderXmlLang	(xmlTextReaderPtr reader)

The xml:lang scope within which the node resides.

reader: the xmlTextReaderPtr used
Returns: the xml:lang value or NULL if none exists., if non NULL it need to be freed by the caller.

PK!tIIIlibxml2-pattern.htmlnu[ pattern: pattern expression handling

pattern

pattern - pattern expression handling

allows to compile and test pattern expressions for nodes either in a tree or based on a parser state.

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlPattern xmlPattern;
typedef enum xmlPatternFlags;
typedef xmlPattern * xmlPatternPtr;
typedef struct _xmlStreamCtxt xmlStreamCtxt;
typedef xmlStreamCtxt * xmlStreamCtxtPtr;
void	xmlFreePattern			(xmlPatternPtr comp);
void	xmlFreePatternList		(xmlPatternPtr comp);
void	xmlFreeStreamCtxt		(xmlStreamCtxtPtr stream);
int	xmlPatternFromRoot		(xmlPatternPtr comp);
xmlStreamCtxtPtr	xmlPatternGetStreamCtxt	(xmlPatternPtr comp);
int	xmlPatternMatch			(xmlPatternPtr comp, 
xmlNodePtr node); int xmlPatternMaxDepth (xmlPatternPtr comp); int xmlPatternMinDepth (xmlPatternPtr comp); int xmlPatternStreamable (xmlPatternPtr comp); xmlPatternPtr xmlPatterncompile (const xmlChar * pattern,
xmlDict * dict,
int flags,
const xmlChar ** namespaces); int xmlStreamPop (xmlStreamCtxtPtr stream); int xmlStreamPush (xmlStreamCtxtPtr stream,
const xmlChar * name,
const xmlChar * ns); int xmlStreamPushAttr (xmlStreamCtxtPtr stream,
const xmlChar * name,
const xmlChar * ns); int xmlStreamPushNode (xmlStreamCtxtPtr stream,
const xmlChar * name,
const xmlChar * ns,
int nodeType); int xmlStreamWantsAnyNode (xmlStreamCtxtPtr streamCtxt);

Description

Details

Structure xmlPattern

struct _xmlPattern {
The content of this structure is not made public by the API.
} xmlPattern;


Enum xmlPatternFlags

enum xmlPatternFlags {
    XML_PATTERN_DEFAULT = 0 /* simple pattern match */
    XML_PATTERN_XPATH = 1 /* standard XPath pattern */
    XML_PATTERN_XSSEL = 2 /* XPath subset for schema selector */
    XML_PATTERN_XSFIELD = 4 /*  XPath subset for schema field */
};


Typedef xmlPatternPtr

xmlPattern * xmlPatternPtr;


Structure xmlStreamCtxt

struct _xmlStreamCtxt {
The content of this structure is not made public by the API.
} xmlStreamCtxt;


Typedef xmlStreamCtxtPtr

xmlStreamCtxt * xmlStreamCtxtPtr;


xmlFreePattern ()

void	xmlFreePattern			(xmlPatternPtr comp)

Free up the memory allocated by @comp

comp: an XSLT comp

xmlFreePatternList ()

void	xmlFreePatternList		(xmlPatternPtr comp)

Free up the memory allocated by all the elements of @comp

comp: an XSLT comp list

xmlFreeStreamCtxt ()

void	xmlFreeStreamCtxt		(xmlStreamCtxtPtr stream)

Free the stream context

stream: the stream context

xmlPatternFromRoot ()

int	xmlPatternFromRoot		(xmlPatternPtr comp)

Check if the pattern must be looked at from the root.

comp: the precompiled pattern
Returns: 1 if true, 0 if false and -1 in case of error

xmlPatternGetStreamCtxt ()

xmlStreamCtxtPtr	xmlPatternGetStreamCtxt	(xmlPatternPtr comp)

Get a streaming context for that pattern Use xmlFreeStreamCtxt to free the context.

comp: the precompiled pattern
Returns: a pointer to the context or NULL in case of failure

xmlPatternMatch ()

int	xmlPatternMatch			(xmlPatternPtr comp, 
xmlNodePtr node)

Test whether the node matches the pattern

comp: the precompiled pattern
node: a node
Returns: 1 if it matches, 0 if it doesn't and -1 in case of failure

xmlPatternMaxDepth ()

int	xmlPatternMaxDepth		(xmlPatternPtr comp)

Check the maximum depth reachable by a pattern

comp: the precompiled pattern
Returns: -2 if no limit (using //), otherwise the depth, and -1 in case of error

xmlPatternMinDepth ()

int	xmlPatternMinDepth		(xmlPatternPtr comp)

Check the minimum depth reachable by a pattern, 0 mean the / or . are part of the set.

comp: the precompiled pattern
Returns: -1 in case of error otherwise the depth,

xmlPatternStreamable ()

int	xmlPatternStreamable		(xmlPatternPtr comp)

Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt() should work.

comp: the precompiled pattern
Returns: 1 if streamable, 0 if not and -1 in case of error.

xmlPatterncompile ()

xmlPatternPtr	xmlPatterncompile	(const xmlChar * pattern, 
xmlDict * dict,
int flags,
const xmlChar ** namespaces)

Compile a pattern.

pattern: the pattern to compile
dict: an optional dictionary for interned strings
flags: compilation flags, see xmlPatternFlags
namespaces: the prefix definitions, array of [URI, prefix] or NULL
Returns: the compiled form of the pattern or NULL in case of error

xmlStreamPop ()

int	xmlStreamPop			(xmlStreamCtxtPtr stream)

push one level from the stream.

stream: the stream context
Returns: -1 in case of error, 0 otherwise.

xmlStreamPush ()

int	xmlStreamPush			(xmlStreamCtxtPtr stream, 
const xmlChar * name,
const xmlChar * ns)

Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.

stream: the stream context
name: the current name
ns: the namespace name
Returns: -1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

xmlStreamPushAttr ()

int	xmlStreamPushAttr		(xmlStreamCtxtPtr stream, 
const xmlChar * name,
const xmlChar * ns)

Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.

stream: the stream context
name: the current name
ns: the namespace name
Returns: -1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

xmlStreamPushNode ()

int	xmlStreamPushNode		(xmlStreamCtxtPtr stream, 
const xmlChar * name,
const xmlChar * ns,
int nodeType)

Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.

stream: the stream context
name: the current name
ns: the namespace name
nodeType: the type of the node being pushed
Returns: -1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.

xmlStreamWantsAnyNode ()

int	xmlStreamWantsAnyNode		(xmlStreamCtxtPtr streamCtxt)

Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.

streamCtxt: the stream context
Returns: 1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.

PK!.cFcFlibxml2-uri.htmlnu[ uri: library of generic URI related routines

uri

uri - library of generic URI related routines

library of generic URI related routines Implements RFC 2396

Author(s): Daniel Veillard

Synopsis

typedef struct _xmlURI xmlURI;
typedef xmlURI * xmlURIPtr;
xmlChar *	xmlBuildRelativeURI	(const xmlChar * URI, 
const xmlChar * base); xmlChar * xmlBuildURI (const xmlChar * URI,
const xmlChar * base); xmlChar * xmlCanonicPath (const xmlChar * path); xmlURIPtr xmlCreateURI (void); void xmlFreeURI (xmlURIPtr uri); int xmlNormalizeURIPath (char * path); xmlURIPtr xmlParseURI (const char * str); xmlURIPtr xmlParseURIRaw (const char * str,
int raw); int xmlParseURIReference (xmlURIPtr uri,
const char * str); xmlChar * xmlPathToURI (const xmlChar * path); void xmlPrintURI (FILE * stream,
xmlURIPtr uri); xmlChar * xmlSaveUri (xmlURIPtr uri); xmlChar * xmlURIEscape (const xmlChar * str); xmlChar * xmlURIEscapeStr (const xmlChar * str,
const xmlChar * list); char * xmlURIUnescapeString (const char * str,
int len,
char * target);

Description

Details

Structure xmlURI

struct _xmlURI {
    char *	scheme	: the URI scheme
    char *	opaque	: opaque part
    char *	authority	: the authority part
    char *	server	: the server part
    char *	user	: the user part
    int	port	: the port number
    char *	path	: the path string
    char *	query	: the query string (deprecated - use with caution)
    char *	fragment	: the fragment identifier
    int	cleanup	: parsing potentially unclean URI
    char *	query_raw	: the query string (as it appears in the URI)
} xmlURI;


Typedef xmlURIPtr

xmlURI * xmlURIPtr;


xmlBuildRelativeURI ()

xmlChar *	xmlBuildRelativeURI	(const xmlChar * URI, 
const xmlChar * base)

Expresses the URI of the reference in terms relative to the base. Some examples of this operation include: base = "http://site1.com/docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif http://site2.com/docs/pic1.gif http://site2.com/docs/pic1.gif base = "docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif Note: if the URI reference is really weird or complicated, it may be worthwhile to first convert it into a "nice" one by calling xmlBuildURI (using 'base') before calling this routine, since this routine (for reasonable efficiency) assumes URI has already been through some validation.

URI: the URI reference under consideration
base: the base value
Returns: a new URI string (to be freed by the caller) or NULL in case error.

xmlBuildURI ()

xmlChar *	xmlBuildURI		(const xmlChar * URI, 
const xmlChar * base)

Computes he final URI of the reference done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396 5.2. Resolving Relative References to Absolute Form

URI: the URI instance found in the document
base: the base value
Returns: a new URI string (to be freed by the caller) or NULL in case of error.

xmlCanonicPath ()

xmlChar *	xmlCanonicPath		(const xmlChar * path)

Constructs a canonic path from the specified path.

path: the resource locator in a filesystem notation
Returns: a new canonic path, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.

xmlCreateURI ()

xmlURIPtr	xmlCreateURI		(void)

Simply creates an empty xmlURI

Returns: the new structure or NULL in case of error

xmlFreeURI ()

void	xmlFreeURI			(xmlURIPtr uri)

Free up the xmlURI struct

uri: pointer to an xmlURI

xmlNormalizeURIPath ()

int	xmlNormalizeURIPath		(char * path)

Applies the 5 normalization steps to a path string--that is, RFC 2396 Section 5.2, steps 6.c through 6.g. Normalization occurs directly on the string, no new allocation is done

path: pointer to the path string
Returns: 0 or an error code

xmlParseURI ()

xmlURIPtr	xmlParseURI		(const char * str)

Parse an URI based on RFC 3986 URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

str: the URI string to analyze
Returns: a newly built xmlURIPtr or NULL in case of error

xmlParseURIRaw ()

xmlURIPtr	xmlParseURIRaw		(const char * str, 
int raw)

Parse an URI but allows to keep intact the original fragments. URI-reference = URI / relative-ref

str: the URI string to analyze
raw: if 1 unescaping of URI pieces are disabled
Returns: a newly built xmlURIPtr or NULL in case of error

xmlParseURIReference ()

int	xmlParseURIReference		(xmlURIPtr uri, 
const char * str)

Parse an URI reference string based on RFC 3986 and fills in the appropriate fields of the @uri structure URI-reference = URI / relative-ref

uri: pointer to an URI structure
str: the string to analyze
Returns: 0 or the error code

xmlPathToURI ()

xmlChar *	xmlPathToURI		(const xmlChar * path)

Constructs an URI expressing the existing path

path: the resource locator in a filesystem notation
Returns: a new URI, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.

xmlPrintURI ()

void	xmlPrintURI			(FILE * stream, 
xmlURIPtr uri)

Prints the URI in the stream @stream.

stream: a FILE* for the output
uri: pointer to an xmlURI

xmlSaveUri ()

xmlChar *	xmlSaveUri		(xmlURIPtr uri)

Save the URI as an escaped string

uri: pointer to an xmlURI
Returns: a new string (to be deallocated by caller)

xmlURIEscape ()

xmlChar *	xmlURIEscape		(const xmlChar * str)

Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it's impossible to be sure.

str: the string of the URI to escape
Returns: an copy of the string, but escaped 25 May 2001 Uses xmlParseURI and xmlURIEscapeStr to try to escape correctly according to RFC2396. - Carl Douglas

xmlURIEscapeStr ()

xmlChar *	xmlURIEscapeStr		(const xmlChar * str, 
const xmlChar * list)

This routine escapes a string to hex, ignoring reserved characters (a-z) and the characters in the exception list.

str: string to escape
list: exception list string of chars not to escape
Returns: a new escaped string or NULL in case of error.

xmlURIUnescapeString ()

char *	xmlURIUnescapeString		(const char * str, 
int len,
char * target)

Unescaping routine, but does not check that the string is an URI. The output is a direct unsigned char translation of %XX values (no encoding) Note that the length of the result can only be smaller or same size as the input string.

str: the string to unescape
len: the length in bytes to unescape (or <= 0 to indicate full string)
target: optional destination buffer
Returns: a copy of the string, but unescaped, will return NULL only in case of error

PK!ZnAAlibxml2-HTMLparser.htmlnu[ HTMLparser: interface for an HTML 4.0 non-verifying parser

HTMLparser

HTMLparser - interface for an HTML 4.0 non-verifying parser

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.

Author(s): Daniel Veillard

Synopsis

#define htmlDefaultSubelement(elt);
#define htmlElementAllowedHereDesc(parent, elt);
#define htmlRequiredAttrs(elt);
typedef xmlDocPtr htmlDocPtr;
typedef struct _htmlElemDesc htmlElemDesc;
typedef htmlElemDesc * htmlElemDescPtr;
typedef struct _htmlEntityDesc htmlEntityDesc;
typedef htmlEntityDesc * htmlEntityDescPtr;
typedef xmlNodePtr htmlNodePtr;
typedef xmlParserCtxt htmlParserCtxt;
typedef xmlParserCtxtPtr htmlParserCtxtPtr;
typedef xmlParserInput htmlParserInput;
typedef xmlParserInputPtr htmlParserInputPtr;
typedef xmlParserNodeInfo htmlParserNodeInfo;
typedef enum htmlParserOption;
typedef xmlSAXHandler htmlSAXHandler;
typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
typedef enum htmlStatus;
int	UTF8ToHtml			(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen); htmlStatus htmlAttrAllowed (const htmlElemDesc * elt,
const xmlChar * attr,
int legacy); int htmlAutoCloseTag (htmlDocPtr doc,
const xmlChar * name,
htmlNodePtr elem); htmlParserCtxtPtr htmlCreateMemoryParserCtxt (const char * buffer,
int size); htmlParserCtxtPtr htmlCreatePushParserCtxt (htmlSAXHandlerPtr sax,
void * user_data,
const char * chunk,
int size,
const char * filename,
xmlCharEncoding enc); htmlDocPtr htmlCtxtReadDoc (htmlParserCtxtPtr ctxt,
const xmlChar * cur,
const char * URL,
const char * encoding,
int options); htmlDocPtr htmlCtxtReadFd (htmlParserCtxtPtr ctxt,
int fd,
const char * URL,
const char * encoding,
int options); htmlDocPtr htmlCtxtReadFile (htmlParserCtxtPtr ctxt,
const char * filename,
const char * encoding,
int options); htmlDocPtr htmlCtxtReadIO (htmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options); htmlDocPtr htmlCtxtReadMemory (htmlParserCtxtPtr ctxt,
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options); void htmlCtxtReset (htmlParserCtxtPtr ctxt); int htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
int options); int htmlElementAllowedHere (const htmlElemDesc * parent,
const xmlChar * elt); htmlStatus htmlElementStatusHere (const htmlElemDesc * parent,
const htmlElemDesc * elt); int htmlEncodeEntities (unsigned char * out,
int * outlen,
const unsigned char * in,
int * inlen,
int quoteChar); const htmlEntityDesc * htmlEntityLookup (const xmlChar * name); const htmlEntityDesc * htmlEntityValueLookup (unsigned int value); void htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); int htmlHandleOmittedElem (int val); int htmlIsAutoClosed (htmlDocPtr doc,
htmlNodePtr elem); int htmlIsScriptAttribute (const xmlChar * name); htmlParserCtxtPtr htmlNewParserCtxt (void); htmlStatus htmlNodeStatus (const htmlNodePtr node,
int legacy); int htmlParseCharRef (htmlParserCtxtPtr ctxt); int htmlParseChunk (htmlParserCtxtPtr ctxt,
const char * chunk,
int size,
int terminate); htmlDocPtr htmlParseDoc (const xmlChar * cur,
const char * encoding); int htmlParseDocument (htmlParserCtxtPtr ctxt); void htmlParseElement (htmlParserCtxtPtr ctxt); const htmlEntityDesc * htmlParseEntityRef (htmlParserCtxtPtr ctxt,
const xmlChar ** str); htmlDocPtr htmlParseFile (const char * filename,
const char * encoding); htmlDocPtr htmlReadDoc (const xmlChar * cur,
const char * URL,
const char * encoding,
int options); htmlDocPtr htmlReadFd (int fd,
const char * URL,
const char * encoding,
int options); htmlDocPtr htmlReadFile (const char * filename,
const char * encoding,
int options); htmlDocPtr htmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options); htmlDocPtr htmlReadMemory (const char * buffer,
int size,
const char * URL,
const char * encoding,
int options); htmlDocPtr htmlSAXParseDoc (const xmlChar * cur,
const char * encoding,
htmlSAXHandlerPtr sax,
void * userData); htmlDocPtr htmlSAXParseFile (const char * filename,
const char * encoding,
htmlSAXHandlerPtr sax,
void * userData); const htmlElemDesc * htmlTagLookup (const xmlChar * tag);

Description

Details

Macro htmlDefaultSubelement

#define htmlDefaultSubelement(elt);

Returns the default subelement for this element

elt: HTML element

Macro htmlElementAllowedHereDesc

#define htmlElementAllowedHereDesc(parent, elt);

Checks whether an HTML element description may be a direct child of the specified element. Returns 1 if allowed; 0 otherwise.

parent: HTML parent element
elt: HTML element

Macro htmlRequiredAttrs

#define htmlRequiredAttrs(elt);

Returns the attributes required for the specified element.

elt: HTML element

Typedef htmlDocPtr

xmlDocPtr htmlDocPtr;


Structure htmlElemDesc

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;


Typedef htmlElemDescPtr

htmlElemDesc * htmlElemDescPtr;


Structure htmlEntityDesc

struct _htmlEntityDesc {
    unsigned int	value	: the UNICODE value for the character
    const char *	name	: The entity name
    const char *	desc	: the description
} htmlEntityDesc;


Typedef htmlEntityDescPtr

htmlEntityDesc * htmlEntityDescPtr;


Typedef htmlNodePtr

xmlNodePtr htmlNodePtr;


Typedef htmlParserCtxt

xmlParserCtxt htmlParserCtxt;


Typedef htmlParserCtxtPtr

xmlParserCtxtPtr htmlParserCtxtPtr;


Typedef htmlParserInput

xmlParserInput htmlParserInput;


Typedef htmlParserInputPtr

xmlParserInputPtr htmlParserInputPtr;


Typedef htmlParserNodeInfo

xmlParserNodeInfo htmlParserNodeInfo;


Enum htmlParserOption

enum htmlParserOption {
    HTML_PARSE_RECOVER = 1 /* Relaxed parsing */
    HTML_PARSE_NODEFDTD = 4 /* do not default a doctype if not found */
    HTML_PARSE_NOERROR = 32 /* suppress error reports */
    HTML_PARSE_NOWARNING = 64 /* suppress warning reports */
    HTML_PARSE_PEDANTIC = 128 /* pedantic error reporting */
    HTML_PARSE_NOBLANKS = 256 /* remove blank nodes */
    HTML_PARSE_NONET = 2048 /* Forbid network access */
    HTML_PARSE_NOIMPLIED = 8192 /* Do not add implied html/body... elements */
    HTML_PARSE_COMPACT = 65536 /* compact small text nodes */
    HTML_PARSE_IGNORE_ENC = 2097152 /*  ignore internal document encoding hint */
};


Typedef htmlSAXHandler

xmlSAXHandler htmlSAXHandler;


Typedef htmlSAXHandlerPtr

xmlSAXHandlerPtr htmlSAXHandlerPtr;


Enum htmlStatus

enum htmlStatus {
    HTML_NA = 0 /* something we don't check at all */
    HTML_INVALID = 1
    HTML_DEPRECATED = 2
    HTML_VALID = 4
    HTML_REQUIRED = 12 /*  VALID bit set so ( & HTML_VALID ) is TRUE */
};


UTF8ToHtml ()

int	UTF8ToHtml			(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen)

Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.

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
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.

htmlAttrAllowed ()

htmlStatus	htmlAttrAllowed		(const htmlElemDesc * elt, 
const xmlChar * attr,
int legacy)

Checks whether an attribute is valid for an element Has full knowledge of Required and Deprecated attributes

elt: HTML element
attr: HTML attribute
legacy: whether to allow deprecated attributes
Returns: one of HTML_REQUIRED, HTML_VALID, HTML_DEPRECATED, HTML_INVALID

htmlAutoCloseTag ()

int	htmlAutoCloseTag		(htmlDocPtr doc, 
const xmlChar * name,
htmlNodePtr elem)

The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if the element or one of it's children would autoclose the given tag.

doc: the HTML document
name: The tag name
elem: the HTML element
Returns: 1 if autoclose, 0 otherwise

htmlCreateMemoryParserCtxt ()

htmlParserCtxtPtr	htmlCreateMemoryParserCtxt	(const char * buffer, 
int size)

Create a parser context for an HTML in-memory document.

buffer: a pointer to a char array
size: the size of the array
Returns: the new parser context or NULL

htmlCreatePushParserCtxt ()

htmlParserCtxtPtr	htmlCreatePushParserCtxt	(htmlSAXHandlerPtr sax, 
void * user_data,
const char * chunk,
int size,
const char * filename,
xmlCharEncoding enc)

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.

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
Returns: the new parser context or NULL

htmlCtxtReadDoc ()

htmlDocPtr	htmlCtxtReadDoc		(htmlParserCtxtPtr ctxt, 
const xmlChar * cur,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context

ctxt: an HTML parser context
cur: a pointer to a zero terminated string
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlCtxtReadFd ()

htmlDocPtr	htmlCtxtReadFd		(htmlParserCtxtPtr ctxt, 
int fd,
const char * URL,
const char * encoding,
int options)

parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context

ctxt: an HTML parser context
fd: an open file descriptor
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlCtxtReadFile ()

htmlDocPtr	htmlCtxtReadFile	(htmlParserCtxtPtr ctxt, 
const char * filename,
const char * encoding,
int options)

parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context

ctxt: an HTML parser context
filename: a file or URL
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlCtxtReadIO ()

htmlDocPtr	htmlCtxtReadIO		(htmlParserCtxtPtr ctxt, 
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)

parse an HTML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context

ctxt: an HTML parser context
ioread: an I/O read function
ioclose: an I/O close function
ioctx: an I/O handler
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlCtxtReadMemory ()

htmlDocPtr	htmlCtxtReadMemory	(htmlParserCtxtPtr ctxt, 
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context

ctxt: an HTML parser context
buffer: a pointer to a char array
size: the size of the array
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlCtxtReset ()

void	htmlCtxtReset			(htmlParserCtxtPtr ctxt)

Reset a parser context

ctxt: an HTML parser context

htmlCtxtUseOptions ()

int	htmlCtxtUseOptions		(htmlParserCtxtPtr ctxt, 
int options)

Applies the options to the parser context

ctxt: an HTML parser context
options: a combination of htmlParserOption(s)
Returns: 0 in case of success, the set of unknown or unimplemented options in case of error.

htmlElementAllowedHere ()

int	htmlElementAllowedHere		(const htmlElemDesc * parent, 
const xmlChar * elt)

Checks whether an HTML element may be a direct child of a parent element. Note - doesn't check for deprecated elements

parent: HTML parent element
elt: HTML element
Returns: 1 if allowed; 0 otherwise.

htmlElementStatusHere ()

htmlStatus	htmlElementStatusHere	(const htmlElemDesc * parent, 
const htmlElemDesc * elt)

Checks whether an HTML element may be a direct child of a parent element. and if so whether it is valid or deprecated.

parent: HTML parent element
elt: HTML element
Returns: one of HTML_VALID, HTML_DEPRECATED, HTML_INVALID

htmlEncodeEntities ()

int	htmlEncodeEntities		(unsigned char * out, 
int * outlen,
const unsigned char * in,
int * inlen,
int quoteChar)

Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.

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.
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.

htmlEntityLookup ()

const htmlEntityDesc *	htmlEntityLookup	(const xmlChar * name)

Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.

name: the entity name
Returns: the associated htmlEntityDescPtr if found, NULL otherwise.

htmlEntityValueLookup ()

const htmlEntityDesc *	htmlEntityValueLookup	(unsigned int value)

Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.

value: the entity's unicode value
Returns: the associated htmlEntityDescPtr if found, NULL otherwise.

htmlFreeParserCtxt ()

void	htmlFreeParserCtxt		(htmlParserCtxtPtr ctxt)

Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed.

ctxt: an HTML parser context

htmlHandleOmittedElem ()

int	htmlHandleOmittedElem		(int val)

Set and return the previous value for handling HTML omitted tags.

val: int 0 or 1
Returns: the last value for 0 for no handling, 1 for auto insertion.

htmlIsAutoClosed ()

int	htmlIsAutoClosed		(htmlDocPtr doc, 
htmlNodePtr elem)

The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it's child

doc: the HTML document
elem: the HTML element
Returns: 1 if autoclosed, 0 otherwise

htmlIsScriptAttribute ()

int	htmlIsScriptAttribute		(const xmlChar * name)

Check if an attribute is of content type Script

name: an attribute name
Returns: 1 is the attribute is a script 0 otherwise

htmlNewParserCtxt ()

htmlParserCtxtPtr	htmlNewParserCtxt	(void)

Allocate and initialize a new parser context.

Returns: the htmlParserCtxtPtr or NULL in case of allocation error

htmlNodeStatus ()

htmlStatus	htmlNodeStatus		(const htmlNodePtr node, 
int legacy)

Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser)

node: an htmlNodePtr in a tree
legacy: whether to allow deprecated elements (YES is faster here for Element nodes)
Returns: for Element nodes, a return from htmlElementAllowedHere (if legacy allowed) or htmlElementStatusHere (otherwise). for Attribute nodes, a return from htmlAttrAllowed for other nodes, HTML_NA (no checks performed)

htmlParseCharRef ()

int	htmlParseCharRef		(htmlParserCtxtPtr ctxt)

parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'

ctxt: an HTML parser context
Returns: the value parsed (as an int)

htmlParseChunk ()

int	htmlParseChunk			(htmlParserCtxtPtr ctxt, 
const char * chunk,
int size,
int terminate)

Parse a Chunk of memory

ctxt: an HTML parser context
chunk: an char array
size: the size in byte of the chunk
terminate: last chunk indicator
Returns: zero if no error, the xmlParserErrors otherwise.

htmlParseDoc ()

htmlDocPtr	htmlParseDoc		(const xmlChar * cur, 
const char * encoding)

parse an HTML in-memory document and build a tree.

cur: a pointer to an array of xmlChar
encoding: a free form C string describing the HTML document encoding, or NULL
Returns: the resulting document tree

htmlParseDocument ()

int	htmlParseDocument		(htmlParserCtxtPtr ctxt)

parse an HTML document (and build a tree if using the standard SAX interface).

ctxt: an HTML parser context
Returns: 0, -1 in case of error. the parser context is augmented as a result of the parsing.

htmlParseElement ()

void	htmlParseElement		(htmlParserCtxtPtr ctxt)

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

ctxt: an HTML parser context

htmlParseEntityRef ()

const htmlEntityDesc *	htmlParseEntityRef	(htmlParserCtxtPtr ctxt, 
const xmlChar ** str)

parse an HTML ENTITY references [68] EntityRef ::= '&' Name ';'

ctxt: an HTML parser context
str: location to store the entity name
Returns: the associated htmlEntityDescPtr if found, or NULL otherwise, if non-NULL *str will have to be freed by the caller.

htmlParseFile ()

htmlDocPtr	htmlParseFile		(const char * filename, 
const char * encoding)

parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

filename: the filename
encoding: a free form C string describing the HTML document encoding, or NULL
Returns: the resulting document tree

htmlReadDoc ()

htmlDocPtr	htmlReadDoc		(const xmlChar * cur, 
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree.

cur: a pointer to a zero terminated string
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlReadFd ()

htmlDocPtr	htmlReadFd		(int fd, 
const char * URL,
const char * encoding,
int options)

parse an HTML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset.

fd: an open file descriptor
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlReadFile ()

htmlDocPtr	htmlReadFile		(const char * filename, 
const char * encoding,
int options)

parse an XML file from the filesystem or the network.

filename: a file or URL
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlReadIO ()

htmlDocPtr	htmlReadIO		(xmlInputReadCallback ioread, 
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)

parse an HTML document from I/O functions and source and build a tree.

ioread: an I/O read function
ioclose: an I/O close function
ioctx: an I/O handler
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlReadMemory ()

htmlDocPtr	htmlReadMemory		(const char * buffer, 
int size,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree.

buffer: a pointer to a char array
size: the size of the array
URL: the base URL to use for the document
encoding: the document encoding, or NULL
options: a combination of htmlParserOption(s)
Returns: the resulting document tree

htmlSAXParseDoc ()

htmlDocPtr	htmlSAXParseDoc		(const xmlChar * cur, 
const char * encoding,
htmlSAXHandlerPtr sax,
void * userData)

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.

cur: a pointer to an array of xmlChar
encoding: a free form C string describing the HTML document encoding, or NULL
sax: the SAX handler block
userData: if using SAX, this pointer will be provided on callbacks.
Returns: the resulting document tree unless SAX is NULL or the document is not well formed.

htmlSAXParseFile ()

htmlDocPtr	htmlSAXParseFile	(const char * filename, 
const char * encoding,
htmlSAXHandlerPtr sax,
void * userData)

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.

filename: the filename
encoding: a free form C string describing the HTML document encoding, or NULL
sax: the SAX handler block
userData: if using SAX, this pointer will be provided on callbacks.
Returns: the resulting document tree unless SAX is NULL or the document is not well formed.

htmlTagLookup ()

const htmlElemDesc *	htmlTagLookup	(const xmlChar * tag)

Lookup the HTML tag in the ElementTable

tag: The tag name in lowercase
Returns: the related htmlElemDescPtr or NULL if not found.

PK!eէbblibxml2-list.htmlnu[ list: lists interfaces

list

list - lists interfaces

this module implement the list support used in various place in the library.

Author(s): Gary Pennington <Gary.Pennington@uk.sun.com>

Synopsis

typedef struct _xmlLink xmlLink;
typedef xmlLink * xmlLinkPtr;
typedef struct _xmlList xmlList;
typedef xmlList * xmlListPtr;
void *	xmlLinkGetData			(xmlLinkPtr lk);
int	xmlListAppend			(xmlListPtr l, 
void * data); void xmlListClear (xmlListPtr l); int xmlListCopy (xmlListPtr cur,
const xmlListPtr old); xmlListPtr xmlListCreate (xmlListDeallocator deallocator,
xmlListDataCompare compare); typedef int xmlListDataCompare (const void * data0,
const void * data1); typedef void xmlListDeallocator (xmlLinkPtr lk); void xmlListDelete (xmlListPtr l); xmlListPtr xmlListDup (const xmlListPtr old); int xmlListEmpty (xmlListPtr l); xmlLinkPtr xmlListEnd (xmlListPtr l); xmlLinkPtr xmlListFront (xmlListPtr l); int xmlListInsert (xmlListPtr l,
void * data); void xmlListMerge (xmlListPtr l1,
xmlListPtr l2); void xmlListPopBack (xmlListPtr l); void xmlListPopFront (xmlListPtr l); int xmlListPushBack (xmlListPtr l,
void * data); int xmlListPushFront (xmlListPtr l,
void * data); int xmlListRemoveAll (xmlListPtr l,
void * data); int xmlListRemoveFirst (xmlListPtr l,
void * data); int xmlListRemoveLast (xmlListPtr l,
void * data); void xmlListReverse (xmlListPtr l); void * xmlListReverseSearch (xmlListPtr l,
void * data); void xmlListReverseWalk (xmlListPtr l,
xmlListWalker walker,
void * user); void * xmlListSearch (xmlListPtr l,
void * data); int xmlListSize (xmlListPtr l); void xmlListSort (xmlListPtr l); void xmlListWalk (xmlListPtr l,
xmlListWalker walker,
void * user); typedef int xmlListWalker (const void * data,
void * user);

Description

Details

Structure xmlLink

struct _xmlLink {
The content of this structure is not made public by the API.
} xmlLink;


Typedef xmlLinkPtr

xmlLink * xmlLinkPtr;


Structure xmlList

struct _xmlList {
The content of this structure is not made public by the API.
} xmlList;


Typedef xmlListPtr

xmlList * xmlListPtr;


Function type xmlListDataCompare

int	xmlListDataCompare		(const void * data0, 
const void * data1)

Callback function used to compare 2 data.

data0: the first data
data1: the second data
Returns: 0 is equality, -1 or 1 otherwise depending on the ordering.

Function type xmlListDeallocator

void	xmlListDeallocator		(xmlLinkPtr lk)

Callback function used to free data from a list.

lk: the data to deallocate

Function type xmlListWalker

int	xmlListWalker			(const void * data, 
void * user)

Callback function used when walking a list with xmlListWalk().

data: the data found in the list
user: extra user provided data to the walker
Returns: 0 to stop walking the list, 1 otherwise.

xmlLinkGetData ()

void *	xmlLinkGetData			(xmlLinkPtr lk)

See Returns.

lk: a link
Returns: a pointer to the data referenced from this link

xmlListAppend ()

int	xmlListAppend			(xmlListPtr l, 
void * data)

Insert data in the ordered list at the end for this value

l: a list
data: the data
Returns: 0 in case of success, 1 in case of failure

xmlListClear ()

void	xmlListClear			(xmlListPtr l)

Remove the all data in the list

l: a list

xmlListCopy ()

int	xmlListCopy			(xmlListPtr cur, 
const xmlListPtr old)

Move all the element from the old list in the new list

cur: the new list
old: the old list
Returns: 0 in case of success 1 in case of error

xmlListCreate ()

xmlListPtr	xmlListCreate		(xmlListDeallocator deallocator, 
xmlListDataCompare compare)

Create a new list

deallocator: an optional deallocator function
compare: an optional comparison function
Returns: the new list or NULL in case of error

xmlListDelete ()

void	xmlListDelete			(xmlListPtr l)

Deletes the list and its associated data

l: a list

xmlListDup ()

xmlListPtr	xmlListDup		(const xmlListPtr old)

Duplicate the list

old: the list
Returns: a new copy of the list or NULL in case of error

xmlListEmpty ()

int	xmlListEmpty			(xmlListPtr l)

Is the list empty ?

l: a list
Returns: 1 if the list is empty, 0 if not empty and -1 in case of error

xmlListEnd ()

xmlLinkPtr	xmlListEnd		(xmlListPtr l)

Get the last element in the list

l: a list
Returns: the last element in the list, or NULL

xmlListFront ()

xmlLinkPtr	xmlListFront		(xmlListPtr l)

Get the first element in the list

l: a list
Returns: the first element in the list, or NULL

xmlListInsert ()

int	xmlListInsert			(xmlListPtr l, 
void * data)

Insert data in the ordered list at the beginning for this value

l: a list
data: the data
Returns: 0 in case of success, 1 in case of failure

xmlListMerge ()

void	xmlListMerge			(xmlListPtr l1, 
xmlListPtr l2)

include all the elements of the second list in the first one and clear the second list

l1: the original list
l2: the new list

xmlListPopBack ()

void	xmlListPopBack			(xmlListPtr l)

Removes the last element in the list

l: a list

xmlListPopFront ()

void	xmlListPopFront			(xmlListPtr l)

Removes the first element in the list

l: a list

xmlListPushBack ()

int	xmlListPushBack			(xmlListPtr l, 
void * data)

add the new data at the end of the list

l: a list
data: new data
Returns: 1 if successful, 0 otherwise

xmlListPushFront ()

int	xmlListPushFront		(xmlListPtr l, 
void * data)

add the new data at the beginning of the list

l: a list
data: new data
Returns: 1 if successful, 0 otherwise

xmlListRemoveAll ()

int	xmlListRemoveAll		(xmlListPtr l, 
void * data)

Remove the all instance associated to data in the list

l: a list
data: list data
Returns: the number of deallocation, or 0 if not found

xmlListRemoveFirst ()

int	xmlListRemoveFirst		(xmlListPtr l, 
void * data)

Remove the first instance associated to data in the list

l: a list
data: list data
Returns: 1 if a deallocation occurred, or 0 if not found

xmlListRemoveLast ()

int	xmlListRemoveLast		(xmlListPtr l, 
void * data)

Remove the last instance associated to data in the list

l: a list
data: list data
Returns: 1 if a deallocation occurred, or 0 if not found

xmlListReverse ()

void	xmlListReverse			(xmlListPtr l)

Reverse the order of the elements in the list

l: a list

xmlListReverseSearch ()

void *	xmlListReverseSearch		(xmlListPtr l, 
void * data)

Search the list in reverse order for an existing value of @data

l: a list
data: a search value
Returns: the value associated to @data or NULL in case of error

xmlListReverseWalk ()

void	xmlListReverseWalk		(xmlListPtr l, 
xmlListWalker walker,
void * user)

Walk all the element of the list in reverse order and apply the walker function to it

l: a list
walker: a processing function
user: a user parameter passed to the walker function

xmlListSearch ()

void *	xmlListSearch			(xmlListPtr l, 
void * data)

Search the list for an existing value of @data

l: a list
data: a search value
Returns: the value associated to @data or NULL in case of error

xmlListSize ()

int	xmlListSize			(xmlListPtr l)

Get the number of elements in the list

l: a list
Returns: the number of elements in the list or -1 in case of error

xmlListSort ()

void	xmlListSort			(xmlListPtr l)

Sort all the elements in the list

l: a list

xmlListWalk ()

void	xmlListWalk			(xmlListPtr l, 
xmlListWalker walker,
void * user)

Walk all the element of the first from first to last and apply the walker function to it

l: a list
walker: a processing function
user: a user parameter passed to the walker function

PK!X#UKKlibxml2-chvalid.htmlnu[ chvalid: Unicode character range checking

chvalid

chvalid - Unicode character range checking

this module exports interfaces for the character range validation APIs This file is automatically generated from the cvs source definition files using the genChRanges.py Python script

Author(s): William Brack <wbrack@mmm.com.hk>

Synopsis

#define xmlIsBaseCharQ(c);
#define xmlIsBaseChar_ch(c);
#define xmlIsBlankQ(c);
#define xmlIsBlank_ch(c);
#define xmlIsCharQ(c);
#define xmlIsChar_ch(c);
#define xmlIsCombiningQ(c);
#define xmlIsDigitQ(c);
#define xmlIsDigit_ch(c);
#define xmlIsExtenderQ(c);
#define xmlIsExtender_ch(c);
#define xmlIsIdeographicQ(c);
#define xmlIsPubidCharQ(c);
#define xmlIsPubidChar_ch(c);
typedef struct _xmlChLRange xmlChLRange;
typedef xmlChLRange * xmlChLRangePtr;
typedef struct _xmlChRangeGroup xmlChRangeGroup;
typedef xmlChRangeGroup * xmlChRangeGroupPtr;
typedef struct _xmlChSRange xmlChSRange;
typedef xmlChSRange * xmlChSRangePtr;
int	xmlCharInRange			(unsigned int val, 
const xmlChRangeGroup * rptr); int xmlIsBaseChar (unsigned int ch); int xmlIsBlank (unsigned int ch); int xmlIsChar (unsigned int ch); int xmlIsCombining (unsigned int ch); int xmlIsDigit (unsigned int ch); int xmlIsExtender (unsigned int ch); int xmlIsIdeographic (unsigned int ch); int xmlIsPubidChar (unsigned int ch);

Description

Details

Macro xmlIsBaseCharQ

#define xmlIsBaseCharQ(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsBaseChar_ch

#define xmlIsBaseChar_ch(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsBlankQ

#define xmlIsBlankQ(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsBlank_ch

#define xmlIsBlank_ch(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsCharQ

#define xmlIsCharQ(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsChar_ch

#define xmlIsChar_ch(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsCombiningQ

#define xmlIsCombiningQ(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsDigitQ

#define xmlIsDigitQ(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsDigit_ch

#define xmlIsDigit_ch(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsExtenderQ

#define xmlIsExtenderQ(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsExtender_ch

#define xmlIsExtender_ch(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsIdeographicQ

#define xmlIsIdeographicQ(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsPubidCharQ

#define xmlIsPubidCharQ(c);

Automatically generated by genChRanges.py

c: char to validate

Macro xmlIsPubidChar_ch

#define xmlIsPubidChar_ch(c);

Automatically generated by genChRanges.py

c: char to validate

Structure xmlChLRange

struct _xmlChLRange {
    unsigned int	low
    unsigned int	high
} xmlChLRange;


Typedef xmlChLRangePtr

xmlChLRange * xmlChLRangePtr;


Structure xmlChRangeGroup

struct _xmlChRangeGroup {
    int	nbShortRange
    int	nbLongRange
    const xmlChSRange *	shortRange	: points to an array of ranges
    const xmlChLRange *	longRange
} xmlChRangeGroup;


Typedef xmlChRangeGroupPtr

xmlChRangeGroup * xmlChRangeGroupPtr;


Structure xmlChSRange

struct _xmlChSRange {
    unsigned short	low
    unsigned short	high
} xmlChSRange;


Typedef xmlChSRangePtr

xmlChSRange * xmlChSRangePtr;


Variable xmlIsBaseCharGroup

const xmlChRangeGroup xmlIsBaseCharGroup;


Variable xmlIsCharGroup

const xmlChRangeGroup xmlIsCharGroup;


Variable xmlIsCombiningGroup

const xmlChRangeGroup xmlIsCombiningGroup;


Variable xmlIsDigitGroup

const xmlChRangeGroup xmlIsDigitGroup;


Variable xmlIsExtenderGroup

const xmlChRangeGroup xmlIsExtenderGroup;


Variable xmlIsIdeographicGroup

const xmlChRangeGroup xmlIsIdeographicGroup;


Variable xmlIsPubidChar_tab

const unsigned charxmlIsPubidChar_tab[256] xmlIsPubidChar_tab;


xmlCharInRange ()

int	xmlCharInRange			(unsigned int val, 
const xmlChRangeGroup * rptr)

Does a binary search of the range table to determine if char is valid

val: character to be validated
rptr: pointer to range to be used to validate
Returns: true if character valid, false otherwise

xmlIsBaseChar ()

int	xmlIsBaseChar			(unsigned int ch)

This function is DEPRECATED. Use xmlIsBaseChar_ch or xmlIsBaseCharQ instead

ch: character to validate
Returns: true if argument valid, false otherwise

xmlIsBlank ()

int	xmlIsBlank			(unsigned int ch)

This function is DEPRECATED. Use xmlIsBlank_ch or xmlIsBlankQ instead

ch: character to validate
Returns: true if argument valid, false otherwise

xmlIsChar ()

int	xmlIsChar			(unsigned int ch)

This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ instead

ch: character to validate
Returns: true if argument valid, false otherwise

xmlIsCombining ()

int	xmlIsCombining			(unsigned int ch)

This function is DEPRECATED. Use xmlIsCombiningQ instead

ch: character to validate
Returns: true if argument valid, false otherwise

xmlIsDigit ()

int	xmlIsDigit			(unsigned int ch)

This function is DEPRECATED. Use xmlIsDigit_ch or xmlIsDigitQ instead

ch: character to validate
Returns: true if argument valid, false otherwise

xmlIsExtender ()

int	xmlIsExtender			(unsigned int ch)

This function is DEPRECATED. Use xmlIsExtender_ch or xmlIsExtenderQ instead

ch: character to validate
Returns: true if argument valid, false otherwise

xmlIsIdeographic ()

int	xmlIsIdeographic		(unsigned int ch)

This function is DEPRECATED. Use xmlIsIdeographicQ instead

ch: character to validate
Returns: true if argument valid, false otherwise

xmlIsPubidChar ()

int	xmlIsPubidChar			(unsigned int ch)

This function is DEPRECATED. Use xmlIsPubidChar_ch or xmlIsPubidCharQ instead

ch: character to validate
Returns: true if argument valid, false otherwise

PK!>㮆libxml2-config.cmakenu[PK!$J libxml/tree.hnu[PK!e  libxml/list.hnu[PK!@hԇUlibxml/xmlstring.hnu[PK!bc libxml/SAX2.hnu[PK!Llibxml/xmlschemas.hnu[PK!Qulibxml/xmlmodule.hnu[PK!L! ! libxml/xmlsave.hnu[PK!<   libxml/pattern.hnu[PK!HftKKOlibxml/xpathInternals.hnu[PK!*Lh h /alibxml/uri.hnu[PK!klibxml/xmlschemastypes.hnu[PK!libxml/schematron.hnu[PK!f?tthlibxml/xmlautomata.hnu[PK! .nn libxml/encoding.hnu[PK!#S))Ͽlibxml/xmlIO.hnu[PK!ڃ libxml/hash.hnu[PK! libxml/threads.hnu[PK!)$$ libxml/HTMLparser.hnu[PK! Ř,,0libxml/nanoftp.hnu[PK!1B/{{,Alibxml/relaxng.hnu[PK!W44 Xlibxml/dict.hnu[PK!XM5M5X`libxml/valid.hnu[PK!6SSlibxml/xmlwriter.hnu[PK!M⻿DD6libxml/parserInternals.hnu[PK!, ?1?1=.libxml/xmlreader.hnu[PK!䥽;;_libxml/xmlexports.hnu[PK!TI''>libxml/HTMLtree.hnu[PK!:-5  libxml/debugXML.hnu[PK!UT ' '_libxml/xmlunicode.hnu[PK!`[8[8libxml/globals.hnu[PK!P!渚FMlibxml/entities.hnu[PK!DCC `libxml/parser.hnu[PK!䤔WWlibxml/xmlmemory.hnu[PK!w (libxml/SAX.hnu[PK!< pfpf%libxml/schemasInternals.hnu[PK!Qlibxml/xpointer.hnu[PK!{A{Alibxml/xpath.hnu[PK! x9 hlibxml/xmlversion.hnu[PK!m**libxml/xmlerror.hnu[PK!#-- - libxml/c14n.hnu[PK!ks>~~dlibxml2-SAX.htmlnu[PK!G]]"/libxml2-HTMLtree.htmlnu[PK! (Jlibxml2-xmlautomata.htmlnu[PK!w-libxml2-xmlmodule.htmlnu[PK!+~qq 1libxml2-encoding.htmlnu[PK!,I"libxml2-globals.htmlnu[PK!^^e]]d- libxml2-xpath.htmlnu[PK!((88 ! index.htmlnu[PK!Ȉ@@u/ libxml2-schematron.htmlnu[PK!Szp libxml2-debugXML.htmlnu[PK!cII libxml2-xmlstring.htmlnu[PK!ߚ>y libxml2-xmlwriter.htmlnu[PK!\V\Vs/ libxml2-nanoftp.htmlnu[PK!Hkl\\ libxml2-xmlregexp.htmlnu[PK!G\?\?(libxml2-nanohttp.htmlnu[PK!qSy3y3Vhlibxml2-c14n.htmlnu[PK! ^^libxml2-xmlmemory.htmlnu[PK!<1kAAplibxml2-xlink.htmlnu[PK!|<home.pngnu[PK!ӌ$^NNW?libxml2-xmlschemas.htmlnu[PK!Zfflibxml2-parser.htmlnu[PK!>?+Ylibxml2-catalog.htmlnu[PK!h>?w4w4libxml2-xpathInternals.htmlnu[PK!E/qqlibxml2-xmlunicode.htmlnu[PK!.ii:_libxml2-valid.htmlnu[PK!CZ up.pngnu[PK!Dleft.pngnu[PK!Eybyblibxml2-xpointer.htmlnu[PK!ErFlibxml2-tree.htmlnu[PK!lk 3right.pngnu[PK!z`;|IIDlibxml2-xmlerror.htmlnu[PK!e%WWL*libxml2-parserInternals.htmlnu[PK!e+ZZlibxml2-schemasInternals.htmlnu[PK!xy libxml2-SAX2.htmlnu[PK!ARRj libxml2-hash.htmlnu[PK!I44 F!style.cssnu[PK!! jJ!libxml2-relaxng.htmlnu[PK!HH!libxml2-xmlversion.htmlnu[PK!uX?8?8'"libxml2-xmlsave.htmlnu[PK!@5252T"libxml2-threads.htmlnu[PK!"G"#"libxml2.devhelp2nu[PK! 6 Ru(general.htmlnu[PK!"#XXJ(libxml2-entities.htmlnu[PK!9?  =(libxml2-xmlexports.htmlnu[PK!3SK<<(libxml2-xinclude.htmlnu[PK!h6~+)libxml2-xmlschemastypes.htmlnu[PK!55)libxml2-dict.htmlnu[PK!@7"*libxml2-xmlIO.htmlnu[PK!vn4*libxml2-xmlreader.htmlnu[PK!tIII,libxml2-pattern.htmlnu[PK!.cFcFD,libxml2-uri.htmlnu[PK!ZnAA'-libxml2-HTMLparser.htmlnu[PK!eէbbo .libxml2-list.htmlnu[PK!X#UKKk.libxml2-chvalid.htmlnu[PKeeh .