tree

Name

tree —

Synopsis



enum        xmlElementType;
typedef     CHAR;
typedef     xmlNotationPtr;
enum        xmlAttributeType;
enum        xmlAttributeDefault;
typedef     xmlEnumerationPtr;
typedef     xmlAttributePtr;
enum        xmlElementContentType;
enum        xmlElementContentOccur;
typedef     xmlElementContentPtr;
enum        xmlElementTypeVal;
typedef     xmlElementPtr;
enum        xmlNsType;
typedef     xmlNsPtr;
typedef     xmlDtdPtr;
typedef     xmlAttrPtr;
typedef     xmlNode;
typedef     xmlNodePtr;
typedef     xmlDoc;
typedef     xmlDocPtr;
typedef     xmlBuffer;
typedef     xmlBufferPtr;
extern      xmlNsPtr baseDTD;
extern      int oldXMLWDcompatibility;
extern      int xmlIndentTreeOutput;
xmlBufferPtr xmlBufferCreate                (void);
void        xmlBufferFree                   (xmlBufferPtr buf);
int         xmlBufferDump                   (FILE *file,
                                             xmlBufferPtr buf);
void        xmlBufferAdd                    (xmlBufferPtr buf,
                                             const CHAR *str,
                                             int len);
void        xmlBufferCat                    (xmlBufferPtr buf,
                                             const CHAR *str);
void        xmlBufferCCat                   (xmlBufferPtr buf,
                                             const char *str);
xmlDtdPtr   xmlCreateIntSubset              (xmlDocPtr doc,
                                             const CHAR *name,
                                             const CHAR *ExternalID,
                                             const CHAR *SystemID);
xmlDtdPtr   xmlNewDtd                       (xmlDocPtr doc,
                                             const CHAR *name,
                                             const CHAR *ExternalID,
                                             const CHAR *SystemID);
void        xmlFreeDtd                      (xmlDtdPtr cur);
xmlNsPtr    xmlNewGlobalNs                  (xmlDocPtr doc,
                                             const CHAR *href,
                                             const CHAR *prefix);
xmlNsPtr    xmlNewNs                        (xmlNodePtr node,
                                             const CHAR *href,
                                             const CHAR *prefix);
void        xmlFreeNs                       (xmlNsPtr cur);
xmlDocPtr   xmlNewDoc                       (const CHAR *version);
void        xmlFreeDoc                      (xmlDocPtr cur);
xmlAttrPtr  xmlNewDocProp                   (xmlDocPtr doc,
                                             const CHAR *name,
                                             const CHAR *value);
xmlAttrPtr  xmlNewProp                      (xmlNodePtr node,
                                             const CHAR *name,
                                             const CHAR *value);
void        xmlFreePropList                 (xmlAttrPtr cur);
void        xmlFreeProp                     (xmlAttrPtr cur);
xmlAttrPtr  xmlCopyProp                     (xmlAttrPtr cur);
xmlAttrPtr  xmlCopyPropList                 (xmlAttrPtr cur);
xmlDtdPtr   xmlCopyDtd                      (xmlDtdPtr dtd);
xmlDocPtr   xmlCopyDoc                      (xmlDocPtr doc,
                                             int recursive);
xmlNodePtr  xmlNewDocNode                   (xmlDocPtr doc,
                                             xmlNsPtr ns,
                                             const CHAR *name,
                                             CHAR *content);
xmlNodePtr  xmlNewNode                      (xmlNsPtr ns,
                                             const CHAR *name);
xmlNodePtr  xmlNewChild                     (xmlNodePtr parent,
                                             xmlNsPtr ns,
                                             const CHAR *name,
                                             CHAR *content);
xmlNodePtr  xmlNewDocText                   (xmlDocPtr doc,
                                             const CHAR *content);
xmlNodePtr  xmlNewText                      (const CHAR *content);
xmlNodePtr  xmlNewDocTextLen                (xmlDocPtr doc,
                                             const CHAR *content,
                                             int len);
xmlNodePtr  xmlNewTextLen                   (const CHAR *content,
                                             int len);
xmlNodePtr  xmlNewDocComment                (xmlDocPtr doc,
                                             const CHAR *content);
xmlNodePtr  xmlNewComment                   (const CHAR *content);
xmlNodePtr  xmlNewReference                 (xmlDocPtr doc,
                                             const CHAR *name);
