diff --git a/ChangeLog b/ChangeLog index 37094c46..79d16fef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Fri Jun 30 11:19:59 CEST 2000 Daniel Veillard + + * win32config.h.in: updated + * xmlversion.h.in: crap forgot to update this, this mean 2.1.0 + lacks iconv support :-( need to release 2.1.1 + * configure.in: release 2.1.1 + * HTMLparser: fixed bug #14784 + * xpath.c HTMLparser.c encoding.c parser.c: fix warning raised + by Windows compiler + * HTMLparser.c SAX.c HTMLtree.h tree.h: create HTML document in + the SAX startDocument() callback. + * TODO: updated + +Thu Jun 29 12:06:48 CEST 2000 Daniel Veillard + + * added xmlStopParser() + Wed Jun 28 23:10:26 MEST 2000 Daniel Veillard * configure.in: 2.1.0 prerelease diff --git a/HTMLparser.c b/HTMLparser.c index cfd65bd7..472d2cf6 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -155,6 +155,8 @@ PUSH_AND_POP(extern, xmlChar*, name) void htmlNextChar(htmlParserCtxtPtr ctxt) { + if (ctxt->instate == XML_PARSER_EOF) + return; if ((*ctxt->input->cur == 0) && (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) { xmlPopInput(ctxt); @@ -1024,7 +1026,7 @@ htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, /* * Ok loop until we reach one of the ending char or a size limit. */ - while ((nbchars < max) && (CUR != end) && + while ((nbchars < (int) max) && (CUR != end) && (CUR != end2) && (CUR != end3)) { if (CUR == '&') { @@ -1421,7 +1423,8 @@ htmlParseHTMLName(htmlParserCtxtPtr ctxt) { (CUR != ':')) return(NULL); while ((i < HTML_PARSER_BUFFER_SIZE) && - ((IS_LETTER(CUR)) || (IS_DIGIT(CUR)))) { + ((IS_LETTER(CUR)) || (IS_DIGIT(CUR)) || + (CUR == ':') || (CUR == '_'))) { if ((CUR >= 'A') && (CUR <= 'Z')) loc[i] = CUR + 0x20; else loc[i] = CUR; i++; @@ -2360,7 +2363,7 @@ failed: if (atts[i] != NULL) xmlFree((xmlChar *) atts[i]); } - xmlFree(atts); + xmlFree((void *) atts); } if (name != NULL) xmlFree(name); } @@ -2824,8 +2827,6 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) { */ while ((CUR == '<') && (NXT(1) == '!') && (NXT(2) == '-') && (NXT(3) == '-')) { - if (ctxt->myDoc == NULL) - ctxt->myDoc = htmlNewDoc(NULL, NULL); htmlParseComment(ctxt); SKIP_BLANKS; } diff --git a/HTMLtree.h b/HTMLtree.h index 9378ba4c..d41d8d9b 100644 --- a/HTMLtree.h +++ b/HTMLtree.h @@ -12,6 +12,7 @@ #include #include +#include #ifdef __cplusplus @@ -27,6 +28,7 @@ void htmlDocDump(FILE *f, xmlDocPtr cur); int htmlSaveFile(const char *filename, xmlDocPtr cur); void htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur); void htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur); +htmlDocPtr htmlNewDoc(const xmlChar *URI, const xmlChar *ExternalID); #ifdef __cplusplus } diff --git a/SAX.c b/SAX.c index ee3af393..68e2d316 100644 --- a/SAX.c +++ b/SAX.c @@ -574,13 +574,18 @@ startDocument(void *ctx) #ifdef DEBUG_SAX fprintf(stderr, "SAX.startDocument()\n"); #endif - doc = ctxt->myDoc = xmlNewDoc(ctxt->version); - if (doc != NULL) { - if (ctxt->encoding != NULL) - doc->encoding = xmlStrdup(ctxt->encoding); - else - doc->encoding = NULL; - doc->standalone = ctxt->standalone; + if (ctxt->html) { + if (ctxt->myDoc == NULL) + ctxt->myDoc = htmlNewDoc(NULL, NULL); + } else { + doc = ctxt->myDoc = xmlNewDoc(ctxt->version); + if (doc != NULL) { + if (ctxt->encoding != NULL) + doc->encoding = xmlStrdup(ctxt->encoding); + else + doc->encoding = NULL; + doc->standalone = ctxt->standalone; + } } } diff --git a/TODO b/TODO index 8545e1a6..8b1bc463 100644 --- a/TODO +++ b/TODO @@ -30,7 +30,7 @@ TODO: - fix --disable-corba configure switch handling, and use XML_WITHOUT_CORBA not WITHOUT_CORBA flag - the html parser should add and if they don't exist -- Command to force the parser to stop parsing and ignore the rest of the file. + started, not finished. TODO: ===== @@ -96,6 +96,8 @@ EXTENSIONS: Done: ===== +- Command to force the parser to stop parsing and ignore the rest of the file. + xmlStopParser() should allow this - support for HTML empty attributes like
- plugged iconv() in for support of a large set of encodings. - xmlSwitchToEncoding() rewrite done diff --git a/configure.in b/configure.in index 3ef84fb7..7c253234 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AM_CONFIG_HEADER(config.h) LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=1 -LIBXML_MICRO_VERSION=0 +LIBXML_MICRO_VERSION=1 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION diff --git a/doc/html/book1.html b/doc/html/book1.html index f23eca27..e066da65 100644 --- a/doc/html/book1.html +++ b/doc/html/book1.html @@ -4,16 +4,13 @@ >Gnome XML Library Reference Manual

    Daniel.Veillard@w3.org
  

debugXML

debugXML

debugXML

Name

debugXML -- 
debugXML —

Synopsis

node, int depth); void xmlDebugDumpDocumentHead (FILE *output, + xmlDocPtr doc); +void xmlDebugDumpDocument (xmlDocPtr doc); doc); +void xmlDebugDumpEntities (FILE *output, + xmlDocPtr doc); +void xmlLsOneNode (FILE *output, + xmlNodePtr node); +char* (*xmlShellReadlineFunc) (char *prompt); +struct xmlShellCtxt; +typedef xmlShellCtxtPtr; +int (*xmlShellCmd) (xmlShellCtxtPtr ctxt, + char *arg, + xmlNodePtr node, + xmlNodePtr node2); +void xmlShell (xmlDocPtr doc, + char *filename, + xmlShellReadlineFunc input, + FILE *output);

Description

Details







xmlDebugDumpDocumentHead ()

void        xmlDebugDumpDocumentHead        (FILE *output,
+                                             xmlDocPtr doc);

output : 
doc : 



xmlDebugDumpEntities ()

void        xmlDebugDumpEntities            (FILE *output,
+                                             xmlDocPtr doc);

output : 
doc : 


xmlLsOneNode ()

void        xmlLsOneNode                    (FILE *output,
+                                             xmlNodePtr node);

output : 
node : 


xmlShellReadlineFunc ()

char*       (*xmlShellReadlineFunc)         (char *prompt);

prompt : 
Returns : 


struct xmlShellCtxt

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


xmlShellCtxtPtr

typedef xmlShellCtxt *xmlShellCtxtPtr;


xmlShellCmd ()

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

ctxt : 
arg : 
node : 
node2 : 
Returns : 


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*

Name

encoding -- 
encoding —

Synopsis

*xmlCharEncodingInputFunc) (unsigned char *out, - int outlen, + int *outlen, unsigned char *in, int *inlen); int (*xmlCharEncodingOutputFunc) (unsigned char *out, - int outlen, + int *outlen, unsigned char *in, int *inlen); +struct xmlCharEncodingHandler; typedef xmlCharEncodingHandlerPtr; void xmlInitCharEncodingHandlers (void); +void xmlCleanupCharEncodingHandlers (void); +void xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); xmlCharEncoding xmlDetectCharEncoding (unsigned char *in, + int len); +xmlCharEncoding xmlParseCharEncoding (const char *name); +const char* xmlGetCharEncodingName (xmlCharEncoding enc); +xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler (const char *name); -xmlCharEncoding xmlDetectCharEncoding (unsigned char *in, - int len); -xmlCharEncoding xmlParseCharEncoding (const char *name); -void xmlInitCharEncodingHandlers (void);xmlCheckUTF8 (unsigned char *utf); +int xmlCharEncOutFunc (xmlCharEncodingHandler *handler, + xmlBufferPtr out, + xmlBufferPtr in); +int xmlCharEncInFunc (xmlCharEncodingHandler *handler, + xmlBufferPtr out, + xmlBufferPtr in); +int xmlCharEncFirstLine (xmlCharEncodingHandler *handler, + xmlBufferPtr out, + xmlBufferPtr in); +int xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);

Description

Details


int         (*xmlCharEncodingInputFunc)     (unsigned char *out,
-                                             int outlen,
+                                             int *outlen,
                                              unsigned char *in,
                                              int *inlen);

int         (*xmlCharEncodingOutputFunc)    (unsigned char *out,
-                                             int outlen,
+                                             int *outlen,
                                              unsigned char *in,
                                              int *inlen);

xmlCharEncodingHandlerPtr

struct xmlCharEncodingHandler

struct xmlCharEncodingHandler {
+    char                       *name;
+    xmlCharEncodingInputFunc   input;
+    xmlCharEncodingOutputFunc  output;
+#ifdef LIBXML_ICONV_ENABLED
+    iconv_t                    iconv_in;
+    iconv_t                    iconv_out;
+#endif /* LIBXML_ICONV_ENABLED */
+};


xmlCharEncodingHandlerPtr

typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;


xmlInitCharEncodingHandlers ()

void        xmlInitCharEncodingHandlers     (void);

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.


xmlCleanupCharEncodingHandlers ()

void        xmlCleanupCharEncodingHandlers  (void);

Cleanup the memory allocated for the char encoding support, it +unregisters all the encoding handlers.


  the xmlCharEncodingHandlerPtr handler block


xmlDetectCharEncoding ()

xmlCharEncoding xmlDetectCharEncoding       (unsigned char *in,
+                                             int len);

Guess the encoding of the entity using the first bytes of the entity content +accordingly of 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 +4 bytes long.
len : pointer to the length of the buffer
Returns :one of the XML_CHAR_ENCODING_... values.


xmlParseCharEncoding ()

xmlCharEncoding xmlParseCharEncoding        (const char *name);

Conpare the string to the known 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.


xmlGetCharEncodingName ()

const char* xmlGetCharEncodingName          (xmlCharEncoding enc);

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

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


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



xmlDetectCharEncoding ()

xmlCheckUTF8 ()

xmlCharEncoding xmlDetectCharEncoding       (unsigned char *in,
-                                             int len);
int xmlCheckUTF8 (unsigned char *utf);

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

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 maxiumum size, but does not check for +0x10ffff maximum value.

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


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.

  an xmlBuffer for the inputthe 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
handler : char enconding transformation data structure
out : an xmlBuffer for the output.
in :
len : 
 


