diff --git a/ChangeLog b/ChangeLog index 989ad74a..54025082 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jan 5 17:29:17 CET 2000 Daniel Veillard + + * doc/* : rebuild the docs + Wed Jan 5 17:08:43 CET 2000 Daniel Veillard * acconfig.h: readline and history patch diff --git a/doc/html/book1.html b/doc/html/book1.html index 13265f03..1e53fbc0 100644 --- a/doc/html/book1.html +++ b/doc/html/book1.html @@ -4,16 +4,13 @@ >Gnome XML Library Reference Manual

    Daniel.Veillard@w3.org
  

entities

entities

entities

Name

entities -- 
entities —

Synopsis

XML_INTERNAL_PREDEFINED_ENTITY +struct xmlEntity; typedef xmlEntityPtrXML_MIN_ENTITIES_TABLE +struct xmlEntitiesTable; typedef xmlEntitiesTablePtrxmlEntitiesTablePtr table); table); +void xmlCleanupPredefinedEntities (void);

Description

Details

#define     XML_INTERNAL_GENERAL_ENTITY
#define XML_INTERNAL_GENERAL_ENTITY 1

#define     XML_EXTERNAL_GENERAL_PARSED_ENTITY
#define XML_EXTERNAL_GENERAL_PARSED_ENTITY 2

#define     XML_EXTERNAL_GENERAL_UNPARSED_ENTITY
#define XML_EXTERNAL_GENERAL_UNPARSED_ENTITY 3

#define     XML_INTERNAL_PARAMETER_ENTITY
#define XML_INTERNAL_PARAMETER_ENTITY 4

#define     XML_EXTERNAL_PARAMETER_ENTITY
#define XML_EXTERNAL_PARAMETER_ENTITY 5

#define     XML_INTERNAL_PREDEFINED_ENTITY
#define XML_INTERNAL_PREDEFINED_ENTITY 6

xmlEntityPtr

struct xmlEntity

struct xmlEntity {
+    int type;			/* The entity type */
+    int len;			/* The lenght of the name */
+    const xmlChar  *name;	/* Name of the entity */
+    const xmlChar  *ExternalID;	/* External identifier for PUBLIC Entity */
+    const xmlChar  *SystemID;	/* URI for a SYSTEM or PUBLIC Entity */
+    xmlChar *content;		/* The entity content or ndata if unparsed */
+    int length;			/* the content length */
+    xmlChar *orig;		/* The entity cont without ref substitution */
+};


xmlEntityPtr

typedef xmlEntity *xmlEntityPtr;


#define     XML_MIN_ENTITIES_TABLE
#define XML_MIN_ENTITIES_TABLE 32

xmlEntitiesTablePtr

struct xmlEntitiesTable

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


xmlEntitiesTablePtr

typedef xmlEntitiesTable *xmlEntitiesTablePtr;


  the document  the entity name  the entity type XML_xxx_yyy_ENTITY  the entity external ID if available  the entity system ID if available  the entity content


  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


  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.



xmlCleanupPredefinedEntities ()

void        xmlCleanupPredefinedEntities    (void);

Cleanup up the predefined entities table.

Name

HTMLparser -- 
HTMLparser —

Synopsis

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

Description

Details

htmlParserCtxt

typedef xmlParserCtxt htmlParserCtxt;


htmlParserCtxtPtr

typedef xmlParserCtxtPtr htmlParserCtxtPtr;


htmlParserNodeInfo

typedef xmlParserNodeInfo htmlParserNodeInfo;


htmlSAXHandler

typedef xmlSAXHandler htmlSAXHandler;


htmlSAXHandlerPtr

typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;


htmlParserInput

typedef xmlParserInput htmlParserInput;


htmlParserInputPtr

typedef xmlParserInputPtr htmlParserInputPtr;


htmlDocPtr

typedef xmlDocPtr htmlDocPtr;


htmlNodePtr

typedef xmlNodePtr htmlNodePtr;


struct htmlElemDesc

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