xmlNodePtr  xmlCopyNode                     (xmlNodePtr node,
                                             int recursive);
xmlNodePtr  xmlCopyNodeList                 (xmlNodePtr node);
xmlNodePtr  xmlGetLastChild                 (xmlNodePtr parent);
int         xmlNodeIsText                   (xmlNodePtr node);
xmlNodePtr  xmlAddChild                     (xmlNodePtr parent,
                                             xmlNodePtr cur);
void        xmlUnlinkNode                   (xmlNodePtr cur);
xmlNodePtr  xmlTextMerge                    (xmlNodePtr first,
                                             xmlNodePtr second);
void        xmlTextConcat                   (xmlNodePtr node,
                                             const CHAR *content,
                                             int len);
void        xmlFreeNodeList                 (xmlNodePtr cur);
void        xmlFreeNode                     (xmlNodePtr cur);
xmlNsPtr    xmlSearchNs                     (xmlDocPtr doc,
                                             xmlNodePtr node,
                                             const CHAR *nameSpace);
xmlNsPtr    xmlSearchNsByHref               (xmlDocPtr doc,
                                             xmlNodePtr node,
                                             const CHAR *href);
void        xmlSetNs                        (xmlNodePtr node,
                                             xmlNsPtr ns);
xmlNsPtr    xmlCopyNamespace                (xmlNsPtr cur);
xmlNsPtr    xmlCopyNamespaceList            (xmlNsPtr cur);
xmlAttrPtr  xmlSetProp                      (xmlNodePtr node,
                                             const CHAR *name,
                                             const CHAR *value);
CHAR*       xmlGetProp                      (xmlNodePtr node,
                                             const CHAR *name);
xmlNodePtr  xmlStringGetNodeList            (xmlDocPtr doc,
                                             const CHAR *value);
xmlNodePtr  xmlStringLenGetNodeList         (xmlDocPtr doc,
                                             const CHAR *value,
                                             int len);
CHAR*       xmlNodeListGetString            (xmlDocPtr doc,
                                             xmlNodePtr list,
                                             int inLine);
void        xmlNodeSetContent               (xmlNodePtr cur,
                                             const CHAR *content);
void        xmlNodeSetContentLen            (xmlNodePtr cur,
                                             const CHAR *content,
                                             int len);
void        xmlNodeAddContent               (xmlNodePtr cur,
                                             const CHAR *content);
void        xmlNodeAddContentLen            (xmlNodePtr cur,
                                             const CHAR *content,
                                             int len);
CHAR*       xmlNodeGetContent               (xmlNodePtr cur);
void        xmlBufferWriteCHAR              (xmlBufferPtr buf,
                                             const CHAR *string);
void        xmlBufferWriteChar              (xmlBufferPtr buf,
                                             const char *string);
void        xmlBufferWriteQuotedString      (xmlBufferPtr buf,
                                             const CHAR *string);
void        xmlDocDumpMemory                (xmlDocPtr cur,
                                             CHAR **mem,
                                             int *size);
void        xmlDocDump                      (FILE *f,
                                             xmlDocPtr cur);
int         xmlSaveFile                     (const char *filename,
                                             xmlDocPtr cur);
int         xmlGetDocCompressMode           (xmlDocPtr doc);
void        xmlSetDocCompressMode           (xmlDocPtr doc,
                                             int mode);
int         xmlGetCompressMode              (void);
void        xmlSetCompressMode              (int mode);

Description

Details

enum xmlElementType

typedef enum {
    XML_ELEMENT_NODE=		1,
    XML_ATTRIBUTE_NODE=		2,
    XML_TEXT_NODE=		3,
    XML_CDATA_SECTION_NODE=	4,
    XML_ENTITY_REF_NODE=	5,
    XML_ENTITY_NODE=		6,
    XML_PI_NODE=		7,
    XML_COMMENT_NODE=		8,
    XML_DOCUMENT_NODE=		9,
    XML_DOCUMENT_TYPE_NODE=	10,
    XML_DOCUMENT_FRAG_NODE=	11,
    XML_NOTATION_NODE=		12
} xmlElementType;


CHAR


xmlNotationPtr

typedef xmlNotation *xmlNotationPtr;


enum xmlAttributeType

