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

Function xmlBufDumpElementDecl

ThirdParty/libxml2/vtklibxml2/xmlsave.c:569–596  ·  view source on GitHub ↗

* xmlBufDumpElementDecl: * @buf: an xmlBufPtr output * @elem: An element table * * This will dump the content of the element declaration as an XML * DTD definition */

Source from the content-addressed store, hash-verified

567 * DTD definition
568 */
569static void
570xmlBufDumpElementDecl(xmlOutputBufferPtr buf, xmlElementPtr elem) {
571 xmlOutputBufferWrite(buf, 10, "<!ELEMENT ");
572 if (elem->prefix != NULL) {
573 xmlOutputBufferWriteString(buf, (const char *) elem->prefix);
574 xmlOutputBufferWrite(buf, 1, ":");
575 }
576 xmlOutputBufferWriteString(buf, (const char *) elem->name);
577 xmlOutputBufferWrite(buf, 1, " ");
578
579 switch (elem->etype) {
580 case XML_ELEMENT_TYPE_EMPTY:
581 xmlOutputBufferWrite(buf, 5, "EMPTY");
582 break;
583 case XML_ELEMENT_TYPE_ANY:
584 xmlOutputBufferWrite(buf, 3, "ANY");
585 break;
586 case XML_ELEMENT_TYPE_MIXED:
587 case XML_ELEMENT_TYPE_ELEMENT:
588 xmlBufDumpElementContent(buf, elem->content);
589 break;
590 default:
591 /* assert(0); */
592 break;
593 }
594
595 xmlOutputBufferWrite(buf, 2, ">\n");
596}
597
598/**
599 * xmlBufDumpEnumeration:

Callers 2

xhtmlNodeDumpOutputFunction · 0.85

Calls 3

xmlOutputBufferWriteFunction · 0.85
xmlBufDumpElementContentFunction · 0.85

Tested by

no test coverage detected