From 06047432eb95559476c4332751e71a00f8ff78a8 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 24 Apr 2000 11:33:38 +0000 Subject: [PATCH] removed extraneous xmlRemoveProp definition added item about * tree.h: removed extraneous xmlRemoveProp definition * TODO: added item about --disable-corba configure switch * tree.c parser.c: fixed problems for xmlCopyDoc and postvalidation * nanoftp.c: fixed include problems giving troubles on AIX and slowlaris * xmlIO.[ch] valid.h tree.[ch] xlink.c xmlmemory.c uri.c parser.c nanoftp.c nanohttp.c SAX.c testSAX.c : comment and headers changes to lower gtk-doc number of warnings * doc/html/*: rebuilt docs Daniel --- ChangeLog | 12 + SAX.c | 31 +- TODO | 2 + doc/html/book1.html | 9 +- doc/html/gnome-xml-debugxml.html | 753 +---- doc/html/gnome-xml-encoding.html | 541 ++-- doc/html/gnome-xml-entities.html | 616 ++-- doc/html/gnome-xml-htmlparser.html | 1064 +------ doc/html/gnome-xml-htmltree.html | 294 +- doc/html/gnome-xml-nanoftp.html | 160 +- doc/html/gnome-xml-nanohttp.html | 40 +- doc/html/gnome-xml-parser.html | 2684 ++-------------- doc/html/gnome-xml-parserinternals.html | 1390 +++----- doc/html/gnome-xml-sax.html | 112 +- doc/html/gnome-xml-tree.html | 3834 +++-------------------- doc/html/gnome-xml-valid.html | 2156 ++----------- doc/html/gnome-xml-xml-error.html | 62 +- doc/html/gnome-xml-xmlio.html | 989 +----- doc/html/gnome-xml-xmlmemory.html | 979 ++---- doc/html/gnome-xml-xpath.html | 1026 +----- doc/html/index.sgml | 172 +- doc/html/libxml-lib.html | 5 +- doc/html/libxml-notes.html | 5 +- include/libxml/tree.h | 5 +- include/libxml/valid.h | 2 +- include/libxml/xmlIO.h | 2 +- nanoftp.c | 39 +- nanohttp.c | 4 +- parser.c | 12 +- testSAX.c | 2 +- tree.c | 23 +- tree.h | 5 +- uri.c | 40 +- valid.h | 2 +- xlink.c | 2 +- xmlIO.h | 2 +- xmlmemory.c | 6 +- 37 files changed, 2837 insertions(+), 14245 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4339b4b9..5ccb9e5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Mon Apr 24 13:30:13 CEST 2000 Daniel Veillard + + * tree.h: removed extraneous xmlRemoveProp definition + * TODO: added item about --disable-corba configure switch + * tree.c parser.c: fixed problems for xmlCopyDoc and postvalidation + * nanoftp.c: fixed include problems giving troubles on AIX and + slowlaris + * xmlIO.[ch] valid.h tree.[ch] xlink.c xmlmemory.c uri.c + parser.c nanoftp.c nanohttp.c SAX.c testSAX.c : + comment and headers changes to lower gtk-doc number of warnings + * doc/html/*: rebuilt docs + Sun Apr 16 11:23:29 CEST 2000 Daniel Veillard * HACKING: documented the tag for 1.x and instructions diff --git a/SAX.c b/SAX.c index f1a85eda..5293df72 100644 --- a/SAX.c +++ b/SAX.c @@ -144,7 +144,10 @@ hasExternalSubset(void *ctx) /** * internalSubset: - * @ctx: the user data (XML parser context) + * @ctx: the user data (XML parser context) + * @name: the root element name + * @ExternalID: the external ID + * @SystemID: the SYSTEM ID (e.g. filename or URL) * * Callback on internal subset declaration. */ @@ -163,6 +166,9 @@ internalSubset(void *ctx, const xmlChar *name, /** * externalSubset: * @ctx: the user data (XML parser context) + * @name: the root element name + * @ExternalID: the external ID + * @SystemID: the SYSTEM ID (e.g. filename or URL) * * Callback on external subset declaration. */ @@ -378,11 +384,12 @@ entityDecl(void *ctx, const xmlChar *name, int type, /** * attributeDecl: * @ctx: the user data (XML parser context) + * @elem: the name of the element * @fullname: the attribute name * @type: the attribute type - * @publicId: The public ID of the attribute - * @systemId: The system ID of the attribute - * @content: the attribute value (without processing). + * @def: the type of default value + * @defaultValue: the attribute default value + * @tree: the tree of enumerated value set * * An attribute definition has been parsed */ @@ -428,9 +435,7 @@ attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname, * @ctx: the user data (XML parser context) * @name: the element name * @type: the element type - * @publicId: The public ID of the element - * @systemId: The system ID of the element - * @content: the element value (without processing). + * @content: the element value tree * * An element definition has been parsed */ @@ -595,7 +600,7 @@ endDocument(void *ctx) /** * attribute: * @ctx: the user data (XML parser context) - * @name: The attribute name + * @fullname: The attribute name, including namespace prefix * @value: The attribute value * * Handle an attribute that has been read by the parser. @@ -743,7 +748,7 @@ attribute(void *ctx, const xmlChar *fullname, const xmlChar *value) /** * startElement: * @ctx: the user data (XML parser context) - * @name: The element name + * @fullname: The element name, including namespace prefix * @atts: An array of name/value attributes pairs, NULL terminated * * called when an opening tag has been processed. @@ -1029,7 +1034,6 @@ ignorableWhitespace(void *ctx, const xmlChar *ch, int len) * @ctx: the user data (XML parser context) * @target: the target name * @data: the PI data's - * @len: the number of xmlChar * * A processing instruction has been parsed. */ @@ -1102,6 +1106,7 @@ globalNamespace(void *ctx, const xmlChar *href, const xmlChar *prefix) * * Set the current element namespace. */ + void setNamespace(void *ctx, const xmlChar *name) { @@ -1128,7 +1133,10 @@ setNamespace(void *ctx, const xmlChar *name) * @ctx: the user data (XML parser context) * * Get the current element namespace. + * + * Returns the xmlNsPtr or NULL if none */ + xmlNsPtr getNamespace(void *ctx) { @@ -1149,7 +1157,10 @@ getNamespace(void *ctx) * * Check that the current element namespace is the same as the * one read upon parsing. + * + * Returns 1 if true 0 otherwise */ + int checkNamespace(void *ctx, xmlChar *namespace) { diff --git a/TODO b/TODO index dc8ee4ac..51ea18b5 100644 --- a/TODO +++ b/TODO @@ -23,6 +23,8 @@ TODO: - Handle undefined namespaces in entity contents better ... at least issue a warning - General checking of DTD validation in presence of namespaces ... hairy +- fix --disable-corba configure switch handling, and use XML_WITHOUT_CORBA + not WITHOUT_CORBA flag TODO: ===== diff --git a/doc/html/book1.html b/doc/html/book1.html index e066da65..f23eca27 100644 --- a/doc/html/book1.html +++ b/doc/html/book1.html @@ -4,13 +4,16 @@ >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); -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); doc);

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

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); -xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler (const char *name); -int xmlCheckUTF8 (unsigned char *utf);xmlCharEncoding xmlDetectCharEncoding (unsigned char *in, + int len); +xmlCharEncoding xmlParseCharEncoding (const char *name); +void xmlInitCharEncodingHandlers (void);

Description

Details




struct xmlCharEncodingHandler

struct xmlCharEncodingHandler {
-    char                       *name;
-    xmlCharEncodingInputFunc   input;
-    xmlCharEncodingOutputFunc output;
-};


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.


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



xmlCheckUTF8 ()

xmlDetectCharEncoding ()

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

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.

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.

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


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 : 
Returns : 


xmlInitCharEncodingHandlers ()

void        xmlInitCharEncodingHandlers     (void);

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.

Name

entities —
entities -- 

Synopsis

-enum xmlEntityType; -struct xmlEntity; +#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 typedef xmlEntityPtrXML_MIN_ENTITIES_TABLE -struct xmlEntitiesTable; typedef xmlEntitiesTablePtrxmlEntitiesTablePtr table); -void xmlDumpEntityDecl (xmlBufferPtr buf, - xmlEntityPtr ent); -void xmlCleanupPredefinedEntities (void); -int xmlEntityAddReference (xmlEntityPtr ent, - const xmlChar *to); table);

Description

Details

enum xmlEntityType

XML_INTERNAL_GENERAL_ENTITY

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

struct xmlEntity

XML_EXTERNAL_GENERAL_PARSED_ENTITY

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
-};
#define XML_EXTERNAL_GENERAL_PARSED_ENTITY 2

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	32
#define XML_MIN_ENTITIES_TABLE

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 external subset.