typedef enum {
    XML_ATTRIBUTE_CDATA = 1,
    XML_ATTRIBUTE_ID,
    XML_ATTRIBUTE_IDREF	,
    XML_ATTRIBUTE_IDREFS,
    XML_ATTRIBUTE_ENTITY,
    XML_ATTRIBUTE_ENTITIES,
    XML_ATTRIBUTE_NMTOKEN,
    XML_ATTRIBUTE_NMTOKENS,
    XML_ATTRIBUTE_ENUMERATION,
    XML_ATTRIBUTE_NOTATION
} xmlAttributeType;


enum xmlAttributeDefault

typedef enum {
    XML_ATTRIBUTE_NONE = 1,
    XML_ATTRIBUTE_REQUIRED,
    XML_ATTRIBUTE_IMPLIED,
    XML_ATTRIBUTE_FIXED
} xmlAttributeDefault;


xmlEnumerationPtr

typedef xmlEnumeration *xmlEnumerationPtr;


xmlAttributePtr

typedef xmlAttribute *xmlAttributePtr;


enum xmlElementContentType

typedef enum {
    XML_ELEMENT_CONTENT_PCDATA = 1,
    XML_ELEMENT_CONTENT_ELEMENT,
    XML_ELEMENT_CONTENT_SEQ,
    XML_ELEMENT_CONTENT_OR
} xmlElementContentType;


enum xmlElementContentOccur

typedef enum {
    XML_ELEMENT_CONTENT_ONCE = 1,
    XML_ELEMENT_CONTENT_OPT,
    XML_ELEMENT_CONTENT_MULT,
    XML_ELEMENT_CONTENT_PLUS
} xmlElementContentOccur;


xmlElementContentPtr

typedef xmlElementContent *xmlElementContentPtr;


enum xmlElementTypeVal

typedef enum {
    XML_ELEMENT_TYPE_EMPTY = 1,
    XML_ELEMENT_TYPE_ANY,
    XML_ELEMENT_TYPE_MIXED,
    XML_ELEMENT_TYPE_ELEMENT
} xmlElementTypeVal;


xmlElementPtr

typedef xmlElement *xmlElementPtr;


enum xmlNsType

typedef enum {
    XML_GLOBAL_NAMESPACE = 1,	/* old style global namespace */
    XML_LOCAL_NAMESPACE		/* new style local scoping */
} xmlNsType;


xmlNsPtr

typedef xmlNs *xmlNsPtr;


xmlDtdPtr

typedef xmlDtd *xmlDtdPtr;


xmlAttrPtr

typedef xmlAttr *xmlAttrPtr;


xmlNode

typedef _xmlNode xmlNode;


xmlNodePtr

typedef _xmlNode *xmlNodePtr;


xmlDoc

typedef _xmlDoc xmlDoc;


xmlDocPtr

typedef xmlDoc *xmlDocPtr;


xmlBuffer

typedef _xmlBuffer xmlBuffer;


xmlBufferPtr

typedef xmlBuffer *xmlBufferPtr;


baseDTD

extern xmlNsPtr baseDTD;


oldXMLWDcompatibility

extern int oldXMLWDcompatibility;/* maintain compatibility with old WD */


xmlIndentTreeOutput

extern int xmlIndentTreeOutput;  /* try to indent the tree dumps */


xmlBufferCreate ()

xmlBufferPtr xmlBufferCreate                (void);

routine to create an XML buffer.

Returns :the new structure.


xmlBufferFree ()

void        xmlBufferFree                   (xmlBufferPtr buf);

Frees an XML buffer.

buf : the buffer to free


xmlBufferDump ()

int         xmlBufferDump                   (FILE *file,
                                             xmlBufferPtr buf);

Dumps an XML buffer to a FILE *.

file : the file output
buf : the buffer to dump
Returns :the number of CHAR written


xmlBufferAdd ()

void        xmlBufferAdd                    (xmlBufferPtr buf,
                                             const CHAR *str,
                                             int len);

Add a string range to an XML buffer.

buf : the buffer to dump
str : the CHAR string
len : the number of CHAR to add


xmlBufferCat ()

void        xmlBufferCat                    (xmlBufferPtr buf,
                                             const CHAR *str);

Append a zero terminated string to an XML buffer.

buf : the buffer to dump
str : the CHAR string


xmlBufferCCat ()

void        xmlBufferCCat                   (xmlBufferPtr buf,
                                             const char *str);

Append a zero terminated C string to an XML buffer.

