  
    
    
    
    
    
    
    
  
  
    
      
        
          
libxml2-debugXML.html            
Prev          
        
        
          
general.html            
Up          
        
        
          
index.html            
Home          
        
        
          
libxml2-encoding.html            
Next          
        
        
libxml2 Reference Manual      
    
    
      
dict    
    
dict - string dictionnary
    
dictionary of reusable strings, just used to avoid allocation and freeing operations. 
    
Author(s): Daniel Veillard 
    
      
Synopsis
      
typedef struct _xmlDict #xmlDictxmlDict ;
typedef 
libxml2-dict.html#xmlDictxmlDict  * #xmlDictPtrxmlDictPtr ;
int	
#xmlDictReferencexmlDictReference 		( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict);
void	
#xmlDictCleanupxmlDictCleanup 			(void);
int	
#xmlDictSizexmlDictSize 			( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict);
const 
libxml2-xmlstring.html#xmlCharxmlChar  *	#xmlDictExistsxmlDictExists 		( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 int len);
int	
#xmlDictOwnsxmlDictOwns 			( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * str);
const 
libxml2-xmlstring.html#xmlCharxmlChar  *	#xmlDictQLookupxmlDictQLookup 		( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * prefix, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name);
libxml2-dict.html#xmlDictPtrxmlDictPtr 	#xmlDictCreateSubxmlDictCreateSub 	( libxml2-dict.html#xmlDictPtrxmlDictPtr  sub);
void	
#xmlDictFreexmlDictFree 			( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict);
const 
libxml2-xmlstring.html#xmlCharxmlChar  *	#xmlDictLookupxmlDictLookup 		( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 int len);
libxml2-dict.html#xmlDictPtrxmlDictPtr 	#xmlDictCreatexmlDictCreate 		(void);
    
    
      
Description
    
    
      
Details
      
        
Structure xmlDict
struct _xmlDict {
The content of this structure is not made public by the API.
} xmlDict;
        
        
Typedef xmlDictPtr
libxml2-dict.html#xmlDictxmlDict  * xmlDictPtr;
        
        
xmlDictCleanup ()
void	xmlDictCleanup			(void)Free the dictionary mutex.
        
        
xmlDictCreate ()
libxml2-dict.html#xmlDictPtrxmlDictPtr 	xmlDictCreate		(void)Create a new dictionary
Returns: the newly created dictionnary, or NULL if an error occured.         
        
xmlDictCreateSub ()
libxml2-dict.html#xmlDictPtrxmlDictPtr 	xmlDictCreateSub	( libxml2-dict.html#xmlDictPtrxmlDictPtr  sub)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.
sub: an existing dictionnary Returns: the newly created dictionnary, or NULL if an error occured.         
        
xmlDictExists ()
const libxml2-xmlstring.html#xmlCharxmlChar  *	xmlDictExists		( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 int len)Check if the @name exists in the dictionnary @dict.
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 if not found.         
        
xmlDictFree ()
void	xmlDictFree			( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict)Free the hash @dict and its contents. The userdata is deallocated with @f if provided.
dict: the dictionnary         
        
xmlDictLookup ()
const libxml2-xmlstring.html#xmlCharxmlChar  *	xmlDictLookup		( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 int len)Add the @name to the dictionnary @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         
        
xmlDictOwns ()
int	xmlDictOwns			( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * 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         
        
xmlDictQLookup ()
const libxml2-xmlstring.html#xmlCharxmlChar  *	xmlDictQLookup		( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * prefix, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * 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         
        
xmlDictReference ()
int	xmlDictReference		( libxml2-dict.html#xmlDictPtrxmlDictPtr  dict)Increment the libxml2-SAX.html#referencereference  counter of a dictionary
dict: the dictionnary Returns: 0 in case of success and -1 in case of error         
        
xmlDictSize ()
int	xmlDictSize			( libxml2-dict.html#xmlDictPtrxmlDictPtr  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         
      
    
  
