/usr/share/doc/libxml2-devel/html
NameSizeModeActions
book1.html96350644editdlrm
home.png6540644editdlrm
index.html96350644editdlrm
left.png4590644editdlrm
libxml-c14n.html180560644editdlrm
libxml-catalog.html410210644editdlrm
libxml-chvalid.html184230644editdlrm
libxml-debugXML.html379110644editdlrm
libxml-dict.html179450644editdlrm
libxml-DOCBparser.html206250644editdlrm
libxml-encoding.html350320644editdlrm
libxml-entities.html276890644editdlrm
libxml-globals.html330880644editdlrm
libxml-hash.html473760644editdlrm
libxml-HTMLparser.html600720644editdlrm
libxml-HTMLtree.html286380644editdlrm
libxml-lib.html96350644editdlrm
libxml-list.html300730644editdlrm
libxml-nanoftp.html270900644editdlrm
libxml-nanohttp.html212240644editdlrm
libxml-parser.html1467670644editdlrm
libxml-parserInternals.html1225140644editdlrm
libxml-pattern.html236730644editdlrm
libxml-relaxng.html410020644editdlrm
libxml-SAX.html434820644editdlrm
libxml-SAX2.html444490644editdlrm
libxml-schemasInternals.html640400644editdlrm
libxml-schematron.html217320644editdlrm
libxml-threads.html171610644editdlrm
libxml-tree.html2356560644editdlrm
libxml-uri.html226780644editdlrm
libxml-valid.html1024590644editdlrm
libxml-xinclude.html197050644editdlrm
libxml-xlink.html216460644editdlrm
libxml-xmlautomata.html395740644editdlrm
libxml-xmlerror.html1097020644editdlrm
libxml-xmlexports.html78550644editdlrm
libxml-xmlIO.html639630644editdlrm
libxml-xmlmemory.html292270644editdlrm
libxml-xmlmodule.html117130644editdlrm
libxml-xmlreader.html1142270644editdlrm
libxml-xmlregexp.html457810644editdlrm
libxml-xmlsave.html192490644editdlrm
libxml-xmlschemas.html477710644editdlrm
libxml-xmlschemastypes.html493760644editdlrm
libxml-xmlstring.html391580644editdlrm
libxml-xmlunicode.html1128520644editdlrm
libxml-xmlversion.html206290644editdlrm
libxml-xmlwriter.html1174800644editdlrm
libxml-xpath.html650420644editdlrm
libxml-xpathInternals.html1432220644editdlrm
libxml-xpointer.html299750644editdlrm
right.png4720644editdlrm
up.png4060644editdlrm
Edit: /usr/share/doc/libxml2-devel/html/libxml-hash.html (47376B)
Module hash from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module hash from libxml2

API Menu
API Indexes
Related links

This module implements the hash table support used in various places in the library.

Table of Contents

#define XML_CAST_FPTR
Structure xmlHashTable
struct _xmlHashTable The content of this structure is not made public by the API.
Typedef xmlHashTable * xmlHashTablePtr
int	xmlHashAddEntry			(xmlHashTablePtr table, 
const xmlChar * name,
void * userdata)
int	xmlHashAddEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
void * userdata)
int	xmlHashAddEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
void * userdata)
Function type: xmlHashCopier
void *	xmlHashCopier			(void * payload, 
const xmlChar * name)
xmlHashTablePtr	xmlHashCopy		(xmlHashTablePtr table, 
xmlHashCopier f)
xmlHashTablePtr	xmlHashCreate		(int size)
xmlHashTablePtr	xmlHashCreateDict	(int size, 
xmlDictPtr dict)
Function type: xmlHashDeallocator
void	xmlHashDeallocator		(void * payload, 
const xmlChar * name)
void	xmlHashDefaultDeallocator	(void * entry, 
const xmlChar * name)
void	xmlHashFree			(xmlHashTablePtr table, 
xmlHashDeallocator f)
void *	xmlHashLookup			(xmlHashTablePtr table, 
const xmlChar * name)
void *	xmlHashLookup2			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2)
void *	xmlHashLookup3			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3)
void *	xmlHashQLookup			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name)
void *	xmlHashQLookup2			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * prefix2,
const xmlChar * name2)
void *	xmlHashQLookup3			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * prefix2,
const xmlChar * name2,
const xmlChar * prefix3,
const xmlChar * name3)
int	xmlHashRemoveEntry		(xmlHashTablePtr table, 
const xmlChar * name,
xmlHashDeallocator f)
int	xmlHashRemoveEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
xmlHashDeallocator f)
int	xmlHashRemoveEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashDeallocator f)
void	xmlHashScan			(xmlHashTablePtr table, 
xmlHashScanner f,
void * data)
void	xmlHashScan3			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashScanner f,
void * data)
void	xmlHashScanFull			(xmlHashTablePtr table, 
xmlHashScannerFull f,
void * data)
void	xmlHashScanFull3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashScannerFull f,
void * data)
Function type: xmlHashScanner
void	xmlHashScanner			(void * payload, 
void * data,
const xmlChar * name)
Function type: xmlHashScannerFull
void	xmlHashScannerFull		(void * payload, 
void * data,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3)
int	xmlHashSize			(xmlHashTablePtr table)
int	xmlHashUpdateEntry		(xmlHashTablePtr table, 
const xmlChar * name,
void * userdata,
xmlHashDeallocator f)
int	xmlHashUpdateEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
void * userdata,
xmlHashDeallocator f)
int	xmlHashUpdateEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
void * userdata,
xmlHashDeallocator f)

