  
    
    
    
    
    
    
    
  
  
    
      
        
          
libxml2-encoding.html            
Prev          
        
        
          
general.html            
Up          
        
        
          
index.html            
Home          
        
        
          
libxml2-globals.html            
Next          
        
        
libxml2 Reference Manual      
    
    
      
entities    
    
entities - interface for the XML entities handling
    
this module provides some of the entity API needed for the parser and applications. 
    
Author(s): Daniel Veillard 
    
      
Synopsis
      
typedef enum #xmlEntityTypexmlEntityType ;
typedef struct _xmlHashTable 
#xmlEntitiesTablexmlEntitiesTable ;
typedef 
libxml2-entities.html#xmlEntitiesTablexmlEntitiesTable  * #xmlEntitiesTablePtrxmlEntitiesTablePtr ;
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	#xmlAddDocEntityxmlAddDocEntity 		( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 int type, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * ExternalID, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * SystemID, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * content);
libxml2-xmlstring.html#xmlCharxmlChar  *	#xmlEncodeEntitiesReentrantxmlEncodeEntitiesReentrant 	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 						 const libxml2-xmlstring.html#xmlCharxmlChar  * input);
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	#xmlGetDocEntityxmlGetDocEntity 		( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name);
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	#xmlGetDtdEntityxmlGetDtdEntity 		( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name);
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	#xmlAddDtdEntityxmlAddDtdEntity 		( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 int type, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * ExternalID, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * SystemID, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * content);
libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr 	#xmlCopyEntitiesTablexmlCopyEntitiesTable 	( libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr  table);
void	
#xmlFreeEntitiesTablexmlFreeEntitiesTable 		( libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr  table);
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	#xmlGetParameterEntityxmlGetParameterEntity 	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name);
void	
#xmlDumpEntitiesTablexmlDumpEntitiesTable 		( libxml2-tree.html#xmlBufferPtrxmlBufferPtr  buf, 					 libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr  table);
void	
#xmlDumpEntityDeclxmlDumpEntityDecl 		( libxml2-tree.html#xmlBufferPtrxmlBufferPtr  buf, 					 libxml2-tree.html#xmlEntityPtrxmlEntityPtr  ent);
void	
#xmlCleanupPredefinedEntitiesxmlCleanupPredefinedEntities 	(void);
libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr 	#xmlCreateEntitiesTablexmlCreateEntitiesTable 	(void);
const 
libxml2-xmlstring.html#xmlCharxmlChar  *	#xmlEncodeEntitiesxmlEncodeEntities 	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * input);
libxml2-xmlstring.html#xmlCharxmlChar  *	#xmlEncodeSpecialCharsxmlEncodeSpecialChars 	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * input);
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	#xmlGetPredefinedEntityxmlGetPredefinedEntity 	(const libxml2-xmlstring.html#xmlCharxmlChar  * name);
void	
#xmlInitializePredefinedEntitiesxmlInitializePredefinedEntities 	(void);
    
    
      
Description
    
    
      
Details
      
        
Structure xmlEntitiesTable
struct _xmlHashTable {
The content of this structure is not made public by the API.
} xmlEntitiesTable;
        
        
Typedef xmlEntitiesTablePtr
libxml2-entities.html#xmlEntitiesTablexmlEntitiesTable  * xmlEntitiesTablePtr;
        
        
Enum xmlEntityType
enum #xmlEntityTypexmlEntityType  {
    
XML_INTERNAL_GENERAL_ENTITY  = 1
    
XML_EXTERNAL_GENERAL_PARSED_ENTITY  = 2
    
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY  = 3
    
XML_INTERNAL_PARAMETER_ENTITY  = 4
    
XML_EXTERNAL_PARAMETER_ENTITY  = 5
    
XML_INTERNAL_PREDEFINED_ENTITY  = 6
};
        
        
xmlAddDocEntity ()
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	xmlAddDocEntity		( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 int type, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * ExternalID, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * SystemID, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * content)Register a new entity for this document.
doc: the document name: the entity name type: the entity type XML_xxx_yyy_ENTITY ExternalID: the entity external ID if available SystemID: the entity system ID if available content: the entity content Returns: a pointer to the entity or NULL in case of error         
        
