MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlGetDocEntity

Function xmlGetDocEntity

ThirdParty/libxml2/vtklibxml2/entities.c:490–513  ·  view source on GitHub ↗

* xmlGetDocEntity: * @doc: the document referencing the entity * @name: the entity name * * Do an entity lookup in the document entity hash table and * 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. */

Source from the content-addressed store, hash-verified

488 * Returns A pointer to the entity structure or NULL if not found.
489 */
490xmlEntityPtr
491xmlGetDocEntity(const xmlDoc *doc, const xmlChar *name) {
492 xmlEntityPtr cur;
493 xmlEntitiesTablePtr table;
494
495 if (doc != NULL) {
496 if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) {
497 table = (xmlEntitiesTablePtr) doc->intSubset->entities;
498 cur = xmlGetEntityFromTable(table, name);
499 if (cur != NULL)
500 return(cur);
501 }
502 if (doc->standalone != 1) {
503 if ((doc->extSubset != NULL) &&
504 (doc->extSubset->entities != NULL)) {
505 table = (xmlEntitiesTablePtr) doc->extSubset->entities;
506 cur = xmlGetEntityFromTable(table, name);
507 if (cur != NULL)
508 return(cur);
509 }
510 }
511 }
512 return(xmlGetPredefinedEntity(name));
513}
514
515/*
516 * Macro used to grow the current buffer.

Callers 11

xmlSAX2GetEntityFunction · 0.85
xmlNewReferenceFunction · 0.85
xmlNodeSetDocFunction · 0.85
xmlStaticCopyNodeFunction · 0.85
xmlDOMWrapCloneNodeFunction · 0.85
xmlSchemaValAtomicTypeFunction · 0.85
xmlXIncludeMergeEntityFunction · 0.85
xmlCtxtDumpOneNodeFunction · 0.85

Calls 2

xmlGetEntityFromTableFunction · 0.85
xmlGetPredefinedEntityFunction · 0.85

Tested by

no test coverage detected