/usr/share/doc/libxml2-devel/html
NameSizeModeActions
book1.html96340644editdlrm
home.png6540644editdlrm
index.html96340644editdlrm
left.png4590644editdlrm
libxml-c14n.html180530644editdlrm
libxml-catalog.html410180644editdlrm
libxml-chvalid.html184210644editdlrm
libxml-debugXML.html379100644editdlrm
libxml-dict.html179440644editdlrm
libxml-DOCBparser.html206230644editdlrm
libxml-encoding.html347040644editdlrm
libxml-entities.html276870644editdlrm
libxml-globals.html330860644editdlrm
libxml-hash.html465390644editdlrm
libxml-HTMLparser.html599840644editdlrm
libxml-HTMLtree.html285990644editdlrm
libxml-lib.html96340644editdlrm
libxml-list.html301070644editdlrm
libxml-nanoftp.html270850644editdlrm
libxml-nanohttp.html212220644editdlrm
libxml-parser.html1463390644editdlrm
libxml-parserInternals.html1226640644editdlrm
libxml-pattern.html236710644editdlrm
libxml-relaxng.html410000644editdlrm
libxml-SAX.html434800644editdlrm
libxml-SAX2.html444490644editdlrm
libxml-schemasInternals.html640570644editdlrm
libxml-schematron.html217270644editdlrm
libxml-threads.html171590644editdlrm
libxml-tree.html2354420644editdlrm
libxml-uri.html226760644editdlrm
libxml-valid.html1024570644editdlrm
libxml-xinclude.html197040644editdlrm
libxml-xlink.html216440644editdlrm
libxml-xmlautomata.html395640644editdlrm
libxml-xmlerror.html1097000644editdlrm
libxml-xmlexports.html75890644editdlrm
libxml-xmlIO.html633120644editdlrm
libxml-xmlmemory.html292250644editdlrm
libxml-xmlmodule.html117090644editdlrm
libxml-xmlreader.html1141360644editdlrm
libxml-xmlregexp.html457830644editdlrm
libxml-xmlsave.html192850644editdlrm
libxml-xmlschemas.html477700644editdlrm
libxml-xmlschemastypes.html493740644editdlrm
libxml-xmlstring.html391560644editdlrm
libxml-xmlunicode.html1128500644editdlrm
libxml-xmlversion.html205630644editdlrm
libxml-xmlwriter.html1174770644editdlrm
libxml-xpath.html650230644editdlrm
libxml-xpathInternals.html1431260644editdlrm
libxml-xpointer.html299730644editdlrm
libxml-xzlib.html65330644editdlrm
right.png4720644editdlrm
up.png4060644editdlrm
Edit: /usr/share/doc/libxml2-devel/html/libxml-entities.html (27687B)
Module entities from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module entities from libxml2

API Menu
API Indexes
Related links

this module provides some of the entity API needed for the parser and applications.

Table of Contents

Structure xmlEntitiesTable
struct _xmlHashTable The content of this structure is not made public by the API.
Typedef xmlEntitiesTable * xmlEntitiesTablePtr
Enum xmlEntityType
xmlEntityPtr	xmlAddDocEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)
xmlEntityPtr	xmlAddDtdEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)
void	xmlCleanupPredefinedEntities	(void)
xmlEntitiesTablePtr	xmlCopyEntitiesTable	(xmlEntitiesTablePtr table)
xmlEntitiesTablePtr	xmlCreateEntitiesTable	(void)
void	xmlDumpEntitiesTable		(xmlBufferPtr buf, 
xmlEntitiesTablePtr table)
void	xmlDumpEntityDecl		(xmlBufferPtr buf, 
xmlEntityPtr ent)
const xmlChar *	xmlEncodeEntities	(xmlDocPtr doc, 
const xmlChar * input)
xmlChar *	xmlEncodeEntitiesReentrant	(xmlDocPtr doc, 
const xmlChar * input)
xmlChar *	xmlEncodeSpecialChars	(const xmlDoc * doc, 
const xmlChar * input)
void	xmlFreeEntitiesTable		(xmlEntitiesTablePtr table)
xmlEntityPtr	xmlGetDocEntity		(const xmlDoc * doc, 
const xmlChar * name)
xmlEntityPtr	xmlGetDtdEntity		(xmlDocPtr doc, 
const xmlChar * name)
xmlEntityPtr	xmlGetParameterEntity	(xmlDocPtr doc, 
const xmlChar * name)
xmlEntityPtr	xmlGetPredefinedEntity	(const xmlChar * name)
void	xmlInitializePredefinedEntities	(void)
xmlEntityPtr	xmlNewEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)