xmlParseCharEncoding ()

xmlCharEncInFunc ()

xmlCharEncoding xmlParseCharEncoding        (const char *name);
int xmlCharEncInFunc (xmlCharEncodingHandler *handler, + xmlBufferPtr out, + xmlBufferPtr in);

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

Generic front-end for the encoding handler input function

namehandler :  char enconding transformation data structureout : an xmlBuffer for the output.in : an xmlBuffer for the input 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


xmlInitCharEncodingHandlers ()

xmlCharEncFirstLine ()

void        xmlInitCharEncodingHandlers     (void);
int xmlCharEncFirstLine (xmlCharEncodingHandler *handler, + xmlBufferPtr out, + xmlBufferPtr in);

Initialize the char encoding support, it registers the default -encoding supported. -NOTE: while public theis function usually don't need to be called -in normal processing.

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

handler : char enconding 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


xmlCharEncCloseFunc ()

int         xmlCharEncCloseFunc             (xmlCharEncodingHandler *handler);

Generic front-end for hencoding handler close function

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

entities

entities

entities

Name

entities -- 
entities —

Synopsis

-#define XML_INTERNAL_GENERAL_ENTITY -#define XML_EXTERNAL_GENERAL_PARSED_ENTITY -#define XML_EXTERNAL_GENERAL_UNPARSED_ENTITY -#define XML_INTERNAL_PARAMETER_ENTITY -#define XML_EXTERNAL_PARAMETER_ENTITY -#define XML_INTERNAL_PREDEFINED_ENTITY +enum xmlEntityType; +struct xmlEntity; typedef xmlEntityPtrXML_MIN_ENTITIES_TABLE +struct xmlEntitiesTable; typedef xmlEntitiesTablePtrxmlChar *input); xmlChar* xmlEncodeSpecialChars (xmlDocPtr doc, + const xmlChar *input); +xmlEntitiesTablePtr xmlEntitiesTablePtr table); table); +void xmlDumpEntityDecl (xmlBufferPtr buf, + xmlEntityPtr ent); +void xmlCleanupPredefinedEntities (void); +int xmlEntityAddReference (xmlEntityPtr ent, + const xmlChar *to);

Description

Details

XML_INTERNAL_GENERAL_ENTITY

enum xmlEntityType

#define XML_INTERNAL_GENERAL_ENTITY		1
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;

XML_EXTERNAL_GENERAL_PARSED_ENTITY

struct xmlEntity

#define XML_EXTERNAL_GENERAL_PARSED_ENTITY	2
struct xmlEntity { +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_ENTITY_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 */ + + 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 */ + +#ifdef WITH_EXTRA_ENT_DETECT + /* Referenced entities name stack */ + xmlChar *ent; /* Current parsed Node */ + int entNr; /* Depth of the parsing stack */ + int entMax; /* Max depth of the parsing stack */ + xmlChar * *entTab; /* array of nodes */ +#endif +};

XML_EXTERNAL_GENERAL_UNPARSED_ENTITY

#define XML_EXTERNAL_GENERAL_UNPARSED_ENTITY	3


XML_INTERNAL_PARAMETER_ENTITY

#define XML_INTERNAL_PARAMETER_ENTITY		4


XML_EXTERNAL_PARAMETER_ENTITY

#define XML_EXTERNAL_PARAMETER_ENTITY		5


XML_INTERNAL_PREDEFINED_ENTITY

#define XML_INTERNAL_PREDEFINED_ENTITY		6


xmlEntityPtr

typedef xmlEntity *xmlEntityPtr;


#define     XML_MIN_ENTITIES_TABLE
#define XML_MIN_ENTITIES_TABLE 32

xmlEntitiesTablePtr

struct xmlEntitiesTable

struct xmlEntitiesTable {
+    int nb_entities;		/* number of elements stored */
+    int max_entities;		/* maximum number of elements */
+    xmlEntityPtr *table;	/* the table of entities */
+};


xmlEntitiesTablePtr

typedef xmlEntitiesTable *xmlEntitiesTablePtr;


  the document  the entity name  the entity type XML_xxx_yyy_ENTITY  the entity external ID if available  the entity system ID if available  the entity content a pointer to the entity or NULL in case of error


Register a new entity for this document DTD.

Register a new entity for this document DTD external subset.

  the document  the entity name  the entity type XML_xxx_yyy_ENTITY  the entity external ID if available  the entity system ID if available  the entity content a pointer to the entity or NULL in case of error


  the entity name NULL if not, othervise the entity


  the document referencing the entity  the entity name A pointer to the entity structure or NULL if not found.


  the document referencing the entity  the entity name A pointer to the entity structure or NULL if not found.


  the document referencing the entity  the entity name A pointer to the entity structure or NULL if not found.


  the document containing the string  A string to convert to XML. A newly allocated string with the substitution done.


  the document containing the string  A string to convert to XML. A newly allocated string with the substitution done.


xmlEncodeSpecialChars ()

xmlChar*    xmlEncodeSpecialChars           (xmlDocPtr 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.


 the xmlEntitiesTablePtr just created or NULL in case of error.


  An entity table the new xmlEntitiesTablePtr or NULL in case of error.



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


xmlCleanupPredefinedEntities ()

void        xmlCleanupPredefinedEntities    (void);

Cleanup up the predefined entities table.


xmlEntityAddReference ()

int         xmlEntityAddReference           (xmlEntityPtr ent,
+                                             const xmlChar *to);

Function to register reuse of an existing entity from a (new) one +Used to keep track of references and detect cycles (well formedness +errors !).

ent : an existing entity
to : the entity name it's referencing
Returns : 0 if Okay, -1 in case of general error, 1 in case of loop +detection.

HTMLparser

HTMLparser

HTMLparser

Name

HTMLparser -- 
HTMLparser —

Synopsis

htmlNodePtr; -htmlElemDescPtrhtmlElemDesc; +typedef htmlElemDescPtr; +struct htmlEntityDesc; +typedef htmlEntityDescPtr; +htmlElemDescPtr htmlTagLookupxmlChar *tag); -htmlEntityDescPtrhtmlEntityDescPtr htmlEntityLookupxmlChar *name); -htmlEntityDescPtrhtmlIsAutoClosed (htmlDocPtr doc, + htmlNodePtr elem); +int htmlAutoCloseTag (htmlDocPtr doc, + const xmlChar *name, + htmlNodePtr elem); +htmlEntityDescPtr htmlParseEntityRefhtmlParseFile (const char *filename, - const char *encoding);htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); +htmlParserCtxtPtr htmlCreatePushParserCtxt (htmlSAXHandlerPtr sax, + void *user_data, + const char *chunk, + int size, + const char *filename, + xmlCharEncoding enc); +int htmlParseChunk (htmlParserCtxtPtr ctxt, + const char *chunk, + int size, + int terminate);

Description

Details

htmlParserCtxt

typedef xmlParserCtxt htmlParserCtxt;


htmlParserCtxtPtr

typedef xmlParserCtxtPtr htmlParserCtxtPtr;


htmlParserNodeInfo

typedef xmlParserNodeInfo htmlParserNodeInfo;


htmlSAXHandler

typedef xmlSAXHandler htmlSAXHandler;


htmlSAXHandlerPtr

typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;


htmlParserInput

typedef xmlParserInput htmlParserInput;


htmlParserInputPtr

typedef xmlParserInputPtr htmlParserInputPtr;


htmlDocPtr

typedef xmlDocPtr htmlDocPtr;


htmlNodePtr

typedef xmlNodePtr htmlNodePtr;


struct htmlElemDesc

struct htmlElemDesc {
+    const char *name;	/* The tag name */
+    int startTag;       /* Whether the start tag can be implied */
+    int endTag;         /* Whether the end tag can be implied */
+    int empty;          /* Is this an empty element ? */
+    int depr;           /* Is this a deprecated element ? */
+    int dtd;            /* 1: only in Loose DTD, 2: only Frameset one */
+    const char *desc;   /* the description */
+};


htmlElemDescPtr

typedef htmlElemDesc *htmlElemDescPtr;


struct htmlEntityDesc

struct htmlEntityDesc {
+    int value;		/* the UNICODE value for the character */
+    const char *name;	/* The entity name */
+    const char *desc;   /* the description */
+};


htmlEntityDescPtr

typedef htmlEntityDesc *htmlEntityDescPtr;


