typedef struct _xmlDictStrings | xmlDictStrings |
typedef xmlDictStrings * | xmlDictStringsPtr |
typedef struct _xmlDictEntry | xmlDictEntry |
typedef xmlDictEntry * | xmlDictEntryPtr |
typedef struct _xmlDict | xmlDict |
typedef xmlDict * | xmlDictPtr |
XMLPUBFUN xmlDictPtr XMLCALL | xmlDictCreate | ( | void | ) |
xmlDictCreate:
Create a new dictionary
Returns the newly created dictionnary, or NULL if an error occured.
OOM: possible --> NULL is returned; OOM flag is set
XMLPUBFUN xmlDictPtr XMLCALL | xmlDictCreateSub | ( | xmlDictPtr | sub | ) |
xmlDictCreateSub: Create a new dictionary, inheriting strings from the read-only dictionnary sub. On lookup, strings are first searched in the new dictionnary, then in sub, and if not found are created in the new dictionnary.
Returns the newly created dictionnary, or NULL if an error occured.
Parameters | |
---|---|
sub | an existing dictionnary |
XMLPUBFUN int XMLCALL | xmlDictReference | ( | xmlDictPtr | dict | ) |
xmlDictReference: Increment the reference counter of a dictionary
Returns 0 in case of success and -1 in case of error
OOM: never
Parameters | |
---|---|
dict | the dictionnary |
XMLPUBFUN void XMLCALL | xmlDictFree | ( | xmlDictPtr | dict | ) |
xmlDictFree: Free the hash dict and its contents. The userdata is deallocated with f if provided.
Parameters | |
---|---|
dict | the dictionnary |
XMLPUBFUN const xmlChar *XMLCALL | xmlDictLookup | ( | xmlDictPtr | dict, |
const xmlChar * | name, | |||
int | len | |||
) |
xmlDictLookup: Add the name to the hash dict if not present.
Returns the internal copy of the name or NULL in case of internal error
OOM: possible --> returns NULL and OOM flag is set
Parameters | |
---|---|
dict | the dictionnary |
name | the name of the userdata |
len | the length of the name, if -1 it is recomputed |
XMLPUBFUN const xmlChar *XMLCALL | xmlDictQLookup | ( | xmlDictPtr | dict, |
const xmlChar * | prefix, | |||
const xmlChar * | name | |||
) |
xmlDictQLookup: Add the QName prefix:name to the hash dict if not present.
Returns the internal copy of the QName or NULL in case of internal error
Parameters | |
---|---|
dict | the dictionnary |
prefix | the prefix |
name | the name |
XMLPUBFUN int XMLCALL | xmlDictSize | ( | xmlDictPtr | dict | ) |
xmlDictSize: Query the number of elements installed in the hash dict.
Returns the number of elements in the dictionnary or -1 in case of error
Parameters | |
---|---|
dict | the dictionnary |
XMLPUBFUN int XMLCALL | xmlDictOwns | ( | xmlDictPtr | dict, |
const xmlChar * | str | |||
) |
xmlDictOwns: check if a string is owned by the disctionary
Returns 1 if true, 0 if false and -1 in case of error -1 in case of error
OOM: impossible
Parameters | |
---|---|
dict | the dictionnary |
str | the string |