/opt/xml2/share/gtk-doc/html/libxml2
NameSizeModeActions
general.html54700644editdlrm
home.png6540644editdlrm
index.html43210644editdlrm
left.png4590644editdlrm
libxml2-c14n.html135460644editdlrm
libxml2-catalog.html365490644editdlrm
libxml2-chvalid.html198350644editdlrm
libxml2-debugXML.html333170644editdlrm
libxml2-dict.html135820644editdlrm
libxml2-DOCBparser.html173610644editdlrm
libxml2-encoding.html295150644editdlrm
libxml2-entities.html231260644editdlrm
libxml2-globals.html356420644editdlrm
libxml2-hash.html420550644editdlrm
libxml2-HTMLparser.html580950644editdlrm
libxml2-HTMLtree.html244160644editdlrm
libxml2-list.html255680644editdlrm
libxml2-nanoftp.html224030644editdlrm
libxml2-nanohttp.html166140644editdlrm
libxml2-parser.html1374950644editdlrm
libxml2-parserInternals.html1253570644editdlrm
libxml2-pattern.html193620644editdlrm
libxml2-relaxng.html352300644editdlrm
libxml2-SAX.html388750644editdlrm
libxml2-SAX2.html396590644editdlrm
libxml2-schemasInternals.html651190644editdlrm
libxml2-schematron.html171050644editdlrm
libxml2-threads.html128960644editdlrm
libxml2-tree.html2344020644editdlrm
libxml2-uri.html184340644editdlrm
libxml2-valid.html985040644editdlrm
libxml2-xinclude.html159200644editdlrm
libxml2-xlink.html173290644editdlrm
libxml2-xmlautomata.html351790644editdlrm
libxml2-xmlerror.html847130644editdlrm
libxml2-xmlexports.html35850644editdlrm
libxml2-xmlIO.html574960644editdlrm
libxml2-xmlmemory.html240120644editdlrm
libxml2-xmlmodule.html73700644editdlrm
libxml2-xmlreader.html1080930644editdlrm
libxml2-xmlregexp.html420130644editdlrm
libxml2-xmlsave.html148420644editdlrm
libxml2-xmlschemas.html425210644editdlrm
libxml2-xmlschemastypes.html444510644editdlrm
libxml2-xmlstring.html351130644editdlrm
libxml2-xmlunicode.html1065960644editdlrm
libxml2-xmlversion.html190260644editdlrm
libxml2-xmlwriter.html1120770644editdlrm
libxml2-xpath.html622850644editdlrm
libxml2-xpathInternals.html1449130644editdlrm
libxml2-xpointer.html254530644editdlrm
libxml2.devhelp3431850644editdlrm
right.png4720644editdlrm
style.css8200644editdlrm
up.png4060644editdlrm
Edit: /opt/xml2/share/gtk-doc/html/libxml2/libxml2-entities.html (23126B)
entities: interface for the XML entities handling

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 xmlEntityType;
typedef struct _xmlHashTable xmlEntitiesTable;
typedef xmlEntitiesTable * xmlEntitiesTablePtr;
xmlEntityPtr	xmlAddDocEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content); xmlEntityPtr xmlNewEntity (xmlDocPtr doc,
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content); xmlChar * xmlEncodeEntitiesReentrant (xmlDocPtr doc,
const xmlChar * input); xmlEntityPtr xmlGetDocEntity (const xmlDoc * doc,
const xmlChar * name); xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar * name); xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc,
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar * name); void xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table); void xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent); void xmlCleanupPredefinedEntities (void); xmlEntitiesTablePtr xmlCreateEntitiesTable (void); const xmlChar * xmlEncodeEntities (xmlDocPtr doc,
const xmlChar * input); xmlChar * xmlEncodeSpecialChars (const xmlDoc * doc,
const xmlChar * input); xmlEntityPtr xmlGetPredefinedEntity (const xmlChar * name); void xmlInitializePredefinedEntities (void);

Description

Details

Structure xmlEntitiesTable

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


Typedef xmlEntitiesTablePtr

xmlEntitiesTable * xmlEntitiesTablePtr;



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

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


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.

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.

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

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

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

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.

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.

xmlFreeEntitiesTable ()

void	xmlFreeEntitiesTable		(xmlEntitiesTablePtr table)

Deallocate the memory used by an entities hash table.

table:An entity table

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.

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.

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.

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


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