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

Function xmlGetPredefinedEntity

ThirdParty/libxml2/vtklibxml2/entities.c:306–332  ·  view source on GitHub ↗

* xmlGetPredefinedEntity: * @name: the entity name * * Check whether this name is an predefined entity. * * Returns NULL if not, otherwise the entity */

Source from the content-addressed store, hash-verified

304 * Returns NULL if not, otherwise the entity
305 */
306xmlEntityPtr
307xmlGetPredefinedEntity(const xmlChar *name) {
308 if (name == NULL) return(NULL);
309 switch (name[0]) {
310 case 'l':
311 if (xmlStrEqual(name, BAD_CAST "lt"))
312 return(&xmlEntityLt);
313 break;
314 case 'g':
315 if (xmlStrEqual(name, BAD_CAST "gt"))
316 return(&xmlEntityGt);
317 break;
318 case 'a':
319 if (xmlStrEqual(name, BAD_CAST "amp"))
320 return(&xmlEntityAmp);
321 if (xmlStrEqual(name, BAD_CAST "apos"))
322 return(&xmlEntityApos);
323 break;
324 case 'q':
325 if (xmlStrEqual(name, BAD_CAST "quot"))
326 return(&xmlEntityQuot);
327 break;
328 default:
329 break;
330 }
331 return(NULL);
332}
333
334/**
335 * xmlAddDtdEntity:

Callers 4

xmlSAX2GetEntityFunction · 0.85
xmlAddEntityFunction · 0.85
xmlGetDocEntityFunction · 0.85
xmlLookupGeneralEntityFunction · 0.85

Calls 1

xmlStrEqualFunction · 0.85

Tested by

no test coverage detected