htmlElemDescPtrhtmlElemDescPtr htmlTagLookup               (const xmlChar   The tag name the related htmlElemDescPtr or NULL if not found.


htmlEntityDescPtrhtmlEntityDescPtr htmlEntityLookup          (const xmlChar  the entity name the associated htmlEntityDescPtr if found, NULL otherwise.


htmlIsAutoClosed ()

int         htmlIsAutoClosed                (htmlDocPtr doc,
+                                             htmlNodePtr elem);

The HTmL DtD allows a tag to implicitely 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


htmlAutoCloseTag ()

int         htmlAutoCloseTag                (htmlDocPtr doc,
+                                             const xmlChar *name,
+                                             htmlNodePtr elem);

The HTmL DtD allows a tag to implicitely 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


htmlEntityDescPtrhtmlEntityDescPtr htmlParseEntityRef        (htmlParserCtxtPtr   an HTML parser context   location to store the entity name the associated htmlEntityDescPtr if found, or NULL otherwise,
+if non-NULL *str will have to be freed by the caller.


  an HTML parser context the value parsed (as an int)


  an HTML parser context


  a pointer to an array of xmlChar  a free form C string describing the HTML document encoding, or NULL  the SAX handler block  if using SAX, this pointer will be provided on callbacks.  the resulting document tree


  a pointer to an array of xmlChar  a free form C string describing the HTML document encoding, or NULL the resulting document tree



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


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 +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
enc : an optional encoding
Returns :the new parser context or NULL


htmlParseChunk ()

int         htmlParseChunk                  (htmlParserCtxtPtr 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.

HTMLtree

HTMLtree

HTMLtree

Name

HTMLtree -- 
HTMLtree —

Synopsis

xmlDocPtr cur); +void htmlNodeDump (xmlBufferPtr buf, + xmlDocPtr doc, + xmlNodePtr cur); +void htmlNodeDumpFile (FILE *out, + xmlDocPtr doc, + xmlNodePtr cur);



#define     HTML_COMMENT_NODE
#define HTML_COMMENT_NODE XML_COMMENT_NODE

  the document  OUT: the memory pointer  OUT: the memory lenght



htmlNodeDump ()

void        htmlNodeDump                    (xmlBufferPtr buf,
+                                             xmlDocPtr doc,
+                                             xmlNodePtr cur);

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

buf : the HTML buffer output
doc : the document
cur : the current node


htmlNodeDumpFile ()

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

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

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

nanoftp

nanoftp

nanoftp

Name

nanoftp -- 
nanoftp —

Synopsis

Description

Details





  The URL used to initialize the context


  an FTP context


  an FTP server name  the port (use 21 if 0)


  the URL to the resource


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


  an FTP context -1 incase of error, 0 otherwise


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


  The proxy URL used to initialize the proxy context


  the proxy host name  the proxy port  the proxy user name  the proxy password  the type of proxy 1 for using SITE, 2 for USER ab


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


  an FTP context the code number


  an FTP context the code number, or 0



  an FTP context -1 incase of error, 0 otherwise


  an FTP context -1 incase of error, 0 otherwise


  an FTP context  the user callback  the user callback data  optional files to list -1 incase of error, 0 otherwise


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


  an FTP context  the user callback  the user callback data  the file to retrieve -1 incase of error, 0 otherwise


Synopsis

Description

Details










parser

parser

parser

Name

parser -- 
parser —
xmlChar*); +struct xmlParserInput; typedef xmlParserInputPtr; -xmlParserInputPtr (*xmlExternalEntityLoader) - (const char *URL, - const char *ID, - xmlParserCtxtPtr context); struct xmlParserNodeInfo; +typedef xmlParserNodeInfoPtr; struct xmlParserNodeInfoSeqxmlChar *SystemID); +void (*externalSubsetSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); xmlEntityPtr*hasExternalSubsetSAXFunc) (void *ctx); +struct xmlSAXHandler; typedef xmlSAXHandlerPtr; +xmlParserInputPtr (*xmlExternalEntityLoader) + (const char *URL, + const char *ID, + xmlParserCtxtPtr context); extern const char *xmlParserVersionxmlSubstituteEntitiesDefaultValue; +extern int xmlGetWarningsDefaultValue; +void xmlCleanupParser (void); int xmlParserInputReadxmlSubstituteEntitiesDefault (int val); +int xmlKeepBlanksDefault (int val); +void xmlStopParser (xmlParserCtxtPtr ctxt); xmlDocPtrxmlChar *cur, int recovery); +int xmlSAXUserParseFile (xmlSAXHandlerPtr sax, + void *user_data, + const char *filename); +int xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, + void *user_data, + char *buffer, + int size); xmlDocPtrxmlChar *SystemID); +int xmlParseBalancedChunkMemory (xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *string, + xmlNodePtr *list); +int xmlParseExternalEntity (xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *URL, + const xmlChar *ID, + xmlNodePtr *list); +void xmlDefaultSAXHandlerInit (void); +void htmlDefaultSAXHandlerInit (void); void xmlInitParserCtxtxmlParserCtxtPtr ctxt); void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); +void xmlSetupParserForBuffer (xmlChar *buffer, const char *filename); -void xmlDefaultSAXHandlerInit (void); -void htmlDefaultSAXHandlerInit (void); +xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur); +xmlParserCtxtPtr xmlCreatePushParserCtxt (xmlSAXHandlerPtr sax, + void *user_data, + const char *chunk, + int size, + const char *filename); +int xmlParseChunk (xmlParserCtxtPtr ctxt, + const char *chunk, + int size, + int terminate); +xmlParserCtxtPtr xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, + void *user_data, + xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + xmlCharEncoding enc); +xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt, + xmlParserInputBufferPtr input, + xmlCharEncoding enc); const xmlParserNodeInfo

Description

Details

#define     XML_DEFAULT_VERSION
#define XML_DEFAULT_VERSION "1.0"


xmlParserInputPtr


xmlExternalEntityLoader ()

struct xmlParserInput

xmlParserInputPtr (*xmlExternalEntityLoader)
-                                            (const char *URL,
-                                             const char *ID,
-                                             xmlParserCtxtPtr context);
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 teh file */ + const xmlChar *base; /* Base of the array to parse */ + const xmlChar *cur; /* Current char being parsed */ + int length; /* length if known */ + int line; /* Current line */ + int col; /* Current column */ + int 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 */ +};


xmlParserInputPtr

typedef xmlParserInput *xmlParserInputPtr;
URL : 
ID : 
context : 
Returns : 



xmlParserNodeInfoPtr

typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;



xmlParserNodeInfoSeqPtr

typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;




xmlParserCtxtPtr

typedef xmlParserCtxt *xmlParserCtxtPtr;



xmlSAXLocatorPtr

typedef xmlSAXLocator *xmlSAXLocatorPtr;




externalSubsetSAXFunc ()

void        (*externalSubsetSAXFunc)        (void *ctx,
+                                             const xmlChar *name,
+                                             const xmlChar *ExternalID,
+                                             const xmlChar *SystemID);

ctx : 
name : 
ExternalID : 
SystemID : 



























xmlSAXHandlerPtr

struct 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;
+    getParameterEntitySAXFunc getParameterEntity;
+    cdataBlockSAXFunc cdataBlock;
+    externalSubsetSAXFunc externalSubset;
+};


xmlSAXHandlerPtr

typedef xmlSAXHandler *xmlSAXHandlerPtr;


xmlExternalEntityLoader ()

xmlParserInputPtr (*xmlExternalEntityLoader)
+                                            (const char *URL,
+                                             const char *ID,
+                                             xmlParserCtxtPtr context);

URL : 
ID : 
context : 
Returns : 







xmlGetWarningsDefaultValue

extern int xmlGetWarningsDefaultValue;


xmlCleanupParser ()

void        xmlCleanupParser                (void);

Cleanup function for the XML parser. It tries to reclaim all +parsing related global memory allocated for the parser processing. +It doesn't deallocate any document related memory. Calling this +function should not prevent reusing the parser.


  an XML parser input  an indicative size for the lookahead the number of xmlChars read, or -1 in case of error, 0 indicate the +end of this entity


  an XML parser input  an indicative size for the lookahead the number of xmlChars read, or -1 in case of error, 0 indicate the +end of this entity


a strdup for array of xmlChar's

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'.

  the input xmlChar * a new xmlChar * or NULL


  the input xmlChar *  the len of cur a new xmlChar * or NULL


  the xmlChar * array (haystack)  the index of the first char (zero based)  the length of the substring the xmlChar * for the first occurence or NULL.


  the xmlChar * array  the xmlChar to search the xmlChar * for the first occurence or NULL.


  the xmlChar * array (haystack)  the xmlChar to search (needle) the xmlChar * for the first occurence or NULL.


  the first xmlChar *  the second xmlChar * the integer result of the comparison


  the first xmlChar *  the second xmlChar *  the max comparison length the integer result of the comparison


lenght of a xmlChar's string

length of a xmlChar's string

  the xmlChar * array the number of xmlChar contained in the ARRAY.


a strcat for array of xmlChar's

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'.

  the original xmlChar * array  the xmlChar * array added a new xmlChar * containing the concatenated string.


  the original xmlChar * array  the xmlChar * array added  the length of add a new xmlChar * containing the concatenated string.


  a pointer to an array of xmlChar the resulting document tree


  an pointer to a char array  the size of the array the resulting document tree



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 +ignorableWhitespace() 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 behaviour +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.


xmlStopParser ()

void        xmlStopParser                   (xmlParserCtxtPtr ctxt);

ctxt : 

  a pointer to an array of xmlChar the resulting document tree


  an pointer to a char array  the size of the array the resulting document tree


  the filename the resulting document tree


  an XML parser context 0, -1 in case of error. the parser context is augmented +as a result of the parsing.


  the SAX handler block  a pointer to an array of xmlChar  work in recovery mode, i.e. tries to read no Well Formed +documents 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,
+                                             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


  the SAX handler block  an pointer to a char array  the size of the array  work in recovery mode, i.e. tries to read not Well Formed +documents the resulting document tree


  the SAX handler block  the filename  work in recovery mode, i.e. tries to read no Well Formed +documents the resulting document tree



xmlParseBalancedChunkMemory ()

int         xmlParseBalancedChunkMemory     (xmlDocPtr doc,
+                                             xmlSAXHandlerPtr sax,
+                                             void *user_data,
+                                             int depth,
+                                             const xmlChar *string,
+                                             xmlNodePtr *list);


xmlParseExternalEntity ()

doc : 
sax : 
user_data : 
depth : 
string : 
list : 
int         xmlParseExternalEntity          (xmlDocPtr doc,
+                                             xmlSAXHandlerPtr sax,
+                                             void *user_data,
+                                             int depth,
+                                             const xmlChar *URL,
+                                             const xmlChar *ID,
+                                             xmlNodePtr *list);

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 bloc (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
list : 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


xmlDefaultSAXHandlerInit ()

void        xmlDefaultSAXHandlerInit        (void);

Initialize the default SAX handler


htmlDefaultSAXHandlerInit ()

void        htmlDefaultSAXHandlerInit       (void);

Initialize the default SAX handler


  an HTML parser context


  an XML parser context


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


  an XML parser context  a xmlChar * buffer  a file name


xmlDefaultSAXHandlerInit ()

xmlCreateDocParserCtxt ()

void        xmlDefaultSAXHandlerInit        (void);
xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur);

Initialize the default SAX handler

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


htmlDefaultSAXHandlerInit ()

xmlCreatePushParserCtxt ()

void        htmlDefaultSAXHandlerInit       (void);
xmlParserCtxtPtr xmlCreatePushParserCtxt (xmlSAXHandlerPtr sax, + void *user_data, + const char *chunk, + int size, + const char *filename);

Initialize the default SAX handler

Create a parser context for using the XML parser in push mode +To allow content encoding detection, size should be >= 4 +The value of filename is used for fetching external entities +and error/warning reports.

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


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.


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


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


  an XML parser context  an XML node within the tree an xmlParserNodeInfo block pointer or NULL


  a node info sequence pointer


  a node info sequence pointer


  a node info sequence pointer  an XML node pointer a long indicating the position of the record


  an XML parser context  a node info sequence pointer




parserInternals

parserInternals

parserInternals

Name

parserInternals -- 
parserInternals —

Synopsis

XML_MAX_NAMELEN -typedef CHARVAL; -#define NEXTCHARVAL (p) -#define SKIPCHARVAL (p) #define IS_CHARxmlParserCtxtPtr xmlCreateDocParserCtxt (xmlCreateMemoryParserCtxt (char *buffer, int size); -void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); xmlParserCtxtPtrxmlNewParserCtxt (void); -void xmlParserCtxtPtr xmlCreateEntityParserCtxt (const xmlChar *URL, + const xmlChar *ID, + const xmlChar *base); +int xmlSwitchEncoding (xmlCharEncoding enc); +int xmlSwitchToEncoding (xmlParserCtxtPtr ctxt, + xmlCharEncodingHandlerPtr handler); +void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); void xmlHandleEntityxmlParserCtxtPtr ctxt); void xmlParseTextDecl (xmlParserCtxtPtr ctxt); +void xmlParseMisc (xmlChar end3); +xmlChar* xmlStringDecodeEntities (xmlParserCtxtPtr ctxt, + const xmlChar *str, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); int nodePush

Description

Details

#define     XML_MAX_NAMELEN
#define XML_MAX_NAMELEN 1000