Register a new entity for this document DTD.

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. 


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; -struct htmlElemDesc; -typedef htmlElemDescPtr; -struct htmlEntityDesc; -typedef htmlEntityDescPtr; -htmlElemDescPtrhtmlElemDescPtr htmlTagLookupxmlChar *tag); -htmlEntityDescPtrhtmlEntityDescPtr htmlEntityLookupxmlChar *name); -int htmlIsAutoClosed (htmlDocPtr doc, - htmlNodePtr elem); -int htmlAutoCloseTag (htmlDocPtr doc, - const xmlChar *name, - htmlNodePtr elem); -htmlEntityDescPtrhtmlEntityDescPtr htmlParseEntityRefhtmlParseFile (const char *filename, - const char *encoding); -void 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	XML_COMMENT_NODE
#define HTML_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 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); 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); -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); +void xmlDefaultSAXHandlerInit (void); +void htmlDefaultSAXHandlerInit (void); const xmlParserNodeInfo

Description

Details

#define XML_DEFAULT_VERSION	"1.0"
#define XML_DEFAULT_VERSION


struct xmlParserInput

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


xmlExternalEntityLoader ()

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

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 : 



























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. Since they are supposed to be -encoded in UTF-8 or an encoding with 8bit based chars, we assume -a termination mark of '0'.