buf : the buffer to dump
str : the C char string


xmlCreateIntSubset ()

xmlDtdPtr   xmlCreateIntSubset              (xmlDocPtr doc,
                                             const CHAR *name,
                                             const CHAR *ExternalID,
                                             const CHAR *SystemID);

Create the internal subset of a document

doc : the document pointer
name : the DTD name
ExternalID : the external ID
SystemID : the system ID
Returns :a pointer to the new DTD structure


xmlNewDtd ()

xmlDtdPtr   xmlNewDtd                       (xmlDocPtr doc,
                                             const CHAR *name,
                                             const CHAR *ExternalID,
                                             const CHAR *SystemID);

Creation of a new DTD.

doc : the document pointer
name : the DTD name
ExternalID : the external ID
SystemID : the system ID
Returns :a pointer to the new DTD structure


xmlFreeDtd ()

void        xmlFreeDtd                      (xmlDtdPtr cur);

Free a DTD structure.

cur : the DTD structure to free up


xmlNewGlobalNs ()

xmlNsPtr    xmlNewGlobalNs                  (xmlDocPtr doc,
                                             const CHAR *href,
                                             const CHAR *prefix);

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

doc : the document carrying the namespace
href : the URI associated
prefix : the prefix for the namespace
Returns :returns a new namespace pointer


xmlNewNs ()

xmlNsPtr    xmlNewNs                        (xmlNodePtr node,
                                             const CHAR *href,
                                             const CHAR *prefix);

Creation of a new Namespace.

node : the element carrying the namespace
href : the URI associated
prefix : the prefix for the namespace
Returns :returns a new namespace pointer


xmlFreeNs ()

void        xmlFreeNs                       (xmlNsPtr cur);

Free up the structures associated to a namespace

cur : the namespace pointer


xmlNewDoc ()

xmlDocPtr   xmlNewDoc                       (const CHAR *version);

version : CHAR string giving the version of XML "1.0"
Returns :a new document


xmlFreeDoc ()

void        xmlFreeDoc                      (xmlDocPtr cur);

Free up all the structures used by a document, tree included.

cur : pointer to the document @:


xmlNewDocProp ()

xmlAttrPtr  xmlNewDocProp                   (xmlDocPtr doc,
                                             const CHAR *name,
                                             const CHAR *value);

Create a new property carried by a document.

doc : the document
name : the name of the attribute
value : the value of the attribute
Returns :a pointer to the attribute


xmlNewProp ()

xmlAttrPtr  xmlNewProp                      (xmlNodePtr node,
                                             const CHAR *name,
                                             const CHAR *value);

Create a new property carried by a node.

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


xmlFreePropList ()

void        xmlFreePropList                 (xmlAttrPtr cur);

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

cur : the first property in the list


xmlFreeProp ()

void        xmlFreeProp                     (xmlAttrPtr cur);

Free one property, all the childs are freed too.

cur : the first property in the list


xmlCopyProp ()

xmlAttrPtr  xmlCopyProp                     (xmlAttrPtr cur);

Do a copy of the attribute.

cur : the attribute
Returns : a new xmlAttrPtr, or NULL in case of error.


xmlCopyPropList ()

xmlAttrPtr  xmlCopyPropList                 (xmlAttrPtr cur);

Do a copy of an attribute list.

cur : the first attribute
Returns : a new xmlAttrPtr, or NULL in case of error.


xmlCopyDtd ()

xmlDtdPtr   xmlCopyDtd                      (xmlDtdPtr dtd);

Do a copy of the dtd.

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


xmlCopyDoc ()

xmlDocPtr   xmlCopyDoc                      (xmlDocPtr doc,
                                             int recursive);

Do a copy of the document info. If recursive, the content tree will be copied too as well as Dtd, namespaces and entities.

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


xmlNewDocNode ()