CHARVAL


NEXTCHARVAL()

#define     NEXTCHARVAL(p)

p : 


SKIPCHARVAL()

#define SKIPCHARVAL(p) (p)++;

p : 









#define     IS_LETTER(c)
#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))





Create a parser context for an XML in-memory document.

Creates a parser context for an XML in-memory document.


  the filename the new parser context or NULL


  a pointer to a zero terminated char array  the size of the array (without the trailing 0) the new parser context or NULL


xmlNewParserCtxt ()

xmlParserCtxtPtr xmlNewParserCtxt           (void);

Allocate and initialize a new parser context.

Returns :the xmlParserCtxtPtr or NULL


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 posible base for the target URI
Returns :the new parser context or NULL


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


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



xmlNewParserCtxt ()

xmlParserCtxtPtr xmlNewParserCtxt           (void);

Allocate and initialize a new parser context.

Returns : 


xmlSwitchEncoding ()

void        xmlSwitchEncoding               (xmlParserCtxtPtr ctxt,
-                                             xmlCharEncoding enc);

change the input functions when discovering the character encoding -of a given entity.

ctxt : 
enc : 


  an XML parser context  an XML entity pointer.


  an XML parser context  an Entity pointer the new input stream or NULL


  an XML parser context  an XML parser input fragment (entity, XML fragment ...).


  an XML parser context the current xmlChar in the parser context


  an xmlParserInputPtr


  an XML parser context  the filename to use as entity the new input stream or NULL in case of error


  an XML parser context  an XML parser context  a xmlChar **  the local part, and prefix is updated +to get the Prefix if any.


  an XML parser context the namespace name or NULL


  an XML parser context  a xmlChar **  the local part, and prefix is updated +to get the Prefix if any.


  an XML parser context the namespace name


  an XML parser context the string parser or NULL.


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 ot was declared on the root of the Tree:-(

To be removed at next drop of binary compatibility

  an XML parser context


  an XML parser context the Name parsed or NULL


  an XML parser context the Name parsed or NULL


  an XML parser context the Nmtoken parsed or NULL


  an XML parser context  if non-NULL store a copy of the original entity value the EntityValue parsed with reference substitued or NULL


[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 "xDxA" 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.

  an XML parser context the AttValue parsed or NULL. The value has to be freed by the caller.


  an XML parser context the SystemLiteral parsed or NULL


  an XML parser context the PubidLiteral parsed or NULL.


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 ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

  an XML parser context  int indicating whether we are within a CDATA section


  an XML parser context  a xmlChar** receiving PubidLiteral  indicate whether we should restrict parsing to only +production [75], see NOTE below 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.


  an XML parser context


  an XML parser context the PITarget name or NULL


  an XML parser context


  an XML parser context


  an XML parser context


  an XML parser context  Receive a possible fixed default value for the attribute  XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED +or XML_ATTRIBUTE_FIXED.


  an XML parser context  the notation attribute tree built while parsing


  an XML parser context  the enumeration attribute tree built while parsing


  an XML parser context  the enumeration tree built while parsing  XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION


[ VC: IDREF ] Values of type IDREF must match the Name production, and values -of type IDREFS must match Names; TODO each IDREF Name must match the value +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; TODO each Entity Name must match the +of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD.

[ VC: Name Token ] @@ -5024,7 +5243,7 @@ CLASS="PARAMETER" WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" ->  an XML parser context  the enumeration tree built while parsing the attribute type


  an XML parser context


  an XML parser context  the list of the xmlElementContentPtr describing the element choices


  an XML parser context  the tree of xmlElementContentPtr describing the element +hierarchy.


  an XML parser context  the name of the element being defined.  the Element Content pointer will be stored here if any  the type of element content XML_ELEMENT_TYPE_xxx


  an XML parser context the type of the element, or -1 in case of error


  an XML parser context


  an XML parser context the value parsed (as an int), 0 in case of error


  an XML parser context the xmlEntityPtr if found, or NULL otherwise.


  an XML parser context


  an XML parser context


  an XML parser context


  an XML parser context  a xmlChar ** used to store the value of the attribute the attribute name, and the value in *value.


  an XML parser context the element name parsed


  an XML parser context


  an XML parser context


  an XML parser context


  an XML parser context


  an XML parser context the string giving the XML version number, or NULL


  an XML parser context the version string, e.g. "1.0"


  an XML parser context the encoding name value or NULL


  an XML parser context the encoding value or NULL


  an XML parser context 1 if standalone, 0 otherwise


  an XML parser context


xmlParseTextDecl ()

void        xmlParseTextDecl                (xmlParserCtxtPtr ctxt);

parse an XML declaration header for external entities

[77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'

Question: Seems that EncodingDecl is mandatory ? Is that a typo ?

ctxt : an XML parser context


  an XML parser context


  an XML parser context  the external identifier  the system identifier (or URL)


#define     XML_SUBSTITUTE_NONE
#define XML_SUBSTITUTE_NONE 0

#define     XML_SUBSTITUTE_REF
#define XML_SUBSTITUTE_REF 1

#define     XML_SUBSTITUTE_PEREF
#define XML_SUBSTITUTE_PEREF 2

#define     XML_SUBSTITUTE_BOTH
#define XML_SUBSTITUTE_BOTH 3

  the parser context  the len to decode (in bytes !), -1 for no size limit  combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF  an end marker xmlChar, 0 if none  an end marker xmlChar, 0 if none  an end marker xmlChar, 0 if none A newly allocated string with the substitution done. The caller +must deallocate it !


xmlStringDecodeEntities ()

xmlChar*    xmlStringDecodeEntities         (xmlParserCtxtPtr ctxt,
+                                             const xmlChar *str,
+                                             int what,
+                                             xmlChar end,
+                                             xmlChar end2,
+                                             xmlChar end3);

[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 !





SAX

SAX

SAX

Name

SAX -- 
SAX —

Synopsis

Description

Details










Does this document has an internal subset

Callback on internal subset declaration.

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




Special entity resolver, better left to the parser, it has -more context than the application layer. -The default behaviour is to NOT resolve the entities, in that case -the ENTITY_REF nodes are built in the structure (and the parameter -values).

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



  the name of the element the attribute name    the type of default value  the attribute default value  the tree of enumerated value set


the element value (without processing). the element value tree






  The attribute name, including namespace prefix

  The element name, including namespace prefix








 the xmlNsPtr or NULL if none


 1 if true 0 otherwise






tree

tree

tree

Name

tree -- 
tree —

Synopsis

BAD_CAST +struct xmlNotation; typedef xmlNotationPtrxmlAttributeDefault; +struct xmlEnumeration; typedef xmlEnumerationPtr; +struct xmlAttribute; typedef xmlAttributePtrxmlElementContentOccur; +struct xmlElementContent; typedef xmlElementContentPtrxmlElementTypeVal; +struct xmlElement; typedef xmlElementPtrxmlNsType; +struct xmlNs; typedef xmlNsPtr; +struct xmlDtd; typedef xmlDtdPtr; +struct xmlAttr; typedef xmlAttrPtr; +struct xmlID; typedef xmlIDPtr; +struct xmlRef; typedef xmlRefPtr; +enum xmlBufferAllocationScheme; +struct xmlBuffer; +typedef xmlBufferPtr; struct xmlNodexmlDocPtr; -struct xmlBuffer; -typedef xmlBufferPtr; +#define xmlChildrenNode +#define xmlRootNode extern xmlNsPtr baseDTDxmlIndentTreeOutput; +extern xmlBufferAllocationScheme xmlBufferAllocScheme; +extern int xmlSaveNoEmptyTags; xmlBufferPtrxmlBufferCreate (void); +xmlBufferPtr xmlBufferCreateSize (size_t size); void xmlBufferFree *str, int len); void xmlBufferAddHead (xmlBufferPtr buf, + const xmlChar *str, + int len); +void xmlBufferCat ( (xmlBufferPtr buf, + int len); +int xmlBufferGrow (xmlBufferPtr buf, int len); void xmlBufferPtr buf); +const xmlChar* xmlBufferContent (const xmlBufferPtr buf); +int xmlBufferUse (const xmlBufferPtr buf); +void xmlBufferSetAllocationScheme (xmlBufferPtr buf, + xmlBufferAllocationScheme scheme); +int xmlBufferLength (const xmlBufferPtr buf); xmlDtdPtrxmlNodePtr xmlNewDocRawNode (xmlDocPtr doc, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); +xmlNodePtr xmlNewNode (xmlNodePtr xmlNewTextChild (xmlNodePtr parent, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); +xmlNodePtr xmlNewDocText (xmlNodePtr xmlNewCharRef (xmlDocPtr doc, + const xmlChar *name); +xmlNodePtr xmlNewReference (xmlNodePtr xmlNewDocFragment (xmlDocPtr doc); +xmlNodePtr xmlDocGetRootElement (xmlDocPtr doc); +xmlNodePtr xmlGetLastChild (xmlNodePtr node); +int xmlIsBlankNode (xmlNodePtr node); +xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc, + xmlNodePtr root); +void xmlNodeSetName (xmlNodePtr cur, + const xmlChar *name); xmlNodePtrxmlNodePtr xmlReplaceNode (xmlNodePtr old, + xmlNodePtr cur); +xmlNodePtr xmlAddSibling (xmlNodePtr elem); +xmlNodePtr xmlAddPrevSibling (xmlNodePtr cur, + xmlNodePtr elem); +xmlNodePtr xmlAddNextSibling (xmlNodePtr cur, + xmlNodePtr elem); void xmlUnlinkNodexmlChar *name); xmlChar* xmlGetNsProp (xmlNodePtr node, + const xmlChar *name, + const xmlChar *nameSpace); +xmlNodePtr xmlNodePtr list, + int inLine); +xmlChar* xmlNodeListGetRawString (xmlDocPtr doc, + xmlNodePtr list, int inLine); void xmlChar *lang); int xmlNodeGetSpacePreserve (xmlNodePtr cur); +xmlChar* xmlNodeGetBase (xmlDocPtr doc, + xmlNodePtr cur); +int xmlRemoveProp (xmlChar *string); +int xmlReconciliateNs (xmlDocPtr doc, + xmlNodePtr tree); void xmlDocDumpMemoryxmlChar **mem, int *size); -void xmlDocDump (xmlDocPtr cur); +void xmlElemDump (FILE *f, + xmlDocPtr doc, + xmlNodePtr cur); int xmlSaveFilexmlDocPtr cur); int xmlSaveFileEnc (const char *filename, + xmlDocPtr cur, + const char *encoding); +int xmlGetDocCompressMode (

Description

Details


xmlChar

typedef unsigned char xmlChar;


#define     CHAR
#define CHAR xmlChar

#define     BAD_CAST
#define BAD_CAST (xmlChar *)

xmlNotationPtr

struct xmlNotation

struct xmlNotation {
+    const xmlChar               *name;	/* Notation name */
+    const xmlChar               *PublicID;	/* Public identifier, if any */
+    const xmlChar               *SystemID;	/* System identifier, if any */
+};


xmlNotationPtr

typedef xmlNotation *xmlNotationPtr;




struct xmlEnumeration

struct xmlEnumeration {
+    struct _xmlEnumeration    *next;	/* next one */
+    const xmlChar            *name;	/* Enumeration name */
+};


xmlEnumerationPtr

typedef xmlEnumeration *xmlEnumerationPtr;


struct xmlAttribute

struct xmlAttribute {
+#ifndef XML_WITHOUT_CORBA
+    void           *_private;	        /* for Corba, must be first ! */
+#endif
+    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 */
+};


xmlAttributePtr

typedef xmlAttribute *xmlAttributePtr;




xmlElementContentPtr

struct 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 */
+};


xmlElementContentPtr

typedef xmlElementContent *xmlElementContentPtr;



xmlElementPtr

struct xmlElement

struct xmlElement {
+#ifndef XML_WITHOUT_CORBA
+    void           *_private;	        /* for Corba, must be first ! */
+#endif
+    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 */
+};


xmlElementPtr

typedef xmlElement *xmlElementPtr;



struct 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 */
+};


xmlNsPtr

typedef xmlNs *xmlNsPtr;


struct xmlDtd

struct xmlDtd {
+#ifndef XML_WITHOUT_CORBA
+    void           *_private;	/* for Corba, must be first ! */
+#endif
+    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 */
+};


xmlDtdPtr

typedef xmlDtd *xmlDtdPtr;


struct xmlAttr

struct xmlAttr {
+#ifndef XML_WITHOUT_CORBA
+    void           *_private;	/* for Corba, must be first ! */
+#endif
+    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 */
+};


xmlAttrPtr

typedef xmlAttr *xmlAttrPtr;


struct xmlID

struct xmlID {
+    struct _xmlID    *next;	/* next ID */
+    const xmlChar    *value;	/* The ID name */
+    xmlAttrPtr        attr;	/* The attribut holding it */
+};


xmlIDPtr

typedef xmlID *xmlIDPtr;


struct xmlRef

struct xmlRef {
+    struct _xmlRef    *next;	/* next Ref */
+    const xmlChar     *value;	/* The Ref name */
+    xmlAttrPtr        attr;	/* The attribut holding it */
+};


xmlRefPtr

typedef xmlRef *xmlRefPtr;


enum xmlBufferAllocationScheme

typedef enum {
+    XML_BUFFER_ALLOC_DOUBLEIT,
+    XML_BUFFER_ALLOC_EXACT
+} xmlBufferAllocationScheme;


struct 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 */
+};


xmlBufferPtr

typedef xmlBuffer *xmlBufferPtr;



xmlNodePtr

typedef xmlNode *xmlNodePtr;



xmlDocPtr


struct 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 */
-};
typedef xmlDoc *xmlDocPtr;