Description

Macro: XML_CAST_FPTR

#define XML_CAST_FPTR

Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) This macro violated ISO C aliasing rules (gcc4 on s390 broke) so it is disabled now

Structure xmlHashTable

Structure xmlHashTable
struct _xmlHashTable { The content of this structure is not made public by the API. }

Function: xmlHashAddEntry

int	xmlHashAddEntry			(xmlHashTablePtr table, 
const xmlChar * name,
void * userdata)

Add the @userdata to the hash @table. This can later be retrieved by using the @name. Duplicate names generate errors.

table:the hash table
name:the name of the userdata
userdata:a pointer to the userdata
Returns:0 the addition succeeded and -1 in case of error.

Function: xmlHashAddEntry2

int	xmlHashAddEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
void * userdata)

Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Duplicate tuples generate errors.

table:the hash table
name:the name of the userdata
name2:a second name of the userdata
userdata:a pointer to the userdata
Returns:0 the addition succeeded and -1 in case of error.

Function: xmlHashAddEntry3

int	xmlHashAddEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
void * userdata)

Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Duplicate entries generate errors.

table:the hash table
name:the name of the userdata
name2:a second name of the userdata
name3:a third name of the userdata
userdata:a pointer to the userdata
Returns:0 the addition succeeded and -1 in case of error.

Function type: xmlHashCopier

Function type: xmlHashCopier
void *	xmlHashCopier			(void * payload, 
const xmlChar * name)

Callback to copy data from a hash.

payload:the data in the hash
name:the name associated
Returns:a copy of the data or NULL in case of error.

Function: xmlHashCopy

xmlHashTablePtr	xmlHashCopy		(xmlHashTablePtr table, 
xmlHashCopier f)

Scan the hash @table and applied @f to each value.

table:the hash table
f:the copier function for items in the hash
Returns:the new table or NULL in case of error.

Function: xmlHashCreate

xmlHashTablePtr	xmlHashCreate		(int size)

Create a new xmlHashTablePtr.

size:the size of the hash table
Returns:the newly created object, or NULL if an error occurred.

Function: xmlHashCreateDict

xmlHashTablePtr	xmlHashCreateDict	(int size, 
xmlDictPtr dict)

Create a new xmlHashTablePtr which will use @dict as the internal dictionary

size:the size of the hash table
dict:a dictionary to use for the hash
Returns:the newly created object, or NULL if an error occurred.

Function type: xmlHashDeallocator

Function type: xmlHashDeallocator
void	xmlHashDeallocator		(void * payload, 
const xmlChar * name)

Callback to free data from a hash.

payload:the data in the hash
name:the name associated

Function: xmlHashDefaultDeallocator

void	xmlHashDefaultDeallocator	(void * entry, 
const xmlChar * name)

Free a hash table entry with xmlFree.

entry:the hash table entry
name:the entry's name

Function: xmlHashFree

void	xmlHashFree			(xmlHashTablePtr table, 
xmlHashDeallocator f)

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

table:the hash table
f:the deallocator function for items in the hash

Function: xmlHashLookup

void *	xmlHashLookup			(xmlHashTablePtr table, 
const xmlChar * name)

Find the userdata specified by the @name.

table:the hash table
name:the name of the userdata
Returns:the pointer to the userdata

Function: xmlHashLookup2

void *	xmlHashLookup2			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2)

Find the userdata specified by the (@name, @name2) tuple.

table:the hash table
name:the name of the userdata
name2:a second name of the userdata
Returns:the pointer to the userdata

Function: xmlHashLookup3

void *	xmlHashLookup3			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3)

Find the userdata specified by the (@name, @name2, @name3) tuple.

table:the hash table
name:the name of the userdata
name2:a second name of the userdata
name3:a third name of the userdata
Returns:the a pointer to the userdata

Function: xmlHashQLookup

void *	xmlHashQLookup			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name)

Find the userdata specified by the QName @prefix:@name/@name.

table:the hash table
prefix:the prefix of the userdata
name:the name of the userdata
Returns:the pointer to the userdata

Function: xmlHashQLookup2

void *	xmlHashQLookup2			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * prefix2,
const xmlChar * name2)

Find the userdata specified by the QNames tuple

table:the hash table
prefix:the prefix of the userdata
name:the name of the userdata
prefix2:the second prefix of the userdata
name2:a second name of the userdata
Returns:the pointer to the userdata

Function: xmlHashQLookup3

