dict

dict —

Synopsis




struct      xmlDict;
typedef     xmlDictPtr;
xmlDictPtr  xmlDictCreate                   (void);
int         xmlDictReference                (xmlDictPtr dict);
void        xmlDictFree                     (xmlDictPtr dict);
const xmlChar* xmlDictLookup                (xmlDictPtr dict,
                                             const xmlChar *name,
                                             int len);
const xmlChar* xmlDictQLookup               (xmlDictPtr dict,
                                             const xmlChar *prefix,
                                             const xmlChar *name);
int         xmlDictOwns                     (xmlDictPtr dict,
                                             const xmlChar *str);
int         xmlDictSize                     (xmlDictPtr dict);

Description

Details

struct xmlDict

struct xmlDict;


xmlDictPtr

typedef xmlDict *xmlDictPtr;


xmlDictCreate ()

xmlDictPtr  xmlDictCreate                   (void);

Create a new dictionary

Returns :the newly created object, or NULL if an error occured.

xmlDictReference ()

int         xmlDictReference                (xmlDictPtr dict);

Increment the reference counter of a dictionary

dict: the dictionnary
Returns :0 in case of success and -1 in case of error

xmlDictFree ()

void        xmlDictFree                     (xmlDictPtr dict);

Free the hash dict and its contents. The userdata is deallocated with f if provided.

dict: the dictionnary

xmlDictLookup ()

const xmlChar* xmlDictLookup                (xmlDictPtr dict,
                                             const xmlChar *name,
                                             int len);

Add the name to the hash dict if not present.

dict: the dictionnary
name: the name of the userdata
len: the length of the name, if -1 it is recomputed
Returns :the internal copy of the name or NULL in case of internal error

xmlDictQLookup ()

const xmlChar* xmlDictQLookup               (xmlDictPtr dict,
                                             const xmlChar *prefix,
                                             const xmlChar *name);

Add the QName prefix:name to the hash dict if not present.

dict: the dictionnary
prefix: the prefix
name: the name
Returns :the internal copy of the QName or NULL in case of internal error

xmlDictOwns ()

int         xmlDictOwns                     (xmlDictPtr dict,
                                             const xmlChar *str);

check if a string is owned by the disctionary

dict: the dictionnary
str: the string
Returns :1 if true, 0 if false and -1 in case of error -1 in case of error

xmlDictSize ()

int         xmlDictSize                     (xmlDictPtr dict);

Query the number of elements installed in the hash dict.

dict: the dictionnary
Returns :the number of elements in the dictionnary or -1 in case of error