a strdup for array of xmlChar's

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 


length of a xmlChar's string

lenght of a xmlChar's string

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


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

a strcat for array of xmlChar's

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 


the filename the resulting document tree 


int 0 or 1  the last value for 0 for no substitution, 1 for substitution. 


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.


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 


xmlCreateDocParserCtxt ()

xmlDefaultSAXHandlerInit ()

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

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

Initialize the default SAX handler

cur : a pointer to an array of xmlChar
Returns :the new parser context or NULL


xmlCreatePushParserCtxt ()

htmlDefaultSAXHandlerInit ()

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

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.

Initialize the default SAX handler

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); -xmlParserCtxtPtr xmlCreateEntityParserCtxt (const xmlChar *URL, - const xmlChar *ID, - const xmlChar *base); void xmlSwitchEncodingxmlCharEncoding enc); void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); -void xmlHandleEntity (xmlParserCtxtPtr 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 1000
#define XML_MAX_NAMELEN

CHARVAL


NEXTCHARVAL()

#define     NEXTCHARVAL(p)

p : 


SKIPCHARVAL()

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

p : 









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






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

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



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 it 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; each IDREF Name must match the value +of type IDREFS must match Names; TODO each IDREF Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute.

[ VC: Entity Name ] Values of type ENTITY must match the Name production, values -of type ENTITIES must match Names; each Entity Name must match the +of type ENTITIES must match Names; TODO each Entity Name must match the name of an unparsed entity declared in the DTD.

[ VC: Name Token ] @@ -5117,7 +5024,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. 


[NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'

Returne the element name parsed

an XML parser context 

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	0
#define XML_SUBSTITUTE_NONE

#define XML_SUBSTITUTE_REF	1
#define XML_SUBSTITUTE_REF

#define XML_SUBSTITUTE_PEREF	2
#define XML_SUBSTITUTE_PEREF

#define XML_SUBSTITUTE_BOTH 	3
#define XML_SUBSTITUTE_BOTH

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










Callback on internal subset declaration.

Does this document has an internal subset




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

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 attribute name





















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; extern xmlNsPtr baseDTDxmlIndentTreeOutput; -extern xmlBufferAllocationScheme xmlBufferAllocScheme; -extern int xmlSaveNoEmptyTags; xmlBufferPtrxmlBufferCreate (void); -xmlBufferPtr xmlBufferCreateSize (size_t size); void xmlBufferFreexmlBufferPtr 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 xmlUnlinkNodexmlNodePtr cur); -int xmlRemoveProp (xmlAttrPtr cur); xmlNsPtrxmlChar *name); xmlChar* xmlGetNsProp (xmlNodePtr node, - const xmlChar *name, - const xmlChar *nameSpace); -xmlNodePtr xmlChar *lang); int xmlNodeGetSpacePreserve (xmlNodePtr cur); -xmlChar* xmlNodeGetBase (xmlDocPtr doc, - xmlNodePtr cur); +HREF="gnome-xml-tree.html#XMLREMOVEPROP" +>xmlRemoveProp (xmlAttrPtr attr); int xmlRemoveNodexmlChar *string); -int xmlReconciliateNs (xmlDocPtr doc, - xmlNodePtr tree); void xmlDocDumpMemoryxmlDocPtr cur); -void xmlElemDump (FILE *f, - xmlDocPtr cur, - xmlNodePtr elem); int xmlSaveFile