htmlElemDescPtr

typedef htmlElemDesc *htmlElemDescPtr;


struct htmlEntityDesc

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


htmlEntityDescPtr

typedef htmlEntityDesc *htmlEntityDescPtr;


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


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


htmlIsAutoClosed ()

int         htmlIsAutoClosed                (htmlDocPtr doc,
+                                             htmlNodePtr elem);

The HTmL DtD allows a tag to implicitely close other tags. +The list is kept in htmlStartClose array. This function checks +if a tag is autoclosed by one of it's child

doc : the HTML document
elem : the HTML element
Returns :1 if autoclosed, 0 otherwise


htmlAutoCloseTag ()

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

The HTmL DtD allows a tag to implicitely close other tags. +The list is kept in htmlStartClose array. This function checks +if the element or one of it's children would autoclose the +given tag.

doc : the HTML document
name : The tag name
elem : the HTML element
Returns :1 if autoclose, 0 otherwise


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


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


  an HTML parser context


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


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



htmlFreeParserCtxt ()

void        htmlFreeParserCtxt              (htmlParserCtxtPtr ctxt);

Free all the memory used by a parser context. However the parsed +document in ctxt->myDoc is not freed.

ctxt : an HTML parser context


htmlCreatePushParserCtxt ()

htmlParserCtxtPtr htmlCreatePushParserCtxt  (htmlSAXHandlerPtr sax,
+                                             void *user_data,
+                                             const char *chunk,
+                                             int size,
+                                             const char *filename,
+                                             xmlCharEncoding enc);

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

sax : a SAX handler
user_data : The user data returned on SAX callbacks
chunk : a pointer to an array of chars
size : number of chars in the array
filename : an optional file name or URI
enc : an optional encoding
Returns :the new parser context or NULL


htmlParseChunk ()

int         htmlParseChunk                  (htmlParserCtxtPtr ctxt,
+                                             const char *chunk,
+                                             int size,
+                                             int terminate);

Parse a Chunk of memory

ctxt : an XML parser context
chunk : an char array
size : the size in byte of the chunk
terminate : last chunk indicator
Returns :zero if no error, the xmlParserErrors otherwise.

HTMLtree

HTMLtree

HTMLtree

Name

HTMLtree -- 
HTMLtree —




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


  the FILE*  the document


Synopsis

Description

Details

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


  The URL to load  the HTTP method to use  the input string if any  the Content-Type information IN and OUT  the extra headers


  The URL to load  if available the Content-Type information will be +returned at that location


  the HTTP context the HTTP return code for the request.


  the HTTP context  a buffer  the buffer length the number of byte read. 0 is an indication of an end of connection. +-1 indicates a parameter error.


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


  the HTTP context

parserInternals

parserInternals

parserInternals

Name

parserInternals -- 
parserInternals —

Synopsis