xmlNodePtr  xmlNewDocNode                   (xmlDocPtr doc,
                                             xmlNsPtr ns,
                                             const CHAR *name,
                                             CHAR *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.


xmlNewNode ()

xmlNodePtr  xmlNewNode                      (xmlNsPtr ns,
                                             const CHAR *name);

Creation of a new node element. ns and content are optionnal (NULL). If content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created.

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


xmlNewChild ()

xmlNodePtr  xmlNewChild                     (xmlNodePtr parent,
                                             xmlNsPtr ns,
                                             const CHAR *name,
                                             CHAR *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 list containing the TEXTs and ENTITY_REFs node will be created.

parent : the parent node
ns : a namespace if any
name : the name of the child
content : the content of the child if any.
Returns :a pointer to the new node object.


xmlNewDocText ()

xmlNodePtr  xmlNewDocText                   (xmlDocPtr doc,
                                             const CHAR *content);

Creation of a new text node within a document.

doc : the document
content : the text content
Returns :a pointer to the new node object.


xmlNewText ()

xmlNodePtr  xmlNewText                      (const CHAR *content);

Creation of a new text node.

content : the text content
Returns :a pointer to the new node object.


xmlNewDocTextLen ()

xmlNodePtr  xmlNewDocTextLen                (xmlDocPtr doc,
                                             const CHAR *content,
                                             int len);

Creation of a new text node with an extra content lenght parameter. The text node pertain to a given document.

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


xmlNewTextLen ()

xmlNodePtr  xmlNewTextLen                   (const CHAR *content,
                                             int len);

Creation of a new text node with an extra parameter for the content's lenght

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


xmlNewDocComment ()

xmlNodePtr  xmlNewDocComment                (xmlDocPtr doc,
                                             const CHAR *content);

Creation of a new node containing a commentwithin a document.

doc : the document
content : the comment content
Returns :a pointer to the new node object.


xmlNewComment ()

xmlNodePtr  xmlNewComment                   (const CHAR *content);

Creation of a new node containing a comment.

content : the comment content
Returns :a pointer to the new node object.


xmlNewReference ()

xmlNodePtr  xmlNewReference                 (xmlDocPtr doc,
                                             const CHAR *name);

Creation of a new reference node.

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


xmlCopyNode ()

xmlNodePtr  xmlCopyNode                     (xmlNodePtr node,
                                             int recursive);

Do a copy of the node.

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


xmlCopyNodeList ()

xmlNodePtr  xmlCopyNodeList                 (xmlNodePtr node);

Do a recursive copy of the node list.

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


xmlGetLastChild ()

xmlNodePtr  xmlGetLastChild                 (xmlNodePtr parent);

Search the last child of a node.

parent : the parent node
Returns :the last child or NULL if none.


xmlNodeIsText ()

int         xmlNodeIsText                   (xmlNodePtr node);

Is this node a Text node ?

node : the node
Returns :1 yes, 0 no


xmlAddChild ()

xmlNodePtr  xmlAddChild                     (xmlNodePtr parent,
                                             xmlNodePtr cur);

Add a new child element, to parent, at the end of the child list.

parent : the parent node
cur : the child node
Returns :the child or NULL in case of error.


xmlUnlinkNode ()

void        xmlUnlinkNode                   (xmlNodePtr cur);

Unlink a node from it's current context, the node is not freed

cur : the node


xmlTextMerge ()

xmlNodePtr  xmlTextMerge                    (xmlNodePtr first,
                                             xmlNodePtr second);

Merge two text nodes into one

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


xmlTextConcat ()

void        xmlTextConcat                   (xmlNodePtr node,
                                             const CHAR *content,
                                             int len);

Concat the given string at the end of the existing node content

node : the node
content : the content
len : content lenght


xmlFreeNodeList ()

void        xmlFreeNodeList                 (xmlNodePtr cur);

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

cur : the first node in the list


xmlFreeNode ()

void        xmlFreeNode                     (xmlNodePtr cur);

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

cur : the node


xmlSearchNs ()

xmlNsPtr    xmlSearchNs                     (xmlDocPtr doc,
                                             xmlNodePtr node,
                                             const CHAR *nameSpace);

Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. nameSpace can be NULL, this is a search for the default namespace.

doc : the document
node : the current node
nameSpace : the namespace string
Returns :the namespace pointer or NULL.


xmlSearchNsByHref ()

xmlNsPtr    xmlSearchNsByHref               (xmlDocPtr doc,
                                             xmlNodePtr node,
                                             const CHAR *href);

Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.

doc : the document
node : the current node
href : the namespace value
Returns :the namespace pointer or NULL.


xmlSetNs ()

void        xmlSetNs                        (xmlNodePtr node,
                                             xmlNsPtr ns);

Associate a namespace to a node, a posteriori.

node : a node in the document
ns : a namespace pointer


xmlCopyNamespace ()

xmlNsPtr    xmlCopyNamespace                (xmlNsPtr cur);

Do a copy of the namespace.

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


xmlCopyNamespaceList ()

xmlNsPtr    xmlCopyNamespaceList            (xmlNsPtr cur);

Do a copy of an namespace list.

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


xmlSetProp ()

xmlAttrPtr  xmlSetProp                      (xmlNodePtr node,
                                             const CHAR *name,
                                             const CHAR *value);

Set (or reset) an attribute carried by a node.

node : the node
name : the attribute name
value : the attribute value
Returns :the attribute pointer.


xmlGetProp ()

CHAR*       xmlGetProp                      (xmlNodePtr node,
                                             const CHAR *name);

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

node : the node
name : the attribute name
Returns :the attribute value or NULL if not found.


xmlStringGetNodeList ()

xmlNodePtr  xmlStringGetNodeList            (xmlDocPtr doc,
                                             const CHAR *value);

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

doc : the document
value : the value of the attribute
Returns :a pointer to the first child


xmlStringLenGetNodeList ()

xmlNodePtr  xmlStringLenGetNodeList         (xmlDocPtr doc,
                                             const CHAR *value,
                                             int len);

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

doc : the document
value : the value of the text
len : the length of the string value
Returns :a pointer to the first child


xmlNodeListGetString ()

CHAR*       xmlNodeListGetString            (xmlDocPtr doc,
                                             xmlNodePtr list,
                                             int inLine);

Returns the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs

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


xmlNodeSetContent ()

void        xmlNodeSetContent               (xmlNodePtr cur,
                                             const CHAR *content);

Replace the content of a node.

cur : the node being modified
content : the new value of the content


xmlNodeSetContentLen ()

void        xmlNodeSetContentLen            (xmlNodePtr cur,
                                             const CHAR *content,
                                             int len);

Replace the content of a node.

cur : the node being modified
content : the new value of the content
len : the size of content


xmlNodeAddContent ()

void        xmlNodeAddContent               (xmlNodePtr cur,
                                             const CHAR *content);

Append the extra substring to the node content.

cur : the node being modified
content : extra content


xmlNodeAddContentLen ()

void        xmlNodeAddContentLen            (xmlNodePtr cur,
                                             const CHAR *content,
                                             int len);

Append the extra substring to the node content.

cur : the node being modified
content : extra content
len : the size of content


xmlNodeGetContent ()

CHAR*       xmlNodeGetContent               (xmlNodePtr cur);

Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substitued.

cur : the node being read
Returns :a new CHAR * or NULL if no content is available. It's up to the caller to free the memory.


xmlBufferWriteCHAR ()

void        xmlBufferWriteCHAR              (xmlBufferPtr buf,
                                             const CHAR *string);

routine which manage and grows an output buffer. This one add CHARs at the end of the buffer.

buf : the XML buffer
string : the string to add


xmlBufferWriteChar ()

void        xmlBufferWriteChar              (xmlBufferPtr buf,
                                             const char *string);

routine which manage and grows an output buffer. This one add C chars at the end of the array.

buf : the XML buffer output
string : the string to add


xmlBufferWriteQuotedString ()

void        xmlBufferWriteQuotedString      (xmlBufferPtr buf,
                                             const CHAR *string);

routine which manage and grows an output buffer. This one writes a quoted or double quoted CHAR string, checking first if it holds quote or double-quotes internally

buf : the XML buffer output
string : the string to add


xmlDocDumpMemory ()

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

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

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


xmlDocDump ()

void        xmlDocDump                      (FILE *f,
                                             xmlDocPtr cur);

Dump an XML document to an open FILE.

f : the FILE*
cur : the document


xmlSaveFile ()

int         xmlSaveFile                     (const char *filename,
                                             xmlDocPtr cur);

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

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


xmlGetDocCompressMode ()

int         xmlGetDocCompressMode           (xmlDocPtr doc);

get the compression ratio for a document, ZLIB based

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


xmlSetDocCompressMode ()

void        xmlSetDocCompressMode           (xmlDocPtr doc,
                                             int mode);

set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)

doc : the document
mode : the compression ratio


xmlGetCompressMode ()

int         xmlGetCompressMode              (void);

get the default compression mode used, ZLIB based.

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


xmlSetCompressMode ()

void        xmlSetCompressMode              (int mode);

set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)

mode : the compression ratio