Description

Structure xmlEntitiesTable

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

Enum xmlEntityType

Enum xmlEntityType {
    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
}

Function: xmlAddDocEntity

xmlEntityPtr	xmlAddDocEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * 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

Function: xmlAddDtdEntity

xmlEntityPtr	xmlAddDtdEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * 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

Function: xmlCleanupPredefinedEntities

void	xmlCleanupPredefinedEntities	(void)

Cleanup up the predefined entities table. Deprecated call

Function: xmlCopyEntitiesTable

xmlEntitiesTablePtr	xmlCopyEntitiesTable	(xmlEntitiesTablePtr table)

Build a copy of an entity table.

table:An entity table
Returns:the new xmlEntitiesTablePtr or NULL in case of error.

Function: xmlCreateEntitiesTable

xmlEntitiesTablePtr	xmlCreateEntitiesTable	(void)

create and initialize an empty entities hash table. This really doesn't make sense and should be deprecated

Returns:the xmlEntitiesTablePtr just created or NULL in case of error.

Function: xmlDumpEntitiesTable

void	xmlDumpEntitiesTable		(xmlBufferPtr buf, 
xmlEntitiesTablePtr table)

This will dump the content of the entity table as an XML DTD definition

buf:An XML buffer.
table:An entity table

Function: xmlDumpEntityDecl

void	xmlDumpEntityDecl		(xmlBufferPtr buf, 
xmlEntityPtr ent)

This will dump the content of the entity table as an XML DTD definition

buf:An XML buffer.
ent:An entity table

Function: xmlEncodeEntities

const xmlChar *	xmlEncodeEntities	(xmlDocPtr doc, 
const xmlChar * input)

TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to xmlEncodeEntitiesReentrant ! This routine will issue a warning when encountered.

doc:the document containing the string
input:A string to convert to XML.
Returns:NULL

Function: xmlEncodeEntitiesReentrant

xmlChar *	xmlEncodeEntitiesReentrant	(xmlDocPtr doc, 
const xmlChar * 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.

Function: xmlEncodeSpecialChars

xmlChar *	xmlEncodeSpecialChars	(const xmlDoc * doc, 
const xmlChar * 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.

Function: xmlFreeEntitiesTable

void	xmlFreeEntitiesTable		(xmlEntitiesTablePtr table)

Deallocate the memory used by an entities hash table.

table:An entity table

Function: xmlGetDocEntity

xmlEntityPtr	xmlGetDocEntity		(const xmlDoc * doc, 
const xmlChar * 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.

Function: xmlGetDtdEntity

xmlEntityPtr	xmlGetDtdEntity		(xmlDocPtr doc, 
const xmlChar * 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.

Function: xmlGetParameterEntity

xmlEntityPtr	xmlGetParameterEntity	(xmlDocPtr doc, 
const xmlChar * 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.

Function: xmlGetPredefinedEntity

xmlEntityPtr	xmlGetPredefinedEntity	(const xmlChar * name)

Check whether this name is an predefined entity.

name:the entity name
Returns:NULL if not, otherwise the entity

Function: xmlInitializePredefinedEntities

void	xmlInitializePredefinedEntities	(void)

Set up the predefined entities. Deprecated call

Function: xmlNewEntity

xmlEntityPtr	xmlNewEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)

Create a new entity, this differs from xmlAddDocEntity() that if the document is NULL or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsability of the caller to link it to the document later or free it when not needed anymore.

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

Daniel Veillard