void *	xmlHashQLookup3			(xmlHashTablePtr table, 
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * prefix2,
const xmlChar * name2,
const xmlChar * prefix3,
const xmlChar * name3)

Find the userdata specified by the (@name, @name2, @name3) tuple.

table:the hash table
prefix:the prefix of the userdata
name:the name of the userdata
prefix2:the second prefix of the userdata
name2:a second name of the userdata
prefix3:the third prefix of the userdata
name3:a third name of the userdata
Returns:the a pointer to the userdata

Function: xmlHashRemoveEntry

int	xmlHashRemoveEntry		(xmlHashTablePtr table, 
const xmlChar * name,
xmlHashDeallocator f)

Find the userdata specified by the @name and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.

table:the hash table
name:the name of the userdata
f:the deallocator function for removed item (if any)
Returns:0 if the removal succeeded and -1 in case of error or not found.

Function: xmlHashRemoveEntry2

int	xmlHashRemoveEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
xmlHashDeallocator f)

Find the userdata specified by the (@name, @name2) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.

table:the hash table
name:the name of the userdata
name2:a second name of the userdata
f:the deallocator function for removed item (if any)
Returns:0 if the removal succeeded and -1 in case of error or not found.

Function: xmlHashRemoveEntry3

int	xmlHashRemoveEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashDeallocator f)

Find the userdata specified by the (@name, @name2, @name3) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.

table:the hash table
name:the name of the userdata
name2:a second name of the userdata
name3:a third name of the userdata
f:the deallocator function for removed item (if any)
Returns:0 if the removal succeeded and -1 in case of error or not found.

Function: xmlHashScan

void	xmlHashScan			(xmlHashTablePtr table, 
xmlHashScanner f,
void * data)

Scan the hash @table and applied @f to each value.

table:the hash table
f:the scanner function for items in the hash
data:extra data passed to f

Function: xmlHashScan3

void	xmlHashScan3			(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashScanner f,
void * data)

Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.

table:the hash table
name:the name of the userdata or NULL
name2:a second name of the userdata or NULL
name3:a third name of the userdata or NULL
f:the scanner function for items in the hash
data:extra data passed to f

Function: xmlHashScanFull

void	xmlHashScanFull			(xmlHashTablePtr table, 
xmlHashScannerFull f,
void * data)

Scan the hash @table and applied @f to each value.

table:the hash table
f:the scanner function for items in the hash
data:extra data passed to f

Function: xmlHashScanFull3

void	xmlHashScanFull3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
xmlHashScannerFull f,
void * data)

Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.

table:the hash table
name:the name of the userdata or NULL
name2:a second name of the userdata or NULL
name3:a third name of the userdata or NULL
f:the scanner function for items in the hash
data:extra data passed to f

Function type: xmlHashScanner

Function type: xmlHashScanner
void	xmlHashScanner			(void * payload, 
void * data,
const xmlChar * name)

Callback when scanning data in a hash with the simple scanner.

payload:the data in the hash
data:extra scanner data
name:the name associated

Function type: xmlHashScannerFull

Function type: xmlHashScannerFull
void	xmlHashScannerFull		(void * payload, 
void * data,
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3)

Callback when scanning data in a hash with the full scanner.

payload:the data in the hash
data:extra scanner data
name:the name associated
name2:the second name associated
name3:the third name associated

Function: xmlHashSize

int	xmlHashSize			(xmlHashTablePtr table)

Query the number of elements installed in the hash @table.

table:the hash table
Returns:the number of elements in the hash table or -1 in case of error

Function: xmlHashUpdateEntry

int	xmlHashUpdateEntry		(xmlHashTablePtr table, 
const xmlChar * name,
void * userdata,
xmlHashDeallocator f)

Add the @userdata to the hash @table. This can later be retrieved by using the @name. Existing entry for this @name will be removed and freed with @f if found.

table:the hash table
name:the name of the userdata
userdata:a pointer to the userdata
f:the deallocator function for replaced item (if any)
Returns:0 the addition succeeded and -1 in case of error.

Function: xmlHashUpdateEntry2

int	xmlHashUpdateEntry2		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
void * userdata,
xmlHashDeallocator f)

Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Existing entry for this tuple will be removed and freed with @f if found.

table:the hash table
name:the name of the userdata
name2:a second name of the userdata
userdata:a pointer to the userdata
f:the deallocator function for replaced item (if any)
Returns:0 the addition succeeded and -1 in case of error.

Function: xmlHashUpdateEntry3

int	xmlHashUpdateEntry3		(xmlHashTablePtr table, 
const xmlChar * name,
const xmlChar * name2,
const xmlChar * name3,
void * userdata,
xmlHashDeallocator f)

Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Existing entry for this tuple will be removed and freed with @f if found.

table:the hash table
name:the name of the userdata
name2:a second name of the userdata
name3:a third name of the userdata
userdata:a pointer to the userdata
f:the deallocator function for replaced item (if any)
Returns:0 the addition succeeded and -1 in case of error.

Daniel Veillard