xmlAddDtdEntity ()
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	xmlAddDtdEntity		( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 int type, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * ExternalID, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * SystemID, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * content)Register a new entity for this document DTD external subset.
doc: the document name: the entity name type: the entity type XML_xxx_yyy_ENTITY ExternalID: the entity external ID if available SystemID: the entity system ID if available content: the entity content Returns: a pointer to the entity or NULL in case of error         
        
xmlCleanupPredefinedEntities ()
void	xmlCleanupPredefinedEntities	(void)Cleanup up the predefined entities table. Deprecated call
        
        
xmlCopyEntitiesTable ()
libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr 	xmlCopyEntitiesTable	( libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr  table)Build a copy of an entity table.
table: An entity table Returns: the new libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr  or NULL in case of error.         
        
xmlCreateEntitiesTable ()
libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr 	xmlCreateEntitiesTable	(void)create and initialize an empty entities hash table. This really doesn't make sense and should be deprecated
Returns: the libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr  just created or NULL in case of error.         
        
xmlDumpEntitiesTable ()
void	xmlDumpEntitiesTable		( libxml2-tree.html#xmlBufferPtrxmlBufferPtr  buf, 					 libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr  table)This will dump the content of the entity table as an XML DTD definition
buf: An XML buffer. table: An entity table         
        
xmlDumpEntityDecl ()
void	xmlDumpEntityDecl		( libxml2-tree.html#xmlBufferPtrxmlBufferPtr  buf, 					 libxml2-tree.html#xmlEntityPtrxmlEntityPtr  ent)This will dump the content of the entity table as an XML DTD definition
buf: An XML buffer. ent: An entity table         
        
xmlEncodeEntities ()
const libxml2-xmlstring.html#xmlCharxmlChar  *	xmlEncodeEntities	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * input)TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to libxml2-entities.html#xmlEncodeEntitiesReentrantxmlEncodeEntitiesReentrant  ! This routine will issue a warning when encountered.
doc: the document containing the string input: A string to convert to XML. Returns: NULL         
        
xmlEncodeEntitiesReentrant ()
libxml2-xmlstring.html#xmlCharxmlChar  *	xmlEncodeEntitiesReentrant	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 						 const libxml2-xmlstring.html#xmlCharxmlChar  * input)Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. Contrary to xmlEncodeEntities, this routine is reentrant, and result must be deallocated.
doc: the document containing the string input: A string to convert to XML. Returns: A newly allocated string with the substitution done.         
        
xmlEncodeSpecialChars ()
libxml2-xmlstring.html#xmlCharxmlChar  *	xmlEncodeSpecialChars	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * input)Do a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated.
doc: the document containing the string input: A string to convert to XML. Returns: A newly allocated string with the substitution done.         
        
xmlFreeEntitiesTable ()
void	xmlFreeEntitiesTable		( libxml2-entities.html#xmlEntitiesTablePtrxmlEntitiesTablePtr  table)Deallocate the memory used by an entities hash table.
table: An entity table         
        
xmlGetDocEntity ()
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	xmlGetDocEntity		( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name)Do an entity lookup in the document entity hash table and
doc: the document referencing the entity name: the entity name Returns: the corresponding entity, otherwise a lookup is done in the predefined entities too. Returns A pointer to the entity structure or NULL if not found.         
        
xmlGetDtdEntity ()
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	xmlGetDtdEntity		( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name)Do an entity lookup in the DTD entity hash table and
doc: the document referencing the entity name: the entity name Returns: the corresponding entity, if found. Note: the first argument is the document node, not the DTD node. Returns A pointer to the entity structure or NULL if not found.         
        
xmlGetParameterEntity ()
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	xmlGetParameterEntity	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name)Do an entity lookup in the internal and external subsets and
doc: the document referencing the entity name: the entity name Returns: the corresponding parameter entity, if found. Returns A pointer to the entity structure or NULL if not found.         
        
xmlGetPredefinedEntity ()
libxml2-tree.html#xmlEntityPtrxmlEntityPtr 	xmlGetPredefinedEntity	(const libxml2-xmlstring.html#xmlCharxmlChar  * name)Check whether this name is an predefined entity.
name: the entity name Returns: NULL if not, otherwise the entity         
        
xmlInitializePredefinedEntities ()
void	xmlInitializePredefinedEntities	(void)Set up the predefined entities. Deprecated call
        
      
    
  