Description

Details


xmlChar

typedef unsigned char xmlChar;


#define CHAR xmlChar
#define CHAR

#define BAD_CAST (xmlChar *)
#define BAD_CAST

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;




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;



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


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;

Sets the allocation scheme for this buffer


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

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





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 


the buffer to dump  the xmlChar string 


the buffer to dump  the C char string 



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

buf : 
scheme : 


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 for the external subset. To create an -internal subset, use xmlCreateIntSubset().

Creation of a new DTD.

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 children are freed too.

Free a property and all its siblings, all the childs 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 children list. +> childs 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 children are freed too.

the first node in the list 


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.

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

the node 


xmlRemoveProp ()

int         xmlRemoveProp                   (xmlAttrPtr cur);

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

cur : an attribute
Returns :0 if success and -1 in case of error.


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. 


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 


the node being read a new xmlChar * or NULL if no content is available. -It's up to the caller to free the memory. 


the node being checked a pointer to the lang value, or NULL if not found -It's up to the caller to free the memory. 


the node being changed  the langage description 


xmlNodeGetSpacePreserve ()

xmlRemoveProp ()

int         xmlNodeGetSpacePreserve         (xmlNodePtr cur);
int xmlRemoveProp (xmlAttrPtr attr);

Searches the language of a node, i.e. the values of the xml:space -attribute or the one carried by the nearest ancestor.

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

curattr : the node being checked -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.



the XML buffer  the string to add 


the XML buffer output  the string to add 


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



xmlElemDump ()

void        xmlElemDump                     (FILE *f,
-                                             xmlDocPtr cur,
-                                             xmlNodePtr elem);

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

the current node
f : 
elem : 

the filename  the document  the number of file written or -1 in case of failure. 


the document 0 (uncompressed) to 9 (max compression) 


the document  the compression ratio 


0 (uncompressed) to 9 (max compression) 


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, xmlChar *prefix, +> *ns, xmlAttributeTypexmlAttributeTablePtr 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); -int xmlValidGetValidElements (xmlNode *prev, - xmlNode *next, - const xmlChar **list, - int max); -int xmlValidGetPotentialChildren (xmlElementContent *ctree, - const xmlChar **list, - int *len, - int max); *name);

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	32
#define XML_MIN_NOTATION_TABLE

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	32
#define XML_MIN_ELEMENT_TABLE

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	32
#define XML_MIN_ATTRIBUTE_TABLE

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	32
#define XML_MIN_ID_TABLE

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	32
#define XML_MIN_REF_TABLE

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, xmlChar *prefix, +> *ns, xmlAttributeType the validation context  pointer to the DTD  the element name  the attribute name prefixns : the attribute type  the attribute default type  the attribute default value  if it's an enumeration, the associated list NULL if not, othervise the entity 


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 document against the dtd instance

Try to validate 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 ] @@ -6238,7 +4991,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 


(const char *filename);

Description

Details

xmlInputMatchCallback ()

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