xmlParserCtxtPtr xmlCreateDocParserCtxt ( (char *buffer, int size); void xmlFreeParserCtxt (

Description

Details

#define     XML_MAX_NAMELEN
#define XML_MAX_NAMELEN 1000



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














  the filename the new parser context or NULL


  an pointer to a char array  the size of the array the new parser context or NULL



 the xmlParserCtxtPtr or NULL


  the parser context  the encoding value (number)


  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  a xmlChar **  the local part, and prefix is updated +to get the Prefix if any.


  an XML parser context the namespace name or NULL


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


  an XML parser context the namespace name


  an XML parser context the string parser or NULL.


This is what the older xml-name Working Draft specified, a bunch of other stuff may still rely on it, so support is still here as -if ot was declared on the root of the Tree:-(

To be removed at next drop of binary compatibility

  an XML parser context


  an XML parser context the Name parsed or NULL


  an XML parser context the Name parsed or NULL


  an XML parser context the Nmtoken parsed or NULL


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


[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"

3.3.3 Attribute-Value Normalization: +Before the value of an attribute is passed to the application or +checked for validity, the XML processor must normalize it as follows: +- a character reference is processed by appending the referenced +character to the attribute value +- an entity reference is processed by recursively processing the +replacement text of the entity +- a whitespace character (x20, xD, xA, x9) is processed by +appending x20 to the normalized value, except that only a single +x20 is appended for a "xDxA" sequence that is part of an external +parsed entity or the literal entity value of an internal parsed entity +- other characters are processed by appending them to the normalized value +If the declared value is not CDATA, then the XML processor must further +process the normalized attribute value by discarding any leading and +trailing space (x20) characters, and by replacing sequences of space +(x20) characters by a single space (x20) character. +All attributes for which no declaration has been read should be treated +by a non-validating parser as if declared CDATA.

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


  an XML parser context the SystemLiteral parsed or NULL


  an XML parser context the PubidLiteral parsed or NULL.


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


  an XML parser context  a xmlChar** receiving PubidLiteral  indicate whether we should restrict parsing to only +production [75], see NOTE below the function returns SystemLiteral and in the second +case publicID receives PubidLiteral, is strict is off +it is possible to return NULL and have publicID set.


  an XML parser context


  an XML parser context the PITarget name or NULL


  an XML parser context


  an XML parser context


  an XML parser context


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


  an XML parser context  the notation attribute tree built while parsing


  an XML parser context  the enumeration attribute tree built while parsing


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


[ VC: IDREF ] Values of type IDREF must match the Name production, and values -of type IDREFS must match Names; TODO each IDREF Name must match the value +of type IDREFS must match Names; each IDREF Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute.

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

[ VC: Name Token ] @@ -4999,7 +5051,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


  an XML parser context


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


#define     XML_SUBSTITUTE_NONE
#define XML_SUBSTITUTE_NONE 0

#define     XML_SUBSTITUTE_REF
#define XML_SUBSTITUTE_REF 1

#define     XML_SUBSTITUTE_PEREF
#define XML_SUBSTITUTE_PEREF 2

#define     XML_SUBSTITUTE_BOTH
#define XML_SUBSTITUTE_BOTH 3

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





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; 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 xmlDocGetRootElement (xmlDocPtr doc); +xmlNodePtr xmlGetLastChild (xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc, + xmlNodePtr root); +void xmlNodeSetName (xmlNodePtr cur, + const xmlChar *name); +xmlNodePtr xmlAddChild (xmlNodePtr 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 xmlRemoveProp (xmlAttrPtrxmlChar* xmlNodeGetBase (xmlDocPtr doc, + xmlNodePtr cur); int xmlDocPtr cur); +void xmlElemDump (FILE *f, + xmlDocPtr cur, + xmlNodePtr elem); int xmlSaveFile

Description

Details



#define     CHAR
#define CHAR xmlChar

#define     BAD_CAST
#define BAD_CAST (xmlChar *)

xmlNotationPtr

struct xmlNotation

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


xmlNotationPtr

typedef xmlNotation *xmlNotationPtr;




struct xmlEnumeration

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


xmlEnumerationPtr

typedef xmlEnumeration *xmlEnumerationPtr;


struct xmlAttribute

struct xmlAttribute {
+    const xmlChar         *elem;	/* Element holding the attribute */
+    const xmlChar         *name;	/* Attribute name */
+    struct _xmlAttribute   *next;       /* list of attributes of an element */
+    xmlAttributeType       type;	/* The 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 */
+};


xmlAttributePtr

typedef xmlAttribute *xmlAttributePtr;




xmlElementContentPtr

struct xmlElementContent

struct xmlElementContent {
+    xmlElementContentType     type;	/* PCDATA, ELEMENT, SEQ or OR */
+    xmlElementContentOccur    ocur;	/* ONCE, OPT, MULT or PLUS */
+    const xmlChar            *name;	/* Element name */
+    struct _xmlElementContent *c1;	/* first child */
+    struct _xmlElementContent *c2;	/* second child */
+};


xmlElementContentPtr

typedef xmlElementContent *xmlElementContentPtr;



xmlElementPtr

struct xmlElement

struct xmlElement {
+    const xmlChar          *name;	/* Element name */
+    xmlElementTypeVal       type;	/* 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 {
+    const xmlChar *name;	/* Name of the DTD */
+    const xmlChar *ExternalID;	/* External identifier for PUBLIC DTD */
+    const xmlChar *SystemID;	/* URI for a SYSTEM or PUBLIC DTD */
+    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 */
+    /* struct xmlDtd *next;	 * next  link for this document  */
+};


xmlDtdPtr

typedef xmlDtd *xmlDtdPtr;


struct xmlAttr

struct xmlAttr {
+#ifndef XML_WITHOUT_CORBA
+    void           *_private;	/* for Corba, must be first ! */
+    void           *vepv;	/* for Corba, must be next ! */
+#endif
+    xmlElementType  type;       /* XML_ATTRIBUTE_NODE, must be third ! */
+    struct _xmlNode *node;	/* attr->node link */
+    struct _xmlAttr *next;	/* attribute list link */
+    const xmlChar   *name;      /* the name of the property */
+    struct _xmlNode *val;       /* the value of the property */
+    xmlNs           *ns;        /* pointer to the associated namespace */
+};


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

struct xmlBuffer {
-    xmlChar *content;		/* The buffer content UTF8 */
-    unsigned int use;		/* The buffer size used */
-    unsigned int size;		/* The buffer size */
-    xmlBufferAllocationScheme alloc; /* The realloc method */
-};
typedef xmlDoc *xmlDocPtr;

xmlBufferPtr





xmlBufferAllocScheme

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


 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


Add a string range to an XML buffer.

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

  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


  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


Creation of a Namespace, the old way using PI and without scoping, to AVOID.

Creation of a Namespace, the old way using PI and without scoping +DEPRECATED !!! +Will be removed at next major release !

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


Creation of a new Namespace.

Creation of a new Namespace. This function will refuse to create +a namespace with a similar prefix than an existing one present on this +node.

  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


  the first property in the list


Free one property, all the childs are freed too.

Free one attribute, all the content is freed too

  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.


content +are optionnal (NULL). +NOTE: content is supposed to be a piece of XML CDATA, so it allow entities +references, but XML special chars need to be escaped first by using +xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't +need entities support.

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


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

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


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


content parameters are optionnal (NULL). If content is non NULL, -a child list containing the TEXTs and ENTITY_REFs node will be created.

content is supposed to be a piece of XML CDATA, so it allow entities +references, but XML special chars need to be escaped first by using +
xmlEncodeEntitiesReentrant(). Use 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 childs 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.


  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.


xmlDocGetRootElement ()

xmlNodePtr  xmlDocGetRootElement            (xmlDocPtr doc);

Get the root element of the document (doc->root 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


xmlDocSetRootElement ()

xmlNodePtr  xmlDocSetRootElement            (xmlDocPtr doc,
+                                             xmlNodePtr root);

Set the root element of the document (doc->root 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


Add a new element to the list of siblings of Add a new element elem to the list of siblings of cur

+If the new element was already inserted in a document it is +first unlinked from its existing context.

  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


  the first node in the list


  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.


Search and get the value of an attribute associated to a node -This does the entity substitution.

FIXED or +default declaration values unless DTD use has been turned off.

  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.


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

Set the language of a node, i.e. the values of the xml:lang +attribute.

int         xmlRemoveProp                   (xmlAttrPtrxmlChar*    xmlNodeGetBase                  (xmlDocPtr doc,
+                                             xmlNodePtr cur);

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

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



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 : 

Dump an XML document to a file. Will use compression if -compiled in and enabled.

filename is "-" the stdout file is +used.

  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)


  the compression ratio

valid

valid

valid

Name

valid -- 
valid —

Synopsis

) (void *ctx, const char *msg, ...); +struct xmlValidCtxt; +typedef xmlValidCtxtPtr; #define XML_MIN_NOTATION_TABLE +struct xmlNotationTable; typedef xmlNotationTablePtrXML_MIN_ELEMENT_TABLE +struct xmlElementTable; typedef xmlElementTablePtrXML_MIN_ATTRIBUTE_TABLE +struct xmlAttributeTable; typedef xmlAttributeTablePtrXML_MIN_ID_TABLE +struct xmlIDTable; typedef xmlIDTablePtrXML_MIN_REF_TABLE +struct xmlRefTable; typedef xmlRefTablePtr xmlAddNotationDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlAddElementDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlAddAttributeDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, 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, xmlValidateAttributeDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateNotationDecl (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateDtd (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateDocument (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateElement (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateOneElement (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateOneAttribute (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateDocumentFinal (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidateNotationUse (xmlValidCtxtPtr (xmlValidCtxtPtr ctxt, xmlValidGetPotentialChildren (xmlElementContent (xmlElementContent *ctree, const

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


xmlValidCtxtPtr

typedef xmlValidCtxt *xmlValidCtxtPtr;


#define     XML_MIN_NOTATION_TABLE
#define XML_MIN_NOTATION_TABLE 32

xmlNotationTablePtr

struct xmlNotationTable

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


xmlNotationTablePtr

typedef xmlNotationTable *xmlNotationTablePtr;


#define     XML_MIN_ELEMENT_TABLE
#define XML_MIN_ELEMENT_TABLE 32

xmlElementTablePtr

struct xmlElementTable

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


xmlElementTablePtr

typedef xmlElementTable *xmlElementTablePtr;


#define     XML_MIN_ATTRIBUTE_TABLE
#define XML_MIN_ATTRIBUTE_TABLE 32

xmlAttributeTablePtr

struct xmlAttributeTable

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


xmlAttributeTablePtr

typedef xmlAttributeTable *xmlAttributeTablePtr;


#define     XML_MIN_ID_TABLE
#define XML_MIN_ID_TABLE 32

xmlIDTablePtr

struct xmlIDTable

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


xmlIDTablePtr

typedef xmlIDTable *xmlIDTablePtr;


#define     XML_MIN_REF_TABLE
#define XML_MIN_REF_TABLE 32

xmlRefTablePtr

struct xmlRefTable

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


xmlRefTablePtr

typedef xmlRefTable *xmlRefTablePtr;


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


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


  An notation table


  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


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


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


  the tree to free.


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


xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,   the validation context  pointer to the DTD  the element name  the attribute name  the attribute 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


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


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


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


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


int         xmlValidateDtd                  (xmlValidCtxtPtrint         xmlValidateDtd                  (xmlValidCtxtPtr ctxt,
                                              

Try to validate the dtd instance

Try to validate the document against the dtd instance

basically it does check all the definitions in the DtD.

  the validation context  a document instance  a dtd instance 1 if valid or 0 otherwise


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,
                                                 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


  a pointer to the DtD to search  the notation name the xmlNotationPtr if found or NULL






 a pointer to the new string or NULL if allocation error occured.


 0 on success


 an int representing the amount of memory allocated.



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


xmlMemShow ()

void        xmlMemShow                      (FILE *fp,
+                                             int nr);

show a show display of the memory allocated, and dump +the nr last allocated areas which were not freed

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





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

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

Synopsis

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

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

Description

Details

struct xmlXPathContext

struct xmlXPathContext {
+    xmlDocPtr doc;			/* The current document */
+    xmlNodePtr node;			/* The current node */
+    xmlNodeSetPtr nodelist;		/* The current node list */
+
+    int nb_variables;			/* number of defined variables */
+    int max_variables;			/* max number of variables */
+    xmlXPathVariablePtr *variables;	/* Array of defined variables */
+
+    int nb_types;			/* number of defined types */
+    int max_types;			/* max number of types */
+    xmlXPathTypePtr *types;		/* Array of defined types */
+
+    int nb_funcs;			/* number of defined funcs */
+    int max_funcs;			/* max number of funcs */
+    xmlXPathFuncPtr *funcs;		/* Array of defined funcs */
+
+    int nb_axis;			/* number of defined axis */
+    int max_axis;			/* max number of axis */
+    xmlXPathAxisPtr *axis;		/* Array of defined axis */
+
+    /* Namespace traversal should be implemented with user */
+    xmlNsPtr *namespaces;		/* The namespaces lookup */
+    int nsNr;				/* the current Namespace index */
+    void *user;				/* user defined extra info */
+};


xmlXPathContextPtr

typedef xmlXPathContext *xmlXPathContextPtr;


struct xmlXPathParserContext

struct xmlXPathParserContext {
+    const xmlChar *cur;			/* the current char being parsed */
+    const xmlChar *base;			/* the full expression */
+
+    int error;				/* error code */
+
+    xmlXPathContextPtr  context;	/* the evaluation context */
+    xmlXPathObjectPtr     value;	/* the current value */
+    int                 valueNr;	/* number of values stacked */
+    int                valueMax;	/* max number of values stacked */
+    xmlXPathObjectPtr *valueTab;	/* stack of values */
+};


xmlXPathParserContextPtr

typedef xmlXPathParserContext *xmlXPathParserContextPtr;


struct xmlNodeSet

struct xmlNodeSet {
+    int nodeNr;			/* # of node in the set */
+    int nodeMax;		/* allocated space */
+    xmlNodePtr *nodeTab;	/* array of nodes in no particular order */
+};


xmlNodeSetPtr

typedef xmlNodeSet *xmlNodeSetPtr;







#define     XPATH_USERS
#define XPATH_USERS 5

struct xmlXPathObject

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


xmlXPathObjectPtr

typedef xmlXPathObject *xmlXPathObjectPtr;


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

struct xmlXPathType

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


xmlXPathTypePtr

typedef xmlXPathType *xmlXPathTypePtr;


struct xmlXPathVariable

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


xmlXPathVariablePtr

typedef xmlXPathVariable *xmlXPathVariablePtr;


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

struct xmlXPathFunct

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


xmlXPathFuncPtr

typedef xmlXPathFunct *xmlXPathFuncPtr;


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

struct xmlXPathAxis

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


xmlXPathAxisPtr

typedef xmlXPathAxis *xmlXPathAxisPtr;


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

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


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


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


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


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


xmlXPathNodeSetCreate ()

xmlNodeSetPtr xmlXPathNodeSetCreate         (xmlNodePtr val);

Create a new xmlNodeSetPtr of type double and of value val

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


xmlXPathFreeNodeSetList ()

void        xmlXPathFreeNodeSetList         (xmlXPathObjectPtr obj);

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

obj : an existing NodeSetList object


xmlXPathFreeNodeSet ()

void        xmlXPathFreeNodeSet             (xmlNodeSetPtr obj);

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

obj : the xmlNodeSetPtr to free

+ - + @@ -38,12 +39,15 @@ + + + @@ -71,11 +75,15 @@ - - - + + + + + + + @@ -126,32 +134,45 @@ + + + + + + + + + + + + + - - + + @@ -159,6 +180,10 @@ + + + + @@ -177,8 +202,10 @@ + + @@ -190,15 +217,22 @@ + + + + + + + @@ -207,6 +241,7 @@ + @@ -217,13 +252,14 @@ - + + @@ -236,8 +272,10 @@ + + @@ -251,18 +289,26 @@ + + + + + + + + @@ -287,10 +333,12 @@ + + @@ -327,8 +375,14 @@ + + + + + + @@ -336,6 +390,9 @@ + + + @@ -344,21 +401,40 @@ + + + + + + + + + + + + + + + + + + + @@ -368,12 +444,15 @@ + + + @@ -468,13 +547,15 @@ + + + - - - + + @@ -482,7 +563,15 @@ + + + + + + + + @@ -493,6 +582,7 @@ +