xmlBufferPtr

xmlChildrenNode

#define xmlChildrenNode children


xmlRootNode

#define xmlRootNode children





xmlBufferAllocScheme

extern xmlBufferAllocationScheme xmlBufferAllocScheme; /* alloc scheme to use */


xmlSaveNoEmptyTags

extern int xmlSaveNoEmptyTags;   /* save empty tags as <empty></empty> */


 the new structure.


xmlBufferCreateSize ()

xmlBufferPtr xmlBufferCreateSize            (size_t size);

routine to create an XML buffer.

size : initial size of buffer
Returns :the new structure.


  the buffer to free


  the file output  the buffer to dump the number of xmlChar written


  the buffer to dump  the xmlChar string  the number of xmlChar to add


xmlBufferAddHead ()

void        xmlBufferAddHead                (xmlBufferPtr buf,
+                                             const xmlChar *str,
+                                             int len);

Add a string range to the beginning of an XML buffer. +if len == -1, the lenght of str is recomputed.

buf : the buffer
str : the xmlChar string
len : the number of xmlChar to add


  the buffer to dump  the xmlChar string


  the buffer to dump  the C char string


  the buffer to dump  the number of xmlChar to remove the number of xmlChar removed, or -1 in case of failure.


xmlBufferGrow ()

int         xmlBufferGrow                   (xmlBufferPtr buf,
+                                             int len);

Grow the available space of an XML buffer.

buf : the buffer
len : the minimum free sie to allocate
Returns :the new available space or -1 in case of error



xmlBufferContent ()

const xmlChar* xmlBufferContent             (const xmlBufferPtr buf);

buf : the buffer to resize
Returns :the internal content


xmlBufferUse ()

int         xmlBufferUse                    (const xmlBufferPtr buf);

buf : 
Returns : 

xmlBufferSetAllocationScheme ()

void        xmlBufferSetAllocationScheme    (xmlBufferPtr buf,
+                                             xmlBufferAllocationScheme scheme);

Sets the allocation scheme for this buffer

buf : the buffer to free
scheme : allocation scheme to use


xmlBufferLength ()

int         xmlBufferLength                 (const xmlBufferPtr buf);

buf : the buffer
Returns :the length of data in the internal content


  the document pointer  the DTD name  the external ID  the system ID a pointer to the new DTD structure


Creation of a new DTD.

Creation of a new DTD for the external subset. To create an +internal subset, use
xmlCreateIntSubset().

  the document pointer  the DTD name  the external ID  the system ID a pointer to the new DTD structure


  the DTD structure to free up


  the document carrying the namespace  the URI associated  the prefix for the namespace NULL this functionnality had been removed


  the element carrying the namespace  the URI associated  the prefix for the namespace returns a new namespace pointer or NULL


  the namespace pointer


  xmlChar string giving the version of XML "1.0" a new document


  pointer to the document +@:


  the document  the name of the attribute  the value of the attribute a pointer to the attribute


  the holding node  the name of the attribute  the value of the attribute a pointer to the attribute


  the holding node  the namespace  the name of the attribute  the value of the attribute a pointer to the attribute


Free a property and all its siblings, all the childs are freed too.

Free a property and all its siblings, all the children are freed too.

  the first property in the list


  an attribute


  the element where the attribute will be grafted  the attribute  a new xmlAttrPtr, or NULL in case of error.


  the element where the attributes will be grafted  the first attribute  a new xmlAttrPtr, or NULL in case of error.


  the dtd  a new xmlDtdPtr, or NULL in case of error.


  the document  if 1 do a recursive copy.  a new xmlDocPtr, or NULL in case of error.


xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode(). Use xmlNewDocRawNode() if you don't need entities support.

  the document  namespace if any  the node name  the XML text content if any a pointer to the new node object.


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 optionnal (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.


  namespace if any  the node name a pointer to the new node object.


parent childs list. +> children list. xmlEncodeEntitiesReentrant(). Use xmlNewTextChild(). Use xmlNewTextChild() if entities support is not needed.

  the parent node  a namespace if any  the name of the child  the XML content of the child if any. 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 optionnal (NULL). If content is non NULL, +a child TEXT node will be created containing the string content.

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.


  the document  the text content a pointer to the new node object.


  the text content a pointer to the new node object.


  the processing instruction name  the PI content a pointer to the new node object.


  the document  the text content  the text len. a pointer to the new node object.


  the text content  the text len. a pointer to the new node object.


  the document  the comment content a pointer to the new node object.


  the comment content a pointer to the new node object.


  the document  the CData block content content  the length of the block 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.


  the document  the reference name, or the reference string with & and ; a pointer to the new node object.


  the node  if 1 do a recursive copy.  a new xmlNodePtr, or NULL in case of error.


  the first node in the list.  a new xmlNodePtr, or NULL in case of error.


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.


xmlDocGetRootElement ()

xmlNodePtr  xmlDocGetRootElement            (xmlDocPtr 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


  the parent node the last child or NULL if none.


  the node 1 yes, 0 no


xmlIsBlankNode ()

int         xmlIsBlankNode                  (xmlNodePtr node);

Is this node a Text node ?

node : the node
Returns :1 yes, 0 no


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
Returns :the old root element if any was found


xmlNodeSetName ()

void        xmlNodeSetName                  (xmlNodePtr cur,
+                                             const xmlChar *name);

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 changed
name : the new tag name


  the parent node  the child node the child or NULL in case of error.


xmlReplaceNode ()

xmlNodePtr  xmlReplaceNode                  (xmlNodePtr old,
+                                             xmlNodePtr cur);

Unlink the old node from it's 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.

old : the old node
cur : the node
Returns :the old node


  the child node  the new node the new element or NULL in case of error.


xmlAddPrevSibling ()

xmlNodePtr  xmlAddPrevSibling               (xmlNodePtr cur,
+                                             xmlNodePtr elem);

Add a new element elem as the previous siblings of cur +If the new element was already inserted in a document it is +first unlinked from its existing context.

cur : the child node
elem : the new node
Returns :the new element or NULL in case of error.


xmlAddNextSibling ()

xmlNodePtr  xmlAddNextSibling               (xmlNodePtr cur,
+                                             xmlNodePtr elem);

Add a new element elem as the next siblings of cur +If the new element was already inserted in a document it is +first unlinked from its existing context.

cur : the child node
elem : the new node
Returns :the new element or NULL in case of error.


  the node


  the first text node  the second text node being merged the first text node augmented


  the node  the content  content lenght


Free a node and all its siblings, this is a recursive behaviour, all -the childs are freed too.

  the first node in the list


Free a node, this is a recursive behaviour, all the childs are freed too.

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.

  the node


  the document  the current node  the namespace string the namespace pointer or NULL.


  the document  the current node  the namespace value the namespace pointer or NULL.


  the document  the current node an NULL terminated array of all the xmlNsPtr found +that need to be freed by the caller or NULL if no +namespace if defined


  a node in the document  a namespace pointer


  the namespace  a new xmlNsPtr, or NULL in case of error.


  the first namespace  a new xmlNsPtr, or NULL in case of error.


  the node  the attribute name  the attribute value the attribute pointer.


  the node  the attribute name the attribute value or NULL if not found. +It's up to the caller to free the memory.


xmlGetNsProp ()

xmlChar*    xmlGetNsProp                    (xmlNodePtr 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.


  the document  the value of the attribute a pointer to the first child


  the document  the value of the text  the length of the string value a pointer to the first child


  the document  a Node list  should we replace entity contents or show their external form a pointer to the string copy, the calller must free it.


xmlNodeListGetRawString ()

xmlChar*    xmlNodeListGetRawString         (xmlDocPtr doc,
+                                             xmlNodePtr list,
+                                             int inLine);

Returns 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 calller must free it.


  the node being modified  the new value of the content


  the node being modified  the new value of the content  the size of content


  the node being modified  extra content


  the node being modified  extra content  the size of content


xmlChar* xmlNodeGetContent (xmlNodePtr 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 substitued.

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.


xmlNodeGetLang ()

xmlChar*    xmlNodeGetLang                  (xmlNodePtr 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.


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 langage description


xmlNodeGetSpacePreserve ()

int         xmlNodeGetSpacePreserve         (xmlNodePtr cur);

Searches the language 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 inheried, 0 if "default", 1 if "preserve"


xmlNodeGetBase ()

xmlChar*    xmlNodeGetBase                  (xmlDocPtr doc,
+                                             xmlNodePtr cur);

Searches for the BASE URL. The code should work on both XML +and HTML document even if base mechanisms are completely different.

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.


xmlRemoveProp ()

int         xmlRemoveProp                   (xmlAttrPtr attr);

Unlink and free one attribute, all the content is freed too +Note this doesn't work for namespace definition attributes

attr : 
Returns :0 if success and -1 in case of error.


xmlRemoveNode ()

int         xmlRemoveNode                   (xmlNodePtr node);

node : 
Returns : 


xmlBufferWriteCHAR ()

void        xmlBufferWriteCHAR              (xmlBufferPtr buf,
+                                             const xmlChar *string);

routine which manage and grows an output buffer. This one add +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


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 tu 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.


xmlDocDumpMemory ()

void        xmlDocDumpMemory                (xmlDocPtr cur,
+                                             xmlChar **mem,
+                                             int *size);

Dump an XML 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 lenght


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 file written or -1 in case of failure.


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


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 file 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 file written or -1 in case of failure.


xmlGetDocCompressMode ()

int         xmlGetDocCompressMode           (xmlDocPtr doc);

get the compression ratio for a document, ZLIB based

doc : the document
Returns :0 (uncompressed) to 9 (max compression)


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


xmlGetCompressMode ()

int         xmlGetCompressMode              (void);

get the default compression mode used, ZLIB based.

Returns :0 (uncompressed) to 9 (max compression)


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

\ No newline at end of file diff --git a/doc/html/gnome-xml-valid.html b/doc/html/gnome-xml-valid.html index 143d52ef..8096567d 100644 --- a/doc/html/gnome-xml-valid.html +++ b/doc/html/gnome-xml-valid.html @@ -4,7 +4,7 @@ >valid

valid

valid

Name

valid -- 
valid —

Synopsis

) (void *ctx, const char *msg, ...); +struct xmlValidCtxt; +typedef xmlValidCtxtPtr; #define XML_MIN_NOTATION_TABLE +struct xmlNotationTable; typedef xmlNotationTablePtrXML_MIN_ELEMENT_TABLE +struct xmlElementTable; typedef xmlElementTablePtrXML_MIN_ATTRIBUTE_TABLE +struct xmlAttributeTable; typedef xmlAttributeTablePtrXML_MIN_ID_TABLE +struct xmlIDTable; typedef xmlIDTablePtrXML_MIN_REF_TABLE +struct xmlRefTable; typedef xmlRefTablePtr xmlAddNotationDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlNotationTablePtr table); void xmlDumpNotationDecl (xmlBufferPtr buf, + xmlNotationPtr nota); +void xmlDumpNotationTable (xmlElementContentPtr cur); +void xmlSprintfElementContent (char *buf, + xmlElementContentPtr content, + int glob); xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlElementTablePtr table); +void xmlDumpElementDecl (xmlBufferPtr buf, + xmlElementPtr elem); xmlEnumerationPtr xmlAddAttributeDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlAttributeTablePtr table); +void xmlDumpAttributeDecl (xmlBufferPtr buf, + xmlAttributePtr attr); xmlIDPtr xmlAddID (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlAttrPtr attr); +int xmlRemoveID (xmlDocPtr doc, + xmlAttrPtr attr); xmlRefPtr xmlAddRef (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlAttrPtr attr); int xmlRemoveRef (xmlDocPtr doc, + xmlAttrPtr attr); +int xmlValidateRoot (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateElementDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlElementPtr elem); +xmlChar* xmlValidNormalizeAttributeValue (xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *name, + const xmlChar *value); int xmlValidateAttributeDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateNotationDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateDtd (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd); int xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); +int xmlValidateDocument (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateElement (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateOneElement (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateOneAttribute (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateDocumentFinal (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateNotationUse (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlChar *name); *name); +int xmlValidGetValidElements (xmlNode *prev, + xmlNode *next, + const xmlChar **list, + int max); +int xmlValidGetPotentialChildren (xmlElementContent *ctree, + const xmlChar **list, + int *len, + int max);

Description

Details



struct 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 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 */
+
+    int              finishDtd;       /* finished validating the Dtd ? */
+};


xmlValidCtxtPtr

typedef xmlValidCtxt *xmlValidCtxtPtr;


#define     XML_MIN_NOTATION_TABLE
#define XML_MIN_NOTATION_TABLE 32

xmlNotationTablePtr

struct xmlNotationTable

struct xmlNotationTable {
+    int nb_notations;		/* number of notations stored */
+    int max_notations;		/* maximum number of notations */
+    xmlNotationPtr *table;	/* the table of attributes */
+};


xmlNotationTablePtr

typedef xmlNotationTable *xmlNotationTablePtr;


#define     XML_MIN_ELEMENT_TABLE
#define XML_MIN_ELEMENT_TABLE 32

xmlElementTablePtr

struct xmlElementTable

struct xmlElementTable {
+    int nb_elements;		/* number of elements stored */
+    int max_elements;		/* maximum number of elements */
+    xmlElementPtr *table;	/* the table of elements */
+};


xmlElementTablePtr

typedef xmlElementTable *xmlElementTablePtr;


#define     XML_MIN_ATTRIBUTE_TABLE
#define XML_MIN_ATTRIBUTE_TABLE 32

xmlAttributeTablePtr

struct xmlAttributeTable

struct xmlAttributeTable {
+    int nb_attributes;		/* number of attributes stored */
+    int max_attributes;		/* maximum number of attributes */
+    xmlAttributePtr *table;	/* the table of attributes */
+};


xmlAttributeTablePtr

typedef xmlAttributeTable *xmlAttributeTablePtr;


#define     XML_MIN_ID_TABLE
#define XML_MIN_ID_TABLE 32

xmlIDTablePtr

struct xmlIDTable

struct xmlIDTable {
+    int nb_ids;			/* number of ids stored */
+    int max_ids;		/* maximum number of ids */
+    xmlIDPtr *table;		/* the table of ids */
+};


xmlIDTablePtr

typedef xmlIDTable *xmlIDTablePtr;


#define     XML_MIN_REF_TABLE
#define XML_MIN_REF_TABLE 32

xmlRefTablePtr

struct xmlRefTable

struct xmlRefTable {
+    int nb_refs;			/* number of refs stored */
+    int max_refs;		/* maximum number of refs */
+    xmlRefPtr *table;		/* the table of refs */
+};


xmlRefTablePtr

typedef xmlRefTable *xmlRefTablePtr;


xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt,   the validation context  pointer to the DTD  the entity name  the public identifier or NULL  the system identifier or NULL NULL if not, othervise the entity


  A notation table the new xmlNotationTablePtr or NULL in case of error.


  An notation 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


  the XML buffer output  A notation table


  the subelement name or NULL  the type of element content decl NULL if not, othervise the new element content structure


  An element content pointer. the new xmlElementContentPtr or NULL in case of error.


  the element content tree to free


xmlSprintfElementContent ()

void        xmlSprintfElementContent        (char *buf,
+                                             xmlElementContentPtr content,
+                                             int glob);

This will dump the content of the element content definition +Intended just for the debug routine

buf : an output buffer
content : An element table
glob : 1 if one must print the englobing parenthesis, 0 otherwise


xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,   the validation context  pointer to the DTD  the entity name  the element type  the element content tree or NULL NULL if not, othervise the entity


  An element table the new xmlElementTablePtr or NULL in case of error.


  An element table


  the XML buffer output  An element 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


  the enumeration name or NULL the xmlEnumerationPtr just created or NULL in case +of error.


  the tree to free.


  the tree to copy. the xmlEnumerationPtr just created or NULL in case +of error.


xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,   the validation context  pointer to the DTD  the element name  the attribute name  the attribute namespace prefix  the attribute type  the attribute default type  the attribute default value  if it's an enumeration, the associated list NULL if not new, othervise the attribute decl


  An attribute table the new xmlAttributeTablePtr or NULL in case of error.


  An attribute table


  the XML buffer output  An attribute table


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


xmlIDPtr xmlAddID (xmlValidCtxtPtr xmlAddID (xmlValidCtxtPtr ctxt,   the validation context  pointer to the document  the value name  the attribute holding the ID NULL if not, othervise the new xmlIDPtr



  An id table


  pointer to the document  the ID value NULL if not found, otherwise the xmlAttrPtr defining the ID


  the document  the element carrying the attribute  the attribute 0 or 1 depending on the lookup result


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


xmlRefPtr xmlAddRef (xmlValidCtxtPtr xmlAddRef (xmlValidCtxtPtr ctxt,   the validation context  pointer to the document  the value name  the attribute holding the Ref NULL if not, othervise the new xmlRefPtr



  An ref table


  the document  the element carrying the attribute  the attribute 0 or 1 depending on the lookup result


xmlRemoveRef ()

int         xmlRemoveRef                    (xmlDocPtr doc,
+                                             xmlAttrPtr attr);

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


int         xmlValidateRoot                 (xmlValidCtxtPtrint         xmlValidateRoot                 (xmlValidCtxtPtr ctxt,
                                                 the validation context   a document instance 1 if valid or 0 otherwise


int         xmlValidateElementDecl          (xmlValidCtxtPtrint         xmlValidateElementDecl          (xmlValidCtxtPtr ctxt,
                                                 the validation context   a document instance   an element definition 1 if valid or 0 otherwise


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.


int         xmlValidateAttributeDecl        (xmlValidCtxtPtrint         xmlValidateAttributeDecl        (xmlValidCtxtPtr ctxt,
                                                 the validation context   a document instance   an attribute definition 1 if valid or 0 otherwise


  an attribute type  an attribute value 1 if valid or 0 otherwise


int         xmlValidateNotationDecl         (xmlValidCtxtPtrint         xmlValidateNotationDecl         (xmlValidCtxtPtr ctxt,
                                                 the validation context   a document instance   a notation definition 1 if valid or 0 otherwise


int         xmlValidateDtd                  (xmlValidCtxtPtrint         xmlValidateDtd                  (xmlValidCtxtPtr ctxt,
                                              

Try to validate the dtd instance

Try to validate the document against the dtd instance

basically it does check all the definitions in the DtD.

  the validation context  a document instance  a dtd instance 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 otherwise


int         xmlValidateDocument             (xmlValidCtxtPtrint         xmlValidateDocument             (xmlValidCtxtPtr ctxt,
                                                 the validation context   a document instance 1 if valid or 0 otherwise


int         xmlValidateElement              (xmlValidCtxtPtrint         xmlValidateElement              (xmlValidCtxtPtr ctxt,
                                                 the validation context   a document instance   an element instance 1 if valid or 0 otherwise


int         xmlValidateOneElement           (xmlValidCtxtPtrint         xmlValidateOneElement           (xmlValidCtxtPtr ctxt,
                                                 the validation context   a document instance   an element instance 1 if valid or 0 otherwise


int         xmlValidateOneAttribute         (xmlValidCtxtPtrint         xmlValidateOneAttribute         (xmlValidCtxtPtr ctxt,
                                              

Try to validate a single attribute for an element -basically it * does the following checks as described by the +basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] @@ -4991,7 +6238,7 @@ CLASS="PARAMETER" WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" ->  the validation context  a document instance  an element instance  an attribute instance  the attribute value (without entities processing) 1 if valid or 0 otherwise


int         xmlValidateDocumentFinal        (xmlValidCtxtPtrint         xmlValidateDocumentFinal        (xmlValidCtxtPtr ctxt,
                                                 the validation context   a document instance 1 if valid or 0 otherwise


int         xmlValidateNotationUse          (xmlValidCtxtPtrint         xmlValidateNotationUse          (xmlValidCtxtPtr ctxt,
                                                 the validation context   the document   the notation name to check 1 if valid or 0 otherwise


  the document  the element name 0 if no, 1 if yes, and -1 if no element description is available


  a pointer to the DtD to search  the element name  the attribute name the xmlAttributePtr if found or NULL



xmlValidGetValidElements ()

int         xmlValidGetValidElements        (xmlNode *prev,
+                                             xmlNode *next,
+                                             const xmlChar **list,
+                                             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
list : 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.


xmlValidGetPotentialChildren ()

int         xmlValidGetPotentialChildren    (xmlElementContent *ctree,
+                                             const xmlChar **list,
+                                             int *len,
+                                             int max);

Build/extend a list of potential children allowed by the content tree

ctree : an element content tree
list : 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.

xml-error

xml-error

xml-error

Name

xml-error -- 
xml-error —

Synopsis

Description

Details


  an XML parser context  the message to display/transmit  extra parameters for the message display


  an XML parser context  the message to display/transmit  extra parameters for the message display


  an XML parser context  the message to display/transmit  extra parameters for the message display


  an XML parser context  the message to display/transmit  extra parameters for the message display


  an xmlParserInputPtr input


  an xmlParserInputPtr input

xmlIO

xmlIO

xmlIO

Name

xmlIO -- 
xmlIO —

Synopsis

+int (*xmlInputMatchCallback) (char const *filename); +void* (*xmlInputOpenCallback) (char const *filename); +int (*xmlInputReadCallback) (void *context, + char *buffer, + int len); +void (*xmlInputCloseCallback) (void *context); +struct xmlParserInputBuffer; typedef xmlParserInputBufferPtr; +int (*xmlOutputMatchCallback) (char const *filename); +void* (*xmlOutputOpenCallback) (char const *filename); +int (*xmlOutputWriteCallback) (void *context, + const char *buffer, + int len); +void (*xmlOutputCloseCallback) (void *context); +struct xmlOutputBuffer; +typedef xmlOutputBufferPtr; +xmlParserInputBufferPtr xmlAllocParserInputBuffer + (xmlCharEncoding enc); xmlParserInputBufferPtrxmlCharEncoding enc); +xmlParserInputBufferPtr xmlParserInputBufferCreateIO + (xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + xmlCharEncoding enc); int xmlParserInputBufferReadxmlParserInputBufferPtr in, int len); +int xmlParserInputBufferPush (xmlParserInputBufferPtr in, + int len, + const char *buf); void xmlFreeParserInputBufferxmlParserGetDirectory (const char *filename);

(const char *filename); +int xmlRegisterInputCallbacks (xmlInputMatchCallback match, + xmlInputOpenCallback open, + xmlInputReadCallback read, + xmlInputCloseCallback close); +xmlOutputBufferPtr xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder); +xmlOutputBufferPtr xmlOutputBufferCreateFilename + (const char *URI, + xmlCharEncodingHandlerPtr encoder, + int compression); +xmlOutputBufferPtr xmlOutputBufferCreateFile + (FILE *file, + xmlCharEncodingHandlerPtr encoder); +xmlOutputBufferPtr xmlOutputBufferCreateFd (int fd, + xmlCharEncodingHandlerPtr encoder); +xmlOutputBufferPtr xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite, + xmlOutputCloseCallback ioclose, + void *ioctx, + xmlCharEncodingHandlerPtr encoder); +int xmlOutputBufferWrite (xmlOutputBufferPtr out, + int len, + const char *buf); +int xmlOutputBufferWriteString (xmlOutputBufferPtr out, + const char *str); +int xmlOutputBufferFlush (xmlOutputBufferPtr out); +int xmlOutputBufferClose (xmlOutputBufferPtr out); +int xmlRegisterOutputCallbacks (xmlOutputMatchCallback match, + xmlOutputOpenCallback open, + xmlOutputWriteCallback write, + xmlOutputCloseCallback close); +int xmlSaveFileTo (xmlOutputBuffer *buf, + xmlDocPtr cur, + const char *encoding);

Description

Details

xmlParserInputBufferPtr


xmlParserInputBufferCreateFilename ()

xmlInputMatchCallback ()

xmlParserInputBufferPtr xmlParserInputBufferCreateFilename
-                                            (const char *URI,
-                                             xmlCharEncoding enc);
int (*xmlInputMatchCallback) (char const *filename);

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.

URI : encfilename :

xmlInputOpenCallback ()

void*       (*xmlInputOpenCallback)         (char const *filename);

filename : 


xmlInputReadCallback ()

int         (*xmlInputReadCallback)         (void *context,
+                                             char *buffer,
+                                             int len);

context : 
buffer : 
len : 
Returns : 


xmlInputCloseCallback ()

void        (*xmlInputCloseCallback)        (void *context);

context : 


struct xmlParserInputBuffer

struct xmlParserInputBuffer {
+    void*                  context;
+    xmlInputReadCallback   readcallback;
+    xmlInputCloseCallback  closecallback;
+    
+    xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+    
+    xmlBufferPtr buffer;    /* Local buffer encoded in UTF-8 or ISOLatin */
+    xmlBufferPtr raw;       /* if encoder != NULL buffer for raw input */
+};


xmlParserInputBufferPtr

typedef xmlParserInputBuffer *xmlParserInputBufferPtr;


xmlOutputMatchCallback ()

int         (*xmlOutputMatchCallback)       (char const *filename);

filename : 
Returns : 


xmlOutputOpenCallback ()

void*       (*xmlOutputOpenCallback)        (char const *filename);

filename : 


xmlOutputWriteCallback ()

int         (*xmlOutputWriteCallback)       (void *context,
+                                             const char *buffer,
+                                             int len);

context : 
buffer : 
len : 
Returns : 


xmlOutputCloseCallback ()

void        (*xmlOutputCloseCallback)       (void *context);

context : 


struct xmlOutputBuffer

struct xmlOutputBuffer {
+    void*                   context;
+    xmlOutputWriteCallback  writecallback;
+    xmlOutputCloseCallback  closecallback;
+    
+    xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+    
+    xmlBufferPtr buffer;    /* Local buffer encoded in UTF-8 or ISOLatin */
+    xmlBufferPtr conv;      /* if encoder != NULL buffer for output */
+    int written;            /* total number of byte written */
+};


xmlOutputBufferPtr

typedef xmlOutputBuffer *xmlOutputBufferPtr;


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


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


  a FILE*   the charset encoding if known the new parser input or NULL


  a file descriptor number  the charset encoding if known 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


  a buffered parser input  indicative value of the amount of chars to read the number of chars read and stored in the buffer, or -1 +in case of error.


Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 -TODO: one should be able to remove one extra copy

TODO: one should be able to remove one extra copy by copying directy +onto in->buffer or in->raw

  a buffered parser input  indicative value of the amount of chars to read 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.



xmlRegisterInputCallbacks ()

int         xmlRegisterInputCallbacks       (xmlInputMatchCallback match,
+                                             xmlInputOpenCallback open,
+                                             xmlInputReadCallback read,
+                                             xmlInputCloseCallback close);

Register a new set of I/O callback for handling parser input.

match : the xmlInputMatchCallback
open : the xmlInputOpenCallback
read : the xmlInputReadCallback
close : the xmlInputCloseCallback
Returns :the registered handler number 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


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


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


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


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 : 
Returns :the new parser output or NULL


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.


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.


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.


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.


xmlRegisterOutputCallbacks ()

int         xmlRegisterOutputCallbacks      (xmlOutputMatchCallback match,
+                                             xmlOutputOpenCallback open,
+                                             xmlOutputWriteCallback write,
+                                             xmlOutputCloseCallback close);

Register a new set of I/O callback for handling output.

match : the xmlOutputMatchCallback
open : the xmlOutputOpenCallback
write : the xmlOutputWriteCallback
close : the xmlOutputCloseCallback
Returns :the registered handler number or -1 in case of error


xmlSaveFileTo ()

int         xmlSaveFileTo                   (xmlOutputBuffer *buf,
+                                             xmlDocPtr cur,
+                                             const char *encoding);

Dump an XML document to an I/O buffer.

buf : an output I/O buffer
cur : the document
encoding : the encoding if any assuming the i/O layer handles the trancoding
Returns : the number of file written or -1 in case of failure.

Name

xmlmemory -- 
xmlmemory —

Synopsis

#define NO_DEBUG_MEMORYDEBUG_MEMORY -void MEM_LIST +void (*xmlFreeFunc) (void*); +void* (*xmlMallocFunc) (...); +void* (*xmlReallocFunc) (void*, + ...); +char* (*xmlStrdupFunc) (const char*); +extern xmlFreeFunc xmlFree (void *ptr); -void* ; +extern xmlMallocFunc xmlMalloc (int size); -void* ; +extern xmlReallocFunc xmlRealloc (void *ptr, - int size); -char* ; +extern xmlStrdupFunc xmlMemStrdup (const char *str); +>; +int xmlMemSetup (xmlFreeFunc freeFunc, + xmlMallocFunc mallocFunc, + xmlReallocFunc reallocFunc, + xmlStrdupFunc strdupFunc); +int xmlMemGet (xmlFreeFunc *freeFunc, + xmlMallocFunc *mallocFunc, + xmlReallocFunc *reallocFunc, + xmlStrdupFunc *strdupFunc); int xmlInitMemoryxmlMemUsed (void); void xmlMemoryDump (void); -void xmlMemDisplay (FILE *fp, int nr); -#define DEBUG_MEMORY_LOCATION -#define DEBUG_MEMORY -#define MEM_LIST +void xmlMemoryDump (void); void* xmlMallocLoc

Description

Details

NO_DEBUG_MEMORY

DEBUG_MEMORY

#define NO_DEBUG_MEMORY
#define DEBUG_MEMORY

xmlFree ()

MEM_LIST

void        xmlFree                         (void *ptr);
#define MEM_LIST /* keep a list of all the allocated memory blocks */

a free() equivalent, with error checking.


xmlFreeFunc ()

void        (*xmlFreeFunc)                  (void*);

ptrParam1 :

xmlMalloc ()

xmlMallocFunc ()

void*       xmlMalloc                       (int size);
void* (*xmlMallocFunc) (...);

a malloc() equivalent, with logging of the allocation info.

size... :

xmlRealloc ()

xmlReallocFunc ()

void*       xmlRealloc                      (void *ptr,
-                                             int size);
void* (*xmlReallocFunc) (void*, + ...);

a realloc() equivalent, with logging of the allocation info.

ptrParam1 :size... :

xmlMemStrdup ()

xmlStrdupFunc ()

char*       xmlMemStrdup                    (const char *str);
char* (*xmlStrdupFunc) (const char*);

a strdup() equivalent, with logging of the allocation info.

strParam1 :

xmlFree

extern xmlFreeFunc xmlFree;


xmlMalloc

extern xmlMallocFunc xmlMalloc;


xmlRealloc

extern xmlReallocFunc xmlRealloc;


xmlMemStrdup

extern xmlStrdupFunc xmlMemStrdup;


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


xmlMemGet ()

int         xmlMemGet                       (xmlFreeFunc *freeFunc,
+                                             xmlMallocFunc *mallocFunc,
+                                             xmlReallocFunc *reallocFunc,
+                                             xmlStrdupFunc *strdupFunc);

Return the memory access functions set currently in use

freeFunc : the free() function in use
mallocFunc : the malloc() function in use
reallocFunc : the realloc() function in use
strdupFunc : the strdup() function in use
Returns :0 on success


 0 on success


 an int representing the amount of memory allocated.


xmlMemoryDump ()

void        xmlMemoryDump                   (void);

Dump in-extenso the memory blocks allocated to the file .memorylist


  a FILE descriptor used as the output file, if NULL, the result is +written to the file .memorylist


  a FILE descriptor used as the output file  number of entries to dump


DEBUG_MEMORY_LOCATION

xmlMemoryDump ()

#define     DEBUG_MEMORY_LOCATION
void xmlMemoryDump (void);

Dump in-extenso the memory blocks allocated to the file .memorylist


DEBUG_MEMORY

#define     DEBUG_MEMORY


MEM_LIST

#define     MEM_LIST


  an int specifying the size in byte to allocate. the line number the file name or NULL  the line number


  the initial memory block pointer  an int specifying the size in byte to allocate. the line number the file name or NULL  the line number


Synopsis

+struct xmlXPathContext; +typedef xmlXPathContextPtr; +struct xmlXPathParserContext; +typedef xmlXPathParserContextPtr; +struct xmlNodeSet; +typedef xmlNodeSetPtr; #define XPATH_UNDEFINEDXPATH_USERS +struct xmlXPathObject; +typedef xmlXPathObjectPtr; int (*xmlXPathConvertFunc) (xmlXPathObjectPtr) (xmlXPathObjectPtr obj, int type); +struct xmlXPathType; +typedef xmlXPathTypePtr; +struct xmlXPathVariable; +typedef xmlXPathVariablePtr; void (*xmlXPathEvalFunc) (xmlXPathParserContextPtr) (xmlXPathParserContextPtr ctxt, int nargs); -xmlXPathObjectPtrxmlXPathFunct; +typedef xmlXPathFuncPtr; +xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr) (xmlXPathParserContextPtr ctxt, - xmlXPathObjectPtrxmlXPathObjectPtr cur); +struct xmlXPathAxis; +typedef xmlXPathAxisPtr; void (*xmlXPathFunction) (xmlXPathParserContextPtr) (xmlXPathParserContextPtr ctxt, int nargs); -xmlXPathContextPtrxmlXPathContextPtr xmlXPathNewContextxmlXPathFreeContext (xmlXPathContextPtr (xmlXPathContextPtr ctxt); -xmlXPathObjectPtrxmlXPathObjectPtr xmlXPathEvalxmlChar *str, - xmlXPathContextPtrxmlXPathContextPtr ctxt); void xmlXPathFreeObject (xmlXPathObjectPtr (xmlXPathObjectPtr obj); -xmlXPathObjectPtrxmlXPathObjectPtr xmlXPathEvalExpressionxmlChar *str, - xmlXPathContextPtr ctxt);

xmlXPathContextPtr ctxt); +xmlNodeSetPtr xmlXPathNodeSetCreate (xmlNodePtr val); +void xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj); +void xmlXPathFreeNodeSet (xmlNodeSetPtr obj);

Description

Details

struct xmlXPathContext

struct xmlXPathContext {
+    xmlDocPtr doc;			/* The current document */
+    xmlNodePtr node;			/* The current node */
+    xmlNodeSetPtr nodelist;		/* The current node list */
+
+    int nb_variables;			/* number of defined variables */
+    int max_variables;			/* max number of variables */
+    xmlXPathVariablePtr *variables;	/* Array 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;			/* number of defined funcs */
+    int max_funcs;			/* max number of funcs */
+    xmlXPathFuncPtr *funcs;		/* Array of defined funcs */
+
+    int nb_axis;			/* number of defined axis */
+    int max_axis;			/* max number of axis */
+    xmlXPathAxisPtr *axis;		/* Array of defined axis */
+
+    /* Namespace traversal should be implemented with user */
+    xmlNsPtr *namespaces;		/* The namespaces lookup */
+    int nsNr;				/* the current Namespace index */
+    void *user;				/* user defined extra info */
+};


xmlXPathContextPtr

typedef xmlXPathContext *xmlXPathContextPtr;


struct 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 */
+};


xmlXPathParserContextPtr

typedef xmlXPathParserContext *xmlXPathParserContextPtr;


struct 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 */
+};


xmlNodeSetPtr

typedef xmlNodeSet *xmlNodeSetPtr;







#define     XPATH_USERS
#define XPATH_USERS 5

struct xmlXPathObject

struct xmlXPathObject {
+    int type;
+    xmlNodeSetPtr nodesetval;
+    int boolval;
+    double floatval;
+    xmlChar *stringval;
+    void *user;
+};


xmlXPathObjectPtr

typedef xmlXPathObject *xmlXPathObjectPtr;


int         (*xmlXPathConvertFunc)          (xmlXPathObjectPtrint         (*xmlXPathConvertFunc)          (xmlXPathObjectPtr obj,
                                              int type);

struct xmlXPathType

struct xmlXPathType {
+    const xmlChar         *name;		/* the type name */
+    xmlXPathConvertFunc func;		/* the conversion function */
+};


xmlXPathTypePtr

typedef xmlXPathType *xmlXPathTypePtr;


struct xmlXPathVariable

struct xmlXPathVariable {
+    const xmlChar       *name;		/* the variable name */
+    xmlXPathObjectPtr value;		/* the value */
+};


xmlXPathVariablePtr

typedef xmlXPathVariable *xmlXPathVariablePtr;


void        (*xmlXPathEvalFunc)             (xmlXPathParserContextPtrvoid        (*xmlXPathEvalFunc)             (xmlXPathParserContextPtr ctxt,
                                              int nargs);

struct xmlXPathFunct

struct xmlXPathFunct {
+    const xmlChar      *name;		/* the function name */
+    xmlXPathEvalFunc func;		/* the evaluation function */
+};


xmlXPathFuncPtr

typedef xmlXPathFunct *xmlXPathFuncPtr;


xmlXPathObjectPtr (*xmlXPathAxisFunc)       (xmlXPathParserContextPtrxmlXPathObjectPtr (*xmlXPathAxisFunc)       (xmlXPathParserContextPtr ctxt,
-                                             xmlXPathObjectPtrxmlXPathObjectPtr cur);

struct xmlXPathAxis

struct xmlXPathAxis {
+    const xmlChar      *name;		/* the axis name */
+    xmlXPathAxisFunc func;		/* the search function */
+};


xmlXPathAxisPtr

typedef xmlXPathAxis *xmlXPathAxisPtr;


void        (*xmlXPathFunction)             (xmlXPathParserContextPtrvoid        (*xmlXPathFunction)             (xmlXPathParserContextPtr ctxt,
                                              int nargs);

xmlXPathContextPtrxmlXPathContextPtr xmlXPathNewContext       (xmlDocPtr   the XML document the xmlXPathContext just allocated.


void        xmlXPathFreeContext             (xmlXPathContextPtrvoid        xmlXPathFreeContext             (xmlXPathContextPtr ctxt);
  the context to free


xmlXPathObjectPtrxmlXPathObjectPtr xmlXPathEval              (const xmlChar *str,
-                                             xmlXPathContextPtrxmlXPathContextPtr ctxt);
  the XPath expression  the XPath context the xmlXPathObjectPtr resulting from the eveluation or NULL. +the caller has to free the object.


void        xmlXPathFreeObject              (xmlXPathObjectPtrvoid        xmlXPathFreeObject              (xmlXPathObjectPtr obj);
  the object to free


xmlXPathObjectPtrxmlXPathObjectPtr xmlXPathEvalExpression    (const xmlChar *str,
-                                             xmlXPathContextPtrxmlXPathContextPtr ctxt);
  the XPath expression  the XPath context 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.


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


xmlXPathFreeNodeSet ()

void        xmlXPathFreeNodeSet             (xmlNodeSetPtr obj);

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

obj : the xmlNodeSetPtr to free

+ - + @@ -13,6 +14,7 @@ + @@ -38,12 +40,16 @@ + + + + @@ -60,20 +66,32 @@ + + + + - - - + + + + + + + + + + + @@ -124,39 +142,61 @@ + + + + + + + + + + + + + - - + + + + + + + + + + + @@ -175,8 +215,10 @@ + + @@ -185,13 +227,22 @@ + + + + + + + + + @@ -205,9 +256,11 @@ + + @@ -215,27 +268,29 @@ + + + + + - - - - - - + + + @@ -245,34 +300,48 @@ + + + + + + + + + + + + + + @@ -280,21 +349,26 @@ + + + + + @@ -305,12 +379,15 @@ + + + @@ -334,8 +411,14 @@ + + + + + + @@ -343,6 +426,9 @@ + + + @@ -350,22 +436,43 @@ + + + + + + + + + + + + + + + + + + + + + @@ -402,19 +509,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - - - @@ -430,9 +560,11 @@ - + + + @@ -487,6 +619,7 @@ + @@ -494,6 +627,7 @@ + @@ -502,13 +636,21 @@ + + + - - - + + + + + + + + @@ -516,21 +658,33 @@ + + + + + + + + - + + + + + + + + - - - - + diff --git a/doc/html/libxml-lib.html b/doc/html/libxml-lib.html index 9ffb9df2..a896ee1e 100644 --- a/doc/html/libxml-lib.html +++ b/doc/html/libxml-lib.html @@ -4,7 +4,7 @@ >Libxml Library Reference