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

Function xmlBufGetEntityRefContent

ThirdParty/libxml2/vtklibxml2/tree.c:5532–5561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5530}
5531
5532static void
5533xmlBufGetEntityRefContent(xmlBufPtr buf, const xmlNode *ref) {
5534 xmlEntityPtr ent;
5535
5536 if (ref->children != NULL) {
5537 ent = (xmlEntityPtr) ref->children;
5538 } else {
5539 /* lookup entity declaration */
5540 ent = xmlGetDocEntity(ref->doc, ref->name);
5541 if (ent == NULL)
5542 return;
5543 }
5544
5545 /*
5546 * The parser should always expand predefined entities but it's
5547 * possible to create references to predefined entities using
5548 * the tree API.
5549 */
5550 if (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY) {
5551 xmlBufCat(buf, ent->content);
5552 return;
5553 }
5554
5555 if (ent->flags & XML_ENT_EXPANDING)
5556 return;
5557
5558 ent->flags |= XML_ENT_EXPANDING;
5559 xmlBufGetChildContent(buf, (xmlNodePtr) ent);
5560 ent->flags &= ~XML_ENT_EXPANDING;
5561}
5562
5563static void
5564xmlBufGetChildContent(xmlBufPtr buf, const xmlNode *tree) {

Callers 2

xmlBufGetChildContentFunction · 0.85
xmlBufGetNodeContentFunction · 0.85

Calls 3

xmlGetDocEntityFunction · 0.85
xmlBufCatFunction · 0.85
xmlBufGetChildContentFunction · 0.85

Tested by

no test coverage detected