filename : 
Returns : 


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


xmlParserInputBufferPtr

typedef xmlParserInputBuffer *xmlParserInputBufferPtr;


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


xmlParserInputBufferPtr xmlParserInputBufferCreateFilename - (const char *filename, + (const char *URI, xmlCharEncodingCreate 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

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

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 -This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy

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

Name

xmlmemory —
xmlmemory -- 

Synopsis

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

Description

Details

DEBUG_MEMORY

NO_DEBUG_MEMORY

#define DEBUG_MEMORY
#define NO_DEBUG_MEMORY

MEM_LIST

#define MEM_LIST /* keep a list of all the allocated memory blocks */


xmlFreeFunc ()

void        (*xmlFreeFunc)                  (void*);

Param1 : 


xmlMallocFunc ()

void*       (*xmlMallocFunc)                (...);

... : 


xmlReallocFunc ()

void*       (*xmlReallocFunc)               (void*,
-                                             ...);

Param1 : 
... : 


xmlStrdupFunc ()

char*       (*xmlStrdupFunc)                (const char*);

Param1 : 
Returns : 


xmlFree

xmlFree ()

extern xmlFreeFunc xmlFree;
void xmlFree (void *ptr);

a free() equivalent, with error checking.

ptr : 


xmlMalloc

xmlMalloc ()

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

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

size : 


xmlRealloc

xmlRealloc ()

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

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

ptr : 
size : 


xmlMemStrdup

xmlMemStrdup ()

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


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 ?

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

freeFuncstr : the free() function to usemallocFunc : the malloc() function to usereallocFunc : the realloc() function to usestrdupFunc : the strdup() function to use 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 


xmlMemoryDump ()

DEBUG_MEMORY_LOCATION

void        xmlMemoryDump                   (void);
#define DEBUG_MEMORY_LOCATION

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 file name or NULL - file: the line number the line number

the initial memory block pointer  an int specifying the size in byte to allocate.  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); -struct xmlXPathFunct; -typedef xmlXPathFuncPtr; -xmlXPathObjectPtrxmlXPathObjectPtr (*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); -xmlNodeSetPtr xmlXPathNodeSetCreate (xmlNodePtr val); -void xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj); -void xmlXPathFreeNodeSet (xmlNodeSetPtr obj);

xmlXPathContextPtr ctxt);

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;			/* # of node in the set */
-    int nodeMax;		/* allocated space */
-    xmlNodePtr *nodeTab;	/* array of nodes in no particular order */
-};


xmlNodeSetPtr

typedef xmlNodeSet *xmlNodeSetPtr;








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

- + - @@ -14,7 +13,6 @@ - @@ -40,16 +38,12 @@ - - - - @@ -66,31 +60,20 @@ - - - - - - - - - - - - - + + @@ -141,46 +124,32 @@ - - - - - - - - - - - - - + + - - - @@ -188,10 +157,6 @@ - - - - @@ -210,10 +175,8 @@ - - @@ -222,28 +185,18 @@ - - - - - - - - - - @@ -252,7 +205,6 @@ - @@ -263,27 +215,27 @@ - - + - - - - + + + + + + - @@ -297,43 +249,30 @@ - - - - - - - - - - - - - @@ -341,26 +280,21 @@ - - - - - @@ -371,8 +305,6 @@ - - @@ -402,14 +334,8 @@ - - - - - - @@ -417,9 +343,6 @@ - - - @@ -427,43 +350,22 @@ - - - - - - - - - - - - - - - - - - - - - @@ -500,25 +402,19 @@ - - - - - - - - - + + + @@ -534,10 +430,9 @@ - - - + + @@ -592,7 +487,6 @@ - @@ -600,7 +494,6 @@ - @@ -609,16 +502,13 @@ - - - - - - + + + @@ -626,33 +516,21 @@ - - - - - - - - - - - - - - + - - + - + + + diff --git a/doc/html/libxml-lib.html b/doc/html/libxml-lib.html index a896ee1e..9ffb9df2 100644 --- a/doc/html/libxml-lib.html +++ b/doc/html/libxml-lib.html @@ -4,7 +4,7 @@ >Libxml Library Reference